user454083
user454083

Reputation: 1397

Any example of what is each constant means in AVFoundation MediaTypes

I am new in AVFoundation, from the Apple document, it is not very clean that what each AVFoundation MediaType means

https://developer.apple.com/library/ios/documentation/AVFoundation/Reference/AVFoundation_Constants/index.html#//apple_ref/doc/constant_group/Media_Types

some media type is quite obviously for instance:

AVMediaTypeVideo which check if device could capture video.

AVMediaTypeAudio which check if device could capture audio.

But for some media type, I am not follow that what it means. For example: AVMediaTypeText In the document, it is said that "Specifies text". If someone understand what AV device could capture text?

Actually I am not quite follow for following media type too. AVMediaTypeClosedCaption Specifies closed-caption content.

AVMediaTypeSubtitle Specifies subtitles.

AVMediaTypeTimecode Specifies a time code.

AVMediaTypeTimedMetadata Specifies timed metadata.

AVMediaTypeMetadata Specifies metadata.

AVMediaTypeMuxed Specifies muxed media.

Upvotes: 2

Views: 1363

Answers (1)

blancos
blancos

Reputation: 1614

I haven't used all of them to the full extent but I will share what I know about them.

AVMediaTypeText : You can make a AVMutableCompositionTrack to put text on video for a particular time period using this.

AVMediaTypeClosedCaption : It used to create closed caption. I think the reason you didn't understand is, you are not familiar with closed captions. Closed captions are much like subtitle. Subtitles are use to read what audio contains in video where as closed captions provide a way for those who may not be able to hear the game sounds at all to fully enjoy the game. They include dialogue, sound cues (such as "machinery starting up").

AVMediaTypeSubtitle : Well this is what the name says, contains timed subtitle for video.

AVMediaTypeTimecode : Time code is a sequence of numeric codes generated at regular intervals by a timing synchronisation. You have to read about SMPTE to know more.

AVMediaTypeTimedMetadata : This contains time-based data. Like you can have accelerometer samples that you want to keep in sync with the AV capture timeline.

AVMediaTypeMetadata : It specifies the meta data of AVCaptureConnection.

AVMediaTypeMuxed : Mux is a shortened form of multiplex. Muxed media is a media where multiple streams have been combined together into a single stream. That means audio and video streams are combined into a single byte stream.

Upvotes: 2

Related Questions