FFmpeg
Data Structures | Macros | Enumerations | Functions | Variables
ffprobe.c File Reference
#include "config.h"
#include "libavutil/ffversion.h"
#include <string.h>
#include <math.h>
#include "libavformat/avformat.h"
#include "libavformat/version.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/version.h"
#include "libavutil/ambient_viewing_environment.h"
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/bprint.h"
#include "libavutil/channel_layout.h"
#include "libavutil/display.h"
#include "libavutil/film_grain_params.h"
#include "libavutil/hash.h"
#include "libavutil/hdr_dynamic_metadata.h"
#include "libavutil/iamf.h"
#include "libavutil/mastering_display_metadata.h"
#include "libavutil/hdr_dynamic_vivid_metadata.h"
#include "libavutil/dovi_meta.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "libavutil/spherical.h"
#include "libavutil/stereo3d.h"
#include "libavutil/dict.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/libm.h"
#include "libavutil/parseutils.h"
#include "libavutil/timecode.h"
#include "libavutil/timestamp.h"
#include "libavdevice/avdevice.h"
#include "libavdevice/version.h"
#include "libswscale/swscale.h"
#include "libswscale/version.h"
#include "libswresample/swresample.h"
#include "libswresample/version.h"
#include "libpostproc/postprocess.h"
#include "libpostproc/version.h"
#include "libavfilter/version.h"
#include "cmdutils.h"
#include "opt_common.h"
#include "libavutil/thread.h"

Go to the source code of this file.

Data Structures

struct  FrameData
 
struct  InputStream
 
struct  InputFile
 
struct  ReadInterval
 
struct  section
 
struct  LogBuffer
 
struct  unit_value
 
struct  Writer
 
struct  WriterContext
 
struct  DefaultContext
 
struct  CompactContext
 
struct  FlatContext
 
struct  INIContext
 
struct  JSONContext
 
struct  XMLContext
 

Macros

#define pthread_mutex_lock(a)   do{}while(0)
 
#define pthread_mutex_unlock(a)   do{}while(0)
 
#define SHOW_OPTIONAL_FIELDS_AUTO   -1
 
#define SHOW_OPTIONAL_FIELDS_NEVER   0
 
#define SHOW_OPTIONAL_FIELDS_ALWAYS   1
 
#define SECTION_MAX_NB_CHILDREN   11
 
#define SECTION_FLAG_IS_WRAPPER   1
 the section only contains other sections, but has no data at its own level More...
 
#define SECTION_FLAG_IS_ARRAY   2
 the section contains an array of elements of the same type More...
 
#define SECTION_FLAG_HAS_VARIABLE_FIELDS   4
 the section may contain a variable number of fields with variable keys. More...
 
#define SECTION_FLAG_HAS_TYPE   8
 For these sections the element_name field is mandatory. More...
 
#define WRITER_FLAG_DISPLAY_OPTIONAL_FIELDS   1
 
#define WRITER_FLAG_PUT_PACKETS_AND_FRAMES_IN_SAME_CHAPTER   2
 
#define SECTION_MAX_NB_LEVELS   12
 
#define OFFSET(x)   offsetof(WriterContext, x)
 
#define PRINT_STRING_OPT   1
 
#define PRINT_STRING_VALIDATE   2
 
#define writer_w8(wctx_, b_)   (wctx_)->writer_w8(wctx_, b_)
 
#define writer_put_str(wctx_, str_)   (wctx_)->writer_put_str(wctx_, str_)
 
#define writer_printf(wctx_, fmt_, ...)   (wctx_)->writer_printf(wctx_, fmt_, __VA_ARGS__)
 
#define MAX_REGISTERED_WRITERS_NB   64
 
#define DEFINE_WRITER_CLASS(name)
 
#define OFFSET(x)   offsetof(DefaultContext, x)
 
#define OFFSET(x)   offsetof(CompactContext, x)
 
#define OFFSET(x)   offsetof(CompactContext, x)
 
#define OFFSET(x)   offsetof(FlatContext, x)
 
#define OFFSET(x)   offsetof(INIContext, x)
 
#define OFFSET(x)   offsetof(JSONContext, x)
 
#define JSON_INDENT()   writer_printf(wctx, "%*c", json->indent_level * 4, ' ')
 
#define OFFSET(x)   offsetof(XMLContext, x)
 
#define CHECK_COMPLIANCE(opt, opt_name)
 
#define XML_INDENT()   writer_printf(wctx, "%*c", xml->indent_level * 4, ' ')
 
#define print_fmt(k, f, ...)
 
#define print_list_fmt(k, f, n, m, ...)
 
#define print_int(k, v)   writer_print_integer(w, k, v)
 
#define print_q(k, v, s)   writer_print_rational(w, k, v, s)
 
#define print_str(k, v)   writer_print_string(w, k, v, 0)
 
#define print_str_opt(k, v)   writer_print_string(w, k, v, PRINT_STRING_OPT)
 
#define print_str_validate(k, v)   writer_print_string(w, k, v, PRINT_STRING_VALIDATE)
 
#define print_time(k, v, tb)   writer_print_time(w, k, v, tb, 0)
 
#define print_ts(k, v)   writer_print_ts(w, k, v, 0)
 
#define print_duration_time(k, v, tb)   writer_print_time(w, k, v, tb, 1)
 
#define print_duration_ts(k, v)   writer_print_ts(w, k, v, 1)
 
#define print_val(k, v, u)
 
#define print_section_header(s)   writer_print_section_header(w, NULL, s)
 
#define print_section_header_data(s, d)   writer_print_section_header(w, d, s)
 
#define print_section_footer(s)   writer_print_section_footer(w, s)
 
#define REALLOCZ_ARRAY_STREAM(ptr, cur_n, new_n)
 
#define IN_PROGRAM   1
 
#define IN_STREAM_GROUP   2
 
#define CHECK_END   if (ret < 0) goto end
 
#define SHOW_LIB_VERSION(libname, LIBNAME)
 
#define PRINT_PIX_FMT_FLAG(flagname, name)
 
#define DEFINE_OPT_SHOW_SECTION(section, target_section_id)
 
#define SET_DO_SHOW(id, varname)
 

Enumerations

enum  SectionID {
  SECTION_ID_NONE = -1, SECTION_ID_CHAPTER, SECTION_ID_CHAPTER_TAGS, SECTION_ID_CHAPTERS,
  SECTION_ID_ERROR, SECTION_ID_FORMAT, SECTION_ID_FORMAT_TAGS, SECTION_ID_FRAME,
  SECTION_ID_FRAMES, SECTION_ID_FRAME_TAGS, SECTION_ID_FRAME_SIDE_DATA_LIST, SECTION_ID_FRAME_SIDE_DATA,
  SECTION_ID_FRAME_SIDE_DATA_TIMECODE_LIST, SECTION_ID_FRAME_SIDE_DATA_TIMECODE, SECTION_ID_FRAME_SIDE_DATA_COMPONENT_LIST, SECTION_ID_FRAME_SIDE_DATA_COMPONENT,
  SECTION_ID_FRAME_SIDE_DATA_PIECE_LIST, SECTION_ID_FRAME_SIDE_DATA_PIECE, SECTION_ID_FRAME_LOG, SECTION_ID_FRAME_LOGS,
  SECTION_ID_LIBRARY_VERSION, SECTION_ID_LIBRARY_VERSIONS, SECTION_ID_PACKET, SECTION_ID_PACKET_TAGS,
  SECTION_ID_PACKETS, SECTION_ID_PACKETS_AND_FRAMES, SECTION_ID_PACKET_SIDE_DATA_LIST, SECTION_ID_PACKET_SIDE_DATA,
  SECTION_ID_PIXEL_FORMAT, SECTION_ID_PIXEL_FORMAT_FLAGS, SECTION_ID_PIXEL_FORMAT_COMPONENT, SECTION_ID_PIXEL_FORMAT_COMPONENTS,
  SECTION_ID_PIXEL_FORMATS, SECTION_ID_PROGRAM_STREAM_DISPOSITION, SECTION_ID_PROGRAM_STREAM_TAGS, SECTION_ID_PROGRAM,
  SECTION_ID_PROGRAM_STREAMS, SECTION_ID_PROGRAM_STREAM, SECTION_ID_PROGRAM_TAGS, SECTION_ID_PROGRAM_VERSION,
  SECTION_ID_PROGRAMS, SECTION_ID_STREAM_GROUP_STREAM_DISPOSITION, SECTION_ID_STREAM_GROUP_STREAM_TAGS, SECTION_ID_STREAM_GROUP,
  SECTION_ID_STREAM_GROUP_COMPONENTS, SECTION_ID_STREAM_GROUP_COMPONENT, SECTION_ID_STREAM_GROUP_SUBCOMPONENTS, SECTION_ID_STREAM_GROUP_SUBCOMPONENT,
  SECTION_ID_STREAM_GROUP_PIECES, SECTION_ID_STREAM_GROUP_PIECE, SECTION_ID_STREAM_GROUP_SUBPIECES, SECTION_ID_STREAM_GROUP_SUBPIECE,
  SECTION_ID_STREAM_GROUP_BLOCKS, SECTION_ID_STREAM_GROUP_BLOCK, SECTION_ID_STREAM_GROUP_STREAMS, SECTION_ID_STREAM_GROUP_STREAM,
  SECTION_ID_STREAM_GROUP_DISPOSITION, SECTION_ID_STREAM_GROUP_TAGS, SECTION_ID_STREAM_GROUPS, SECTION_ID_ROOT,
  SECTION_ID_STREAM, SECTION_ID_STREAM_DISPOSITION, SECTION_ID_STREAMS, SECTION_ID_STREAM_TAGS,
  SECTION_ID_STREAM_SIDE_DATA_LIST, SECTION_ID_STREAM_SIDE_DATA, SECTION_ID_SUBTITLE
}
 
enum  StringValidation { WRITER_STRING_VALIDATION_FAIL, WRITER_STRING_VALIDATION_REPLACE, WRITER_STRING_VALIDATION_IGNORE, WRITER_STRING_VALIDATION_NB }
 

Functions

static const char * get_packet_side_data_type (const void *data)
 
static const char * get_frame_side_data_type (const void *data)
 
static const char * get_raw_string_type (const void *data)
 
static const char * get_stream_group_type (const void *data)
 
static void log_callback (void *ptr, int level, const char *fmt, va_list vl)
 
static char * value_string (char *buf, int buf_size, struct unit_value uv)
 
static const char * writer_get_name (void *p)
 
static void * writer_child_next (void *obj, void *prev)
 
static int writer_close (WriterContext **wctx)
 
static void bprint_bytes (AVBPrint *bp, const uint8_t *ubuf, size_t ubuf_size)
 
static void writer_w8_avio (WriterContext *wctx, int b)
 
static void writer_put_str_avio (WriterContext *wctx, const char *str)
 
static void writer_printf_avio (WriterContext *wctx, const char *fmt,...)
 
static void writer_w8_printf (WriterContext *wctx, int b)
 
static void writer_put_str_printf (WriterContext *wctx, const char *str)
 
static void writer_printf_printf (WriterContext *wctx, const char *fmt,...)
 
static int writer_open (WriterContext **wctx, const Writer *writer, const char *args, const struct section *sections, int nb_sections, const char *output)
 
static void writer_print_section_header (WriterContext *wctx, const void *data, int section_id)
 
static void writer_print_section_footer (WriterContext *wctx)
 
static void writer_print_integer (WriterContext *wctx, const char *key, int64_t val)
 
