History

avformat/avio: add avio_protocol_get_class

Steven Liu committed 6 years ago

Commit 27529ee1 parent 3bce9e94 files · +21 −1Browse files

Unified · Split

4 files
  1. doc/APIchanges +3 −0
  2. libavformat/avio.h +7 −0
  3. libavformat/protocols.c +10 −0
  4. libavformat/version.h +1 −1
doc/APIchanges+3−0
@@ -15,6 +15,9 @@ libavutil: 2017-10-21 · 14 unmodified lines
15 15
16API changes, most recent first:16API changes, most recent first:
17 17
182020-01-30 - xxxxxxxxxx - lavf 58.37.100 - avio.h
19 Add avio_protocol_get_class().
20
182020-01-15 - xxxxxxxxxx - lavc 58.66.100 - avcodec.h212020-01-15 - xxxxxxxxxx - lavc 58.66.100 - avcodec.h
19 Add AV_PKT_DATA_PRFT and AVProducerReferenceTime.22 Add AV_PKT_DATA_PRFT and AVProducerReferenceTime.
20 23
libavformat/avio.h+7−0
@@ -807,6 +807,13 @@ int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer); · 806 unmodified lines
807 */807 */
808const char *avio_enum_protocols(void **opaque, int output);808const char *avio_enum_protocols(void **opaque, int output);
809 809
810/**
811 * Get AVClass by names of available protocols.
812 *
813 * @return A AVClass of input protocol name or NULL
814 */
815const AVClass *avio_protocol_get_class(const char *name);
816
810/**817/**
811 * Pause and resume playing - only meaningful if using a network streaming818 * Pause and resume playing - only meaningful if using a network streaming
812 * protocol (e.g. MMS).819 * protocol (e.g. MMS).
libavformat/protocols.c+10−0
@@ -107,6 +107,16 @@ const char *avio_enum_protocols(void **opaque, int output) · 106 unmodified lines
107 return avio_enum_protocols(opaque, output);107 return avio_enum_protocols(opaque, output);
108}108}
109 109
110const AVClass *avio_protocol_get_class(const char *name)
111{
112 int i = 0;
113 for (i = 0; url_protocols[i]; i++) {
114 if (!strcmp(url_protocols[i]->name, name))
115 return url_protocols[i]->priv_data_class;
116 }
117 return NULL;
118}
119
110const URLProtocol **ffurl_get_protocols(const char *whitelist,120const URLProtocol **ffurl_get_protocols(const char *whitelist,
111 const char *blacklist)121 const char *blacklist)
112{122{
libavformat/version.h+1−1
@@ -32,7 +32,7 @@ · 31 unmodified lines
32// Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium)32// Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium)
33// Also please add any ticket numbers that you believe might be affected here33// Also please add any ticket numbers that you believe might be affected here
34#define LIBAVFORMAT_VERSION_MAJOR 5834#define LIBAVFORMAT_VERSION_MAJOR 58
35#define LIBAVFORMAT_VERSION_MINOR 3635#define LIBAVFORMAT_VERSION_MINOR 37
36#define LIBAVFORMAT_VERSION_MICRO 10036#define LIBAVFORMAT_VERSION_MICRO 100
37 37
38#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \38#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t