RIFF FourCCs
[Utility functions]

Get the tables mapping RIFF FourCCs to libavcodec CodecIDs. More...


Functions

struct AVCodecTagavformat_get_riff_video_tags (void)
struct AVCodecTagavformat_get_riff_audio_tags (void)
AVRational av_guess_sample_aspect_ratio (AVFormatContext *format, AVStream *stream, AVFrame *frame)
 Guesses the sample aspect ratio of a frame, based on both the stream and the frame aspect ratio.


Detailed Description

Get the tables mapping RIFF FourCCs to libavcodec CodecIDs.

The tables are meant to be passed to av_codec_get_id()/av_codec_get_tag() as in the following code:

 uint32_t tag = MKTAG('H', '2', '6', '4');
 const struct AVCodecTag *table[] = { avformat_get_riff_video_tags(), 0 };
 enum CodecID id = av_codec_get_id(table, tag);

Function Documentation

AVRational av_guess_sample_aspect_ratio ( AVFormatContext format,
AVStream stream,
AVFrame frame 
)

Guesses the sample aspect ratio of a frame, based on both the stream and the frame aspect ratio.

Since the frame aspect ratio is set by the codec but the stream aspect ratio is set by the demuxer, these two may not be equal. This function tries to return the value that you should use if you would like to display the frame.

Basic logic is to use the stream aspect ratio if it is set to something sane otherwise use the frame aspect ratio. This way a container setting, which is usually easy to modify can override the coded value in the frames.

Parameters:
format the format context which the stream is part of
stream the stream which the frame is part of
frame the frame with the aspect ratio to be determined
Returns:
the guessed (valid) sample_aspect_ratio, 0/1 if no idea

Definition at line 4430 of file utils.c.

Referenced by queue_picture().

struct AVCodecTag* avformat_get_riff_audio_tags ( void   )  [read]

Returns:
the table mapping RIFF FourCCs for audio to CodecID.

Definition at line 4425 of file utils.c.

struct AVCodecTag* avformat_get_riff_video_tags ( void   )  [read]

Returns:
the table mapping RIFF FourCCs for video to libavcodec CodecID.

Definition at line 4421 of file utils.c.


Generated on Fri Oct 26 02:48:04 2012 for FFmpeg by  doxygen 1.5.8