]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/avformat.h
avformat: deprecate AVFormatContext filename field
[ffmpeg] / libavformat / avformat.h
index b0387214c53f7dcaf7b033965ec56e1009523c61..82f98453375eda58abc510164a5768a3f1f688c8 100644 (file)
@@ -991,6 +991,8 @@ typedef struct AVStream {
      * String containing pairs of key and values describing recommended encoder configuration.
      * Pairs are separated by ','.
      * Keys are separated from values by '='.
+     *
+     * @deprecated unused
      */
     attribute_deprecated
     char *recommended_encoder_configuration;
@@ -1017,10 +1019,10 @@ typedef struct AVStream {
      *****************************************************************
      */
 
+#define MAX_STD_TIMEBASES (30*12+30+3+6)
     /**
      * Stream information used internally by avformat_find_stream_info()
      */
-#define MAX_STD_TIMEBASES (30*12+30+3+6)
     struct {
         int64_t last_dts;
         int64_t duration_gcd;
@@ -1220,8 +1222,8 @@ attribute_deprecated
 AVRational av_stream_get_r_frame_rate(const AVStream *s);
 attribute_deprecated
 void       av_stream_set_r_frame_rate(AVStream *s, AVRational r);
-attribute_deprecated
 #if FF_API_LAVF_FFSERVER
+attribute_deprecated
 char* av_stream_get_recommended_encoder_configuration(const AVStream *s);
 attribute_deprecated
 void  av_stream_set_recommended_encoder_configuration(AVStream *s, char *configuration);
@@ -1273,6 +1275,11 @@ typedef struct AVProgram {
 
 #define AVFMTCTX_NOHEADER      0x0001 /**< signal that no header is present
                                          (streams are added dynamically) */
+#define AVFMTCTX_UNSEEKABLE    0x0002 /**< signal that the stream is definitely
+                                         not seekable, and attempts to call the
+                                         seek function will fail. For some
+                                         network protocols (e.g. HLS), this can
+                                         change dynamically at runtime. */
 
 typedef struct AVChapter {
     int id;                 ///< unique ID to identify the chapter
@@ -1387,13 +1394,33 @@ typedef struct AVFormatContext {
      */
     AVStream **streams;
 
+#if FF_API_FORMAT_FILENAME
     /**
      * input or output filename
      *
      * - demuxing: set by avformat_open_input()
      * - muxing: may be set by the caller before avformat_write_header()
+     *
+     * @deprecated Use url instead.
      */
+    attribute_deprecated
     char filename[1024];
+#endif
+
+    /**
+     * input or output URL. Unlike the old filename field, this field has no
+     * length restriction.
+     *
+     * - demuxing: set by avformat_open_input(), initialized to an empty
+     *             string if url parameter was NULL in avformat_open_input().
+     * - muxing: may be set by the caller before calling avformat_write_header()
+     *           (or avformat_init_output() if that is called first) to a string
+     *           which is freeable by av_free(). Set to an empty string if it
+     *           was NULL in avformat_init_output().
+     *
+     * Freed by libavformat in avformat_free_context().
+     */
+    char *url;
 
     /**
      * Position of the first frame of the component, in
@@ -1857,7 +1884,7 @@ typedef struct AVFormatContext {
      */
     char *protocol_whitelist;
 
-    /*
+    /**
      * A callback for opening new IO streams.
      *
      * Whenever a muxer or a demuxer needs to open an IO stream (typically from