Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-11-27 19:42:50 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2016-11-29 00:45:28 +0300
commit75b436d8b682db6f402fdb0561661ec5c0203cfc (patch)
treee654ea0f8ab88e728467a1dae1b672e5613335c7 /ffserver_config.h
parentc8b24a685ac5e8b21877063c211339558a59eb82 (diff)
ffserver: Remove use of AVStream as a intermediate to store parameters
Reviewed-by: "Reynaldo H. Verdejo Pinochet" <reynaldo@osg.samsung.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'ffserver_config.h')
-rw-r--r--ffserver_config.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/ffserver_config.h b/ffserver_config.h
index 0bd4cfc762..373767b4ad 100644
--- a/ffserver_config.h
+++ b/ffserver_config.h
@@ -49,6 +49,24 @@ typedef struct FFServerIPAddressACL {
struct in_addr last;
} FFServerIPAddressACL;
+/**
+ * This holds the stream parameters for an AVStream, it cannot be a AVStream
+ * because AVStreams cannot be instanciated without a AVFormatContext, especially
+ * not outside libavformat.
+ *
+ * The fields of this struct have the same semantics as the fields of an AVStream.
+ */
+typedef struct LayeredAVStream {
+ int index;
+ int id;
+ AVCodecParameters *codecpar;
+ AVCodecContext *codec;
+ AVRational time_base;
+ int pts_wrap_bits;
+ AVRational sample_aspect_ratio;
+ char *recommended_encoder_configuration;
+} LayeredAVStream;
+
/* description of each stream of the ffserver.conf file */
typedef struct FFServerStream {
enum FFServerStreamType stream_type;
@@ -64,7 +82,7 @@ typedef struct FFServerStream {
int prebuffer; /* Number of milliseconds early to start */
int64_t max_time; /* Number of milliseconds to run */
int send_on_key;
- AVStream *streams[FFSERVER_MAX_STREAMS];
+ LayeredAVStream *streams[FFSERVER_MAX_STREAMS];
int feed_streams[FFSERVER_MAX_STREAMS]; /* index of streams in the feed */
char feed_filename[1024]; /* file name of the feed storage, or
input file name for a stream */