diff options
author | Anton Khirnov <anton@khirnov.net> | 2024-02-14 19:08:18 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2024-02-21 10:33:20 +0100 |
commit | a3f69cdec73dfddb132a89a524e1977dddfe46d0 (patch) | |
tree | 930d4f1a1e82d72033fe3c8642cdf886fb7d573f /fftools/ffmpeg_filter.c | |
parent | 6b6815b1c875dfc5f81b44d9c240d6449bd61e5d (diff) | |
download | ffmpeg-a3f69cdec73dfddb132a89a524e1977dddfe46d0.tar.gz |
fftools/ffmpeg: cosmetics, vertically align structs
Diffstat (limited to 'fftools/ffmpeg_filter.c')
-rw-r--r-- | fftools/ffmpeg_filter.c | 120 |
1 files changed, 60 insertions, 60 deletions
diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index dc65b441a6..79cc101fb6 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -43,27 +43,27 @@ #include "libavcodec/mathops.h" typedef struct FilterGraphPriv { - FilterGraph fg; + FilterGraph fg; // name used for logging - char log_name[32]; + char log_name[32]; - int is_simple; + int is_simple; // true when the filtergraph contains only meta filters // that do not modify the frame data - int is_meta; + int is_meta; // source filters are present in the graph - int have_sources; - int disable_conversions; + int have_sources; + int disable_conversions; - unsigned nb_outputs_done; + unsigned nb_outputs_done; - const char *graph_desc; + const char *graph_desc; // frame for temporarily holding output from the filtergraph - AVFrame *frame; + AVFrame *frame; // frame for sending output to the encoder - AVFrame *frame_enc; + AVFrame *frame_enc; Scheduler *sch; unsigned sch_idx; @@ -81,70 +81,70 @@ static const FilterGraphPriv *cfgp_from_cfg(const FilterGraph *fg) // data that is local to the filter thread and not visible outside of it typedef struct FilterGraphThread { - AVFilterGraph *graph; + AVFilterGraph *graph; - AVFrame *frame; + AVFrame *frame; // Temporary buffer for output frames, since on filtergraph reset // we cannot send them to encoders immediately. // The output index is stored in frame opaque. - AVFifo *frame_queue_out; + AVFifo *frame_queue_out; // index of the next input to request from the scheduler - unsigned next_in; + unsigned next_in; // set to 1 after at least one frame passed through this output - int got_frame; + int got_frame; // EOF status of each input/output, as received by the thread - uint8_t *eof_in; - uint8_t *eof_out; + uint8_t *eof_in; + uint8_t *eof_out; } FilterGraphThread; typedef struct InputFilterPriv { - InputFilter ifilter; + InputFilter ifilter; - InputFilterOptions opts; + InputFilterOptions opts; - int index; + int index; - AVFilterContext *filter; + AVFilterContext *filter; - InputStream *ist; + InputStream *ist; // used to hold submitted input - AVFrame *frame; + AVFrame *frame; /* for filters that are not yet bound to an input stream, * this stores the input linklabel, if any */ - uint8_t *linklabel; + uint8_t *linklabel; // filter data type - enum AVMediaType type; + enum AVMediaType type; // source data type: AVMEDIA_TYPE_SUBTITLE for sub2video, // same as type otherwise - enum AVMediaType type_src; + enum AVMediaType type_src; - int eof; + int eof; // parameters configured for this input - int format; + int format; - int width, height; - AVRational sample_aspect_ratio; - enum AVColorSpace color_space; - enum AVColorRange color_range; + int width, height; + AVRational sample_aspect_ratio; + enum AVColorSpace color_space; + enum AVColorRange color_range; - int sample_rate; - AVChannelLayout ch_layout; + int sample_rate; + AVChannelLayout ch_layout; - AVRational time_base; + AVRational time_base; - AVFifo *frame_queue; + AVFifo *frame_queue; - AVBufferRef *hw_frames_ctx; + AVBufferRef *hw_frames_ctx; - int displaymatrix_present; - int32_t displaymatrix[9]; + int displaymatrix_present; + int32_t displaymatrix[9]; // fallback parameters to use when no input is ever sent struct { @@ -177,15 +177,15 @@ static InputFilterPriv *ifp_from_ifilter(InputFilter *ifilter) } typedef struct FPSConvContext { - AVFrame *last_frame; + AVFrame *last_frame; /* number of frames emitted by the video-encoding sync code */ - int64_t frame_number; + int64_t frame_number; /* history of nb_frames_prev, i.e. the number of times the * previous frame was duplicated by vsync code in recent * do_video_out() calls */ - int64_t frames_prev_hist[3]; + int64_t frames_prev_hist[3]; - uint64_t dup_warning; + uint64_t dup_warning; int last_dropped; int dropped_keyframe; @@ -197,38 +197,38 @@ typedef struct FPSConvContext { } FPSConvContext; typedef struct OutputFilterPriv { - OutputFilter ofilter; + OutputFilter ofilter; - int index; + int index; - AVFilterContext *filter; + AVFilterContext *filter; /* desired output stream properties */ - int format; - int width, height; - int sample_rate; - AVChannelLayout ch_layout; + int format; + int width, height; + int sample_rate; + AVChannelLayout ch_layout; // time base in which the output is sent to our downstream // does not need to match the filtersink's timebase - AVRational tb_out; + AVRational tb_out; // at least one frame with the above timebase was sent // to our downstream, so it cannot change anymore - int tb_out_locked; + int tb_out_locked; - AVRational sample_aspect_ratio; + AVRational sample_aspect_ratio; // those are only set if no format is specified and the encoder gives us multiple options // They point directly to the relevant lists of the encoder. - const int *formats; - const AVChannelLayout *ch_layouts; - const int *sample_rates; + const int *formats; + const AVChannelLayout *ch_layouts; + const int *sample_rates; - AVRational enc_timebase; + AVRational enc_timebase; // offset for output timestamps, in AV_TIME_BASE_Q - int64_t ts_offset; - int64_t next_pts; - FPSConvContext fps; + int64_t ts_offset; + int64_t next_pts; + FPSConvContext fps; } OutputFilterPriv; static OutputFilterPriv *ofp_from_ofilter(OutputFilter *ofilter) |