[FFmpeg-devel] [PATCH] cmdutils: Restore opt_protocols() as it was before the API "cleanup"
Michael Niedermayer
michaelni at gmx.at
Sun Feb 5 05:49:00 CET 2012
This uses internal API as its not possible print a list of
protocols as we did before with the new public API.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
cmdutils.c | 22 ++++++++++++++--------
1 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/cmdutils.c b/cmdutils.c
index 056849d..0b33434 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -34,6 +34,8 @@
#include "libavdevice/avdevice.h"
#include "libswscale/swscale.h"
#include "libswresample/swresample.h"
+#include "libavformat/url.h" // for opt_protocols()
+
#if CONFIG_POSTPROC
#include "libpostproc/postprocess.h"
#endif
@@ -850,16 +852,20 @@ int opt_bsfs(const char *opt, const char *arg)
int opt_protocols(const char *opt, const char *arg)
{
- void *opaque = NULL;
- const char *name;
+ URLProtocol *up=NULL;
printf("Supported file protocols:\n"
- "Input:\n");
- while ((name = avio_enum_protocols(&opaque, 0)))
- printf("%s\n", name);
- printf("Output:\n");
- while ((name = avio_enum_protocols(&opaque, 1)))
- printf("%s\n", name);
+ "I.. = Input supported\n"
+ ".O. = Output supported\n"
+ "..S = Seek supported\n"
+ "FLAGS NAME\n"
+ "----- \n");
+ while((up = ffurl_protocol_next(up)))
+ printf("%c%c%c %s\n",
+ up->url_read ? 'I' : '.',
+ up->url_write ? 'O' : '.',
+ up->url_seek ? 'S' : '.',
+ up->name);
return 0;
}
--
1.7.5.4
More information about the ffmpeg-devel
mailing list