[FFmpeg-cvslog] Merge commit '1e56173515826aa4d680d3b216d80a3879ed1c68'
James Almer
git at videolan.org
Thu May 2 19:55:28 EEST 2019
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Thu May 2 13:01:36 2019 -0300| [3e076faf3b86bb16f746e7c9b0cf3dac5f9a851a] | committer: James Almer
Merge commit '1e56173515826aa4d680d3b216d80a3879ed1c68'
* commit '1e56173515826aa4d680d3b216d80a3879ed1c68':
rtsp: add pkt_size option
Merged-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3e076faf3b86bb16f746e7c9b0cf3dac5f9a851a
---
libavformat/rtsp.c | 5 ++++-
libavformat/rtsp.h | 1 +
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 8349840c96..c153cac88b 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -76,7 +76,8 @@
#define COMMON_OPTS() \
{ "reorder_queue_size", "set number of packets to buffer for handling of reordered packets", OFFSET(reordering_queue_size), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, DEC }, \
- { "buffer_size", "Underlying protocol send/receive buffer size", OFFSET(buffer_size), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, DEC|ENC } \
+ { "buffer_size", "Underlying protocol send/receive buffer size", OFFSET(buffer_size), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, DEC|ENC }, \
+ { "pkt_size", "Underlying protocol send packet size", OFFSET(pkt_size), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, ENC } \
const AVOption ff_rtsp_options[] = {
@@ -132,6 +133,8 @@ static AVDictionary *map_to_opts(RTSPState *rt)
snprintf(buf, sizeof(buf), "%d", rt->buffer_size);
av_dict_set(&opts, "buffer_size", buf, 0);
+ snprintf(buf, sizeof(buf), "%d", rt->pkt_size);
+ av_dict_set(&opts, "pkt_size", buf, 0);
return opts;
}
diff --git a/libavformat/rtsp.h b/libavformat/rtsp.h
index b49278fc20..54a9a30c16 100644
--- a/libavformat/rtsp.h
+++ b/libavformat/rtsp.h
@@ -410,6 +410,7 @@ typedef struct RTSPState {
char default_lang[4];
int buffer_size;
+ int pkt_size;
} RTSPState;
#define RTSP_FLAG_FILTER_SRC 0x1 /**< Filter incoming UDP packets -
======================================================================
diff --cc libavformat/rtsp.c
index 8349840c96,12c4998c66..c153cac88b
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@@ -65,18 -64,18 +65,19 @@@
#define RTSP_FLAG_OPTS(name, longname) \
{ name, longname, OFFSET(rtsp_flags), AV_OPT_TYPE_FLAGS, {.i64 = 0}, INT_MIN, INT_MAX, DEC, "rtsp_flags" }, \
- { "filter_src", "Only receive packets from the negotiated peer IP", 0, AV_OPT_TYPE_CONST, {.i64 = RTSP_FLAG_FILTER_SRC}, 0, 0, DEC, "rtsp_flags" }
+ { "filter_src", "only receive packets from the negotiated peer IP", 0, AV_OPT_TYPE_CONST, {.i64 = RTSP_FLAG_FILTER_SRC}, 0, 0, DEC, "rtsp_flags" }
#define RTSP_MEDIATYPE_OPTS(name, longname) \
- { name, longname, OFFSET(media_type_mask), AV_OPT_TYPE_FLAGS, { .i64 = (1 << (AVMEDIA_TYPE_DATA+1)) - 1 }, INT_MIN, INT_MAX, DEC, "allowed_media_types" }, \
+ { name, longname, OFFSET(media_type_mask), AV_OPT_TYPE_FLAGS, { .i64 = (1 << (AVMEDIA_TYPE_SUBTITLE+1)) - 1 }, INT_MIN, INT_MAX, DEC, "allowed_media_types" }, \
{ "video", "Video", 0, AV_OPT_TYPE_CONST, {.i64 = 1 << AVMEDIA_TYPE_VIDEO}, 0, 0, DEC, "allowed_media_types" }, \
{ "audio", "Audio", 0, AV_OPT_TYPE_CONST, {.i64 = 1 << AVMEDIA_TYPE_AUDIO}, 0, 0, DEC, "allowed_media_types" }, \
- { "data", "Data", 0, AV_OPT_TYPE_CONST, {.i64 = 1 << AVMEDIA_TYPE_DATA}, 0, 0, DEC, "allowed_media_types" }
+ { "data", "Data", 0, AV_OPT_TYPE_CONST, {.i64 = 1 << AVMEDIA_TYPE_DATA}, 0, 0, DEC, "allowed_media_types" }, \
+ { "subtitle", "Subtitle", 0, AV_OPT_TYPE_CONST, {.i64 = 1 << AVMEDIA_TYPE_SUBTITLE}, 0, 0, DEC, "allowed_media_types" }
#define COMMON_OPTS() \
- { "reorder_queue_size", "Number of packets to buffer for handling of reordered packets", OFFSET(reordering_queue_size), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, DEC }, \
+ { "reorder_queue_size", "set number of packets to buffer for handling of reordered packets", OFFSET(reordering_queue_size), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, DEC }, \
- { "buffer_size", "Underlying protocol send/receive buffer size", OFFSET(buffer_size), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, DEC|ENC } \
+ { "buffer_size", "Underlying protocol send/receive buffer size", OFFSET(buffer_size), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, DEC|ENC }, \
+ { "pkt_size", "Underlying protocol send packet size", OFFSET(pkt_size), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, ENC } \
const AVOption ff_rtsp_options[] = {
diff --cc libavformat/rtsp.h
index b49278fc20,c38b90432d..54a9a30c16
--- a/libavformat/rtsp.h
+++ b/libavformat/rtsp.h
@@@ -403,13 -397,11 +403,14 @@@ typedef struct RTSPState
*/
int reordering_queue_size;
+ /**
+ * User-Agent string
+ */
+ char *user_agent;
+
char default_lang[4];
int buffer_size;
+ int pkt_size;
-
- const URLProtocol **protocols;
} RTSPState;
#define RTSP_FLAG_FILTER_SRC 0x1 /**< Filter incoming UDP packets -
More information about the ffmpeg-cvslog
mailing list