static int validate_string (WriterContext *wctx, char **dstp, const char *src)
 
static int writer_print_string (WriterContext *wctx, const char *key, const char *val, int flags)
 
static void writer_print_rational (WriterContext *wctx, const char *key, AVRational q, char sep)
 
static void writer_print_time (WriterContext *wctx, const char *key, int64_t ts, const AVRational *time_base, int is_duration)
 
static void writer_print_ts (WriterContext *wctx, const char *key, int64_t ts, int is_duration)
 
static void writer_print_data (WriterContext *wctx, const char *name, const uint8_t *data, int size)
 
static void writer_print_data_hash (WriterContext *wctx, const char *name, const uint8_t *data, int size)
 
static void writer_print_integers (WriterContext *wctx, const char *name, uint8_t *data, int size, const char *format, int columns, int bytes, int offset_add)
 
static int writer_register (const Writer *writer)
 
static const Writerwriter_get_by_name (const char *name)
 
 DEFINE_WRITER_CLASS (default)
 
static char * upcase_string (char *dst, size_t dst_size, const char *src)
 
static void default_print_section_header (WriterContext *wctx, const void *data)
 
static void default_print_section_footer (WriterContext *wctx)
 
static void default_print_str (WriterContext *wctx, const char *key, const char *value)
 
static void default_print_int (WriterContext *wctx, const char *key, int64_t value)
 
static const char * c_escape_str (AVBPrint *dst, const char *src, const char sep, void *log_ctx)
 Apply C-language-like string escaping. More...
 
static const char * csv_escape_str (AVBPrint *dst, const char *src, const char sep, void *log_ctx)
 Quote fields containing special characters, check RFC4180. More...
 
static const char * none_escape_str (AVBPrint *dst, const char *src, const char sep, void *log_ctx)
 
 DEFINE_WRITER_CLASS (compact)
 
static av_cold int compact_init (WriterContext *wctx)
 
static void compact_print_section_header (WriterContext *wctx, const void *data)
 
static void compact_print_section_footer (WriterContext *wctx)
 
static void compact_print_str (WriterContext *wctx, const char *key, const char *value)
 
static void compact_print_int (WriterContext *wctx, const char *key, int64_t value)
 
 DEFINE_WRITER_CLASS (csv)
 
 DEFINE_WRITER_CLASS (flat)
 
static av_cold int flat_init (WriterContext *wctx)
 
static const char * flat_escape_key_str (AVBPrint *dst, const char *src, const char sep)
 
static const char * flat_escape_value_str (AVBPrint *dst, const char *src)
 
static void flat_print_section_header (WriterContext *wctx, const void *data)
 
static void flat_print_int (WriterContext *wctx, const char *key, int64_t value)
 
static void flat_print_str (WriterContext *wctx, const char *key, const char *value)
 
 DEFINE_WRITER_CLASS (ini)
 
static char * ini_escape_str (AVBPrint *dst, const char *src)
 
static void ini_print_section_header (WriterContext *wctx, const void *data)
 
static void ini_print_str (WriterContext *wctx, const char *key, const char *value)
 
static void ini_print_int (WriterContext *wctx, const char *key, int64_t value)
 
 DEFINE_WRITER_CLASS (json)
 
static av_cold int json_init (WriterContext *wctx)
 
static const char * json_escape_str (AVBPrint *dst, const char *src, void *log_ctx)
 
static void json_print_section_header (WriterContext *wctx, const void *data)
 
static void json_print_section_footer (WriterContext *wctx)
 
static void json_print_item_str (WriterContext *wctx, const char *key, const char *value)
 
static void json_print_str (WriterContext *wctx, const char *key, const char *value)
 
static void json_print_int (WriterContext *wctx, const char *key, int64_t value)
 
 DEFINE_WRITER_CLASS (xml)
 
static av_cold int xml_init (WriterContext *wctx)
 
static void xml_print_section_header (WriterContext *wctx, const void *data)
 
static void xml_print_section_footer (WriterContext *wctx)
 
static void xml_print_value (WriterContext *wctx, const char *key, const char *str, int64_t num, const int is_int)
 
static void xml_print_str (WriterContext *wctx, const char *key, const char *value)
 
static void xml_print_int (WriterContext *wctx, const char *key, int64_t value)
 
static void writer_register_all (void)
 
static int show_tags (WriterContext *w, AVDictionary *tags, int section_id)
 
static void print_dovi_metadata (WriterContext *w, const AVDOVIMetadata *dovi)
 
static void print_dynamic_hdr10_plus (WriterContext *w, const AVDynamicHDRPlus *metadata)
 
static void print_dynamic_hdr_vivid (WriterContext *w, const AVDynamicHDRVivid *metadata)
 
static void print_ambient_viewing_environment (WriterContext *w, const AVAmbientViewingEnvironment *env)
 
static void print_film_grain_params (WriterContext *w, const AVFilmGrainParams *fgp)
 
static void print_pkt_side_data (WriterContext *w, AVCodecParameters *par, const AVPacketSideData *sd, SectionID id_data)
 
static void print_private_data (WriterContext *w, void *priv_data)
 
static void print_color_range (WriterContext *w, enum AVColorRange color_range)
 
static void print_color_space (WriterContext *w, enum AVColorSpace color_space)
 
static void print_primaries (WriterContext *w, enum AVColorPrimaries color_primaries)
 
static void print_color_trc (WriterContext *w, enum AVColorTransferCharacteristic color_trc)
 
static void print_chroma_location (WriterContext *w, enum AVChromaLocation chroma_location)
 
static void clear_log (int need_lock)
 
static int show_log (WriterContext *w, int section_ids, int section_id, int log_level)
 
static void show_packet (WriterContext *w, InputFile *ifile, AVPacket *pkt, int packet_idx)
 
static void show_subtitle (WriterContext *w, AVSubtitle *sub, AVStream *stream, AVFormatContext *fmt_ctx)
 
static void print_frame_side_data (WriterContext *w, const AVFrame *frame, const AVStream *stream)
 
static void show_frame (WriterContext *w, AVFrame *frame, AVStream *stream, AVFormatContext *fmt_ctx)
 
static av_always_inline int process_frame (WriterContext *w, InputFile *ifile, AVFrame *frame, const AVPacket *pkt, int *packet_new)
 
static void log_read_interval (const ReadInterval *interval, void *log_ctx, int log_level)
 
static int read_interval_packets (WriterContext *w, InputFile *ifile, const ReadInterval *interval, int64_t *cur_ts)
 
static int read_packets (WriterContext *w, InputFile *ifile)
 
static void print_dispositions (WriterContext *w, uint32_t disposition, SectionID section_id)
 
static int show_stream (WriterContext *w, AVFormatContext *fmt_ctx, int stream_idx, InputStream *ist, int container)
 
static int show_streams (WriterContext *w, InputFile *ifile)
 
static int show_program (WriterContext *w, InputFile *ifile, AVProgram *program)
 
static int show_programs (WriterContext *w, InputFile *ifile)
 
static void print_tile_grid_params (WriterContext *w, const AVStreamGroup *stg, const AVStreamGroupTileGrid *tile_grid)
 
static void print_iamf_param_definition (WriterContext *w, const char *name, const AVIAMFParamDefinition *param, SectionID section_id)
 
static void print_iamf_audio_element_params (WriterContext *w, const AVStreamGroup *stg, const AVIAMFAudioElement *audio_element)
 
static void print_iamf_submix_params (WriterContext *w, const AVIAMFSubmix *submix)
 
static void print_iamf_mix_presentation_params (WriterContext *w, const AVStreamGroup *stg, const AVIAMFMixPresentation *mix_presentation)
 
static void print_stream_group_params (WriterContext *w, AVStreamGroup *stg)
 
static int show_stream_group (WriterContext *w, InputFile *ifile, AVStreamGroup *stg)
 
static int show_stream_groups (WriterContext *w, InputFile *ifile)
 
static int show_chapters (WriterContext *w, InputFile *ifile)
 
static int show_format (WriterContext *w, InputFile *ifile)
 
static void show_error (WriterContext *w, int err)
 
static int open_input_file (InputFile *ifile, const char *filename, const char *print_filename)
 
static void close_input_file (InputFile *ifile)
 
static int probe_file (WriterContext *wctx, const char *filename, const char *print_filename)
 
static void show_usage (void)
 
static void ffprobe_show_program_version (WriterContext *w)
 
static void ffprobe_show_library_versions (WriterContext *w)
 
static void ffprobe_show_pixel_formats (WriterContext *w)
 
static int opt_show_optional_fields (void *optctx, const char *opt, const char *arg)
 
static int opt_format (void *optctx, const char *opt, const char *arg)
 
static void mark_section_show_entries (SectionID section_id, int show_all_entries, AVDictionary *entries)
 
static int match_section (const char *section_name, int show_all_entries, AVDictionary *entries)
 
static int opt_show_entries (void *optctx, const char *opt, const char *arg)
 
static int opt_input_file (void *optctx, const char *arg)
 
static int opt_input_file_i (void *optctx, const char *opt, const char *arg)
 
static int opt_output_file_o (void *optctx, const char *opt, const char *arg)
 
static int opt_print_filename (void *optctx, const char *opt, const char *arg)
 
void show_help_default (const char *opt, const char *arg)
 Per-fftool specific help handler. More...
 
static int parse_read_interval (const char *interval_spec, ReadInterval *interval)
 Parse interval specification, according to the format: INTERVAL ::= [START|+START_OFFSET][%[END|+END_OFFSET]] INTERVALS ::= INTERVAL[,INTERVALS]. More...
 
static int parse_read_intervals (const char *intervals_spec)
 
static int opt_read_intervals (void *optctx, const char *opt, const char *arg)
 
static int opt_pretty (void *optctx, const char *opt, const char *arg)
 
static void print_section (SectionID id, int level)
 
static int opt_sections (void *optctx, const char *opt, const char *arg)
 
static int opt_show_versions (void *optctx, const char *opt, const char *arg)
 
static int check_section_show_entries (int section_id)
 
int main (int argc, char **argv)
 

Variables

const char program_name [] = "ffprobe"
 program name, defined by the program for show_version(). More...
 
const int program_birth_year = 2007
 program birth year, defined by the program for show_banner() More...
 
static int do_bitexact = 0
 
static int do_count_frames = 0
 
static int do_count_packets = 0
 
static int do_read_frames = 0
 
static int do_read_packets = 0
 
static int do_show_chapters = 0
 
static int do_show_error = 0
 
static int do_show_format = 0
 
static int do_show_frames = 0
 
static int do_show_packets = 0
 
static int do_show_programs = 0
 
static int do_show_stream_groups = 0
 
static int do_show_stream_group_components = 0
 
static int do_show_streams = 0
 
static int do_show_stream_disposition = 0
 
static int do_show_stream_group_disposition = 0
 
static int do_show_data = 0
 
static int do_show_program_version = 0
 
static int do_show_library_versions = 0
 
static int do_show_pixel_formats = 0
 
static int do_show_pixel_format_flags = 0
 
static int do_show_pixel_format_components = 0
 
static int do_show_log = 0
 
static int do_show_chapter_tags = 0
 
static int do_show_format_tags = 0
 
static int do_show_frame_tags = 0
 
static int do_show_program_tags = 0
 
static int do_show_stream_group_tags = 0
 
static int do_show_stream_tags = 0
 
static int do_show_packet_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 int show_private_data = 1
 
static int show_optional_fields = SHOW_OPTIONAL_FIELDS_AUTO
 
