diff options
author | Anton Khirnov <anton@khirnov.net> | 2016-05-23 14:09:08 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2016-06-25 11:20:50 +0200 |
commit | 722ec3eb35bc152ce91d0a4502eca0df1c0086d0 (patch) | |
tree | d353507a68b0f209244ebe44f8ee72d7e7305e9e /avconv.h | |
parent | 398f015f077c6a2406deffd9e37ff34b9c7bb3bc (diff) | |
download | ffmpeg-722ec3eb35bc152ce91d0a4502eca0df1c0086d0.tar.gz |
avconv: decouple configuring filtergraphs and setting input parameters
Currently, calling configure_filtergraph() will pull in the input
parameters from the corresponding decoder context. This has the
following disadvantages:
- the decoded frame is a more proper source for this information
- a filter accessing decoder data breaks proper layering
Add functions for explicitly sending the input stream parameters to a
filtergraph input - currently from a frame and a decoder. The decoder
one will be dropped in future commits after some more restructuring.
Diffstat (limited to 'avconv.h')
-rw-r--r-- | avconv.h | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -199,6 +199,17 @@ typedef struct InputFilter { struct InputStream *ist; struct FilterGraph *graph; uint8_t *name; + + // parameters configured for this input + int format; + + int width, height; + AVRational sample_aspect_ratio; + + int sample_rate; + uint64_t channel_layout; + + AVBufferRef *hw_frames_ctx; } InputFilter; typedef struct OutputFilter { @@ -468,6 +479,9 @@ int filtergraph_is_simple(FilterGraph *fg); int init_simple_filtergraph(InputStream *ist, OutputStream *ost); int init_complex_filtergraph(FilterGraph *fg); +int ifilter_parameters_from_frame(InputFilter *ifilter, const AVFrame *frame); +int ifilter_parameters_from_decoder(InputFilter *ifilter, const AVCodecContext *avctx); + int avconv_parse_options(int argc, char **argv); int vdpau_init(AVCodecContext *s); |