]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/avformat.h
cmdutils: replace strncpy() with direct assignment
[ffmpeg] / libavformat / avformat.h
index 2aea37443e94676dc8a63a3d7a7867acdd310269..e3bd01ec7f8f309b4bfa9bbcaf8557105baca2a5 100644 (file)
@@ -590,6 +590,7 @@ typedef struct AVOutputFormat {
      * @see avdevice_list_devices() for more details.
      */
     int (*get_device_list)(struct AVFormatContext *s, struct AVDeviceInfoList *device_list);
+#if LIBAVFORMAT_VERSION_MAJOR < 59
     /**
      * Initialize device capabilities submodule.
      * @see avdevice_capabilities_create() for more details.
@@ -600,6 +601,7 @@ typedef struct AVOutputFormat {
      * @see avdevice_capabilities_free() for more details.
      */
     int (*free_device_capabilities)(struct AVFormatContext *s, struct AVDeviceCapabilitiesQuery *caps);
+#endif
     enum AVCodecID data_codec; /**< default data codec */
     /**
      * Initialize format. May allocate data here, and set any AVFormatContext or
@@ -769,6 +771,7 @@ typedef struct AVInputFormat {
      */
     int (*get_device_list)(struct AVFormatContext *s, struct AVDeviceInfoList *device_list);
 
+#if LIBAVFORMAT_VERSION_MAJOR < 59
     /**
      * Initialize device capabilities submodule.
      * @see avdevice_capabilities_create() for more details.
@@ -780,6 +783,7 @@ typedef struct AVInputFormat {
      * @see avdevice_capabilities_free() for more details.
      */
     int (*free_device_capabilities)(struct AVFormatContext *s, struct AVDeviceCapabilitiesQuery *caps);
+#endif
 } AVInputFormat;
 /**
  * @}
@@ -1079,18 +1083,15 @@ typedef struct AVStream {
     enum AVStreamParseType need_parsing;
     struct AVCodecParserContext *parser;
 
-    /**
-     * last packet in packet_buffer for this stream when muxing.
-     */
-    struct AVPacketList *last_in_packet_buffer;
-    AVProbeData probe_data;
-#define MAX_REORDER_DELAY 16
-    int64_t pts_buffer[MAX_REORDER_DELAY+1];
-
-    AVIndexEntry *index_entries; /**< Only used if the format does not
-                                    support seeking natively. */
-    int nb_index_entries;
-    unsigned int index_entries_allocated_size;
+#if LIBAVFORMAT_VERSION_MAJOR < 59
+    // kept for ABI compatibility only, do not access in any way
+    void        *unused7;
+    AVProbeData  unused6;
+    int64_t      unused5[16+1];
+    void         *unused2;
+    int          unused3;
+    unsigned int unused4;
+#endif
 
     /**
      * Stream Identifier
@@ -1099,28 +1100,12 @@ typedef struct AVStream {
      */
     int stream_identifier;
 
-    /**
-     * Details of the MPEG-TS program which created this stream.
-     */
-    int program_num;
-    int pmt_version;
-    int pmt_stream_idx;
-
-    int64_t interleaver_chunk_size;
-    int64_t interleaver_chunk_duration;
-
-    /**
-     * stream probing state
-     * -1   -> probing finished
-     *  0   -> no probing requested
-     * rest -> perform probing with request_probe being the minimum score to accept.
-     */
-    int request_probe;
-    /**
-     * Indicates that everything up to the next keyframe
-     * should be discarded.
-     */
-    int skip_to_keyframe;
+#if LIBAVFORMAT_VERSION_MAJOR < 59
+    // kept for ABI compatibility only, do not access in any way
+    int unused8;
+    int unused9;
+    int unused10;
+#endif
 
     /**
      * An opaque field for libavformat internal usage.
@@ -1394,7 +1379,9 @@ typedef struct AVFormatContext {
 #define AVFMT_FLAG_MP4A_LATM    0x8000 ///< Deprecated, does nothing.
 #endif
 #define AVFMT_FLAG_SORT_DTS    0x10000 ///< try to interleave outputted packets by dts (using this flag can slow demuxing down)
-#define AVFMT_FLAG_PRIV_OPT    0x20000 ///< Enable use of private options by delaying codec open (this could be made default once all code is converted)
+#if FF_API_LAVF_PRIV_OPT
+#define AVFMT_FLAG_PRIV_OPT    0x20000 ///< Enable use of private options by delaying codec open (deprecated, will do nothing once av_demuxer_open() is removed)
+#endif
 #if FF_API_LAVF_KEEPSIDE_FLAG
 #define AVFMT_FLAG_KEEP_SIDE_DATA 0x40000 ///< Deprecated, does nothing.
 #endif
@@ -2096,7 +2083,11 @@ int av_stream_add_side_data(AVStream *st, enum AVPacketSideDataType type,
  * @return pointer to fresh allocated data or NULL otherwise
  */
 uint8_t *av_stream_new_side_data(AVStream *stream,
+#if FF_API_BUFFER_SIZE_T
                                  enum AVPacketSideDataType type, int size);
+#else
+                                 enum AVPacketSideDataType type, size_t size);
+#endif
 /**
  * Get side information from stream.
  *
@@ -2107,7 +2098,11 @@ uint8_t *av_stream_new_side_data(AVStream *stream,
  * @return pointer to data if present or NULL otherwise
  */
 uint8_t *av_stream_get_side_data(const AVStream *stream,
+#if FF_API_BUFFER_SIZE_T
                                  enum AVPacketSideDataType type, int *size);
+#else
+                                 enum AVPacketSideDataType type, size_t *size);
+#endif
 
 AVProgram *av_new_program(AVFormatContext *s, int id);
 
@@ -2225,8 +2220,13 @@ int av_probe_input_buffer(AVIOContext *pb, ff_const59 AVInputFormat **fmt,
  */
 int avformat_open_input(AVFormatContext **ps, const char *url, ff_const59 AVInputFormat *fmt, AVDictionary **options);
 
+#if FF_API_DEMUXER_OPEN
+/**
+ * @deprecated Use an AVDictionary to pass options to a demuxer.
+ */
 attribute_deprecated
 int av_demuxer_open(AVFormatContext *ic);
+#endif
 
 /**
  * Read packets of a media file to get stream information. This