static char * output_format
 
static char * stream_specifier
 
static char * show_data_hash
 
static ReadIntervalread_intervals
 
static int read_intervals_nb = 0
 
static int find_stream_info = 1
 
static struct section sections []
 
static const OptionDefoptions
 
static const char * input_filename
 
static const char * print_input_filename
 
static const AVInputFormatiformat = NULL
 
static const char * output_filename = NULL
 
static struct AVHashContexthash
 
struct {
   double   bin_val
 
   double   dec_val
 
   const char *   bin_str
 
   const char *   dec_str
 
si_prefixes []
 
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"
 
static int nb_streams
 
static uint64_t * nb_streams_packets
 
static uint64_t * nb_streams_frames
 
static intselected_streams
 
static LogBufferlog_buffer
 
static int log_buffer_size
 
static const AVOption writer_options []
 
static const AVClass writer_class
 
static const Writerregistered_writers [MAX_REGISTERED_WRITERS_NB+1]
 
static const AVOption default_options []
 
static const Writer default_writer
 
static const AVOption compact_options []
 
static const Writer compact_writer
 
static const AVOption csv_options []
 
static const Writer csv_writer
 
static const AVOption flat_options []
 
static const Writer flat_writer
 
static const AVOption ini_options []
 
static const Writer ini_writer
 
static const AVOption json_options []
 
static const Writer json_writer
 
static const AVOption xml_options []
 
static Writer xml_writer
 
static const OptionDef real_options []
 

Detailed Description

simple media prober based on the FFmpeg libraries

Definition in file ffprobe.c.

Macro Definition Documentation

◆ pthread_mutex_lock

#define pthread_mutex_lock (   a)    do{}while(0)

Definition at line 78 of file ffprobe.c.

◆ pthread_mutex_unlock

#define pthread_mutex_unlock (   a)    do{}while(0)

Definition at line 82 of file ffprobe.c.

◆ SHOW_OPTIONAL_FIELDS_AUTO

#define SHOW_OPTIONAL_FIELDS_AUTO   -1

Definition at line 145 of file ffprobe.c.

◆ SHOW_OPTIONAL_FIELDS_NEVER

#define SHOW_OPTIONAL_FIELDS_NEVER   0

Definition at line 146 of file ffprobe.c.

◆ SHOW_OPTIONAL_FIELDS_ALWAYS

#define SHOW_OPTIONAL_FIELDS_ALWAYS   1

Definition at line 147 of file ffprobe.c.

◆ SECTION_MAX_NB_CHILDREN

#define SECTION_MAX_NB_CHILDREN   11

Definition at line 169 of file ffprobe.c.

◆ SECTION_FLAG_IS_WRAPPER

#define SECTION_FLAG_IS_WRAPPER   1

the section only contains other sections, but has no data at its own level

Definition at line 245 of file ffprobe.c.

◆ SECTION_FLAG_IS_ARRAY

#define SECTION_FLAG_IS_ARRAY   2

the section contains an array of elements of the same type

Definition at line 246 of file ffprobe.c.

◆ SECTION_FLAG_HAS_VARIABLE_FIELDS

#define SECTION_FLAG_HAS_VARIABLE_FIELDS   4

the section may contain a variable number of fields with variable keys.

Definition at line 247 of file ffprobe.c.

◆ SECTION_FLAG_HAS_TYPE

#define SECTION_FLAG_HAS_TYPE   8

For these sections the element_name field is mandatory.

the section contains a type to distinguish multiple nested elements

Definition at line 249 of file ffprobe.c.

◆ WRITER_FLAG_DISPLAY_OPTIONAL_FIELDS

#define WRITER_FLAG_DISPLAY_OPTIONAL_FIELDS   1

Definition at line 515 of file ffprobe.c.

◆ WRITER_FLAG_PUT_PACKETS_AND_FRAMES_IN_SAME_CHAPTER

#define WRITER_FLAG_PUT_PACKETS_AND_FRAMES_IN_SAME_CHAPTER   2

Definition at line 516 of file ffprobe.c.

◆ SECTION_MAX_NB_LEVELS

#define SECTION_MAX_NB_LEVELS   12

Definition at line 541 of file ffprobe.c.

◆ OFFSET [1/8]

#define OFFSET (   x)    offsetof(WriterContext, x)

Definition at line 1819 of file ffprobe.c.

◆ PRINT_STRING_OPT

#define PRINT_STRING_OPT   1

Definition at line 894 of file ffprobe.c.

◆ PRINT_STRING_VALIDATE

#define PRINT_STRING_VALIDATE   2

Definition at line 895 of file ffprobe.c.

◆ writer_w8

#define writer_w8 (   wctx_,
  b_ 
)    (wctx_)->writer_w8(wctx_, b_)

Definition at line 1039 of file ffprobe.c.

◆ writer_put_str

#define writer_put_str (   wctx_,
  str_ 
)    (wctx_)->writer_put_str(wctx_, str_)

Definition at line 1040 of file ffprobe.c.

◆ writer_printf

#define writer_printf (   wctx_,
  fmt_,
  ... 
)    (wctx_)->writer_printf(wctx_, fmt_, __VA_ARGS__)

Definition at line 1041 of file ffprobe.c.

◆ MAX_REGISTERED_WRITERS_NB

#define MAX_REGISTERED_WRITERS_NB   64

Definition at line 1043 of file ffprobe.c.

◆ DEFINE_WRITER_CLASS

#define DEFINE_WRITER_CLASS (   name)
Value:
static const char *name##_get_name(void *ctx) \
{ \
return #name ; \
} \
static const AVClass name##_class = { \
.class_name = #name, \
.item_name = name##_get_name, \
.option = name##_options \
}

Definition at line 1072 of file ffprobe.c.

◆ OFFSET [2/8]

#define OFFSET (   x)    offsetof(DefaultContext, x)

Definition at line 1819 of file ffprobe.c.

◆ OFFSET [3/8]

#define OFFSET (   x)    offsetof(CompactContext, x)

Definition at line 1819 of file ffprobe.c.

◆ OFFSET [4/8]

#define OFFSET (   x)    offsetof(CompactContext, x)

Definition at line 1819 of file ffprobe.c.

◆ OFFSET [5/8]

#define OFFSET (   x)    offsetof(FlatContext, x)

Definition at line 1819 of file ffprobe.c.

◆ OFFSET [6/8]

#define OFFSET (   x)    offsetof(INIContext, x)

Definition at line 1819 of file ffprobe.c.

◆ OFFSET [7/8]

#define OFFSET (   x)    offsetof(JSONContext, x)

Definition at line 1819 of file ffprobe.c.

◆ JSON_INDENT

#define JSON_INDENT ( )    writer_printf(wctx, "%*c", json->indent_level * 4, ' ')

Definition at line 1691 of file ffprobe.c.

◆ OFFSET [8/8]

#define OFFSET (   x)    offsetof(XMLContext, x)

Definition at line 1819 of file ffprobe.c.

◆ CHECK_COMPLIANCE

#define CHECK_COMPLIANCE (   opt,
  opt_name 
)
Value:
if (opt) { \
av_log(wctx, AV_LOG_ERROR, \
"XSD-compliant output selected but option '%s' was selected, XML output may be non-compliant.\n" \
"You need to disable such option with '-no%s'\n", opt_name, opt_name); \
return AVERROR(EINVAL); \
}

◆ XML_INDENT

#define XML_INDENT ( )    writer_printf(wctx, "%*c", xml->indent_level * 4, ' ')

Definition at line 1852 of file ffprobe.c.

◆ print_fmt

#define print_fmt (   k,
  f,
  ... 
)
Value:
do { \
av_bprint_clear(&pbuf); \
av_bprintf(&pbuf, f, __VA_ARGS__); \
writer_print_string(w, k, pbuf.str, 0); \
} while (0)

Definition at line 1997 of file ffprobe.c.

◆ print_list_fmt

#define print_list_fmt (   k,
  f,
  n,
  m,
  ... 
)
Value:
do { \
av_bprint_clear(&pbuf); \
for (int idx = 0; idx < n; idx++) { \
for (int idx2 = 0; idx2 < m; idx2++) { \
if (idx > 0 || idx2 > 0) \
av_bprint_chars(&pbuf, ' ', 1); \
av_bprintf(&pbuf, f, __VA_ARGS__); \
} \
} \
writer_print_string(w, k, pbuf.str, 0); \
} while (0)

Definition at line 2003 of file ffprobe.c.

◆ print_int

#define print_int (   k,
 
)    writer_print_integer(w, k, v)

Definition at line 2015 of file ffprobe.c.

◆ print_q

#define print_q (   k,
  v,
  s 
)    writer_print_rational(w, k, v, s)

Definition at line 2016 of file ffprobe.c.

◆ print_str

#define print_str (   k,
 
)    writer_print_string(w, k, v, 0)

Definition at line 2017 of file ffprobe.c.

◆ print_str_opt

#define print_str_opt (   k,
 
)    writer_print_string(w, k, v, PRINT_STRING_OPT)

Definition at line 2018 of file ffprobe.c.

◆ print_str_validate

#define print_str_validate (   k,
 
)    writer_print_string(w, k, v, PRINT_STRING_VALIDATE)

Definition at line 2019 of file ffprobe.c.

◆ print_time

#define print_time (   k,
  v,
  tb 
)    writer_print_time(w, k, v, tb, 0)

Definition at line 2020 of file ffprobe.c.

◆ print_ts

#define print_ts (   k,
 
)    writer_print_ts(w, k, v, 0)

Definition at line 2021 of file ffprobe.c.

◆ print_duration_time

#define print_duration_time (   k,
  v,
  tb 
)    writer_print_time(w, k, v, tb, 1)

Definition at line 2022 of file ffprobe.c.

◆ print_duration_ts

#define print_duration_ts (   k,
 
)    writer_print_ts(w, k, v, 1)

Definition at line 2023 of file ffprobe.c.

◆ print_val

#define print_val (   k,
  v,
  u 
)
Value:
do { \
struct unit_value uv; \
uv.val.i = v; \
uv.unit = u; \
writer_print_string(w, k, value_string(val_str, sizeof(val_str), uv), 0); \
} while (0)

Definition at line 2024 of file ffprobe.c.

◆ print_section_header

#define print_section_header (   s)    writer_print_section_header(w, NULL, s)

Definition at line 2031 of file ffprobe.c.

◆ print_section_header_data

#define print_section_header_data (   s,
  d 
)    writer_print_section_header(w, d, s)

Definition at line 2032 of file ffprobe.c.

◆ print_section_footer

#define print_section_footer (   s)    writer_print_section_footer(w, s)

Definition at line 2033 of file ffprobe.c.

◆ REALLOCZ_ARRAY_STREAM

#define REALLOCZ_ARRAY_STREAM (   ptr,
  cur_n,
  new_n 
)
Value:
{ \
ret = av_reallocp_array(&(ptr), (new_n), sizeof(*(ptr))); \
if (ret < 0) \
goto end; \
memset( (ptr) + (cur_n), 0, ((new_n) - (cur_n)) * sizeof(*(ptr)) ); \
}

Definition at line 2035 of file ffprobe.c.

◆ IN_PROGRAM

#define IN_PROGRAM   1

Definition at line 3239 of file ffprobe.c.

◆ IN_STREAM_GROUP

#define IN_STREAM_GROUP   2

Definition at line 3240 of file ffprobe.c.

◆ CHECK_END

#define CHECK_END   if (ret < 0) goto end

◆ SHOW_LIB_VERSION

