[FFmpeg-cvslog] avio: deprecate url_get_filename().

Anton Khirnov git at videolan.org
Tue Apr 5 02:33:10 CEST 2011


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Thu Mar 31 18:00:55 2011 +0200| [727c7aa02642c97b68356d40d1a8e9e835ba1a69] | committer: Anton Khirnov

avio: deprecate url_get_filename().

URLContext.filename should be used directly.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=727c7aa02642c97b68356d40d1a8e9e835ba1a69
---

 libavformat/avio.c |   10 ++++------
 libavformat/avio.h |    8 +-------
 2 files changed, 5 insertions(+), 13 deletions(-)

diff --git a/libavformat/avio.c b/libavformat/avio.c
index a51bac1..24cec8f 100644
--- a/libavformat/avio.c
+++ b/libavformat/avio.c
@@ -212,6 +212,10 @@ int url_get_max_packet_size(URLContext *h)
 {
     return h->max_packet_size;
 }
+void url_get_filename(URLContext *h, char *buf, int buf_size)
+{
+    av_strlcpy(buf, h->filename, buf_size);
+}
 #endif
 
 #define URL_SCHEME_CHARS                        \
@@ -372,12 +376,6 @@ int ffurl_get_file_handle(URLContext *h)
     return h->prot->url_get_file_handle(h);
 }
 
-void url_get_filename(URLContext *h, char *buf, int buf_size)
-{
-    av_strlcpy(buf, h->filename, buf_size);
-}
-
-
 static int default_interrupt_cb(void)
 {
     return 0;
diff --git a/libavformat/avio.h b/libavformat/avio.h
index 4c2b4d5..427aa8c 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -113,6 +113,7 @@ attribute_deprecated int url_close(URLContext *h);
 attribute_deprecated int64_t url_filesize(URLContext *h);
 attribute_deprecated int url_get_file_handle(URLContext *h);
 attribute_deprecated int url_get_max_packet_size(URLContext *h);
+attribute_deprecated void url_get_filename(URLContext *h, char *buf, int buf_size);
 #endif
 
 /**
@@ -122,13 +123,6 @@ attribute_deprecated int url_get_max_packet_size(URLContext *h);
 int url_exist(const char *url);
 
 /**
- * Copy the filename of the resource accessed by h to buf.
- *
- * @param buf_size size in bytes of buf
- */
-void url_get_filename(URLContext *h, char *buf, int buf_size);
-
-/**
  * The callback is called in blocking functions to test regulary if
  * asynchronous interruption is needed. AVERROR_EXIT is returned
  * in this case by the interrupted function. 'NULL' means no interrupt



More information about the ffmpeg-cvslog mailing list