avprobe.c File Reference
#include "config.h"
#include "libavformat/avformat.h"
#include "libavcodec/avcodec.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "libavutil/dict.h"
#include "libavdevice/avdevice.h"
#include "cmdutils.h"
#include "cmdutils_common_opts.h"

Go to the source code of this file.

Functions

void exit_program (int ret)
 Do all the necessary cleanup and abort.
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 char * ts_value_string (char *buf, int buf_size, int64_t ts)
static const char * media_type_string (enum AVMediaType media_type)
static void show_packet (AVFormatContext *fmt_ctx, AVPacket *pkt)
static void show_packets (AVFormatContext *fmt_ctx)
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 int opt_format (const char *opt, const char *arg)
static void opt_input_file (void *optctx, const char *arg)
static void show_help (void)
static void opt_pretty (void)
int main (int argc, char **argv)

Variables

const char program_name [] = "avprobe"
 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_packets = 0
static int do_show_streams = 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

void exit_program ( int  ret)

Do all the necessary cleanup and abort.

This function is implemented in the avtools, not cmdutils.

Definition at line 59 of file avprobe.c.

int main ( int  argc,
char **  argv 
)

Definition at line 426 of file avprobe.c.

static const char* media_type_string ( enum AVMediaType  media_type)
static

Definition at line 123 of file avprobe.c.

Referenced by show_packet(), and show_stream().

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

Definition at line 292 of file avprobe.c.

Referenced by probe_file().

static int opt_format ( const char *  opt,
const char *  arg 
)
static

Definition at line 365 of file avprobe.c.

static void opt_input_file ( void optctx,
const char *  arg 
)
static

Definition at line 375 of file avprobe.c.

Referenced by main().

static void opt_pretty ( void  )
static

Definition at line 397 of file avprobe.c.

static int probe_file ( const char *  filename)
static

Definition at line 336 of file avprobe.c.

Referenced by main().

static void show_format ( AVFormatContext fmt_ctx)
static

Definition at line 260 of file avprobe.c.

Referenced by probe_file().

static void show_help ( void  )
static

Definition at line 388 of file avprobe.c.

static void show_packet ( AVFormatContext fmt_ctx,
AVPacket pkt 
)
static

Definition at line 135 of file avprobe.c.

Referenced by show_packets().

static void show_packets ( AVFormatContext fmt_ctx)
static

Definition at line 161 of file avprobe.c.

Referenced by probe_file().

static void show_stream ( AVFormatContext fmt_ctx,
int  stream_idx 
)
static

Definition at line 171 of file avprobe.c.

Referenced by probe_file().

static void show_usage ( void  )
static

Definition at line 358 of file avprobe.c.

Referenced by main(), and show_help().

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

Definition at line 100 of file avprobe.c.

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

static char* ts_value_string ( char *  buf,
int  buf_size,
int64_t  ts 
)
static

Definition at line 112 of file avprobe.c.

Referenced by show_packet().

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

Definition at line 64 of file avprobe.c.

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

Variable Documentation

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

Definition at line 51 of file avprobe.c.

Referenced by value_string().

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

Definition at line 52 of file avprobe.c.

Referenced by value_string().

int do_show_format = 0
static

Definition at line 35 of file avprobe.c.

Referenced by probe_file().

int do_show_packets = 0
static

Definition at line 36 of file avprobe.c.

Referenced by probe_file().

int do_show_streams = 0
static

Definition at line 37 of file avprobe.c.

Referenced by probe_file().

AVInputFormat* iformat = NULL
static

Definition at line 49 of file avprobe.c.

Referenced by movie_init(), show_help(), and stream_open().

const char* input_filename
static

Definition at line 48 of file avprobe.c.

Referenced by main(), and opt_input_file().

static const OptionDef options
static

Definition at line 45 of file avprobe.c.

const int program_birth_year = 2007

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

Definition at line 33 of file avprobe.c.

const char program_name[] = "avprobe"

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

Definition at line 32 of file avprobe.c.

int show_value_unit = 0
static

Definition at line 39 of file avprobe.c.

Referenced by opt_pretty(), and value_string().

const char* unit_bit_per_second_str = "bit/s"
static

Definition at line 57 of file avprobe.c.

Referenced by show_format().

const char* unit_byte_str = "byte"
static

Definition at line 56 of file avprobe.c.

Referenced by show_format(), show_packet(), and value_string().

const char* unit_hertz_str = "Hz"
static

Definition at line 55 of file avprobe.c.

Referenced by show_stream().

const char* unit_second_str = "s"
static

Definition at line 54 of file avprobe.c.

Referenced by time_value_string(), and value_string().

int use_byte_value_binary_prefix = 0
static

Definition at line 41 of file avprobe.c.

Referenced by opt_pretty(), and value_string().

int use_value_prefix = 0
static

Definition at line 40 of file avprobe.c.

Referenced by opt_pretty(), and value_string().

int use_value_sexagesimal_format = 0
static

Definition at line 42 of file avprobe.c.

Referenced by opt_pretty(), and value_string().