symba (Symbian Books), страница 13

PDF-файл symba (Symbian Books), страница 13 Основы автоматизированного проектирования (ОАП) (17704): Книга - 3 семестрsymba (Symbian Books) - PDF, страница 13 (17704) - СтудИзба2018-01-10СтудИзба

Описание файла

Файл "symba" внутри архива находится в папке "Symbian Books". PDF-файл из архива "Symbian Books", который расположен в категории "". Всё это находится в предмете "основы автоматизированного проектирования (оап)" из 3 семестр, которые можно найти в файловом архиве МГТУ им. Н.Э.Баумана. Не смотря на прямую связь этого архива с МГТУ им. Н.Э.Баумана, его также можно найти и в других разделах. Архив можно найти в разделе "книги и методические указания", в предмете "основы автоматизированного производства (оап)" в общих файлах.

Просмотр PDF-файла онлайн

Текст 13 страницы из PDF

If morethan one client is requesting control, then a priority calculation is usedto determine which client should have it. Higher priority clients takeownership from lower priority clients when they contend for use of thecamera.There are two parts that make up a client’s priority value:• Clients may declare themselves to have a priority from −100 to 100.The default priority is zero.• Clients with MultimediaDD capability take priority ahead of clientswithout that capability, regardless of the declared priority values.A camera implementation may use additional prioritization decisions,such as prioritizing a particular process ID.

However the API does notassume any camera policy for this, as it is implementation-specific.The CCamera::Reserve() call is unsuccessful if a higher priorityclient is already using the camera: the MCameraObserver2::HandleEvent() callback returns an error.If a client is superseded by another, it receives a MCameraObserver2::HandleEvent() notification that the camera is no longer available. It should expect no further callbacks for outstanding capturerequests or notifications for pending custom extended operations (histograms, snapshots, etc.) and further attempts to use the camera withouta successful CCamera::Reserve() call will fail.3.3.1 Power ControlOnce a camera object is available, the client application needs to switchon the camera power, using CCamera::PowerOn(). The callbackinterface is notified when power on is complete.

