[libav-devel] [PATCH] avio: make url_filesize() internal.

2011-04-04 Thread Anton Khirnov
---
 libavformat/avio.c   |6 +-
 libavformat/avio.h   |8 +---
 libavformat/concat.c |2 +-
 libavformat/url.h|7 +++
 4 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/libavformat/avio.c b/libavformat/avio.c
index b372ee3..76d3d4d 100644
--- a/libavformat/avio.c
+++ b/libavformat/avio.c
@@ -200,6 +200,10 @@ int url_close(URLContext *h)
 {
 return ffurl_close(h);
 }
+int64_t url_filesize(URLContext *h)
+{
+return ffurl_size(h);
+}
 #endif
 
 #define URL_SCHEME_CHARS\
@@ -338,7 +342,7 @@ int url_exist(const char *filename)
 return 1;
 }
 
-int64_t url_filesize(URLContext *h)
+int64_t ffurl_size(URLContext *h)
 {
 int64_t pos, size;
 
diff --git a/libavformat/avio.h b/libavformat/avio.h
index cd78d93..28f24e0 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -110,6 +110,7 @@ attribute_deprecated int url_read_complete(URLContext *h, 
unsigned char *buf, in
 attribute_deprecated int url_write(URLContext *h, const unsigned char *buf, 
int size);
 attribute_deprecated int64_t url_seek(URLContext *h, int64_t pos, int whence);
 attribute_deprecated int url_close(URLContext *h);
+attribute_deprecated int64_t url_filesize(URLContext *h);
 #endif
 
 /**
@@ -119,13 +120,6 @@ attribute_deprecated int url_close(URLContext *h);
 int url_exist(const char *url);
 
 /**
- * Return the filesize of the resource accessed by h, AVERROR(ENOSYS)
- * if the operation is not supported by h, or another negative value
- * corresponding to an AVERROR error code in case of failure.
- */
-int64_t url_filesize(URLContext *h);
-
-/**
  * Return the file descriptor associated with this URL. For RTP, this
  * will return only the RTP file descriptor, not the RTCP file descriptor.
  *
diff --git a/libavformat/concat.c b/libavformat/concat.c
index 40317de..dbacc69 100644
--- a/libavformat/concat.c
+++ b/libavformat/concat.c
@@ -105,7 +105,7 @@ static av_cold int concat_open(URLContext *h, const char 
*uri, int flags)
 break;
 
 /* creating size */
-if ((size = url_filesize(uc))  0) {
+if ((size = ffurl_size(uc))  0) {
 ffurl_close(uc);
 err = AVERROR(ENOSYS);
 break;
diff --git a/libavformat/url.h b/libavformat/url.h
index 2ec3eb4..df3cb46 100644
--- a/libavformat/url.h
+++ b/libavformat/url.h
@@ -111,4 +111,11 @@ int64_t ffurl_seek(URLContext *h, int64_t pos, int whence);
  */
 int ffurl_close(URLContext *h);
 
+/**
+ * Return the filesize of the resource accessed by h, AVERROR(ENOSYS)
+ * if the operation is not supported by h, or another negative value
+ * corresponding to an AVERROR error code in case of failure.
+ */
+int64_t ffurl_size(URLContext *h);
+
 #endif //AVFORMAT_URL_H
-- 
1.7.4.1

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] avio: make url_filesize() internal.

2011-04-04 Thread Måns Rullgård
Anton Khirnov an...@khirnov.net writes:

 ---
  libavformat/avio.c   |6 +-
  libavformat/avio.h   |8 +---
  libavformat/concat.c |2 +-
  libavformat/url.h|7 +++
  4 files changed, 14 insertions(+), 9 deletions(-)

Looks OK.

-- 
Måns Rullgård
m...@mansr.com
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel