symba (779893), страница 23

Файл №779893 symba (Symbian Books) 23 страницаsymba (779893) страница 232018-01-10СтудИзба
Просмтор этого файла доступен только зарегистрированным пользователям. Но у нас супер быстрая регистрация: достаточно только электронной почты!

Текст из файла (страница 23)

A quality value of 0 indicates the lowest qualitypossible, a value of 50 indicates a normal quality, and value of 100indicates the highest quality lossless output possible. Whilst you can setany quality value between 0 and 100, it is preferable to use the valuesdefined in the TVideoQuality enumeration which defines values forlow, normal, high and lossless quality.

If a controller does not support theexact quality value that you specify, it uses the nearest quality value thatit does support.You should note that setting the quality value may cause the controllerto modify the bit-rate setting that it is using in order to meet the qualityvalue that you specified. The controller may also modify the frame rate,unless you have previously specified that the frame rate is fixed by callingthe SetVideoFrameRateFixedL() method.

Note also that changingthe bit-rate or frame-rate settings overrides the quality setting that yourequested.CONTROLLING THE AUDIO THAT IS RECORDED97You can query the current quality value using the VideoQualityL()method:TInt VideoQualityL() const;The VideoQualityL() method always returns the value set by themost recent call to SetVideoQualityL(). If you have subsequentlychanged the bit rate or frame rate, the value it returns will not have beenadjusted to take into account those changes.Enabling Video RecordingFrom Symbian OS v9.4 onwards, it is possible to request that onlythe audio track is stored in the video by disabling the video using theSetVideoEnabledL() method.void SetVideoEnabledL(TBool aEnabled);You can check whether the video is enabled or not using theVideoEnabledL() method.TBool VideoEnabledL() const;4.13 Controlling the Audio that Is RecordedPrioritySection 4.9.1 gave details about the priority value that is used to resolveresource conflicts for the audio devices.

The priority can also be set andretrieved directly:void SetPriorityL(TInt aPriority, TMdaPriorityPreference aPref);void GetPriorityL(TInt& aPriority, TMdaPriorityPreference& aPref) const;These methods take the same parameters as the CVideoRecorderUtility::NewL() method.Bit RateIt is possible to set and get the audio bit rate (in bits per second) thatshould be used when encoding the video.98MULTIMEDIA FRAMEWORK: VIDEOvoid SetAudioBitRateL(TInt aBitRate);TInt AudioBitRateL() const;Audio TypeIt is possible to get a list of all the audio types that a controller canhandle.void GetSupportedAudioTypesL(RArray<TFourCC>& aAudioTypes) const;This returns an array of FourCC codes each of which identifies onesupported audio codec type.Given the list of supported audio types, you can then select whichone you want to use when encoding the audio track for the videoby calling SetAudioTypeL() and passing the chosen FourCC codeto it.void SetAudioTypeL(TFourCC aType);Where a controller has found multiple audio types that could be used,it will already have chosen one that it thinks is suitable.

There is noneed for you to change this unless you have a requirement that a specificcodec is used. For information on how to choose a codec to use, seeSection 4.11.2.You can retrieve which audio type is currently in use by using theAudioTypeL() method.TFourCC AudioTypeL() const;Audio EnablingYou can specify whether or not you want your recorded video to containaudio using the SetAudioEnabledL() method:void SetAudioEnabledL(TBool aEnabled);You can check whether you are storing the audio using the AudioEnabledL() method.TBool AudioEnabledL() const;CONTROLLING THE AUDIO THAT IS RECORDED99Audio GainTo find out the maximum audio recording gain that the controller cansupport, you can call the MaxGainL() method:TInt MaxGainL() const;Once you know the maximum gain value supported, you can use thisto set the audio recording gain to be any value from 0 to the maximumgain:void SetGainL(TInt aGain);You can check the current gain value by calling the GainL() method:TInt GainL() const;Number of Audio ChannelsYou can find out the range of supported audio channels for the controllerusing the GetSupportedAudioChannelsL() method:void GetSupportedAudioChannelsL(RArray<TUint>& aChannels) const;This returns an array of integers, each entry being a supported numberof audio channels.

Using this information, you can then set the numberof audio channels that you would like to use for the recording:void SetAudioChannelsL(const TUint aNumChannels);You can also find out how many audio channels are currently beingused:TUint AudioChannelsL() const;Audio Sample RatesYou can obtain a list of audio sample rates that the controller supportsusing the GetSupportedAudioSampleRatesL() method:void GetSupportedAudioSampleRatesL(RArray<TUint> &aSampleRates) const;100MULTIMEDIA FRAMEWORK: VIDEOThis returns an array of integers, each entry being a sample rate that issupported.You can set the audio sample rate to use with the SetAudioSampleRateL() method:void SetAudioSampleRateL(const TUint aSampleRate);You can retrieve the audio sample rate currently being used by callingAudioSampleRateL():TUint AudioSampleRateL() const;4.14Storing MetadataYou can get the number of metadata entries and access individualmetadata entries for your recorded video:TInt NumberOfMetaDataEntriesL() const;CMMFMetaDataEntry* MetaDataEntryL(TInt aIndex) const;These methods are the same as for video playback.

