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

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

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

The aVideoType parameter is used to specify theMIME type of the video codec and the aAudioType parameter is usedto specify the FourCC code of the audio codec. On S60 phones you don’tneed to specify the codec types if you don’t want to (the parameters havedefault NULL values); in this case, the controller chooses for you.

OnUIQ phones, you are required to choose the codec types. Failing to setthe video type results in an error code being returned. Failing to set theaudio type means the recording has no audio.Where multiple codecs are available to choose from, you need tothink about how to handle the choice. You could ask the user to chooseor you could try to make the decision in your application. The choiceof codec depends on a number of factors.

You may want to maintaincompatibility with other devices which, for instance, may not supportmore advanced formats such as the H.264 video format, or you may wantthe high level of compression that H.264 gives to save storage space onthe device. For audio, you may choose the AMR codec, if you know youwill be recording mostly speech, or you may choose a more compatiblegeneral-purpose format, such as AAC.You can choose to record your video into a descriptor buffer:void OpenDesL(TDes8& aDescriptor, TInt aCameraHandle,TUid aControllerUid, TUid aVideoFormat,const TDesC8& aVideoType, TFourCC aAudioType);This has the same parameters as the OpenFileL() methods, exceptthat it takes a descriptor instead of the file name or file handle.You can also choose to stream your video to a specified URL; however,you should note that the majority of Symbian smartphones do not currentlysupport this.void OpenUrlL(const TDesC& aUrl, TInt aIapId, TInt aCameraHandle,TUid aControllerUid, TUid aVideoFormat,const TDesC8& aVideoType, TFourCC aAudioType);You need to specify the URL to stream the recording to and theidentifier for the access point that should be used to connect to the URL.92MULTIMEDIA FRAMEWORK: VIDEOAll the open commands are asynchronous and you must wait for theMvruoOpenComplete() method of your observer to be called beforeproceeding.

If the open operation fails, then the initial API call can leavewith an error or an error code can be passed to the observer method. Youneed to handle both these scenarios when using these APIs.4.11.3 Preparing to RecordOnce the video open operation has completed, you need to prepare tostart the recording by calling the Prepare() method. This allows thevideo controller to allocate the buffers and resources it requires to performthe recording.void Prepare();This is an asynchronous method, and you should wait for the MvruoPrepareComplete() method of your observer to be called beforeproceeding.4.11.4 Starting the RecordingTo start recording the video, you call the Record() method.

This mustbe done after the prepare operation has completed.void Record();This is an asynchronous method. When the recording finishes theMvruoRecordComplete() method of your observer is called. Notehowever that the method is not called if you specifically call Stop() tostop the recording.4.11.5 Pausing the RecordingYou can pause the current recording using PauseL():void PauseL();4.11.6 Stopping the RecordingYou can stop the current recording using Stop():TInt Stop();CONTROLLING THE VIDEO THAT IS RECORDED934.11.7 Closing the Recorded FileAfter the recording has completed or been stopped, you can close the filethat is storing the video:void Close();4.12 Controlling the Video that Is RecordedFrame RateThe frame rate for the recording can be specified using the SetVideoFrameRateL() method.

You can read the current frame rate being usedwith the VideoFrameRateL() method.void SetVideoFrameRateL(TReal32 aFrameRate);TReal32 VideoFrameRateL() const;The frame rate is a floating-point number specifying the number offrames per second.From Symbian OS v9.4 onwards, you can specify whether the framerate is fixed or variable using the SetVideoFrameRateFixedL()method.void SetVideoFrameRateFixedL(TBool aFixedFrameRate);This method indicates to the controller that it should attempt to outputa constant frame rate and it may result in a lower picture quality beingoutput at lower bit rates. You should note that this is only an indicationto the controller that you would like a constant frame rate.

