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

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

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

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

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

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

The broadcast industry already has its own set of technologies34MULTIMEDIA ARCHITECTUREand business models which are likely to be used in the early implementations of mobile TV. They tend to involve proprietary middleware andconditional access solutions. As such, third-party developers are not likelyto be able to access any mobile TV functionality via public APIs. Symbianis enabling the integration of mobile TV tuners via a common hardwareabstraction layer for device integrators and middleware vendors.In addition to broadcast services, mobile TV can also be delivered via3G mobile networks.

There are a number of different systems based onboth proprietary and open standards, such as Multimedia Broadcast Multicast Service (MBMS). They can involve streaming, progressive download,or download and play. The multimedia framework can be used in theimplementation of such services but specific details are beyond the scopeof this book. For more information on mobile TV, turn to Section 7.4.2.Links to the most up-to-date resources connected with this book canbe found on the wiki page at developer.symbian.com/multimediabookwikipage.3The Onboard CameraIn the previous chapters, we learnt about the multimedia subsystem andits components.

From this chapter onwards, we take a closer look ateach component. This chapter introduces you to the Onboard Cameracomponent.The chapter begins with an introduction to the Onboard CameraAPI. After understanding the need for a common API, we learn how toaccess and control the camera, through this API, to use the camera’s fullcapabilities. We then look at capturing still images and video frames andwe finish by looking at some advanced topics, such as multiple cameraclients.3.1 IntroductionAs cameras became more widespread on phones, different APIs wereintroduced by the phone manufacturers to allow developers to accessthe camera functionality.

Fragmentation began to occur; meaning thatdifferent camera handling code had to be written depending on the phoneplatform and the individual device’s capabilities.To resolve this, Symbian defined a common Camera API, the ECamAPI, which was first released in Symbian OS v7.0s. In each subsequentrelease of the operating system, additional functionality has been addedto cover the variety of camera hardware available, and to provide acommon API for developers to work with irrespective of the hardwareavailable on any particular Symbian smartphone.The ECam API provides functionality to display a viewfinder andcapture still images from the camera. It is also possible to use it forcapturing video; however we recommend that you use the video APIoutlined in Chapter 4.

The implementation of the camera API is notsupplied by Symbian since it is highly dependent on the hardwarearchitecture of each phone. Each phone manufacturer provides its own36THE ONBOARD CAMERAimplementation, using the same ECam API. You may therefore find thatthe behavior differs slightly between phones and manufacturers.3.2 Accessing the CameraThe ECam API is an open, extensible, generic API that provides functionality to control the digital camera on the phone and to request andreceive specific image data from it. Figure 3.1 shows where the ECamAPI is placed in the multimedia subsystem and the other multimediacomponents it interacts with.“Still Image”Client Application“Multimedia”Client Application(e.g. camera app)(e.g. video player)ImageConversionLibraryOnboardCamera APIMultimediaFrameworkMDFFigure 3.1 The multimedia subsystemFurther information about the Multimedia Framework can be found inChapters 4 and 5 of this book; the Image Conversion Library is discussedin Chapter 6.The onboard camera component provides images to its clients.

A clientmay be an application with image requirements, for example a cameraapplication, or an MMF video controller being used by a camcorderapplication (for information about video, look in Chapter 4). Clients havespecific priorities and may pre-empt others in their interactions with thecamera. When a camera client needs to share the camera with anothercomponent, it creates a handle to the camera and passes this handle tothe component (see Section 3.8).Platform security requires that applications have UserEnvironmentcapability to create a CCamera object.

Client applications should includethe ecam.h header file and link against ecam.lib.To access the camera, use CCamera::NewL() to create the object.Upon creation of the CCamera object, the method NewL() might leave;ACCESSING THE CAMERA37common leave error codes at this point are:• KErrPermissionDenied(-46) if the application does not havethe UserEnvironment capability.• KErrNotSupported(-5) if:• camera functionality is not supported. Some emulators do notsupport camera functionality and you must test on the device.• MCameraObserver2 observer is given, but only the olderMCameraObserver is supported (these callback interfaces arediscussed below).After the camera object is created the camera is reserved for your useby calling CCamera::Reserve().A client must implement a callback interface so that the camera cannotify it when events occur, such as when an image has been captured ora buffer of video data is ready.

The recommended callback interface toimplement is MCameraObserver2 since it provides extra functionalitysuch as allowing image capture without buffer copy and it unifies the presentation to the client of the images, video and viewfinder data. However,as MCameraObserver2 is still not widely implemented on S60 devices,we recommend also implementing the older MCameraObserver interface to provide compatibility with existing S60 smartphones.Before you attempt to access and use the camera on a Symbiansmartphone, you should first check that one exists. The static CCamera::CamerasAvailable() method returns the number of cameras present.Many phones capable of video telephony have more than one; often onefacing towards the user and one facing away.To initiate CCamera, simply call CCamera::NewL() which acceptsan observer parameter of MCameraObserver or MCameraObserver2,1specifying the index of the camera you want to use as the aCameraIndexparameter.// Determine the number of available camerasTInt camerasAvailable = CCamera::CamerasAvailable();TInt cameraIndex = 0; // range from 0 to camerasAvailable-1TInt priority = 0; // priority between -100 and 100// Try to create camera with MCameraObserver2// Note the current class must be derived from both observers so we// can just dereference the "this" pointerTRAPD(error, iCamera = CCamera::NewL(*this, cameraIndex, priority));if (error == KErrNotSupported){// if MCameraObserver2 is unsupported, try using MCameraObserveriCamera = CCamera::NewL(*this, cameraIndex);1 S60 3rd Edition FP2 SDKs use two separate functions for the different observer interfaces,NewL() and New2L().38THE ONBOARD CAMERA}else{User::LeaveIfError(error);}If you want to select a camera to use on the basis of its orientation or capabilities, you should instantiate a CCamera instance for eachone and check the capabilities using the CameraInfo() method.

Thismethod returns a TCameraInfo class that contains a variety of information about the camera in question, such as the camera’s orientation,iOrientation, and the options supported, iOptionsSupported.The iOrientation member can take one of the following values:• EOrientationOutwards – the camera faces away from the userand so would usually be used to take pictures.• EOrientationInwards – the camera faces towards the user and isprobably used for video telephony.• EOrientationMobile – the orientation of the camera can bechanged by the user; in this case, you cannot rely on knowingthe present orientation of the camera.• EOrientationUnknown – the orientation of the camera is notknown.Something that is not covered by these enumerations, unfortunately, isthat the camera can be mounted in portrait or landscape orientation withrespect to the viewfinder.

If your camera application is not in the sameorientation as the main camera application of the device, the cameraAPI will rotate the image – but you may find that the resolution you cancapture is restricted.The iOptionsSupported member of TCameraInfo is a bitfieldindicating a number of options that a camera supports. The values forthe bits are defined by enumeration TCameraInfo::TOptions. Thefollowing example values are useful in selecting a camera:• EImageCaptureSupported indicates that the camera can capturestill images.• EVideoCaptureSupported indicates that the camera can capturevideo.// member of classTCameraInfo info;// Retrieve camera informationCAMERA CONTROL39iCamera->CameraInfo(info);// Camera orientationTCameraInfo::TCameraOrientation orientation = info.iOrientation;// Supported modesTBool imageCaptureSupported = info.iOptionsSupported &TCameraInfo::EImageCaptureSupported;TBool videoCaptureSupported = info.iOptionsSupported &TCameraInfo::EVideoCaptureSupported;3.3 Camera ControlA client may not always be able to gain control of the camera.

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