Once the power-oncallback is received, the camera is ready to be used and the client canstart setting up the viewfinder or capturing images.As continuous camera use can drain the battery, the camera should beswitched off whenever it is not in use, by calling CCamera::PowerOff().40THE ONBOARD CAMERAIn addition, the viewfinder should have a timeout since this, in particular,will drain the battery.void CCameraAppUi::HandleCommandL(TInt aCommand){switch (aCommand){// An example AppUI command to start the camera examplecase ECommandCameraOn:{// Reserve the cameraiCamera->Reserve();}break;}}//Handle event method from MCameraObserver2void CCameraAppUi::HandleEvent(const TECAMEvent& aEvent){if (aEvent.iEventType == KUidECamEventReserveComplete){if (aEvent.iErrorCode == KErrNone){iCamera->PowerOn();}else//report error to user}else if (aEvent.iEventType == KUidECamEventPowerOnComplete){if (aEvent.iErrorCode == KErrNone){// camera now ready for use}else//report error to user}}// from MCameraObservervoid CCameraDemoAppUi::ReserveComplete(TInt aError){if (aError == KErrNone){iCamera->PowerOn();}else{// handle error}}void CCameraDemoAppUi::PowerOnComplete(TInt aError){if (aError == KErrNone){// camera now ready for use}}CAMERA CONTROL413.3.2 Basic Image SettingsThe CCamera class allows access to the camera’s settings.

It providesfunctions that allow you to select the image format and to alter brightness,contrast, zoom, exposure, flash and white balance levels of the cameraimage. Before using such functions though, you should test that thecamera supports what you want.

To do this, get a TCameraInfo objectusing the CameraInfo() function. The object’s iOptionsSupportedmember is a bitfield of flags that describe which options are supportedby the camera.Image FormatBefore a client application captures still or video images it can first specifythe required image format. There may be complicated dependenciesbetween frame sizes and formats, so the required format must be specifiedas follows:1. Select the format from those available from either the TCameraInfo::iImageFormatsSupported or TCameraInfo::iVideoFrameFormatsSupported bitfields, for still or video imagesrespectively.2.

Select the required size using either CCamera::EnumerateCaptureSizes() or CCamera::EnumerateVideoFrameSizes()for still or video images respectively. Note that not all possible sizesare guaranteed to be supported for any given format. Unsupportedsizes are returned as (0,0).3. For video capture, select the frame rate using CCamera::EnumerateVideoFrameRates(). Again, not all rates are guaranteed tobe supported, as dependencies may exist in the camera between theformat, size, exposure mode and rate.BrightnessTo alter the camera image brightness:1. Check if brightness control is supported, by testing if the TCameraInfo::EBrightnessSupported flag is set in the options.2.

Set the brightness using CCamera::SetBrightnessL().3. The brightness should be in the range −100 to +100. To set thebrightness automatically, use the flag CCamera::EBrightnessAuto.TBool brightnessSupported = info.iOptionsSupported &TCameraInfo::EBrightnessSupported;42THE ONBOARD CAMERAif (brightnessSupported){iCamera->SetBrightnessL(CCamera::EBrightnessAuto);}ContrastTo alter the camera image contrast:1.Check if contrast control is supported, by testing if the TCameraInfo::EContrastSupported flag is set in the options.2.Set the contrast using CCamera::SetContrastL().

The contrast should be in the range −100 to +100. To set the contrastautomatically, use the flag CCamera::EContrastAuto.TBool contrastSupported = info.iOptionsSupported &TCameraInfo::EContrastSupported;if (contrastSupported){iCamera->SetContrastL(CCamera::EContrastAuto);}ZoomTo alter the camera’s zoom level:1.Test if zoom is supported, and for what range of values, by readingthe minimum and maximum zoom values from the data membersin TCameraInfo.

A value of zero means zoom is not supported.A step of one in the zoom value corresponds to the smallest zoomchange available. The camera zoom increases linearly with the zoomvalue until the maximum zoom is reached. A separate set of valuesis available for (optical) zoom and for digital zoom. TCameraInfoalso has members iMinZoomFactor and iMaxZoomFactor thatcontain the actual zoom factor when at minimum (non-digital only)and maximum zoom.2.Set the zoom using CCamera::SetDigitalZoomFactorL() orCCamera::SetZoomFactorL().TCameraInfo info;iCamera->CameraInfo(info);// setup optical zoomTInt minZoom = info.iMinZoom;TInt maxZoom = info.iMaxZoom;DISPLAYING THE VIEWFINDER43if (minZoom != 0) // if it is supported{// set a value from minZoom to maxZoomiCamera->SetZoomFactorL(maxZoom);}// set up digital zoomTInt maxDigitalZoom = info.iMaxDigitalZoom;if (maxDigitalZoom > 0) // if it is supported{// set a value from 0 to maxDigitalZoomiCamera->SetDigitalZoomFactorL(maxDigitalZoom);}White BalanceWhite balance presets are given by the CCamera::TWhiteBalanceenum.

Supported white balance options are given in TCameraInfo::iWhiteBalanceOptionsSupported. EWBAuto is the default and isalways supported. To alter the white balance to compensate for tungstenlighting, use:iCamera->SetWhiteBalanceL(CCamera::EWBTungsten);ExposureExposure presets are given by the CCamera::TExposure enum. Supported exposure presets are given in TCameraInfo::iExposureModesSupported.

EExposureAuto is the default and is always supported. To alter the exposure for nighttime shots, call:iCamera->SetExposureL(CCamera::EExposureNight);FlashFlash presets are given by the CCamera::TFlash enum. Supportedflash settings are given in TCameraInfo::iFlashModesSupported.EFlashNone is the default. To alter the flash mode, use:iCamera->SetFlashL(CCamera::EFlashAuto);3.4 Displaying the ViewfinderAfter we have successfully powered on the camera hardware, we candisplay a viewfinder.44THE ONBOARD CAMERAThe viewfinder can, if the camera implementation supports it, transferframes from the camera directly to the display memory at a location of theclient’s choosing. Alternatively, if supported, the application developersmay implement a viewfinder function, in which case the client is passedthe viewfinder image as a bitmap at regular intervals.The option to use is determined by the capabilities of the camera.The iOptions member of TCameraInfo may have one or both of thefollowing two bits set:• EViewFinderBitmapSupported – we have to render the viewfinder ourselves using bitmaps supplied by the camera.• EViewFinderDirectSupported – the frames are transferred fromthe camera directly to the display memory at the location the clientchooses.It is possible that neither method is supported, so you should alwayscheck which method is supported before attempting to render a viewfinder.You can specify the portion of the screen to which viewfinder datais to be transferred.

This is specified in screen co-ordinates and may bemodified if, for example, the camera requires the destination to have acertain byte alignment. The size of image returned by the viewfinder maynot be the exact size requested if this conflicts with the requirement forthe viewfinder to show the unclipped view in the ratio required for videocapture. In this case, the camera returns the best match.3.4.1 Direct Screen Access ViewfinderRendering of a direct screen viewfinder, where the frames are transferredfrom the camera directly to the display memory at a location of theclient’s choosing, is the most efficient method. The rendering is doneby the camera subsystem and is usually optimized to make use of anyhardware acceleration present.

To draw a direct screen access viewfinder,we use the following method:virtual void StartViewFinderDirectL(RWsSession& aWs,CWsScreenDevice& aScreenDevice,RWindowBase& aWindow,TRect& aScreenRect);The first three parameters can be retrieved from an application GUIenvironment; aScreenRect is the rectangle, relative to the physicalscreen, in which the viewfinder is to be rendered. Once a successfulcall has been made to StartViewFinderDirectL(), the viewfinderis visible to the user.

Свежие статьи
Популярно сейчас
Как Вы думаете, сколько людей до Вас делали точно такое же задание? 99% студентов выполняют точно такие же задания, как и их предшественники год назад. Найдите нужный учебный материал на СтудИзбе!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
5259
Авторов
на СтудИзбе
421
Средний доход
с одного платного файла
Обучение Подробнее