Re: [FFmpeg-devel] [PATCH] rtsp: add pkt_size option

2019-05-01 Thread Tristan Matthews
On Thu, Apr 18, 2019 at 5:14 PM Tristan Matthews  wrote:
>
> On Mon, Apr 15, 2019 at 6:50 PM Tristan Matthews  wrote:
> >
> > This allows users to specify an upper limit on the size of outgoing packets
> > when publishing via RTSP.
> >
> > Signed-off-by: Martin Storsjö 
> > ---
> >  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(, "buffer_size", buf, 0);
> > +snprintf(buf, sizeof(buf), "%d", rt->pkt_size);
> > +av_dict_set(, "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 -
> > --
> > 2.17.1
> >
>
> Ping.

Ping.

Best,
-t
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] rtsp: add pkt_size option

2019-04-18 Thread Tristan Matthews
On Mon, Apr 15, 2019 at 6:50 PM Tristan Matthews  wrote:
>
> This allows users to specify an upper limit on the size of outgoing packets
> when publishing via RTSP.
>
> Signed-off-by: Martin Storsjö 
> ---
>  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(, "buffer_size", buf, 0);
> +snprintf(buf, sizeof(buf), "%d", rt->pkt_size);
> +av_dict_set(, "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 -
> --
> 2.17.1
>

Ping.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH] rtsp: add pkt_size option

2019-04-15 Thread Tristan Matthews
This allows users to specify an upper limit on the size of outgoing packets
when publishing via RTSP.

Signed-off-by: Martin Storsjö 
---
 libavformat/rtsp.c | 6 +-
 libavformat/rtsp.h | 1 +
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 8349840c96..8a8ffdea4d 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -76,7 +76,9 @@
 
 #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 }, \
+{ "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 +134,8 @@ static AVDictionary *map_to_opts(RTSPState *rt)
 
 snprintf(buf, sizeof(buf), "%d", rt->buffer_size);
 av_dict_set(, "buffer_size", buf, 0);
+snprintf(buf, sizeof(buf), "%d", rt->pkt_size);
+av_dict_set(, "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 -
-- 
2.17.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH] rtsp: add pkt_size option

2019-04-15 Thread Tristan Matthews
This allows users to specify an upper limit on the size of outgoing packets
when publishing via RTSP.

Signed-off-by: Martin Storsjö 
---
 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(, "buffer_size", buf, 0);
+snprintf(buf, sizeof(buf), "%d", rt->pkt_size);
+av_dict_set(, "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 -
-- 
2.17.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".