ffprobe.c File Reference

#include "config.h"
#include "libavformat/avformat.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/opt.h"
#include "libavutil/pixdesc.h"
#include "libavdevice/avdevice.h"
#include "cmdutils.h"
#include "cmdutils_common_opts.h"

Go to the source code of this file.

Functions

static char * value_string (char *buf, int buf_size, double val, const char *unit)
static char * time_value_string (char *buf, int buf_size, int64_t val, const AVRational *time_base)
static const char * media_type_string (enum AVMediaType media_type)
static void show_stream (AVFormatContext *fmt_ctx, int stream_idx)
static void show_format (AVFormatContext *fmt_ctx)
static int open_input_file (AVFormatContext **fmt_ctx_ptr, const char *filename)
static int probe_file (const char *filename)
static void show_usage (void)
static void opt_format (const char *arg)
static void opt_input_file (const char *arg)
static void show_help (void)
static void opt_pretty (void)
int main (int argc, char **argv)

Variables

const char program_name [] = "FFprobe"
 program name, defined by the program for show_version().
const int program_birth_year = 2007
 program birth year, defined by the program for show_banner()
static int do_show_format = 0
static int do_show_streams = 0
static int convert_tags = 0
static int show_value_unit = 0
static int use_value_prefix = 0
static int use_byte_value_binary_prefix = 0
static int use_value_sexagesimal_format = 0
static const OptionDef options []
static const char * input_filename
static AVInputFormatiformat = NULL
static const char * binary_unit_prefixes [] = { "", "Ki", "Mi", "Gi", "Ti", "Pi" }
static const char * decimal_unit_prefixes [] = { "", "K" , "M" , "G" , "T" , "P" }
static const char * unit_second_str = "s"
static const char * unit_hertz_str = "Hz"
static const char * unit_byte_str = "byte"
static const char * unit_bit_per_second_str = "bit/s"


Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 349 of file ffprobe.c.

static const char* media_type_string ( enum AVMediaType  media_type  )  [static]

Definition at line 104 of file ffprobe.c.

Referenced by show_stream().

static int open_input_file ( AVFormatContext **  fmt_ctx_ptr,
const char *  filename 
) [static]

Definition at line 232 of file ffprobe.c.

Referenced by probe_file().

static void opt_format ( const char *  arg  )  [static]

Definition at line 296 of file ffprobe.c.

static void opt_input_file ( const char *  arg  )  [static]

Definition at line 305 of file ffprobe.c.

static void opt_pretty ( void   )  [static]

Definition at line 324 of file ffprobe.c.

static int probe_file ( const char *  filename  )  [static]

Definition at line 270 of file ffprobe.c.

Referenced by main().

static void show_format ( AVFormatContext fmt_ctx  )  [static]

Definition at line 204 of file ffprobe.c.

Referenced by probe_file().

static void show_help ( void   )  [static]

Definition at line 317 of file ffprobe.c.

static void show_stream ( AVFormatContext fmt_ctx,
int  stream_idx 
) [static]

Definition at line 116 of file ffprobe.c.

Referenced by probe_file().

static void show_usage ( void   )  [static]

Definition at line 289 of file ffprobe.c.

static char* time_value_string ( char *  buf,
int  buf_size,
int64_t  val,
const AVRational time_base 
) [static]

Definition at line 93 of file ffprobe.c.

Referenced by show_format(), and show_stream().

static char* value_string ( char *  buf,
int  buf_size,
double  val,
const char *  unit 
) [static]

Definition at line 58 of file ffprobe.c.

Referenced by show_format(), show_stream(), and time_value_string().


Variable Documentation

const char* binary_unit_prefixes[] = { "", "Ki", "Mi", "Gi", "Ti", "Pi" } [static]

Definition at line 50 of file ffprobe.c.

Referenced by value_string().

int convert_tags = 0 [static]

Definition at line 37 of file ffprobe.c.

Referenced by show_format().

const char* decimal_unit_prefixes[] = { "", "K" , "M" , "G" , "T" , "P" } [static]

Definition at line 51 of file ffprobe.c.

Referenced by value_string().

int do_show_format = 0 [static]

Definition at line 34 of file ffprobe.c.

Referenced by probe_file().