#define SHOW_LIB_VERSION (   libname,
  LIBNAME 
)
Value:
do { \
if (CONFIG_##LIBNAME) { \
unsigned int version = libname##_version(); \
writer_print_section_header(w, NULL, SECTION_ID_LIBRARY_VERSION); \
print_str("name", "lib" #libname); \
print_int("major", LIB##LIBNAME##_VERSION_MAJOR); \
print_int("minor", LIB##LIBNAME##_VERSION_MINOR); \
print_int("micro", LIB##LIBNAME##_VERSION_MICRO); \
print_int("version", version); \
print_str("ident", LIB##LIBNAME##_IDENT); \
writer_print_section_footer(w); \
} \
} while (0)

Definition at line 4089 of file ffprobe.c.

◆ PRINT_PIX_FMT_FLAG

#define PRINT_PIX_FMT_FLAG (   flagname,
  name 
)
Value:
do { \
print_int(name, !!(pixdesc->flags & AV_PIX_FMT_FLAG_##flagname)); \
} while (0)

Definition at line 4118 of file ffprobe.c.

◆ DEFINE_OPT_SHOW_SECTION

#define DEFINE_OPT_SHOW_SECTION (   section,
  target_section_id 
)
Value:
static int opt_show_##section(void *optctx, const char *opt, const char *arg) \
{ \
mark_section_show_entries(SECTION_ID_##target_section_id, 1, NULL); \
return 0; \
}

Definition at line 4524 of file ffprobe.c.

◆ SET_DO_SHOW

#define SET_DO_SHOW (   id,
  varname 
)
Value:
do { \
if (check_section_show_entries(SECTION_ID_##id)) \
do_show_##varname = 1; \
} while (0)

Definition at line 4605 of file ffprobe.c.

Enumeration Type Documentation

◆ SectionID

enum SectionID
Enumerator
SECTION_ID_NONE 
SECTION_ID_CHAPTER 
SECTION_ID_CHAPTER_TAGS 
SECTION_ID_CHAPTERS 
SECTION_ID_ERROR 
SECTION_ID_FORMAT 
SECTION_ID_FORMAT_TAGS 
SECTION_ID_FRAME 
SECTION_ID_FRAMES 
SECTION_ID_FRAME_TAGS 
SECTION_ID_FRAME_SIDE_DATA_LIST 
SECTION_ID_FRAME_SIDE_DATA 
SECTION_ID_FRAME_SIDE_DATA_TIMECODE_LIST 
SECTION_ID_FRAME_SIDE_DATA_TIMECODE 
SECTION_ID_FRAME_SIDE_DATA_COMPONENT_LIST 
SECTION_ID_FRAME_SIDE_DATA_COMPONENT 
SECTION_ID_FRAME_SIDE_DATA_PIECE_LIST 
SECTION_ID_FRAME_SIDE_DATA_PIECE 
SECTION_ID_FRAME_LOG 
SECTION_ID_FRAME_LOGS 
SECTION_ID_LIBRARY_VERSION 
SECTION_ID_LIBRARY_VERSIONS 
SECTION_ID_PACKET 
SECTION_ID_PACKET_TAGS 
SECTION_ID_PACKETS 
SECTION_ID_PACKETS_AND_FRAMES 
SECTION_ID_PACKET_SIDE_DATA_LIST 
SECTION_ID_PACKET_SIDE_DATA 
SECTION_ID_PIXEL_FORMAT 
SECTION_ID_PIXEL_FORMAT_FLAGS 
SECTION_ID_PIXEL_FORMAT_COMPONENT 
SECTION_ID_PIXEL_FORMAT_COMPONENTS 
SECTION_ID_PIXEL_FORMATS 
SECTION_ID_PROGRAM_STREAM_DISPOSITION 
SECTION_ID_PROGRAM_STREAM_TAGS 
SECTION_ID_PROGRAM 
SECTION_ID_PROGRAM_STREAMS 
SECTION_ID_PROGRAM_STREAM 
SECTION_ID_PROGRAM_TAGS 
SECTION_ID_PROGRAM_VERSION 
SECTION_ID_PROGRAMS 
SECTION_ID_STREAM_GROUP_STREAM_DISPOSITION 
SECTION_ID_STREAM_GROUP_STREAM_TAGS 
SECTION_ID_STREAM_GROUP 
SECTION_ID_STREAM_GROUP_COMPONENTS 
SECTION_ID_STREAM_GROUP_COMPONENT 
SECTION_ID_STREAM_GROUP_SUBCOMPONENTS 
SECTION_ID_STREAM_GROUP_SUBCOMPONENT 
SECTION_ID_STREAM_GROUP_PIECES 
SECTION_ID_STREAM_GROUP_PIECE 
SECTION_ID_STREAM_GROUP_SUBPIECES 
SECTION_ID_STREAM_GROUP_SUBPIECE 
SECTION_ID_STREAM_GROUP_BLOCKS 
SECTION_ID_STREAM_GROUP_BLOCK 
SECTION_ID_STREAM_GROUP_STREAMS 
SECTION_ID_STREAM_GROUP_STREAM 
SECTION_ID_STREAM_GROUP_DISPOSITION 
SECTION_ID_STREAM_GROUP_TAGS 
SECTION_ID_STREAM_GROUPS 
SECTION_ID_ROOT 
SECTION_ID_STREAM 
SECTION_ID_STREAM_DISPOSITION 
SECTION_ID_STREAMS 
SECTION_ID_STREAM_TAGS 
SECTION_ID_STREAM_SIDE_DATA_LIST 
SECTION_ID_STREAM_SIDE_DATA 
SECTION_ID_SUBTITLE 

Definition at line 171 of file ffprobe.c.

◆ StringValidation

Enumerator
WRITER_STRING_VALIDATION_FAIL 
WRITER_STRING_VALIDATION_REPLACE 
WRITER_STRING_VALIDATION_IGNORE 
WRITER_STRING_VALIDATION_NB 

Definition at line 518 of file ffprobe.c.

Function Documentation

◆ get_packet_side_data_type()

static const char* get_packet_side_data_type ( const void *  data)
static

Definition at line 260 of file ffprobe.c.

◆ get_frame_side_data_type()

static const char* get_frame_side_data_type ( const void *  data)
static

Definition at line 266 of file ffprobe.c.

◆ get_raw_string_type()

static const char* get_raw_string_type ( const void *  data)
static

Definition at line 272 of file ffprobe.c.

◆ get_stream_group_type()

static const char* get_stream_group_type ( const void *  data)
static

Definition at line 277 of file ffprobe.c.

◆ log_callback()

static void log_callback ( void *  ptr,
int  level,
const char *  fmt,
va_list  vl 
)
static

Definition at line 404 of file ffprobe.c.

Referenced by av_vlog(), and main().

◆ value_string()

static char* value_string ( char *  buf,
int  buf_size,
struct unit_value  uv 
)
static

Definition at line 458 of file ffprobe.c.

Referenced by writer_print_time().

◆ writer_get_name()

static const char* writer_get_name ( void *  p)
static

Definition at line 577 of file ffprobe.c.

◆ writer_child_next()

static void* writer_child_next ( void *  obj,
void *  prev 
)
static

Definition at line 598 of file ffprobe.c.

◆ writer_close()

static int writer_close ( WriterContext **  wctx)
static

Definition at line 614 of file ffprobe.c.

Referenced by main(), and writer_open().

◆ bprint_bytes()

static void bprint_bytes ( AVBPrint *  bp,
const uint8_t *  ubuf,
size_t  ubuf_size 
)
static

Definition at line 638 of file ffprobe.c.

Referenced by validate_string(), and writer_open().

◆ writer_w8_avio()

static void writer_w8_avio ( WriterContext wctx,
int  b 
)
inlinestatic

Definition at line 646 of file ffprobe.c.

Referenced by writer_open().

◆ writer_put_str_avio()

static void writer_put_str_avio ( WriterContext wctx,
const char *  str 
)
inlinestatic

Definition at line 651 of file ffprobe.c.

Referenced by writer_open().

◆ writer_printf_avio()

static void writer_printf_avio ( WriterContext wctx,
const char *  fmt,
  ... 
)
inlinestatic

Definition at line 656 of file ffprobe.c.

Referenced by writer_open().

◆ writer_w8_printf()

static void writer_w8_printf ( WriterContext wctx,
int  b 
)
inlinestatic

Definition at line 665 of file ffprobe.c.

Referenced by writer_open().

◆ writer_put_str_printf()

static void writer_put_str_printf ( WriterContext wctx,
const char *  str 
)
inlinestatic

Definition at line 670 of file ffprobe.c.

Referenced by writer_open().

◆ writer_printf_printf()

static void writer_printf_printf ( WriterContext wctx,
const char *  fmt,
  ... 
)
inlinestatic

Definition at line 675 of file ffprobe.c.

Referenced by writer_open().

◆ writer_open()

static int writer_open ( WriterContext **  wctx,
const Writer writer,
const char *  args,
const struct section sections,
int  nb_sections,
const char *  output 
)
static

Definition at line 684 of file ffprobe.c.

Referenced by main().

◆ writer_print_section_header()

static void writer_print_section_header ( WriterContext wctx,
const void *  data,
int  section_id 
)
inlinestatic

◆ writer_print_section_footer()

static void writer_print_section_footer ( WriterContext wctx)
inlinestatic

◆ writer_print_integer()

static void writer_print_integer ( WriterContext wctx,
const char *  key,
int64_t  val 
)
inlinestatic

Definition at line 828 of file ffprobe.c.

Referenced by writer_print_ts().

◆ validate_string()

static int validate_string ( WriterContext wctx,
char **  dstp,
const char *  src 
)
inlinestatic

Definition at line 839 of file ffprobe.c.

Referenced by writer_print_string().

◆ writer_print_string()

static int writer_print_string ( WriterContext wctx,
const char *  key,
const char *  val,
int  flags 
)
inlinestatic

◆ writer_print_rational()

static void writer_print_rational ( WriterContext wctx,
const char *  key,
AVRational  q,
char  sep 
)
inlinestatic

Definition at line 935 of file ffprobe.c.

◆ writer_print_time()

static void writer_print_time ( WriterContext wctx,
const char *  key,
int64_t  ts,
const AVRational time_base,
int  is_duration 
)
static

Definition at line 944 of file ffprobe.c.

◆ writer_print_ts()

static void writer_print_ts ( WriterContext wctx,
const char *  key,
int64_t  ts,
int  is_duration 
)
static

Definition at line 961 of file ffprobe.c.

◆ writer_print_data()

static void writer_print_data ( WriterContext wctx,
const char *  name,
const uint8_t *  data,
int  size 
)
static

Definition at line 970 of file ffprobe.c.

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

◆ writer_print_data_hash()

static void writer_print_data_hash ( WriterContext wctx,
const char *  name,
const uint8_t *  data,
int  size 
)
static

Definition at line 998 of file ffprobe.c.

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

◆ writer_print_integers()

static void writer_print_integers ( WriterContext wctx,
const char *  name,
uint8_t *  data,
int  size,
const char *  format,
int  columns,
int  bytes,
int  offset_add 
)
static

Definition at line 1013 of file ffprobe.c.

Referenced by print_frame_side_data(), and print_pkt_side_data().

◆ writer_register()

static int writer_register ( const Writer writer)
static

Definition at line 1047 of file ffprobe.c.

Referenced by writer_register_all().

◆ writer_get_by_name()

static const Writer* writer_get_by_name ( const char *  name)
static

Definition at line 1058 of file ffprobe.c.

Referenced by main().

◆ DEFINE_WRITER_CLASS() [1/7]

DEFINE_WRITER_CLASS ( default  )

◆ upcase_string()

static char* upcase_string ( char *  dst,
size_t  dst_size,
const char *  src 
)
inlinestatic

Definition at line 1106 of file ffprobe.c.

Referenced by default_print_section_footer(), and default_print_section_header().

◆ default_print_section_header()

static void default_print_section_header ( WriterContext wctx,
const void *  data 
)
static

Definition at line 1115 of file ffprobe.c.

◆ default_print_section_footer()

static void default_print_section_footer ( WriterContext wctx)
static

Definition at line 1140 of file ffprobe.c.

◆ default_print_str()

static void default_print_str ( WriterContext wctx,
const char *  key,
const char *  value 
)
static

Definition at line 1153 of file ffprobe.c.

◆ default_print_int()

static void default_print_int ( WriterContext wctx,
const char *  key,
int64_t  value 
)
static

Definition at line 1162 of file ffprobe.c.

◆ c_escape_str()

static const char* c_escape_str ( AVBPrint *  dst,
const char *  src,
const char  sep,
void *  log_ctx 
)
static

Apply C-language-like string escaping.

Definition at line 1187 of file ffprobe.c.

Referenced by compact_init().

◆ csv_escape_str()

static const char* csv_escape_str ( AVBPrint *  dst,
const char *  src,
const char  sep,
void *  log_ctx 
)
static

Quote fields containing special characters, check RFC4180.

Definition at line 1210 of file ffprobe.c.

Referenced by compact_init().

◆ none_escape_str()

static const char* none_escape_str ( AVBPrint *  dst,
const char *  src,
const char  sep,
void *  log_ctx 
)
static

Definition at line 1228 of file ffprobe.c.

Referenced by compact_init().

◆ DEFINE_WRITER_CLASS() [2/7]

DEFINE_WRITER_CLASS ( compact  )

◆ compact_init()

static av_cold int compact_init ( WriterContext wctx)
static

Definition at line 1263 of file ffprobe.c.

◆ compact_print_section_header()

static void compact_print_section_header ( WriterContext wctx,
const void *  data 
)
static

Definition at line 1285 of file ffprobe.c.

◆ compact_print_section_footer()

static void compact_print_section_footer ( WriterContext wctx)
static

Definition at line 1337 of file ffprobe.c.

◆ compact_print_str()

static void compact_print_str ( WriterContext wctx,
const char *  key,
const char *  value 
)
static

Definition at line 1347 of file ffprobe.c.

◆ compact_print_int()

static void compact_print_int ( WriterContext wctx,
const char *  key,
int64_t  value 
)
static

Definition at line 1360 of file ffprobe.c.

◆ DEFINE_WRITER_CLASS() [3/7]

DEFINE_WRITER_CLASS ( csv  )

◆ DEFINE_WRITER_CLASS() [4/7]

DEFINE_WRITER_CLASS ( flat  )

◆ flat_init()

static av_cold int flat_init ( WriterContext wctx)
static

Definition at line 1435 of file ffprobe.c.

◆ flat_escape_key_str()

static const char* flat_escape_key_str ( AVBPrint *  dst,
const char *  src,
const char  sep 
)
static

Definition at line 1449 of file ffprobe.c.

Referenced by flat_print_str().

◆ flat_escape_value_str()

static const char* flat_escape_value_str ( AVBPrint *  dst,
const char *  src 
)
static

Definition at line 1464 of file ffprobe.c.

Referenced by flat_print_str().

◆ flat_print_section_header()

static void flat_print_section_header ( WriterContext wctx,
const void *  data 
)
static

Definition at line 1482 of file ffprobe.c.

◆ flat_print_int()

static void flat_print_int ( WriterContext wctx,
const char *  key,
int64_t  value 
)
static

Definition at line 1508 of file ffprobe.c.

◆ flat_print_str()

static void flat_print_str ( WriterContext wctx,
const char *  key,
const char *  value 
)
static

Definition at line 1513 of file ffprobe.c.

◆ DEFINE_WRITER_CLASS() [5/7]

DEFINE_WRITER_CLASS ( ini  )

◆ ini_escape_str()

static char* ini_escape_str ( AVBPrint *  dst,
const char *  src 
)
static

Definition at line 1555 of file ffprobe.c.

Referenced by ini_print_str().

◆ ini_print_section_header()

static void ini_print_section_header ( WriterContext wctx,
const void *  data 
)
static

Definition at line 1582 of file ffprobe.c.

◆ ini_print_str()

static void ini_print_str ( WriterContext wctx,
const char *  key,
const char *  value 
)
static

Definition at line 1615 of file ffprobe.c.

◆ ini_print_int()

static void ini_print_int ( WriterContext wctx,
const char *  key,
int64_t  value 
)
static

Definition at line 1626 of file ffprobe.c.

◆ DEFINE_WRITER_CLASS() [6/7]

DEFINE_WRITER_CLASS ( json  )

◆ json_init()

static av_cold int json_init ( WriterContext wctx)
static

Definition at line 1661 of file ffprobe.c.

◆ json_escape_str()

static const char* json_escape_str ( AVBPrint *  dst,
const char *  src,
void *  log_ctx 
)
static

Definition at line 1671 of file ffprobe.c.

Referenced by json_print_int(), json_print_item_str(), and json_print_section_header().

◆ json_print_section_header()

static void json_print_section_header ( WriterContext wctx,
const void *  data 
)
static

Definition at line 1693 of file ffprobe.c.

◆ json_print_section_footer()

static void json_print_section_footer ( WriterContext wctx)
static

Definition at line 1732 of file ffprobe.c.

◆ json_print_item_str()

static void json_print_item_str ( WriterContext wctx,
const char *  key,
const char *  value 
)
inlinestatic

Definition at line 1754 of file ffprobe.c.

Referenced by json_print_str().

◆ json_print_str()

static void json_print_str ( WriterContext wctx,
const char *  key,
const char *  value 
)
static

Definition at line 1766 of file ffprobe.c.

◆ json_print_int()

static void json_print_int ( WriterContext wctx,
const char *  key,
int64_t  value 
)
static

Definition at line 1779 of file ffprobe.c.

◆ DEFINE_WRITER_CLASS() [7/7]

DEFINE_WRITER_CLASS ( xml  )

◆ xml_init()

static av_cold int xml_init ( WriterContext wctx)
static

Definition at line 1831 of file ffprobe.c.

◆ xml_print_section_header()

static void xml_print_section_header ( WriterContext wctx,
const void *  data 
)
static

Definition at line 1854 of file ffprobe.c.

◆ xml_print_section_footer()

static void xml_print_section_footer ( WriterContext wctx)
static

Definition at line 1900 of file ffprobe.c.

◆ xml_print_value()

static void xml_print_value ( WriterContext wctx,
const char *  key,
const char *  str,
int64_t  num,
const int  is_int 
)
static

Definition at line 1917 of file ffprobe.c.

Referenced by xml_print_int(), and xml_print_str().

◆ xml_print_str()

static void xml_print_str ( WriterContext wctx,
const char *  key,
const char *  value 
)
inlinestatic

Definition at line 1959 of file ffprobe.c.

◆ xml_print_int()

static void xml_print_int ( WriterContext wctx,
const char *  key,
int64_t  value 
)
static

Definition at line 1963 of file ffprobe.c.

◆ writer_register_all()

static void writer_register_all ( void  )
static

Definition at line 1980 of file ffprobe.c.

Referenced by main().

◆ show_tags()

static int show_tags ( WriterContext w,
AVDictionary tags,
int  section_id 
)
inlinestatic

◆ print_dovi_metadata()

static void print_dovi_metadata ( WriterContext w,
const AVDOVIMetadata dovi 
)
static

Definition at line 2061 of file ffprobe.c.

Referenced by print_frame_side_data().

◆ print_dynamic_hdr10_plus()

static void print_dynamic_hdr10_plus ( WriterContext w,
const AVDynamicHDRPlus metadata 
)
static

Definition at line 2223 of file ffprobe.c.

Referenced by print_frame_side_data(), and print_pkt_side_data().

◆ print_dynamic_hdr_vivid()

static void print_dynamic_hdr_vivid ( WriterContext w,
const AVDynamicHDRVivid metadata 
)
static

Definition at line 2322 of file ffprobe.c.

Referenced by print_frame_side_data().

◆ print_ambient_viewing_environment()

static void print_ambient_viewing_environment ( WriterContext w,
const AVAmbientViewingEnvironment env 
)
static

Definition at line 2392 of file ffprobe.c.

Referenced by print_frame_side_data(), and print_pkt_side_data().

◆ print_film_grain_params()

static void print_film_grain_params ( WriterContext w,
const AVFilmGrainParams fgp 
)
static

Definition at line 2403 of file ffprobe.c.

Referenced by print_frame_side_data().

◆ print_pkt_side_data()

static void print_pkt_side_data ( WriterContext w,
AVCodecParameters par,
const AVPacketSideData sd,
SectionID  id_data 
)
static

Definition at line 2528 of file ffprobe.c.

Referenced by show_packet(), and show_stream().

◆ print_private_data()

static void print_private_data ( WriterContext w,
void *  priv_data 
)
static

Definition at line 2631 of file ffprobe.c.

Referenced by show_stream().

◆ print_color_range()

static void print_color_range ( WriterContext w,
enum AVColorRange  color_range 
)
static

Definition at line 2644 of file ffprobe.c.

Referenced by show_frame(), and show_stream().

◆ print_color_space()

static void print_color_space ( WriterContext w,
enum AVColorSpace  color_space 
)
static

Definition at line 2654 of file ffprobe.c.

Referenced by show_frame(), and show_stream().

◆ print_primaries()

static void print_primaries ( WriterContext w,
enum AVColorPrimaries  color_primaries 
)
static

Definition at line 2664 of file ffprobe.c.

Referenced by show_frame(), and show_stream().

◆ print_color_trc()

static void print_color_trc ( WriterContext w,
enum AVColorTransferCharacteristic  color_trc 
)
static

Definition at line 2674 of file ffprobe.c.

Referenced by show_frame(), and show_stream().

◆ print_chroma_location()

static void print_chroma_location ( WriterContext w,
enum AVChromaLocation  chroma_location 
)
static

Definition at line 2684 of file ffprobe.c.

Referenced by show_frame(), and show_stream().

◆ clear_log()

static void clear_log ( int  need_lock)
static

Definition at line 2694 of file ffprobe.c.

Referenced by process_frame(), and show_log().

◆ show_log()

static int show_log ( WriterContext w,
int  section_ids,
int  section_id,
int  log_level 
)
static

Definition at line 2710 of file ffprobe.c.

Referenced by show_frame().

◆ show_packet()

static void show_packet ( WriterContext w,
InputFile ifile,
AVPacket pkt,
int  packet_idx 
)
static

Definition at line 2745 of file ffprobe.c.

Referenced by read_interval_packets().

◆ show_subtitle()

static void show_subtitle ( WriterContext w,
AVSubtitle sub,
AVStream stream,
AVFormatContext fmt_ctx 
)
static

Definition at line 2803 of file ffprobe.c.

Referenced by process_frame().

◆ print_frame_side_data()

static void print_frame_side_data ( WriterContext w,
const AVFrame frame,
const AVStream stream 
)
static

Definition at line 2826 of file ffprobe.c.

Referenced by show_frame().

◆ show_frame()

static void show_frame ( WriterContext w,
AVFrame frame,
AVStream stream,
AVFormatContext fmt_ctx 
)
static

◆ process_frame()

static av_always_inline int process_frame ( WriterContext w,
InputFile ifile,
AVFrame frame,
const AVPacket pkt,
int packet_new 
)
static

Definition at line 2997 of file ffprobe.c.

Referenced by init_framesync(), and read_interval_packets().

◆ log_read_interval()

static void log_read_interval ( const ReadInterval interval,
void *  log_ctx,
int  log_level 
)
static

Definition at line 3060 of file ffprobe.c.

Referenced by parse_read_intervals(), and read_interval_packets().

◆ read_interval_packets()

static int read_interval_packets ( WriterContext w,
InputFile ifile,
const ReadInterval interval,
int64_t *  cur_ts 
)
static

Definition at line 3084 of file ffprobe.c.

Referenced by read_packets().

◆ read_packets()

static int read_packets ( WriterContext w,
InputFile ifile 
)
static

Definition at line 3207 of file ffprobe.c.

Referenced by probe_file().

◆ print_dispositions()

static void print_dispositions ( WriterContext w,
uint32_t  disposition,
SectionID  section_id 
)
static

Definition at line 3227 of file ffprobe.c.

Referenced by show_stream(), and show_stream_group().

◆ show_stream()

static int show_stream ( WriterContext w,
AVFormatContext fmt_ctx,
int  stream_idx,
InputStream ist,
int  container 
)
static

Definition at line 3242 of file ffprobe.c.

Referenced by show_program(), show_stream_group(), and show_streams().

◆ show_streams()

static int show_streams ( WriterContext w,
InputFile ifile 
)
static

Definition at line 3462 of file ffprobe.c.

Referenced by probe_file().

◆ show_program()

static int show_program ( WriterContext w,
InputFile ifile,
AVProgram program 
)
static

Definition at line 3479 of file ffprobe.c.

Referenced by show_programs().

◆ show_programs()

static int show_programs ( WriterContext w,
InputFile ifile 
)
static

Definition at line 3510 of file ffprobe.c.

Referenced by probe_file().

◆ print_tile_grid_params()

static void print_tile_grid_params ( WriterContext w,
const AVStreamGroup stg,
const AVStreamGroupTileGrid tile_grid 
)
static

Definition at line 3528 of file ffprobe.c.

Referenced by print_stream_group_params().

◆ print_iamf_param_definition()

static void print_iamf_param_definition ( WriterContext w,
const char *  name,
const AVIAMFParamDefinition param,
SectionID  section_id 
)
static

Definition at line 3551 of file ffprobe.c.

Referenced by print_iamf_audio_element_params(), and print_iamf_submix_params().

◆ print_iamf_audio_element_params()

static void print_iamf_audio_element_params ( WriterContext w,
const AVStreamGroup stg,
const AVIAMFAudioElement audio_element 
)
static

Definition at line 3606 of file ffprobe.c.

Referenced by print_stream_group_params().

◆ print_iamf_submix_params()

static void print_iamf_submix_params ( WriterContext w,
const AVIAMFSubmix submix 
)
static

Definition at line 3637 of file ffprobe.c.

Referenced by print_iamf_mix_presentation_params().

◆ print_iamf_mix_presentation_params()

static void print_iamf_mix_presentation_params ( WriterContext w,
const AVStreamGroup stg,
const AVIAMFMixPresentation mix_presentation 
)
static

Definition at line 3684 of file ffprobe.c.

Referenced by print_stream_group_params().

◆ print_stream_group_params()

static void print_stream_group_params ( WriterContext w,
AVStreamGroup stg 
)
static

Definition at line 3703 of file ffprobe.c.

Referenced by show_stream_group().

◆ show_stream_group()

static int show_stream_group ( WriterContext w,
InputFile ifile,
AVStreamGroup stg 
)
static

Definition at line 3715 of file ffprobe.c.

Referenced by show_stream_groups().

◆ show_stream_groups()

static int show_stream_groups ( WriterContext w,
InputFile ifile 
)
static

Definition at line 3759 of file ffprobe.c.

Referenced by probe_file().

◆ show_chapters()

static int show_chapters ( WriterContext w,
InputFile ifile 
)
static

Definition at line 3776 of file ffprobe.c.

Referenced by probe_file().

◆ show_format()

static int show_format ( WriterContext w,
InputFile ifile 
)
static

Definition at line 3801 of file ffprobe.c.

Referenced by probe_file().

◆ show_error()

static void show_error ( WriterContext w,
int  err 
)
static

Definition at line 3833 of file ffprobe.c.

Referenced by main().

◆ open_input_file()

static int open_input_file ( InputFile ifile,
const char *  filename,
const char *  print_filename 
)
static

Definition at line 3841 of file ffprobe.c.

Referenced by probe_file().

◆ close_input_file()

static void close_input_file ( InputFile ifile)
static

Definition at line 3966 of file ffprobe.c.

Referenced by probe_file().

◆ probe_file()

static int probe_file ( WriterContext wctx,
const char *  filename,
const char *  print_filename 
)
static

Definition at line 3980 of file ffprobe.c.

Referenced by main().

◆ show_usage()

static void show_usage ( void  )
static

Definition at line 4066 of file ffprobe.c.

Referenced by main(), and show_help_default().

◆ ffprobe_show_program_version()

static void ffprobe_show_program_version ( WriterContext w)
static

Definition at line 4073 of file ffprobe.c.

Referenced by main().

◆ ffprobe_show_library_versions()

static void ffprobe_show_library_versions ( WriterContext w)
static

Definition at line 4104 of file ffprobe.c.

Referenced by main().

◆ ffprobe_show_pixel_formats()

static void ffprobe_show_pixel_formats ( WriterContext w)
static

Definition at line 4123 of file ffprobe.c.

Referenced by main().

◆ opt_show_optional_fields()

static int opt_show_optional_fields ( void *  optctx,
const char *  opt,
const char *  arg 
)
static

Definition at line 4169 of file ffprobe.c.

◆ opt_format()

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

Definition at line 4186 of file ffprobe.c.

◆ mark_section_show_entries()

static void mark_section_show_entries ( SectionID  section_id,
int  show_all_entries,
AVDictionary entries 
)
inlinestatic

Definition at line 4196 of file ffprobe.c.

Referenced by match_section(), and opt_show_versions().

◆ match_section()

static int match_section ( const char *  section_name,
int  show_all_entries,
AVDictionary entries 
)
static

Definition at line 4210 of file ffprobe.c.

Referenced by opt_show_entries().

◆ opt_show_entries()

static int opt_show_entries ( void *  optctx,
const char *  opt,
const char *  arg 
)
static

Definition at line 4229 of file ffprobe.c.

◆ opt_input_file()

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

Definition at line 4279 of file ffprobe.c.

Referenced by main(), and opt_input_file_i().

◆ opt_input_file_i()

static int opt_input_file_i ( void *  optctx,
const char *  opt,
const char *  arg 
)
static

Definition at line 4296 of file ffprobe.c.

◆ opt_output_file_o()

static int opt_output_file_o ( void *  optctx,
const char *  opt,
const char *  arg 
)
static

Definition at line 4302 of file ffprobe.c.

◆ opt_print_filename()

static int opt_print_filename ( void *  optctx,
const char *  opt,
const char *  arg 
)
static

Definition at line 4319 of file ffprobe.c.

◆ show_help_default()

void show_help_default ( const char *  opt,
const char *  arg 
)

Per-fftool specific help handler.

Implemented in each fftool, called by show_help().

Definition at line 4326 of file ffprobe.c.

Referenced by show_help().

◆ parse_read_interval()

static int parse_read_interval ( const char *  interval_spec,
ReadInterval interval 
)
static

Parse interval specification, according to the format: INTERVAL ::= [START|+START_OFFSET][%[END|+END_OFFSET]] INTERVALS ::= INTERVAL[,INTERVALS].

Definition at line 4342 of file ffprobe.c.

Referenced by parse_read_intervals().

◆ parse_read_intervals()

static int parse_read_intervals ( const char *  intervals_spec)
static

Definition at line 4424 of file ffprobe.c.

Referenced by opt_read_intervals().

◆ opt_read_intervals()

static int opt_read_intervals ( void *  optctx,
const char *  opt,
const char *  arg 
)
static

Definition at line 4472 of file ffprobe.c.

◆ opt_pretty()

static int opt_pretty ( void *  optctx,
const char *  opt,
const char *  arg 
)
static

Definition at line 4477 of file ffprobe.c.

◆ print_section()

static void print_section ( SectionID  id,
int  level 
)
static

Definition at line 4486 of file ffprobe.c.

Referenced by opt_sections().

◆ opt_sections()

static int opt_sections ( void *  optctx,
const char *  opt,
const char *  arg 
)
static

Definition at line 4504 of file ffprobe.c.

◆ opt_show_versions()

static int opt_show_versions ( void *  optctx,
const char *  opt,
const char *  arg 
)
static

Definition at line 4517 of file ffprobe.c.

◆ check_section_show_entries()

static int check_section_show_entries ( int  section_id)
inlinestatic

Definition at line 4594 of file ffprobe.c.

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 4610 of file ffprobe.c.

Variable Documentation

◆ program_name

const char program_name[] = "ffprobe"

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

Definition at line 104 of file ffprobe.c.

Referenced by expand_filename_template(), init_report(), main(), print_program_info(), show_help_default(), show_license(), show_usage(), and usage().

◆ program_birth_year

const int program_birth_year = 2007

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

Definition at line 105 of file ffprobe.c.

Referenced by ffprobe_show_program_version(), and print_program_info().

◆ do_bitexact

int do_bitexact = 0
static

Definition at line 107 of file ffprobe.c.

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

◆ do_count_frames

int do_count_frames = 0
static

Definition at line 108 of file ffprobe.c.

Referenced by probe_file().

◆ do_count_packets

int do_count_packets = 0
static

Definition at line 109 of file ffprobe.c.

Referenced by probe_file().

◆ do_read_frames

int do_read_frames = 0
static

Definition at line 110 of file ffprobe.c.

Referenced by probe_file(), and read_interval_packets().

◆ do_read_packets

int do_read_packets = 0
static

Definition at line 111 of file ffprobe.c.

Referenced by probe_file(), and read_interval_packets().

◆ do_show_chapters

int do_show_chapters = 0
static

Definition at line 112 of file ffprobe.c.

Referenced by main(), and probe_file().

◆ do_show_error

int do_show_error = 0
static

Definition at line 113 of file ffprobe.c.

Referenced by main().

◆ do_show_format

int do_show_format = 0
static

Definition at line 114 of file ffprobe.c.

Referenced by main(), and probe_file().

◆ do_show_frames

int do_show_frames = 0
static

Definition at line 115 of file ffprobe.c.

Referenced by probe_file(), and process_frame().

◆ do_show_packets

int do_show_packets = 0
static

Definition at line 116 of file ffprobe.c.

Referenced by main(), probe_file(), and read_interval_packets().

◆ do_show_programs

int do_show_programs = 0
static

Definition at line 117 of file ffprobe.c.

Referenced by main(), and probe_file().

◆ do_show_stream_groups

int do_show_stream_groups = 0
static

Definition at line 118 of file ffprobe.c.

Referenced by main(), and probe_file().

◆ do_show_stream_group_components

int do_show_stream_group_components = 0
static

Definition at line 119 of file ffprobe.c.

Referenced by show_stream_group().

◆ do_show_streams

int do_show_streams = 0
static

Definition at line 120 of file ffprobe.c.

Referenced by main(), and probe_file().

◆ do_show_stream_disposition

int do_show_stream_disposition = 0
static

Definition at line 121 of file ffprobe.c.

Referenced by show_stream().

◆ do_show_stream_group_disposition

int do_show_stream_group_disposition = 0
static

Definition at line 122 of file ffprobe.c.

Referenced by show_stream_group().

◆ do_show_data

int do_show_data = 0
static

Definition at line 123 of file ffprobe.c.

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

◆ do_show_program_version

int do_show_program_version = 0
static

Definition at line 124 of file ffprobe.c.

Referenced by main().

◆ do_show_library_versions

int do_show_library_versions = 0
static

Definition at line 125 of file ffprobe.c.

Referenced by main().

◆ do_show_pixel_formats

int do_show_pixel_formats = 0
static

Definition at line 126 of file ffprobe.c.

Referenced by main().

◆ do_show_pixel_format_flags

int do_show_pixel_format_flags = 0
static

Definition at line 127 of file ffprobe.c.

Referenced by ffprobe_show_pixel_formats().

◆ do_show_pixel_format_components

int do_show_pixel_format_components = 0
static

Definition at line 128 of file ffprobe.c.

Referenced by ffprobe_show_pixel_formats().

◆ do_show_log

int do_show_log = 0
static

Definition at line 129 of file ffprobe.c.

Referenced by main(), open_input_file(), and show_frame().

◆ do_show_chapter_tags

int do_show_chapter_tags = 0
static

Definition at line 131 of file ffprobe.c.

Referenced by show_chapters().

◆ do_show_format_tags

int do_show_format_tags = 0
static

Definition at line 132 of file ffprobe.c.

Referenced by show_format().

◆ do_show_frame_tags

int do_show_frame_tags = 0
static

Definition at line 133 of file ffprobe.c.

Referenced by show_frame().

◆ do_show_program_tags

int do_show_program_tags = 0
static

Definition at line 134 of file ffprobe.c.

Referenced by show_program().

◆ do_show_stream_group_tags

int do_show_stream_group_tags = 0
static

Definition at line 135 of file ffprobe.c.

Referenced by show_stream_group().

◆ do_show_stream_tags

int do_show_stream_tags = 0
static

Definition at line 136 of file ffprobe.c.

Referenced by show_stream().

◆ do_show_packet_tags

int do_show_packet_tags = 0
static

Definition at line 137 of file ffprobe.c.

Referenced by show_packet().

◆ show_value_unit

int show_value_unit = 0
static

Definition at line 139 of file ffprobe.c.

Referenced by opt_pretty(), value_string(), and xml_init().

◆ use_value_prefix

int use_value_prefix = 0
static

Definition at line 140 of file ffprobe.c.

Referenced by opt_pretty(), value_string(), and xml_init().

◆ use_byte_value_binary_prefix

int use_byte_value_binary_prefix = 0
static

Definition at line 141 of file ffprobe.c.

Referenced by opt_pretty(), and value_string().

◆ use_value_sexagesimal_format

int use_value_sexagesimal_format = 0
static

Definition at line 142 of file ffprobe.c.

Referenced by opt_pretty(), and value_string().

◆ show_private_data

int show_private_data = 1
static

Definition at line 143 of file ffprobe.c.

Referenced by show_stream(), and xml_init().

◆ show_optional_fields

int show_optional_fields = SHOW_OPTIONAL_FIELDS_AUTO
static

Definition at line 148 of file ffprobe.c.

Referenced by opt_show_optional_fields(), and writer_print_string().

◆ output_format

char* output_format
static

Definition at line 150 of file ffprobe.c.

Referenced by ff_nvdec_decode_init(), hwaccel_retrieve_data(), and main().

◆ stream_specifier

char* stream_specifier
static

Definition at line 151 of file ffprobe.c.

Referenced by probe_file().

◆ show_data_hash

char* show_data_hash
static

Definition at line 152 of file ffprobe.c.

Referenced by main().

◆ read_intervals

ReadInterval* read_intervals
static

Definition at line 162 of file ffprobe.c.

Referenced by main(), parse_read_intervals(), and read_packets().

◆ read_intervals_nb

int read_intervals_nb = 0
static

Definition at line 163 of file ffprobe.c.

Referenced by parse_read_intervals(), and read_packets().

◆ find_stream_info

int find_stream_info = 1
static

Definition at line 165 of file ffprobe.c.

Referenced by open_input_file().

◆ sections

struct section sections[]
static

◆ options

const OptionDef* options
static

Definition at line 355 of file ffprobe.c.

Referenced by main(), and show_help_default().

◆ input_filename

const char* input_filename
static

Definition at line 358 of file ffprobe.c.

Referenced by main(), and opt_input_file().

◆ print_input_filename

const char* print_input_filename
static

Definition at line 359 of file ffprobe.c.

Referenced by main(), and opt_print_filename().

◆ iformat

const AVInputFormat* iformat = NULL
static

◆ output_filename

const char* output_filename = NULL
static

Definition at line 361 of file ffprobe.c.

Referenced by main(), opt_output_file_o(), and writer_open().

◆ hash

struct AVHashContext* hash
static

Definition at line 363 of file ffprobe.c.

Referenced by main(), and writer_print_data_hash().

◆ bin_val

double bin_val

Definition at line 366 of file ffprobe.c.

◆ dec_val

double dec_val

Definition at line 367 of file ffprobe.c.

◆ bin_str

const char* bin_str

Definition at line 368 of file ffprobe.c.

◆ dec_str

const char* dec_str

Definition at line 369 of file ffprobe.c.

◆ si_prefixes

const { ... } si_prefixes[]
Initial value:
= {
{ 1.0, 1.0, "", "" },
{ 1.024e3, 1e3, "Ki", "K" },
{ 1.048576e6, 1e6, "Mi", "M" },
{ 1.073741824e9, 1e9, "Gi", "G" },
{ 1.099511627776e12, 1e12, "Ti", "T" },
{ 1.125899906842624e15, 1e15, "Pi", "P" },
}

Referenced by value_string().

◆ unit_second_str

const char unit_second_str[] = "s"
static

Definition at line 379 of file ffprobe.c.

Referenced by value_string(), and writer_print_time().

◆ unit_hertz_str

const char unit_hertz_str[] = "Hz"
static

Definition at line 380 of file ffprobe.c.

Referenced by show_stream().

◆ unit_byte_str

const char unit_byte_str[] = "byte"
static

Definition at line 381 of file ffprobe.c.

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

◆ unit_bit_per_second_str

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

Definition at line 382 of file ffprobe.c.

Referenced by show_format(), and show_stream().

◆ nb_streams

int nb_streams
static

◆ nb_streams_packets

uint64_t* nb_streams_packets
static

Definition at line 385 of file ffprobe.c.

Referenced by probe_file(), read_interval_packets(), and show_stream().

◆ nb_streams_frames

uint64_t* nb_streams_frames
static

Definition at line 386 of file ffprobe.c.

Referenced by probe_file(), process_frame(), read_interval_packets(), and show_stream().

◆ selected_streams

int* selected_streams
static

◆ log_buffer

LogBuffer* log_buffer
static

Definition at line 401 of file ffprobe.c.

Referenced by clear_log(), log_callback(), and show_log().

◆ log_buffer_size

int log_buffer_size
static

Definition at line 402 of file ffprobe.c.

Referenced by clear_log(), log_callback(), and show_log().

◆ writer_options

const AVOption writer_options[]
static
Initial value:
= {
{ "string_validation", "set string validation mode",
OFFSET(string_validation), AV_OPT_TYPE_INT, {.i64=WRITER_STRING_VALIDATION_REPLACE}, 0, WRITER_STRING_VALIDATION_NB-1, .unit = "sv" },
{ "sv", "set string validation mode",
OFFSET(string_validation), AV_OPT_TYPE_INT, {.i64=WRITER_STRING_VALIDATION_REPLACE}, 0, WRITER_STRING_VALIDATION_NB-1, .unit = "sv" },
{ "ignore", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = WRITER_STRING_VALIDATION_IGNORE}, .unit = "sv" },
{ "replace", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = WRITER_STRING_VALIDATION_REPLACE}, .unit = "sv" },
{ "fail", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = WRITER_STRING_VALIDATION_FAIL}, .unit = "sv" },
{ "string_validation_replacement", "set string validation replacement string", OFFSET(string_validation_replacement), AV_OPT_TYPE_STRING, {.str=""}},
{ "svr", "set string validation replacement string", OFFSET(string_validation_replacement), AV_OPT_TYPE_STRING, {.str="\xEF\xBF\xBD"}},
{ NULL }
}

Definition at line 585 of file ffprobe.c.

◆ writer_class

const AVClass writer_class
static
Initial value:
= {
.class_name = "Writer",
.item_name = writer_get_name,
.option = writer_options,
.child_next = writer_child_next,
}

Definition at line 606 of file ffprobe.c.

Referenced by writer_open().

◆ registered_writers

const Writer* registered_writers[MAX_REGISTERED_WRITERS_NB+1]
static

Definition at line 1045 of file ffprobe.c.

Referenced by writer_get_by_name(), and writer_register().

◆ default_options

const AVOption default_options[]
static
Initial value:
= {
{ "noprint_wrappers", "do not print headers and footers", OFFSET(noprint_wrappers), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1 },
{ "nw", "do not print headers and footers", OFFSET(noprint_wrappers), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1 },
{ "nokey", "force no key printing", OFFSET(nokey), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1 },
{ "nk", "force no key printing", OFFSET(nokey), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1 },
{NULL},
}

Definition at line 1095 of file ffprobe.c.

◆ default_writer

const Writer default_writer
static
Initial value:
= {
.name = "default",
.priv_size = sizeof(DefaultContext),
.print_integer = default_print_int,
.print_string = default_print_str,
.priv_class = &default_class,
}

Definition at line 1171 of file ffprobe.c.

Referenced by writer_register_all().

◆ compact_options

const AVOption compact_options[]
static
Initial value:
= {
{"item_sep", "set item separator", OFFSET(item_sep_str), AV_OPT_TYPE_STRING, {.str="|"}, 0, 0 },
{"s", "set item separator", OFFSET(item_sep_str), AV_OPT_TYPE_STRING, {.str="|"}, 0, 0 },
{"nokey", "force no key printing", OFFSET(nokey), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1 },
{"nk", "force no key printing", OFFSET(nokey), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1 },
{"escape", "set escape mode", OFFSET(escape_mode_str), AV_OPT_TYPE_STRING, {.str="c"}, 0, 0 },
{"e", "set escape mode", OFFSET(escape_mode_str), AV_OPT_TYPE_STRING, {.str="c"}, 0, 0 },
{"print_section", "print section name", OFFSET(print_section), AV_OPT_TYPE_BOOL, {.i64=1}, 0, 1 },
{"p", "print section name", OFFSET(print_section), AV_OPT_TYPE_BOOL, {.i64=1}, 0, 1 },
{NULL},
}

Definition at line 1249 of file ffprobe.c.

◆ compact_writer

const Writer compact_writer
static
Initial value:
= {
.name = "compact",
.priv_size = sizeof(CompactContext),
.print_integer = compact_print_int,
.print_string = compact_print_str,
.priv_class = &compact_class,
}

Definition at line 1370 of file ffprobe.c.

Referenced by writer_register_all().

◆ csv_options

const AVOption csv_options[]
static
Initial value:
= {
{"item_sep", "set item separator", OFFSET(item_sep_str), AV_OPT_TYPE_STRING, {.str=","}, 0, 0 },
{"s", "set item separator", OFFSET(item_sep_str), AV_OPT_TYPE_STRING, {.str=","}, 0, 0 },
{"nokey", "force no key printing", OFFSET(nokey), AV_OPT_TYPE_BOOL, {.i64=1}, 0, 1 },
{"nk", "force no key printing", OFFSET(nokey), AV_OPT_TYPE_BOOL, {.i64=1}, 0, 1 },
{"escape", "set escape mode", OFFSET(escape_mode_str), AV_OPT_TYPE_STRING, {.str="csv"}, 0, 0 },
{"e", "set escape mode", OFFSET(escape_mode_str), AV_OPT_TYPE_STRING, {.str="csv"}, 0, 0 },
{"print_section", "print section name", OFFSET(print_section), AV_OPT_TYPE_BOOL, {.i64=1}, 0, 1 },
{"p", "print section name", OFFSET(print_section), AV_OPT_TYPE_BOOL, {.i64=1}, 0, 1 },
{NULL},
}

Definition at line 1387 of file ffprobe.c.

◆ csv_writer

const Writer csv_writer
static
Initial value:

Definition at line 1401 of file ffprobe.c.

Referenced by writer_register_all().

◆ flat_options

const AVOption flat_options[]
static
Initial value:
= {
{"sep_char", "set separator", OFFSET(sep_str), AV_OPT_TYPE_STRING, {.str="."}, 0, 0 },
{"s", "set separator", OFFSET(sep_str), AV_OPT_TYPE_STRING, {.str="."}, 0, 0 },
{"hierarchical", "specify if the section specification should be hierarchical", OFFSET(hierarchical), AV_OPT_TYPE_BOOL, {.i64=1}, 0, 1 },
{"h", "specify if the section specification should be hierarchical", OFFSET(hierarchical), AV_OPT_TYPE_BOOL, {.i64=1}, 0, 1 },
{NULL},
}

Definition at line 1425 of file ffprobe.c.

◆ flat_writer

const Writer flat_writer
static
Initial value:
= {
.name = "flat",
.priv_size = sizeof(FlatContext),
.print_integer = flat_print_int,
.print_string = flat_print_str,
.priv_class = &flat_class,
}

Definition at line 1526 of file ffprobe.c.

Referenced by writer_register_all().

◆ ini_options

const AVOption ini_options[]
static
Initial value:
= {
{"hierarchical", "specify if the section specification should be hierarchical", OFFSET(hierarchical), AV_OPT_TYPE_BOOL, {.i64=1}, 0, 1 },
{"h", "specify if the section specification should be hierarchical", OFFSET(hierarchical), AV_OPT_TYPE_BOOL, {.i64=1}, 0, 1 },
{NULL},
}

Definition at line 1547 of file ffprobe.c.

◆ ini_writer

const Writer ini_writer
static
Initial value:
= {
.name = "ini",
.priv_size = sizeof(INIContext),
.print_integer = ini_print_int,
.print_string = ini_print_str,
.priv_class = &ini_class,
}

Definition at line 1631 of file ffprobe.c.

Referenced by writer_register_all().

◆ json_options

const AVOption json_options[]
static
Initial value:
= {
{ "compact", "enable compact output", OFFSET(compact), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1 },
{ "c", "enable compact output", OFFSET(compact), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1 },
{ NULL }
}

Definition at line 1653 of file ffprobe.c.

◆ json_writer

const Writer json_writer
static
Initial value:
= {
.name = "json",
.priv_size = sizeof(JSONContext),
.print_integer = json_print_int,
.print_string = json_print_str,
.priv_class = &json_class,
}

Definition at line 1796 of file ffprobe.c.

Referenced by writer_register_all().

◆ xml_options

const AVOption xml_options[]
static
Initial value:
= {
{"fully_qualified", "specify if the output should be fully qualified", OFFSET(fully_qualified), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1 },
{"q", "specify if the output should be fully qualified", OFFSET(fully_qualified), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1 },
{"xsd_strict", "ensure that the output is XSD compliant", OFFSET(xsd_strict), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1 },
{"x", "ensure that the output is XSD compliant", OFFSET(xsd_strict), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1 },
{NULL},
}

Definition at line 1821 of file ffprobe.c.

◆ xml_writer

Writer xml_writer
static
Initial value:
= {
.name = "xml",
.priv_size = sizeof(XMLContext),
.print_integer = xml_print_int,
.print_string = xml_print_str,
.priv_class = &xml_class,
}

Definition at line 1968 of file ffprobe.c.

Referenced by main(), and writer_register_all().

◆ real_options

const OptionDef real_options[]
static

Definition at line 4543 of file ffprobe.c.

Referenced by main().

compact_print_section_header
static void compact_print_section_header(WriterContext *wctx, const void *data)
Definition: ffprobe.c:1285
name
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option name
Definition: writing_filters.txt:88
AVERROR
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
unit_value::i
int64_t i
Definition: ffprobe.c:454
default_print_int
static void default_print_int(WriterContext *wctx, const char *key, int64_t value)
Definition: ffprobe.c:1162
compact_print_section_footer
static void compact_print_section_footer(WriterContext *wctx)
Definition: ffprobe.c:1337
u
#define u(width, name, range_min, range_max)
Definition: cbs_h2645.c:251
value_string
static char * value_string(char *buf, int buf_size, struct unit_value uv)
Definition: ffprobe.c:458
json_print_section_header
static void json_print_section_header(WriterContext *wctx, const void *data)
Definition: ffprobe.c:1693
DefaultContext
Definition: ffprobe.c:1085
w
uint8_t w
Definition: llviddspenc.c:38
flat_print_section_header
static void flat_print_section_header(WriterContext *wctx, const void *data)
Definition: ffprobe.c:1482
json_print_int
static void json_print_int(WriterContext *wctx, const char *key, int64_t value)
Definition: ffprobe.c:1779
print_section_header
#define print_section_header(s)
Definition: ffprobe.c:2031
OFFSET
#define OFFSET(x)
Definition: ffprobe.c:1819
check_section_show_entries
static int check_section_show_entries(int section_id)
Definition: ffprobe.c:4594
print_section
static void print_section(SectionID id, int level)
Definition: ffprobe.c:4486
writer_options
static const AVOption writer_options[]
Definition: ffprobe.c:585
CompactContext
Definition: ffprobe.c:1233
ini_print_section_header
static void ini_print_section_header(WriterContext *wctx, const void *data)
Definition: ffprobe.c:1582
xml_print_section_header
static void xml_print_section_header(WriterContext *wctx, const void *data)
Definition: ffprobe.c:1854
compact_init
static av_cold int compact_init(WriterContext *wctx)
Definition: ffprobe.c:1263
xml_print_section_footer
static void xml_print_section_footer(WriterContext *wctx)
Definition: ffprobe.c:1900
INIContext
Definition: ffprobe.c:1539
json_print_section_footer
static void json_print_section_footer(WriterContext *wctx)
Definition: ffprobe.c:1732
writer_get_name
static const char * writer_get_name(void *p)
Definition: ffprobe.c:577
json_init
static av_cold int json_init(WriterContext *wctx)
Definition: ffprobe.c:1661
AV_LOG_ERROR
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:180
writer_child_next
static void * writer_child_next(void *obj, void *prev)
Definition: ffprobe.c:598
print_section_footer
#define print_section_footer(s)
Definition: ffprobe.c:2033
FlatContext
Definition: ffprobe.c:1415
xml_print_str
static void xml_print_str(WriterContext *wctx, const char *key, const char *value)
Definition: ffprobe.c:1959
ctx
AVFormatContext * ctx
Definition: movenc.c:49
flat_print_str
static void flat_print_str(WriterContext *wctx, const char *key, const char *value)
Definition: ffprobe.c:1513
arg
const char * arg
Definition: jacosubdec.c:67
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
AVClass
Describe the class of an AVClass context structure.
Definition: log.h:66
NULL
#define NULL
Definition: coverity.c:32
compact_print_str
static void compact_print_str(WriterContext *wctx, const char *key, const char *value)
Definition: ffprobe.c:1347
SECTION_ID_LIBRARY_VERSION
@ SECTION_ID_LIBRARY_VERSION
Definition: ffprobe.c:192
xml_init
static av_cold int xml_init(WriterContext *wctx)
Definition: ffprobe.c:1831
unit_value::val
union unit_value::@10 val
WRITER_FLAG_PUT_PACKETS_AND_FRAMES_IN_SAME_CHAPTER
#define WRITER_FLAG_PUT_PACKETS_AND_FRAMES_IN_SAME_CHAPTER
Definition: ffprobe.c:516
WRITER_FLAG_DISPLAY_OPTIONAL_FIELDS
#define WRITER_FLAG_DISPLAY_OPTIONAL_FIELDS
Definition: ffprobe.c:515
xml_print_int
static void xml_print_int(WriterContext *wctx, const char *key, int64_t value)
Definition: ffprobe.c:1963
WRITER_STRING_VALIDATION_IGNORE
@ WRITER_STRING_VALIDATION_IGNORE
Definition: ffprobe.c:521
f
f
Definition: af_crystalizer.c:121
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:366
section
Definition: ffprobe.c:241
unit_value
Definition: ffprobe.c:453
ini_print_str
static void ini_print_str(WriterContext *wctx, const char *key, const char *value)
Definition: ffprobe.c:1615
av_reallocp_array
int av_reallocp_array(void *ptr, size_t nmemb, size_t size)
Allocate, reallocate an array through a pointer to a pointer.
Definition: mem.c:225
version
version
Definition: libkvazaar.c:321
ini_print_int
static void ini_print_int(WriterContext *wctx, const char *key, int64_t value)
Definition: ffprobe.c:1626
compact_print_int
static void compact_print_int(WriterContext *wctx, const char *key, int64_t value)
Definition: ffprobe.c:1360
WRITER_STRING_VALIDATION_NB
@ WRITER_STRING_VALIDATION_NB
Definition: ffprobe.c:522
json_print_str
static void json_print_str(WriterContext *wctx, const char *key, const char *value)
Definition: ffprobe.c:1766
ret
ret
Definition: filter_design.txt:187
flat_print_int
static void flat_print_int(WriterContext *wctx, const char *key, int64_t value)
Definition: ffprobe.c:1508
flat_init
static av_cold int flat_init(WriterContext *wctx)
Definition: ffprobe.c:1435
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:235
XMLContext
Definition: ffprobe.c:1810
WRITER_STRING_VALIDATION_REPLACE
@ WRITER_STRING_VALIDATION_REPLACE
Definition: ffprobe.c:520
default_print_section_header
static void default_print_section_header(WriterContext *wctx, const void *data)
Definition: ffprobe.c:1115
WRITER_STRING_VALIDATION_FAIL
@ WRITER_STRING_VALIDATION_FAIL
Definition: ffprobe.c:519
AV_OPT_TYPE_BOOL
@ AV_OPT_TYPE_BOOL
Definition: opt.h:251
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:474
AV_OPT_TYPE_STRING
@ AV_OPT_TYPE_STRING
Definition: opt.h:239
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Definition: opt.h:244
default_print_str
static void default_print_str(WriterContext *wctx, const char *key, const char *value)
Definition: ffprobe.c:1153
default_print_section_footer
static void default_print_section_footer(WriterContext *wctx)
Definition: ffprobe.c:1140
JSONContext
Definition: ffprobe.c:1643