The controllermay not be fully able to meet your request and may still skip someframes.You can check whether the frame rate is fixed using the VideoFrameRateFixedL() method.TBool VideoFrameRateFixedL() const;By default, the frame rate is not fixed, although at higher bit rates thecontroller may be able to output a constant frame rate anyway.94MULTIMEDIA FRAMEWORK: VIDEOFrame SizeYou can specify the frame size for the recording using the SetVideoFrameSizeL() method. You can retrieve the current frame sizeusing the GetVideoFrameSizeL() method.void SetVideoFrameSizeL(const TSize& aSize);void GetVideoFrameSizeL(TSize& aSize) const;DurationYou can get the duration in microseconds of the current video recording:TTimeIntervalMicroSeconds DurationL() const;Bit RateYou can set the video bit rate (in bits per second) that should be used forthe recording using the SetVideoBitRateL() method.

You can readthe current video bit rate using the VideoBitRateL() method.void SetVideoBitRateL(TInt aBitRate);TInt VideoBitRateL();Maximum Clip SizeYou can specify a maximum size for a video recording. This limits therecording size to a maximum number of bytes.void SetMaxClipSizeL(TInt aClipSizeInBytes);If you don’t want to specify a limit, then set the aClipSizeInBytesparameter to KMMFNoMaxClipSize.Recording Time AvailableYou can ask the controller for an indication of how much longer thecurrent video recording can continue using the RecordTimeAvailable() method.

The controller examines the available resources, suchas file space and buffer space, in order to return an estimate of the timeremaining in microseconds.TTimeIntervalMicroSeconds RecordTimeAvailable() const;CONTROLLING THE VIDEO THAT IS RECORDED95Video TypeYou can get a list of the video codecs supported by the currently selectedcontroller using the GetSupportedVideoTypesL() method.void GetSupportedVideoTypesL(CDesC8Array& aVideoTypes) const;This method populates your array of descriptors aVideoTypes withthe names of supported video codecs.

The format of the video types isnot specified. Depending on the controller, the method might return a listof video MIME types or it might return a list of FourCC codes; you needto ensure that you can handle either.Once you have the list of supported video types, you can select theone you want using the SetVideoTypeL() method:void SetVideoTypeL(const TDesC8& aType);Where a controller has found multiple codecs that could be used, itwill already have chosen one that it thinks is suitable. There is no need foryou to change this unless you have a requirement that a specific codecis used.

For some information on how to choose a codec to use, seeSection 4.11.2.Getting MIME TypeYou can get the MIME type of the video format that the controller iscurrently using with the VideoFormatMimeType() method:const TDesC8& VideoFormatMimeType() const;Pixel Aspect RatioThe concept of pixel aspect ratio was first introduced in ‘Scaling’,Section 4.6.4. Pixel aspect ratio is important while recording a video.If you know the aspect ratio of the display that your recorded video willbe shown on, then you can adjust the pixel aspect ratio in order thatthe video scales properly to the display. Typically, Symbian smartphonedisplays use a pixel aspect ratio of 1:1. For TV broadcast signals, highdefinition TV uses 1:1, NTSC uses 10:11 and PAL uses 59:54.If you want to change the pixel aspect ratio used to encode videodata, you can ask the controller for a list of pixel aspect ratios that itsupports.96MULTIMEDIA FRAMEWORK: VIDEOvoid GetSupportedPixelAspectRatiosL(RArray<TVideoAspectRatio>& aAspectRatios) const;This returns an array of TVideoAspectRatio; this class stores twopublic data members, the iNumerator and iDenominator, whichgive the X and Y pixel widths respectively.Given the list of supported ratios, you can then choose which oneyou want.

To set the pixel aspect ratio, you should call the SetPixelAspectRatioL() method and pass the TVideoAspectRatiocontaining your choice.void SetPixelAspectRatioL(const TVideoAspectRatio& aAspectRatio);You can check which pixel aspect ratio is currently being usedby calling the GetPixelAspectRatioL() method which will fill aTVideoAspectRatio passed to it with the correct values:void GetPixelAspectRatioL(TVideoAspectRatio& aAspectRatio) const;Video QualityFrom Symbian OS v9.4, it is possible to control the quality of the outputvideo recording using the SetVideoQualityL() method:void SetVideoQualityL(TInt aQuality);The aQuality parameter is a value from 0 to 100 which defines thequality that you require.

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

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

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

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