int do_show_streams = 0 [static]

Definition at line 35 of file ffprobe.c.

Referenced by probe_file().

AVInputFormat* iformat = NULL [static]

Definition at line 48 of file ffprobe.c.

Referenced by audio_open().

const char* input_filename [static]

Definition at line 47 of file ffprobe.c.

static const OptionDef options [static]

Initial value:

 {
    { "L", OPT_EXIT, {(void*)show_license}, "show license" },
    { "h", OPT_EXIT, {(void*)show_help}, "show help" },
    { "?", OPT_EXIT, {(void*)show_help}, "show help" },
    { "help", OPT_EXIT, {(void*)show_help}, "show help" },
    { "-help", OPT_EXIT, {(void*)show_help}, "show help" },
    { "version", OPT_EXIT, {(void*)show_version}, "show version" },
    { "formats"  , OPT_EXIT, {(void*)show_formats  }, "show available formats" },
    { "codecs"   , OPT_EXIT, {(void*)show_codecs   }, "show available codecs" },
    { "bsfs"     , OPT_EXIT, {(void*)show_bsfs     }, "show available bit stream filters" },
    { "protocols", OPT_EXIT, {(void*)show_protocols}, "show available protocols" },
    { "filters",   OPT_EXIT, {(void*)show_filters  }, "show available filters" },
    { "pix_fmts" , OPT_EXIT, {(void*)show_pix_fmts }, "show available pixel formats" },
    { "loglevel", HAS_ARG | OPT_FUNC2, {(void*)opt_loglevel}, "set libav* logging level", "loglevel" },
    { "convert_tags", OPT_BOOL, {(void*)&convert_tags}, "convert tag names to the FFmpeg generic tag names" },
    { "f", HAS_ARG, {(void*)opt_format}, "force format", "format" },
    { "unit", OPT_BOOL, {(void*)&show_value_unit}, "show unit of the displayed values" },
    { "prefix", OPT_BOOL, {(void*)&use_value_prefix}, "use SI prefixes for the displayed values" },
    { "byte_binary_prefix", OPT_BOOL, {(void*)&use_byte_value_binary_prefix},
      "use binary prefixes for byte units" },
    { "sexagesimal", OPT_BOOL,  {(void*)&use_value_sexagesimal_format},
      "use sexagesimal format HOURS:MM:SS.MICROSECONDS for time units" },
    { "pretty", 0, {(void*)&opt_pretty},
      "prettify the format of displayed values, make it more human readable" },
    { "show_format",  OPT_BOOL, {(void*)&do_show_format} , "show format/container info" },
    { "show_streams", OPT_BOOL, {(void*)&do_show_streams}, "show streams info" },
    { NULL, },
}

Definition at line 44 of file ffprobe.c.

const int program_birth_year = 2007

program birth year, defined by the program for show_banner()

Definition at line 32 of file ffprobe.c.

const char program_name[] = "FFprobe"

program name, defined by the program for show_version().

Definition at line 31 of file ffprobe.c.

int show_value_unit = 0 [static]

Definition at line 38 of file ffprobe.c.

Referenced by opt_pretty(), and value_string().

const char* unit_bit_per_second_str = "bit/s" [static]

Definition at line 56 of file ffprobe.c.

Referenced by show_format().

const char* unit_byte_str = "byte" [static]

Definition at line 55 of file ffprobe.c.

Referenced by show_format(), and value_string().

const char* unit_hertz_str = "Hz" [static]

Definition at line 54 of file ffprobe.c.

Referenced by show_stream().

const char* unit_second_str = "s" [static]

Definition at line 53 of file ffprobe.c.

Referenced by time_value_string(), and value_string().

int use_byte_value_binary_prefix = 0 [static]

Definition at line 40 of file ffprobe.c.

Referenced by opt_pretty(), and value_string().

int use_value_prefix = 0 [static]

Definition at line 39 of file ffprobe.c.

Referenced by opt_pretty(), and value_string().

int use_value_sexagesimal_format = 0 [static]

Definition at line 41 of file ffprobe.c.

Referenced by opt_pretty(), and value_string().


Generated on Fri Oct 26 02:36:50 2012 for FFmpeg by  doxygen 1.5.8