See Section 4.8 fora full description.If you have the index of a metadata item, then you can removeor replace it if you want to. To remove a metadata item use theRemoveMetaDataEntryL() method specifying the index of the entry:void RemoveMetaDataEntryL(TInt aIndex);To replace a metadata item, use the ReplaceMetaDataEntryL()method. You need to specify the index of the existing item and aCMMFMetaDataEntry containing the new information:void ReplaceMetaDataEntryL(TInt aIndex,const CMMFMetaDataEntry &aNewEntry);It is possible to add a new item of metadata using the AddMetaDataEntryL() method:void AddMetaDataEntryL(const CMMFMetaDataEntry& aNewEntry);CUSTOM COMMANDS101This method takes a CMMFMetaDataEntry parameter containing theinformation about the new item of metadata.

The controller can then usethe name and value data members within the CMMFMetaDataEntryclass to add the metadata to the recorded video.4.15 Custom CommandsCustom commands are an extension mechanism that allows controllerspecific functionality to be accessed by third-party developers. Thecommands can be sent directly to the controllers from the client APIs. Asthe functionality is controller-specific, the authors of the controller wouldhave to choose to make information publicly available about what thefunctionality is and how to access and use it.The areas of controller functionality are called interfaces, and therecan be a number of methods per interface. Each interface has its own UIDand the client can call a specific method on the interface by specifyingthe UID and a function number.Both video playback and video recording classes provide the same setof methods to access controller-specific custom commands.TInt CustomCommandSync(const TMMFMessageDestinationPckg& aDestination,TInt aFunction, const TDesC8& aDataTo1,const TDesC8& aDataTo2, TDes8& aDataFrom);TInt CustomCommandSync(const TMMFMessageDestinationPckg& aDestination,TInt aFunction, const TDesC8& aDataTo1, const TDesC8& aDataTo2);void CustomCommandAsync(const TMMFMessageDestinationPckg& aDestination,TInt aFunction, const TDesC8& aDataTo1,const TDesC8& aDataTo2, TDes8& aDataFrom,TRequestStatus& aStatus);void CustomCommandAsync(const TMMFMessageDestinationPckg& aDestination,TInt aFunction, const TDesC8& aDataTo1,const TDesC8& aDataTo2, TRequestStatus& aStatus);There are both synchronous and asynchronous versions of the customcommand methods.Each method has a parameter called aDestination, which is aTMMFMessageDestinationPckg.

This is a TPckgBuf containing aTMMFMessageDestination. The TMMFMessageDestination contains the UID of the interface that the controller exposes. Each methodalso has a parameter called aFunction. This specifies which functionto call on the exposed interface. The values for the other parameters arespecific to the interface and function exposed by the controller.1024.16MULTIMEDIA FRAMEWORK: VIDEOExamples and TroubleshootingThe various developer forums for Symbian OS are a good source ofexample code. For instance, the Forum Nokia website has an audioand video resources page at www.forum.nokia.com/main/resources/technologies/audiovideo/audio video documents.html#symbian.That page contains a number of useful example applications, includinga video example application.

While the application is specifically aimed atthe Nokia S60 3rd Edition SDK, the code that uses the client API methodsis generic across all platforms and could be used for applications writtenfor other SDKs.It can be very useful to download videos in a format that you can use fortesting. There are a large number of websites, such as www.mobile9.comand www.mobango.com, that allow you to download video contentfor use on your phone. If you can’t find the format you are lookingfor, then there are a large number of video conversion tools availablewhich can convert from one format to another. For instance, eRightSoftSUPER (www.erightsoft.com/SUPER.html ) supports a very extensive setof container and codec formats.If you are planning to stream video from the Internet then you need tobe aware that some network operators restrict access to video streamingservices.

They may use a ‘walled garden’ or ‘whitelist’ system, onlyallowing their own hosted content or that of specific third parties. If youare having trouble connecting to your server then this may be the issue.You can check this by using a WLAN-enabled phone or another networkto connect to the same server.Another major consideration for video-streaming applications is selecting the frame size and bit rate appropriately.

Характеристики

Тип файла
PDF-файл
Размер
1,13 Mb
Материал
Тип материала
Высшее учебное заведение

Список файлов книги

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