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

Paul B Mahol onemda at gmail.com
Thu Dec 24 15:16:55 EET 2020


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 resolved it. Instead you object how librist is
implemented.

[auto-censored entries]

You are just very rude and disrespectfully developers and community overall.

Good ridance!


On Thu, Dec 24, 2020 at 2:10 PM James Almer <jamrial at gmail.com> wrote:

> 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_peer_config peer_config;
> > +
> > +    struct rist_peer *peer;
> > +    struct rist_ctx *rist_ctx;
> > +} RISTContext;
>
> [...]
>
> > +static int librist_open(URLContext *h, const char *uri, int flags)
> > +{
> > +    RISTContext *s = h->priv_data;
> > +    struct rist_logging_settings *logging_settings =
> &s->logging_settings;
> > +    struct rist_peer_config *peer_config = &s->peer_config;
> > +    int ret;
> > +
> > +    ret = rist_logging_set(&logging_settings, s->log_level, log_cb, h,
> NULL, NULL);
> > +    if (ret < 0)
> > +        return risterr2ret(ret);
> > +
> > +    if (flags & AVIO_FLAG_WRITE) {
> > +        ret = rist_sender_create(&s->rist_ctx, s->profile, 0,
> logging_settings);
> > +    } else {
> > +        ret = rist_receiver_create(&s->rist_ctx, s->profile,
> logging_settings);
> > +    }
> > +    if (ret < 0)
> > +        goto err;
> > +
> > +    ret = rist_parse_address(uri, (const struct rist_peer_config
> **)&peer_config);
> > +    if (ret < 0)
> > +        goto err;
>
> Look at
>
> https://code.videolan.org/rist/librist/-/blob/4fd217662cee398f4706c815958a1efe48b2093f/src/rist.c#L637
> rist_parse_address() does not fill peer_config with default values if it
> doesn't allocate it itself. It assumes it was allocated during a
> previous call and not by the caller.
>
> Unless the library provides a defaults()/reset() kind of function, it
> doesn't look like you can really use your own rist_peer_config struct.
> Can you talk with the devs about it? Or even just submit a PR yourself.
> It should be very trivial to implement.
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list