lavf: reorganize URLProtocols
Instead of a linked list constructed at av_register_all(), store them in a constant array of pointers. Since no registration is necessary now, this removes some global state from lavf. This will also allow the urlprotocol layer caller to limit the available protocols in a simple and flexible way in the following commits.
This commit is contained in:
@@ -320,7 +320,7 @@ static const AVClass lib ## flavor ## _class = {\
|
||||
};
|
||||
|
||||
RTMP_CLASS(rtmp)
|
||||
URLProtocol ff_librtmp_protocol = {
|
||||
const URLProtocol ff_librtmp_protocol = {
|
||||
.name = "rtmp",
|
||||
.url_open = rtmp_open,
|
||||
.url_read = rtmp_read,
|
||||
@@ -335,7 +335,7 @@ URLProtocol ff_librtmp_protocol = {
|
||||
};
|
||||
|
||||
RTMP_CLASS(rtmpt)
|
||||
URLProtocol ff_librtmpt_protocol = {
|
||||
const URLProtocol ff_librtmpt_protocol = {
|
||||
.name = "rtmpt",
|
||||
.url_open = rtmp_open,
|
||||
.url_read = rtmp_read,
|
||||
@@ -350,7 +350,7 @@ URLProtocol ff_librtmpt_protocol = {
|
||||
};
|
||||
|
||||
RTMP_CLASS(rtmpe)
|
||||
URLProtocol ff_librtmpe_protocol = {
|
||||
const URLProtocol ff_librtmpe_protocol = {
|
||||
.name = "rtmpe",
|
||||
.url_open = rtmp_open,
|
||||
.url_read = rtmp_read,
|
||||
@@ -365,7 +365,7 @@ URLProtocol ff_librtmpe_protocol = {
|
||||
};
|
||||
|
||||
RTMP_CLASS(rtmpte)
|
||||
URLProtocol ff_librtmpte_protocol = {
|
||||
const URLProtocol ff_librtmpte_protocol = {
|
||||
.name = "rtmpte",
|
||||
.url_open = rtmp_open,
|
||||
.url_read = rtmp_read,
|
||||
@@ -380,7 +380,7 @@ URLProtocol ff_librtmpte_protocol = {
|
||||
};
|
||||
|
||||
RTMP_CLASS(rtmps)
|
||||
URLProtocol ff_librtmps_protocol = {
|
||||
const URLProtocol ff_librtmps_protocol = {
|
||||
.name = "rtmps",
|
||||
.url_open = rtmp_open,
|
||||
.url_read = rtmp_read,
|
||||
|
Reference in New Issue
Block a user