FFmpeg
|
#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/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 "textformat/avtextformat.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 | LogBuffer |
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 int | show_tags (AVTextFormatContext *tfc, AVDictionary *tags, int section_id) |
static void | print_dovi_metadata (AVTextFormatContext *tfc, const AVDOVIMetadata *dovi) |
static void | print_dynamic_hdr10_plus (AVTextFormatContext *tfc, const AVDynamicHDRPlus *metadata) |
static void | print_dynamic_hdr_vivid (AVTextFormatContext *tfc, const AVDynamicHDRVivid *metadata) |
static void | print_ambient_viewing_environment (AVTextFormatContext *tfc, const AVAmbientViewingEnvironment *env) |
static void | print_film_grain_params (AVTextFormatContext *tfc, const AVFilmGrainParams *fgp) |
static void | print_pkt_side_data (AVTextFormatContext *tfc, AVCodecParameters *par, const AVPacketSideData *sd, SectionID id_data) |
static void | print_private_data (AVTextFormatContext *tfc, void *priv_data) |
static void | print_pixel_format (AVTextFormatContext *tfc, enum AVPixelFormat pix_fmt) |
static void | print_color_range (AVTextFormatContext *tfc, enum AVColorRange color_range) |
static void | print_color_space (AVTextFormatContext *tfc, enum AVColorSpace color_space) |
static void | print_primaries (AVTextFormatContext *tfc, enum AVColorPrimaries color_primaries) |
static void | print_color_trc (AVTextFormatContext *tfc, enum AVColorTransferCharacteristic color_trc) |
static void | print_chroma_location (AVTextFormatContext *tfc, enum AVChromaLocation chroma_location) |
static void | clear_log (int need_lock) |
static int | show_log (AVTextFormatContext *tfc, int section_ids, int section_id, int log_level) |
static void | show_packet (AVTextFormatContext *tfc, InputFile *ifile, AVPacket *pkt, int packet_idx) |
static void | show_subtitle (AVTextFormatContext *tfc, AVSubtitle *sub, AVStream *stream, AVFormatContext *fmt_ctx) |
static void | print_frame_side_data (AVTextFormatContext *tfc, const AVFrame *frame, const AVStream *stream) |
static void | show_frame (AVTextFormatContext *tfc, AVFrame *frame, AVStream *stream, AVFormatContext *fmt_ctx) |
static av_always_inline int | process_frame (AVTextFormatContext *tfc, 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 (AVTextFormatContext *tfc, InputFile *ifile, const ReadInterval *interval, int64_t *cur_ts) |
static int | read_packets (AVTextFormatContext *tfc, InputFile *ifile) |
static void | print_dispositions (AVTextFormatContext *tfc, uint32_t disposition, SectionID section_id) |
static int | show_stream (AVTextFormatContext *tfc, AVFormatContext *fmt_ctx, int stream_idx, InputStream *ist, int container) |
static int | show_streams (AVTextFormatContext *tfc, InputFile *ifile) |
static int | show_program (AVTextFormatContext *tfc, InputFile *ifile, AVProgram *program) |
static int | show_programs (AVTextFormatContext *tfc, InputFile *ifile) |
static void | print_tile_grid_params (AVTextFormatContext *tfc, const AVStreamGroup *stg, const AVStreamGroupTileGrid *tile_grid) |
static void | print_iamf_param_definition (AVTextFormatContext *tfc, const char *name, const AVIAMFParamDefinition *param, SectionID section_id) |
static void | print_iamf_audio_element_params (AVTextFormatContext *tfc, const AVStreamGroup *stg, const AVIAMFAudioElement *audio_element) |
static void | print_iamf_submix_params (AVTextFormatContext *tfc, const AVIAMFSubmix *submix) |
static void | print_iamf_mix_presentation_params (AVTextFormatContext *tfc, const AVStreamGroup *stg, const AVIAMFMixPresentation *mix_presentation) |
static void | print_stream_group_params (AVTextFormatContext *tfc, AVStreamGroup *stg) |
static int | show_stream_group (AVTextFormatContext *tfc, InputFile *ifile, AVStreamGroup *stg) |
static int | show_stream_groups (AVTextFormatContext *tfc, InputFile *ifile) |
static int | show_chapters (AVTextFormatContext *tfc, InputFile *ifile) |
static int | show_format (AVTextFormatContext *tfc, InputFile *ifile) |
static void | show_error (AVTextFormatContext *tfc, 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 (AVTextFormatContext *tfc, const char *filename, const char *print_filename) |
static void | show_usage (void) |
static void | ffprobe_show_program_version (AVTextFormatContext *tfc) |
static void | ffprobe_show_library_versions (AVTextFormatContext *tfc) |
static void | ffprobe_show_pixel_formats (AVTextFormatContext *tfc) |
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) |
simple media prober based on the FFmpeg libraries
Definition in file ffprobe.c.
#define print_fmt | ( | k, | |
f, | |||
... | |||
) |
#define print_list_fmt | ( | k, | |
f, | |||
n, | |||
m, | |||
... | |||
) |
#define print_int | ( | k, | |
v | |||
) | avtext_print_integer(tfc, k, v) |
#define print_q | ( | k, | |
v, | |||
s | |||
) | avtext_print_rational(tfc, k, v, s) |
#define print_str | ( | k, | |
v | |||
) | avtext_print_string(tfc, k, v, 0) |
#define print_str_opt | ( | k, | |
v | |||
) | avtext_print_string(tfc, k, v, AV_TEXTFORMAT_PRINT_STRING_OPTIONAL) |
#define print_str_validate | ( | k, | |
v | |||
) | avtext_print_string(tfc, k, v, AV_TEXTFORMAT_PRINT_STRING_VALIDATE) |
#define print_time | ( | k, | |
v, | |||
tb | |||
) | avtext_print_time(tfc, k, v, tb, 0) |
#define print_ts | ( | k, | |
v | |||
) | avtext_print_ts(tfc, k, v, 0) |
#define print_duration_time | ( | k, | |
v, | |||
tb | |||
) | avtext_print_time(tfc, k, v, tb, 1) |
#define print_duration_ts | ( | k, | |
v | |||
) | avtext_print_ts(tfc, k, v, 1) |
#define print_val | ( | k, | |
v, | |||
u | |||
) | avtext_print_unit_int(tfc, k, v, u) |
#define REALLOCZ_ARRAY_STREAM | ( | ptr, | |
cur_n, | |||
new_n | |||
) |
#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 | |||
) |
enum SectionID |
|
static |
|
static |
|
static |
|
static |
|
static |
|
inlinestatic |
Definition at line 444 of file ffprobe.c.
Referenced by show_chapters(), show_format(), show_frame(), show_packet(), show_program(), show_stream(), and show_stream_group().
|
static |
Definition at line 462 of file ffprobe.c.
Referenced by print_frame_side_data().
|
static |
Definition at line 624 of file ffprobe.c.
Referenced by print_frame_side_data(), and print_pkt_side_data().
|
static |
Definition at line 723 of file ffprobe.c.
Referenced by print_frame_side_data().
|
static |
Definition at line 793 of file ffprobe.c.
Referenced by print_frame_side_data(), and print_pkt_side_data().
|
static |
Definition at line 804 of file ffprobe.c.
Referenced by print_frame_side_data().
|
static |
Definition at line 929 of file ffprobe.c.
Referenced by show_packet(), and show_stream().
|
static |
Definition at line 1051 of file ffprobe.c.
Referenced by show_stream().
|
static |
Definition at line 1064 of file ffprobe.c.
Referenced by show_frame(), and show_stream().
|
static |
Definition at line 1089 of file ffprobe.c.
Referenced by show_frame(), and show_stream().
|
static |
Definition at line 1099 of file ffprobe.c.
Referenced by show_frame(), and show_stream().
|
static |
Definition at line 1109 of file ffprobe.c.
Referenced by show_frame(), and show_stream().
|
static |
Definition at line 1119 of file ffprobe.c.
Referenced by show_frame(), and show_stream().
|
static |
Definition at line 1129 of file ffprobe.c.
Referenced by show_frame(), and show_stream().
|
static |
Definition at line 1139 of file ffprobe.c.
Referenced by process_frame(), and show_log().
|
static |
Definition at line 1155 of file ffprobe.c.
Referenced by show_frame().
|
static |
Definition at line 1190 of file ffprobe.c.
Referenced by read_interval_packets().
|
static |
Definition at line 1247 of file ffprobe.c.
Referenced by process_frame().
|
static |
Definition at line 1270 of file ffprobe.c.
Referenced by show_frame().
|
static |
Definition at line 1356 of file ffprobe.c.
Referenced by av1_receive_frame_internal(), frame_tag(), process_frame(), and uncompressed_header().
|
static |
Definition at line 1442 of file ffprobe.c.
Referenced by init_framesync(), and read_interval_packets().
|
static |
Definition at line 1515 of file ffprobe.c.
Referenced by parse_read_intervals(), and read_interval_packets().
|
static |
Definition at line 1539 of file ffprobe.c.
Referenced by read_packets().
|
static |
Definition at line 1664 of file ffprobe.c.
Referenced by probe_file().
|
static |
Definition at line 1684 of file ffprobe.c.
Referenced by show_stream(), and show_stream_group().
|
static |
Definition at line 1699 of file ffprobe.c.
Referenced by show_program(), show_stream_group(), and show_streams().
|
static |
Definition at line 1920 of file ffprobe.c.
Referenced by probe_file().
|
static |
Definition at line 1937 of file ffprobe.c.
Referenced by show_programs().
|
static |
Definition at line 1968 of file ffprobe.c.
Referenced by probe_file().
|
static |
Definition at line 1986 of file ffprobe.c.
Referenced by print_stream_group_params().
|
static |
Definition at line 2009 of file ffprobe.c.
Referenced by print_iamf_audio_element_params(), and print_iamf_submix_params().
|
static |
Definition at line 2064 of file ffprobe.c.
Referenced by print_stream_group_params().
|
static |
Definition at line 2095 of file ffprobe.c.
Referenced by print_iamf_mix_presentation_params().
|
static |
Definition at line 2142 of file ffprobe.c.
Referenced by print_stream_group_params().
|
static |
Definition at line 2161 of file ffprobe.c.
Referenced by show_stream_group().
|
static |
Definition at line 2173 of file ffprobe.c.
Referenced by show_stream_groups().
|
static |
Definition at line 2217 of file ffprobe.c.
Referenced by probe_file().
|
static |
Definition at line 2234 of file ffprobe.c.
Referenced by probe_file().
|
static |
Definition at line 2259 of file ffprobe.c.
Referenced by probe_file().
|
static |
|
static |
Definition at line 2298 of file ffprobe.c.
Referenced by probe_file().
|
static |
Definition at line 2423 of file ffprobe.c.
Referenced by probe_file().
|
static |
|
static |
Definition at line 2528 of file ffprobe.c.
Referenced by main(), and show_help_default().
|
static |
|
static |
|
static |
|
static |
|
static |
|
inlinestatic |
Definition at line 2658 of file ffprobe.c.
Referenced by match_section(), and opt_show_versions().
|
static |
Definition at line 2672 of file ffprobe.c.
Referenced by opt_show_entries().
|
static |
|
static |
Definition at line 2741 of file ffprobe.c.
Referenced by main(), and opt_input_file_i().
|
static |
|
static |
|
static |
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 2788 of file ffprobe.c.
Referenced by show_help().
|
static |
Parse interval specification, according to the format: INTERVAL ::= [START|+START_OFFSET][%[END|+END_OFFSET]] INTERVALS ::= INTERVAL[,INTERVALS].
Definition at line 2804 of file ffprobe.c.
Referenced by parse_read_intervals().
|
static |
Definition at line 2886 of file ffprobe.c.
Referenced by opt_read_intervals().
|
static |
|
static |
|
static |
Definition at line 2948 of file ffprobe.c.
Referenced by opt_sections().
|
static |
|
static |
|
inlinestatic |
const char program_name[] = "ffprobe" |
program name, defined by the program for show_version().
Definition at line 93 of file ffprobe.c.
Referenced by expand_filename_template(), init_report(), main(), print_program_info(), show_help_default(), show_license(), show_usage(), and usage().
const int program_birth_year = 2007 |
program birth year, defined by the program for show_banner()
Definition at line 94 of file ffprobe.c.
Referenced by ffprobe_show_program_version(), and print_program_info().
|
static |
Definition at line 96 of file ffprobe.c.
Referenced by probe_file(), process_frame(), and show_stream().
|
static |
Definition at line 97 of file ffprobe.c.
Referenced by main(), print_pixel_format(), show_format(), and show_stream().
|
static |
Definition at line 98 of file ffprobe.c.
Referenced by probe_file().
|
static |
Definition at line 99 of file ffprobe.c.
Referenced by probe_file().
|
static |
Definition at line 100 of file ffprobe.c.
Referenced by probe_file(), and read_interval_packets().
|
static |
Definition at line 101 of file ffprobe.c.
Referenced by probe_file(), and read_interval_packets().
|
static |
Definition at line 102 of file ffprobe.c.
Referenced by main(), and probe_file().
|
static |
Definition at line 104 of file ffprobe.c.
Referenced by main(), and probe_file().
|
static |
Definition at line 105 of file ffprobe.c.
Referenced by probe_file(), and process_frame().
|
static |
Definition at line 106 of file ffprobe.c.
Referenced by main(), probe_file(), and read_interval_packets().
|
static |
Definition at line 107 of file ffprobe.c.
Referenced by main(), and probe_file().
|
static |
Definition at line 108 of file ffprobe.c.
Referenced by main(), and probe_file().
|
static |
Definition at line 109 of file ffprobe.c.
Referenced by show_stream_group().
|
static |
Definition at line 110 of file ffprobe.c.
Referenced by main(), and probe_file().
|
static |
Definition at line 111 of file ffprobe.c.
Referenced by show_stream().
|
static |
Definition at line 112 of file ffprobe.c.
Referenced by show_stream_group().
|
static |
Definition at line 113 of file ffprobe.c.
Referenced by print_pkt_side_data(), show_packet(), and show_stream().
|
static |
|
static |
|
static |
|
static |
Definition at line 117 of file ffprobe.c.
Referenced by ffprobe_show_pixel_formats().
|
static |
Definition at line 118 of file ffprobe.c.
Referenced by ffprobe_show_pixel_formats().
|
static |
Definition at line 119 of file ffprobe.c.
Referenced by main(), open_input_file(), and show_frame().
|
static |
Definition at line 121 of file ffprobe.c.
Referenced by show_chapters().
|
static |
Definition at line 122 of file ffprobe.c.
Referenced by show_format().
|
static |
Definition at line 123 of file ffprobe.c.
Referenced by show_frame().
|
static |
Definition at line 124 of file ffprobe.c.
Referenced by show_program().
|
static |
Definition at line 125 of file ffprobe.c.
Referenced by show_stream_group().
|
static |
Definition at line 126 of file ffprobe.c.
Referenced by show_stream().
|
static |
Definition at line 127 of file ffprobe.c.
Referenced by show_packet().
|
static |
Definition at line 129 of file ffprobe.c.
Referenced by avtext_context_open(), main(), and opt_pretty().
|
static |
Definition at line 130 of file ffprobe.c.
Referenced by avtext_context_open(), main(), and opt_pretty().
|
static |
Definition at line 131 of file ffprobe.c.
Referenced by avtext_context_open(), main(), and opt_pretty().
|
static |
Definition at line 132 of file ffprobe.c.
Referenced by avtext_context_open(), main(), and opt_pretty().
|
static |
Definition at line 133 of file ffprobe.c.
Referenced by show_stream().
|
static |
Definition at line 138 of file ffprobe.c.
Referenced by avtext_context_open(), main(), and opt_show_optional_fields().
|
static |
Definition at line 140 of file ffprobe.c.
Referenced by ff_nvdec_decode_init(), hwaccel_retrieve_data(), and main().
|
static |
Definition at line 141 of file ffprobe.c.
Referenced by probe_file().
|
static |
Definition at line 142 of file ffprobe.c.
Referenced by avtext_context_open(), and main().
|
static |
Definition at line 152 of file ffprobe.c.
Referenced by main(), parse_read_intervals(), and read_packets().
|
static |
Definition at line 153 of file ffprobe.c.
Referenced by parse_read_intervals(), and read_packets().
|
static |
Definition at line 155 of file ffprobe.c.
Referenced by open_input_file().
|
static |
Definition at line 251 of file ffprobe.c.
Referenced by avtext_context_open(), check_section_show_entries(), main(), mark_section_show_entries(), match_section(), print_iamf_param_definition(), and print_section().
|
static |
Definition at line 326 of file ffprobe.c.
Referenced by main(), and opt_input_file().
|
static |
Definition at line 327 of file ffprobe.c.
Referenced by main(), and opt_print_filename().
|
static |
Definition at line 328 of file ffprobe.c.
Referenced by ff_alloc_input_device_context(), ff_load_image(), ff_wms_parse_sdp_a_line(), movie_common_init(), open_input_file(), opt_format(), show_format_opts(), and stream_open().
|
static |
Definition at line 329 of file ffprobe.c.
Referenced by avtextwriter_create_file(), main(), and opt_output_file_o().
|
static |
Definition at line 332 of file ffprobe.c.
Referenced by show_stream().
|
static |
Definition at line 333 of file ffprobe.c.
Referenced by show_format(), show_frame(), and show_packet().
|
static |
Definition at line 334 of file ffprobe.c.
Referenced by show_format(), and show_stream().
|
static |
Definition at line 336 of file ffprobe.c.
Referenced by aix_read_header(), asf_read_close(), av_dump_format(), av_find_best_stream(), avformat_match_stream_specifier(), avi_read_header(), avi_sync(), decode_frame_header(), decode_info_header(), decode_stream_header(), dvdvideo_audio_stream_add_all(), dvdvideo_subp_stream_add_all(), ff_get_wav_header(), find_matching_stream(), ist_iter(), ivr_read_header(), libopus_decode_init(), lvf_read_header(), main(), match_streams_one_to_one(), mov_parse_tiles(), mov_write_moov_tag(), movie_common_init(), new_stream_video(), ost_iter(), parse_variant_stream_mapstring(), probe_file(), qt_rtp_parse_packet(), queue_alloc(), read_interval_packets(), receive_for_stream(), sch_mux_receive_finish(), sch_mux_stream_buffering(), sch_mux_stream_ready(), sch_mux_sub_heartbeat(), sch_mux_sub_heartbeat_add(), select_pcr_streams(), set_dispositions(), sq_frame_samples(), sq_limit_frames(), sq_send(), stream_cycle_channel(), stream_specifier_match(), tq_alloc(), tq_receive_finish(), tq_send(), and tq_send_finish().
|
static |
Definition at line 337 of file ffprobe.c.
Referenced by probe_file(), read_interval_packets(), and show_stream().
|
static |
Definition at line 338 of file ffprobe.c.
Referenced by probe_file(), process_frame(), read_interval_packets(), and show_stream().
|
static |
Definition at line 339 of file ffprobe.c.
Referenced by probe_file(), read_interval_packets(), show_program(), show_stream_group(), and show_streams().
|
static |
Definition at line 340 of file ffprobe.c.
Referenced by probe_file(), process_frame(), read_interval_packets(), and show_stream().
|
static |
Definition at line 341 of file ffprobe.c.
Referenced by probe_file(), process_frame(), read_interval_packets(), and show_stream().
|
static |
Definition at line 343 of file ffprobe.c.
Referenced by clear_log(), log_callback(), and show_log().
|
static |
Definition at line 354 of file ffprobe.c.
Referenced by clear_log(), log_callback(), and show_log().
|
static |
Definition at line 355 of file ffprobe.c.
Referenced by clear_log(), log_callback(), and show_log().