mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-23 19:49:56 +00:00
lavf: use designated initializers for all protocols
This is more readable and makes it easier to reorder URLProtocol members.
This commit is contained in:
parent
a6aa7a1a14
commit
f35ff97f2e
@ -298,11 +298,9 @@ static int applehttp_close(URLContext *h)
|
||||
}
|
||||
|
||||
URLProtocol ff_applehttp_protocol = {
|
||||
"applehttp",
|
||||
applehttp_open,
|
||||
applehttp_read,
|
||||
NULL, /* write */
|
||||
NULL, /* seek */
|
||||
applehttp_close,
|
||||
.flags = URL_PROTOCOL_FLAG_NESTED_SCHEME,
|
||||
.name = "applehttp",
|
||||
.url_open = applehttp_open,
|
||||
.url_read = applehttp_read,
|
||||
.url_close = applehttp_close,
|
||||
.flags = URL_PROTOCOL_FLAG_NESTED_SCHEME,
|
||||
};
|
||||
|
@ -190,10 +190,9 @@ static int64_t concat_seek(URLContext *h, int64_t pos, int whence)
|
||||
}
|
||||
|
||||
URLProtocol ff_concat_protocol = {
|
||||
"concat",
|
||||
concat_open,
|
||||
concat_read,
|
||||
NULL,
|
||||
concat_seek,
|
||||
concat_close,
|
||||
.name = "concat",
|
||||
.url_open = concat_open,
|
||||
.url_read = concat_read,
|
||||
.url_seek = concat_seek,
|
||||
.url_close = concat_close,
|
||||
};
|
||||
|
@ -95,12 +95,12 @@ static int file_close(URLContext *h)
|
||||
}
|
||||
|
||||
URLProtocol ff_file_protocol = {
|
||||
"file",
|
||||
file_open,
|
||||
file_read,
|
||||
file_write,
|
||||
file_seek,
|
||||
file_close,
|
||||
.name = "file",
|
||||
.url_open = file_open,
|
||||
.url_read = file_read,
|
||||
.url_write = file_write,
|
||||
.url_seek = file_seek,
|
||||
.url_close = file_close,
|
||||
.url_get_file_handle = file_get_handle,
|
||||
};
|
||||
|
||||
@ -131,10 +131,10 @@ static int pipe_open(URLContext *h, const char *filename, int flags)
|
||||
}
|
||||
|
||||
URLProtocol ff_pipe_protocol = {
|
||||
"pipe",
|
||||
pipe_open,
|
||||
file_read,
|
||||
file_write,
|
||||
.name = "pipe",
|
||||
.url_open = pipe_open,
|
||||
.url_read = file_read,
|
||||
.url_write = file_write,
|
||||
.url_get_file_handle = file_get_handle,
|
||||
};
|
||||
|
||||
|
@ -121,10 +121,9 @@ static int gopher_read(URLContext *h, uint8_t *buf, int size)
|
||||
|
||||
|
||||
URLProtocol ff_gopher_protocol = {
|
||||
"gopher",
|
||||
gopher_open,
|
||||
gopher_read,
|
||||
gopher_write,
|
||||
NULL, /*seek*/
|
||||
gopher_close,
|
||||
.name = "gopher",
|
||||
.url_open = gopher_open,
|
||||
.url_read = gopher_read,
|
||||
.url_write = gopher_write,
|
||||
.url_close = gopher_close,
|
||||
};
|
||||
|
@ -505,13 +505,13 @@ http_get_file_handle(URLContext *h)
|
||||
}
|
||||
|
||||
URLProtocol ff_http_protocol = {
|
||||
"http",
|
||||
http_open,
|
||||
http_read,
|
||||
http_write,
|
||||
http_seek,
|
||||
http_close,
|
||||
.name = "http",
|
||||
.url_open = http_open,
|
||||
.url_read = http_read,
|
||||
.url_write = http_write,
|
||||
.url_seek = http_seek,
|
||||
.url_close = http_close,
|
||||
.url_get_file_handle = http_get_file_handle,
|
||||
.priv_data_size = sizeof(HTTPContext),
|
||||
.priv_data_class = &httpcontext_class,
|
||||
.priv_data_size = sizeof(HTTPContext),
|
||||
.priv_data_class = &httpcontext_class,
|
||||
};
|
||||
|
@ -158,66 +158,56 @@ static int rtmp_get_file_handle(URLContext *s)
|
||||
}
|
||||
|
||||
URLProtocol ff_rtmp_protocol = {
|
||||
"rtmp",
|
||||
rtmp_open,
|
||||
rtmp_read,
|
||||
rtmp_write,
|
||||
NULL, /* seek */
|
||||
rtmp_close,
|
||||
NULL, /* next */
|
||||
rtmp_read_pause,
|
||||
rtmp_read_seek,
|
||||
rtmp_get_file_handle
|
||||
.name = "rtmp",
|
||||
.url_open = rtmp_open,
|
||||
.url_read = rtmp_read,
|
||||
.url_write = rtmp_write,
|
||||
.url_close = rtmp_close,
|
||||
.url_read_pause = rtmp_read_pause,
|
||||
.url_read_seek = rtmp_read_seek,
|
||||
.url_get_file_handle = rtmp_get_file_handle
|
||||
};
|
||||
|
||||
URLProtocol ff_rtmpt_protocol = {
|
||||
"rtmpt",
|
||||
rtmp_open,
|
||||
rtmp_read,
|
||||
rtmp_write,
|
||||
NULL, /* seek */
|
||||
rtmp_close,
|
||||
NULL, /* next */
|
||||
rtmp_read_pause,
|
||||
rtmp_read_seek,
|
||||
rtmp_get_file_handle
|
||||
.name = "rtmpt",
|
||||
.url_open = rtmp_open,
|
||||
.url_read = rtmp_read,
|
||||
.url_write = rtmp_write,
|
||||
.url_close = rtmp_close,
|
||||
.url_read_pause = rtmp_read_pause,
|
||||
.url_read_seek = rtmp_read_seek,
|
||||
.url_get_file_handle = rtmp_get_file_handle
|
||||
};
|
||||
|
||||
URLProtocol ff_rtmpe_protocol = {
|
||||
"rtmpe",
|
||||
rtmp_open,
|
||||
rtmp_read,
|
||||
rtmp_write,
|
||||
NULL, /* seek */
|
||||
rtmp_close,
|
||||
NULL, /* next */
|
||||
rtmp_read_pause,
|
||||
rtmp_read_seek,
|
||||
rtmp_get_file_handle
|
||||
.name = "rtmpe",
|
||||
.url_open = rtmp_open,
|
||||
.url_read = rtmp_read,
|
||||
.url_write = rtmp_write,
|
||||
.url_close = rtmp_close,
|
||||
.url_read_pause = rtmp_read_pause,
|
||||
.url_read_seek = rtmp_read_seek,
|
||||
.url_get_file_handle = rtmp_get_file_handle
|
||||
};
|
||||
|
||||
URLProtocol ff_rtmpte_protocol = {
|
||||
"rtmpte",
|
||||
rtmp_open,
|
||||
rtmp_read,
|
||||
rtmp_write,
|
||||
NULL, /* seek */
|
||||
rtmp_close,
|
||||
NULL, /* next */
|
||||
rtmp_read_pause,
|
||||
rtmp_read_seek,
|
||||
rtmp_get_file_handle
|
||||
.name = "rtmpte",
|
||||
.url_open = rtmp_open,
|
||||
.url_read = rtmp_read,
|
||||
.url_write = rtmp_write,
|
||||
.url_close = rtmp_close,
|
||||
.url_read_pause = rtmp_read_pause,
|
||||
.url_read_seek = rtmp_read_seek,
|
||||
.url_get_file_handle = rtmp_get_file_handle
|
||||
};
|
||||
|
||||
URLProtocol ff_rtmps_protocol = {
|
||||
"rtmps",
|
||||
rtmp_open,
|
||||
rtmp_read,
|
||||
rtmp_write,
|
||||
NULL, /* seek */
|
||||
rtmp_close,
|
||||
NULL, /* next */
|
||||
rtmp_read_pause,
|
||||
rtmp_read_seek,
|
||||
rtmp_get_file_handle
|
||||
.name = "rtmps",
|
||||
.url_open = rtmp_open,
|
||||
.url_read = rtmp_read,
|
||||
.url_write = rtmp_write,
|
||||
.url_close = rtmp_close,
|
||||
.url_read_pause = rtmp_read_pause,
|
||||
.url_read_seek = rtmp_read_seek,
|
||||
.url_get_file_handle = rtmp_get_file_handle
|
||||
};
|
||||
|
@ -623,10 +623,8 @@ static int mms_read(URLContext *h, uint8_t *buf, int size)
|
||||
}
|
||||
|
||||
URLProtocol ff_mmst_protocol = {
|
||||
"mmst",
|
||||
mms_open,
|
||||
mms_read,
|
||||
NULL, // write
|
||||
NULL, // seek
|
||||
mms_close,
|
||||
.name = "mmst",
|
||||
.url_open = mms_open,
|
||||
.url_read = mms_read,
|
||||
.url_close = mms_close,
|
||||
};
|
||||
|
@ -991,10 +991,9 @@ static int rtmp_write(URLContext *s, const uint8_t *buf, int size)
|
||||
}
|
||||
|
||||
URLProtocol ff_rtmp_protocol = {
|
||||
"rtmp",
|
||||
rtmp_open,
|
||||
rtmp_read,
|
||||
rtmp_write,
|
||||
NULL, /* seek */
|
||||
rtmp_close,
|
||||
.name = "rtmp",
|
||||
.url_open = rtmp_open,
|
||||
.url_read = rtmp_read,
|
||||
.url_write = rtmp_write,
|
||||
.url_close = rtmp_close,
|
||||
};
|
||||
|
@ -355,11 +355,10 @@ int rtp_get_rtcp_file_handle(URLContext *h) {
|
||||
}
|
||||
|
||||
URLProtocol ff_rtp_protocol = {
|
||||
"rtp",
|
||||
rtp_open,
|
||||
rtp_read,
|
||||
rtp_write,
|
||||
NULL, /* seek */
|
||||
rtp_close,
|
||||
.name = "rtp",
|
||||
.url_open = rtp_open,
|
||||
.url_read = rtp_read,
|
||||
.url_write = rtp_write,
|
||||
.url_close = rtp_close,
|
||||
.url_get_file_handle = rtp_get_file_handle,
|
||||
};
|
||||
|
@ -195,11 +195,10 @@ static int tcp_get_file_handle(URLContext *h)
|
||||
}
|
||||
|
||||
URLProtocol ff_tcp_protocol = {
|
||||
"tcp",
|
||||
tcp_open,
|
||||
tcp_read,
|
||||
tcp_write,
|
||||
NULL, /* seek */
|
||||
tcp_close,
|
||||
.name = "tcp",
|
||||
.url_open = tcp_open,
|
||||
.url_read = tcp_read,
|
||||
.url_write = tcp_write,
|
||||
.url_close = tcp_close,
|
||||
.url_get_file_handle = tcp_get_file_handle,
|
||||
};
|
||||
|
@ -489,11 +489,10 @@ static int udp_close(URLContext *h)
|
||||
}
|
||||
|
||||
URLProtocol ff_udp_protocol = {
|
||||
"udp",
|
||||
udp_open,
|
||||
udp_read,
|
||||
udp_write,
|
||||
NULL, /* seek */
|
||||
udp_close,
|
||||
.name = "udp",
|
||||
.url_open = udp_open,
|
||||
.url_read = udp_read,
|
||||
.url_write = udp_write,
|
||||
.url_close = udp_close,
|
||||
.url_get_file_handle = udp_get_file_handle,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user