Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2021-02-28 Thread Marton Balint
On Sun, 28 Feb 2021, Paul B Mahol wrote: On Sun, Feb 28, 2021 at 11:14 PM Marton Balint wrote: On Sun, 28 Feb 2021, Paul B Mahol wrote: > This work is sponsored by Open Broadcast Systems. > > Signed-off-by: Paul B Mahol > --- > configure | 5 + > doc/protocols.texi |

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2021-02-28 Thread Paul B Mahol
On Sun, Feb 28, 2021 at 11:14 PM Marton Balint wrote: > > > On Sun, 28 Feb 2021, Paul B Mahol wrote: > > > This work is sponsored by Open Broadcast Systems. > > > > Signed-off-by: Paul B Mahol > > --- > > configure | 5 + > > doc/protocols.texi | 29 + > > libavformat/Mak

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2021-02-28 Thread Marton Balint
On Sun, 28 Feb 2021, Paul B Mahol wrote: This work is sponsored by Open Broadcast Systems. Signed-off-by: Paul B Mahol --- configure | 5 + doc/protocols.texi | 29 + libavformat/Makefile| 1 + libavformat/librist.c | 236 +++

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2021-02-28 Thread Marton Balint
On Sun, 28 Feb 2021, Paul B Mahol wrote: On Fri, Feb 26, 2021 at 9:54 PM Marton Balint wrote: On Fri, 26 Feb 2021, Paul B Mahol wrote: > This work is sponsored by Open Broadcast Systems. > > Signed-off-by: Paul B Mahol > --- > configure | 5 + > doc/protocols.texi |

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2021-02-28 Thread Paul B Mahol
On Fri, Feb 26, 2021 at 9:54 PM Marton Balint wrote: > > > On Fri, 26 Feb 2021, Paul B Mahol wrote: > > > This work is sponsored by Open Broadcast Systems. > > > > Signed-off-by: Paul B Mahol > > --- > > configure | 5 + > > doc/protocols.texi | 29 + > > libavformat/Make

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2021-02-26 Thread Marton Balint
On Fri, 26 Feb 2021, Paul B Mahol wrote: This work is sponsored by Open Broadcast Systems. Signed-off-by: Paul B Mahol --- configure | 5 + doc/protocols.texi | 29 + libavformat/Makefile| 1 + libavformat/librist.c | 248 +++

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2021-02-01 Thread Sergio M. Ammirata, Ph.D.
On Mon, 2021-02-01 at 16:25 +0100, Nicolas George wrote: > Sergio M. Ammirata, Ph.D. (12021-02-01): > This is a packet protocol. In your example above, > thereader will get three reads of 20, 30 and 40 > Thank you for the clarification. I looked a little in the > code in themeantime. > Considerin

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2021-02-01 Thread Nicolas George
Sergio M. Ammirata, Ph.D. (12021-02-01): > This is a packet protocol. In your example above, the > reader will get three reads of 20, 30 and 40 Thank you for the clarification. I looked a little in the code in the meantime. Considering what was said, h->max_packet_size should be set to the maximu

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2021-02-01 Thread Sergio M. Ammirata, Ph.D.
> Can you clarify something? Is this supposed to be a > packet protocol or astream protocol? > I.e., if the reader is waiting for 100 octets, and the > writer sent 20then 30 then 40, will the reader get three > reads of 20, 30, 40 or asingle read of 20+30+40=90? This is a packet protocol. In your

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2021-02-01 Thread Nicolas George
Rodney Baker (12021-02-02): > Nagle can introduce unwanted latency which is not desirable for real-time > streaming. Mind you, tcp is inappropriate for real-time streaming anyway - > that's what rtsp was invented for. I don't think Nagle belongs at app level > anyway - it's a network stack funct

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2021-02-01 Thread Rodney Baker
On Tuesday, 2 February 2021 0:52:23 ACDT Nicolas George wrote: > Sergio M. Ammirata, Ph.D. (12021-01-31): > > For writing, the data you give librist, will go out "as is" > > to the network with some added protocol overhead bytes (28 > > bytes without encryption enabled and 36 bytes with > > encrypt

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2021-02-01 Thread Nicolas George
Sergio M. Ammirata, Ph.D. (12021-01-31): > For writing, the data you give librist, will go out "as is" > to the network with some added protocol overhead bytes (28 > bytes without encryption enabled and 36 bytes with > encryption enabled). Can you clarify something? Is this supposed to be a packet

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2021-02-01 Thread Rodney Baker
On Monday, 1 February 2021 8:03:28 ACDT Sergio M. Ammirata, Ph.D. wrote: > librist has an internal buffer limit of 1 bytes (the > protocol has none). > > For writing, the data you give librist, will go out "as is" > to the network with some added protocol overhead bytes (28 > bytes without enc

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2021-01-31 Thread Sergio M. Ammirata, Ph.D.
librist has an internal buffer limit of 1 bytes (the protocol has none). For writing, the data you give librist, will go out "as is" to the network with some added protocol overhead bytes (28 bytes without encryption enabled and 36 bytes with encryption enabled). To avoid your data being fra

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2021-01-31 Thread Marton Balint
On Sun, 31 Jan 2021, Paul B Mahol wrote: On Sun, Jan 31, 2021 at 12:29 PM Marton Balint wrote: On Sun, 31 Jan 2021, Paul B Mahol wrote: > On Sun, Jan 31, 2021 at 12:00 PM Marton Balint wrote: > >> >> >> On Tue, 26 Jan 2021, Paul B Mahol wrote: >> >> > This work is sponsored by Open Broa

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2021-01-31 Thread Paul B Mahol
On Sun, Jan 31, 2021 at 12:29 PM Marton Balint wrote: > > > On Sun, 31 Jan 2021, Paul B Mahol wrote: > > > On Sun, Jan 31, 2021 at 12:00 PM Marton Balint wrote: > > > >> > >> > >> On Tue, 26 Jan 2021, Paul B Mahol wrote: > >> > >> > This work is sponsored by Open Broadcast Systems. > >> > > >> >

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2021-01-31 Thread Marton Balint
On Sun, 31 Jan 2021, Paul B Mahol wrote: On Sun, Jan 31, 2021 at 12:00 PM Marton Balint wrote: On Tue, 26 Jan 2021, Paul B Mahol wrote: > This work is sponsored by Open Broadcast Systems. > > Signed-off-by: Paul B Mahol > --- > configure | 5 + > doc/protocols.texi |

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2021-01-31 Thread Paul B Mahol
On Sun, Jan 31, 2021 at 12:00 PM Marton Balint wrote: > > > On Tue, 26 Jan 2021, Paul B Mahol wrote: > > > This work is sponsored by Open Broadcast Systems. > > > > Signed-off-by: Paul B Mahol > > --- > > configure | 5 + > > doc/protocols.texi | 32 + > > libavformat/Mak

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2021-01-31 Thread Marton Balint
On Tue, 26 Jan 2021, Paul B Mahol wrote: This work is sponsored by Open Broadcast Systems. Signed-off-by: Paul B Mahol --- configure | 5 + doc/protocols.texi | 32 + libavformat/Makefile| 1 + libavformat/librist.c | 251 +++

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2021-01-30 Thread James Almer
On 1/30/2021 8:57 PM, Marton Balint wrote: On Tue, 26 Jan 2021, Paul B Mahol wrote: This work is sponsored by Open Broadcast Systems. Signed-off-by: Paul B Mahol --- configure   |   5 + doc/protocols.texi  |  32 + libavformat/Makefile    |   1 + libavformat/librist.c   |

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2021-01-30 Thread Marton Balint
On Sun, 31 Jan 2021, Marton Balint wrote: On Tue, 26 Jan 2021, Paul B Mahol wrote: This work is sponsored by Open Broadcast Systems. Signed-off-by: Paul B Mahol --- configure | 5 + doc/protocols.texi | 32 + libavformat/Makefile| 1 + libavformat/librist.c

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2021-01-30 Thread Marton Balint
On Tue, 26 Jan 2021, Paul B Mahol wrote: This work is sponsored by Open Broadcast Systems. Signed-off-by: Paul B Mahol --- configure | 5 + doc/protocols.texi | 32 + libavformat/Makefile| 1 + libavformat/librist.c | 251 +++

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2021-01-29 Thread Paul B Mahol
Will apply soon. ___ 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] libavformat: add librist protocol

2021-01-19 Thread Sergio M. Ammirata, Ph.D.
Hello Paul, In the librist_read function, you must call the new API called rist_receiver_data_block_free to free the buffer when you are done using it. I am not sure if ffmpeg supports a custom callback for freeing a buffer. If it does, you could actually use the rist buffer as a reference as lon

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2020-12-28 Thread Nicolas George
Marton Balint (12020-12-25): > Actually it should be POLLING_TIME as defined in libavformat/network.h for > blocking mode if you want behaviour to be consistent with other protocols. > The function cannot block indefinitely even in blocking mode to be able > allow generic code in libavformat/avio.c

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2020-12-24 Thread Marton Balint
On Thu, 24 Dec 2020, Nicolas George wrote: +static int librist_read(URLContext *h, uint8_t *buf, int size) +{ +RISTContext *s = h->priv_data; +const struct rist_data_block *data_block; +int ret; + +ret = rist_receiver_data_read(s->rist_ctx, &data_block, 5); Already mention

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2020-12-24 Thread Paul B Mahol
Look guys I will apply this patch soon. Your reviews are very bad! Why your reviews are extremely bad? You really have no skills or experience to say anything useful in this patch. Simple proof is that I posted one variant where you objected about allocation and than your are not happy how I re

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2020-12-24 Thread James Almer
On 12/24/2020 8:08 AM, Paul B Mahol wrote: +typedef struct RISTContext { +const AVClass *class; + +int profile; +int buffer_size; +int packet_size; +int log_level; +int encryption; +char *secret; + +struct rist_logging_settings logging_settings; +struct rist_pe

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2020-12-24 Thread Nicolas George
Paul B Mahol (12020-12-24): > I have zero respect about your disrespectful and extremely rude reviews. > > Why such flag should be handled? It does not make sense. > timeout is correct. > payload is never silently discarded, it is make sure that it is never > bigger than max packet size, its just

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2020-12-24 Thread Paul B Mahol
On Thu, Dec 24, 2020 at 12:32 PM Nicolas George wrote: > Paul B Mahol (12020-12-24): > > This work is sponsored by Open Broadcast Systems. > > > > Signed-off-by: Paul B Mahol > > --- > > configure | 5 + > > doc/protocols.texi | 32 ++ > > libavformat/Makefile| 1

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2020-12-24 Thread Nicolas George
Paul B Mahol (12020-12-24): > This work is sponsored by Open Broadcast Systems. > > Signed-off-by: Paul B Mahol > --- > configure | 5 + > doc/protocols.texi | 32 ++ > libavformat/Makefile| 1 + > libavformat/librist.c | 242

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2020-12-24 Thread Nicolas George
Paul B Mahol (12020-12-24): > This work is sponsored by Open Broadcast Systems. > > Signed-off-by: Paul B Mahol > --- > configure | 5 + > doc/protocols.texi | 32 ++ > libavformat/Makefile| 1 + > libavformat/librist.c | 233

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2020-12-23 Thread James Almer
On 12/23/2020 8:53 PM, James Almer wrote: On 12/23/2020 8:32 PM, Paul B Mahol wrote: +static int librist_close(URLContext *h) +{ +    RISTContext *s = h->priv_data; +    int ret = 0; + +    s->peer = NULL; + +    if (s->rist_ctx) +    ret = rist_destroy(s->rist_ctx); +    if (ret < 0) + 

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2020-12-23 Thread James Almer
On 12/23/2020 8:32 PM, Paul B Mahol wrote: +static int librist_close(URLContext *h) +{ +RISTContext *s = h->priv_data; +int ret = 0; + +s->peer = NULL; + +if (s->rist_ctx) +ret = rist_destroy(s->rist_ctx); +if (ret < 0) +return risterr2ret(ret); +s->rist_ct

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2020-12-23 Thread Marton Balint
On Wed, 23 Dec 2020, Paul B Mahol wrote: On Wed, Dec 23, 2020 at 10:30 PM Marton Balint wrote: INT_MAX for pkt_size is probably not a good default. pkt_size is used (at least in other protocols) to determine the maximum allowed packet size for output, and the maximum supported packet siz

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2020-12-23 Thread Nicolas George
Paul B Mahol (12020-12-23): > I nowhere see proof that this cause any bugs. get_file_handle() returns a file descriptor for use with select() or poll(). If you give it a random number (fd is a random number), the application will poll it as if it were a file descriptor. At best, it causes EBADFD.

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2020-12-23 Thread Nicolas George
Paul B Mahol (12020-12-23): > This work is sponsored by Open Broadcast Systems. Thanks for the disclosure. > > Signed-off-by: Paul B Mahol > --- > configure | 5 + > doc/protocols.texi | 29 + > libavformat/Makefile| 1 + > libavformat/librist.c | 227

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2020-12-23 Thread Paul B Mahol
On Wed, Dec 23, 2020 at 11:29 PM Nicolas George wrote: > Marton Balint (12020-12-23): > > > +static int librist_get_file_handle(URLContext *h) > > > +{ > > > +RISTContext *s = h->priv_data; > > > + > > > +return s->fd; > > > +} > > > > I don't think this is right, s->fd is a flow id, not

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2020-12-23 Thread Nicolas George
Marton Balint (12020-12-23): > > +static int librist_get_file_handle(URLContext *h) > > +{ > > +RISTContext *s = h->priv_data; > > + > > +return s->fd; > > +} > > I don't think this is right, s->fd is a flow id, not an ordinary file > descriptor. You probably don't need this callback anywa

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2020-12-23 Thread Paul B Mahol
On Wed, Dec 23, 2020 at 10:30 PM Marton Balint wrote: > > > On Wed, 23 Dec 2020, Paul B Mahol wrote: > > > This work is sponsored by Open Broadcast Systems. > > > > Signed-off-by: Paul B Mahol > > --- > > configure | 5 + > > doc/protocols.texi | 29 + > > libavformat/Mak

Re: [FFmpeg-devel] [PATCH] libavformat: add librist protocol

2020-12-23 Thread Marton Balint
On Wed, 23 Dec 2020, Paul B Mahol wrote: This work is sponsored by Open Broadcast Systems. Signed-off-by: Paul B Mahol --- configure | 5 + doc/protocols.texi | 29 + libavformat/Makefile| 1 + libavformat/librist.c | 227 +++