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
1515
1616 API changes, most recent first:
1717
18+2020-01-30 - xxxxxxxxxx - lavf 58.37.100 - avio.h
19+ Add avio_protocol_get_class().
20+
1821 2020-01-15 - xxxxxxxxxx - lavc 58.66.100 - avcodec.h
1922 Add AV_PKT_DATA_PRFT and AVProducerReferenceTime.
2023
libavformat/avio.h+7−0
@@ -807,6 +807,13 @@ int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer); · 806 unmodified lines
807807 */
808808 const char *avio_enum_protocols(void **opaque, int output);
809809
810+/**
811+ * Get AVClass by names of available protocols.
812+ *
813+ * @return A AVClass of input protocol name or NULL
814+ */
815+const AVClass *avio_protocol_get_class(const char *name);
816+
810817 /**
811818 * Pause and resume playing - only meaningful if using a network streaming
812819 * 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
107107 return avio_enum_protocols(opaque, output);
108108 }
109109
110+const 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+
110120 const URLProtocol **ffurl_get_protocols(const char *whitelist,
111121 const char *blacklist)
112122 {
libavformat/version.h+1−1
@@ -32,7 +32,7 @@ · 31 unmodified lines
3232 // Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium)
3333 // Also please add any ticket numbers that you believe might be affected here
3434 #define LIBAVFORMAT_VERSION_MAJOR 58
35−#define LIBAVFORMAT_VERSION_MINOR 36
35+#define LIBAVFORMAT_VERSION_MINOR 37
3636 #define LIBAVFORMAT_VERSION_MICRO 100
3737
3838 #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