libavcore/parseutils.c File Reference

misc parsing utilities for libavcore More...

#include "parseutils.h"
#include "libavutil/avutil.h"
#include "libavutil/eval.h"

Go to the source code of this file.

Data Structures

struct  VideoSizeAbbr
struct  VideoRateAbbr

Functions

int av_parse_video_size (int *width_ptr, int *height_ptr, const char *str)
 Parse str and put in width_ptr and height_ptr the detected values.
int av_parse_video_rate (AVRational *rate, const char *arg)
 Parse str and store the detected values in *rate.

Variables

static const VideoSizeAbbr video_size_abbrs []
static const VideoRateAbbr video_rate_abbrs []


Detailed Description

misc parsing utilities for libavcore

Definition in file parseutils.c.


Function Documentation

int av_parse_video_rate ( AVRational rate,
const char *  str 
)

Parse str and store the detected values in *rate.

Parameters:
[in,out] rate pointer to the AVRational which will contain the detected frame rate
[in] str the string to parse: it has to be a string in the format rate_num / rate_den, a float number or a valid video rate abbreviation
Returns:
>= 0 on success, a negative error code otherwise

Definition at line 117 of file parseutils.c.

Referenced by av_parse_video_frame_rate(), opt_frame_rate(), parse_ffconfig(), and parse_frame_rate().

int av_parse_video_size ( int *  width_ptr,
int *  height_ptr,
const char *  str 
)

Parse str and put in width_ptr and height_ptr the detected values.

Parameters:
[in,out] width_ptr pointer to the variable which will contain the detected width value
[in,out] height_ptr pointer to the variable which will contain the detected height value
[in] str the string to parse: it has to be a string in the format width x height or a valid video size abbreviation.
Returns:
>= 0 on success, a negative error code otherwise

Definition at line 89 of file parseutils.c.

Referenced by av_parse_video_frame_size(), opt_frame_size(), parse_ffconfig(), and parse_image_size().


Variable Documentation

const VideoRateAbbr video_rate_abbrs[] [static]

Initial value:

 {
    { "ntsc",      { 30000, 1001 } },
    { "pal",       {    25,    1 } },
    { "qntsc",     { 30000, 1001 } }, 
    { "qpal",      {    25,    1 } }, 
    { "sntsc",     { 30000, 1001 } }, 
    { "spal",      {    25,    1 } }, 
    { "film",      {    24,    1 } },
    { "ntsc-film", { 24000, 1001 } },
}

Definition at line 78 of file parseutils.c.

const VideoSizeAbbr video_size_abbrs[] [static]

Definition at line 38 of file parseutils.c.


Generated on Wed Nov 17 12:34:26 2010 for FFmpeg by  doxygen 1.5.6