Commit 27529eeb authored by Steven Liu's avatar Steven Liu

avformat/avio: add avio_protocol_get_class

Reviewed-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
Suggested-by: 's avatarHendrik Leppkes <h.leppkes@gmail.com>
Suggested-by: 's avatarNicolas George <george@nsup.org>
Signed-off-by: 's avatarSteven Liu <lq@chinaffmpeg.org>
parent 3bce9e9b
...@@ -15,6 +15,9 @@ libavutil: 2017-10-21 ...@@ -15,6 +15,9 @@ libavutil: 2017-10-21
API changes, most recent first: API changes, most recent first:
2020-01-30 - xxxxxxxxxx - lavf 58.37.100 - avio.h
Add avio_protocol_get_class().
2020-01-15 - xxxxxxxxxx - lavc 58.66.100 - avcodec.h 2020-01-15 - xxxxxxxxxx - lavc 58.66.100 - avcodec.h
Add AV_PKT_DATA_PRFT and AVProducerReferenceTime. Add AV_PKT_DATA_PRFT and AVProducerReferenceTime.
......
...@@ -807,6 +807,13 @@ int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer); ...@@ -807,6 +807,13 @@ int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer);
*/ */
const char *avio_enum_protocols(void **opaque, int output); const char *avio_enum_protocols(void **opaque, int output);
/**
* Get AVClass by names of available protocols.
*
* @return A AVClass of input protocol name or NULL
*/
const AVClass *avio_protocol_get_class(const char *name);
/** /**
* Pause and resume playing - only meaningful if using a network streaming * Pause and resume playing - only meaningful if using a network streaming
* protocol (e.g. MMS). * protocol (e.g. MMS).
......
...@@ -107,6 +107,16 @@ const char *avio_enum_protocols(void **opaque, int output) ...@@ -107,6 +107,16 @@ const char *avio_enum_protocols(void **opaque, int output)
return avio_enum_protocols(opaque, output); return avio_enum_protocols(opaque, output);
} }
const AVClass *avio_protocol_get_class(const char *name)
{
int i = 0;
for (i = 0; url_protocols[i]; i++) {
if (!strcmp(url_protocols[i]->name, name))
return url_protocols[i]->priv_data_class;
}
return NULL;
}
const URLProtocol **ffurl_get_protocols(const char *whitelist, const URLProtocol **ffurl_get_protocols(const char *whitelist,
const char *blacklist) const char *blacklist)
{ {
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
// Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium) // Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium)
// Also please add any ticket numbers that you believe might be affected here // Also please add any ticket numbers that you believe might be affected here
#define LIBAVFORMAT_VERSION_MAJOR 58 #define LIBAVFORMAT_VERSION_MAJOR 58
#define LIBAVFORMAT_VERSION_MINOR 36 #define LIBAVFORMAT_VERSION_MINOR 37
#define LIBAVFORMAT_VERSION_MICRO 100 #define LIBAVFORMAT_VERSION_MICRO 100
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment