]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/avformat.h
avformat: remove deprecated AVStream.codec
[ffmpeg] / libavformat / avformat.h
index bb8ddef88ddbd11c73eb569ec39cdcd9c968064c..624d2dae2c2f677525c2278689ace3caef8f53fe 100644 (file)
@@ -839,13 +839,7 @@ typedef struct AVStream {
      * encoding: set by the user, replaced by libavformat if left unset
      */
     int id;
-#if FF_API_LAVF_AVCTX
-    /**
-     * @deprecated use the codecpar struct instead
-     */
-    attribute_deprecated
-    AVCodecContext *codec;
-#endif
+
     void *priv_data;
 
     /**
@@ -1598,7 +1592,7 @@ typedef struct AVFormatContext {
      * the same codec_id.
      * Demuxing: Set by user
      */
-    AVCodec *video_codec;
+    const AVCodec *video_codec;
 
     /**
      * Forced audio codec.
@@ -1606,7 +1600,7 @@ typedef struct AVFormatContext {
      * the same codec_id.
      * Demuxing: Set by user
      */
-    AVCodec *audio_codec;
+    const AVCodec *audio_codec;
 
     /**
      * Forced subtitle codec.
@@ -1614,7 +1608,7 @@ typedef struct AVFormatContext {
      * the same codec_id.
      * Demuxing: Set by user
      */
-    AVCodec *subtitle_codec;
+    const AVCodec *subtitle_codec;
 
     /**
      * Forced data codec.
@@ -1622,7 +1616,7 @@ typedef struct AVFormatContext {
      * the same codec_id.
      * Demuxing: Set by user
      */
-    AVCodec *data_codec;
+    const AVCodec *data_codec;
 
     /**
      * Number of bytes to be written as padding in a metadata header.
@@ -1837,13 +1831,11 @@ const AVClass *avformat_get_class(void);
  *
  * When muxing, should be called by the user before avformat_write_header().
  *
- * User is required to call avcodec_close() and avformat_free_context() to
- * clean up the allocation by avformat_new_stream().
+ * User is required to call avformat_free_context() to clean up the allocation
+ * by avformat_new_stream().
  *
  * @param s media file handle
- * @param c If non-NULL, the AVCodecContext corresponding to the new stream
- * will be initialized to use this codec. This is needed for e.g. codec-specific
- * defaults to be set, so codec should be provided if it is known.
+ * @param c unused, does nothing
  *
  * @return newly created stream or NULL on error.
  */
@@ -1873,11 +1865,7 @@ 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.
  *
@@ -1888,11 +1876,7 @@ 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);
 
@@ -2078,7 +2062,7 @@ int av_find_best_stream(AVFormatContext *ic,
                         enum AVMediaType type,
                         int wanted_stream_nb,
                         int related_stream,
-                        AVCodec **decoder_ret,
+                        const AVCodec **decoder_ret,
                         int flags);
 
 /**