[FFmpeg-devel] [PATCH 1/5] Early version of IPFS protocol support.

Mark Gaiser markg85 at gmail.com
Tue Feb 1 00:04:25 EET 2022


On Mon, Jan 31, 2022 at 9:26 PM Lynne <dev at lynne.ee> wrote:

> Jan 31, 2022, 14:51 by markg85 at gmail.com:
>
> > Signed-off-by: Mark Gaiser <markg85 at gmail.com>
> > ---
> >  configure               |   1 +
> >  doc/protocols.texi      |  30 ++++++
> >  libavformat/Makefile    |   1 +
> >  libavformat/ipfs.c      | 202 ++++++++++++++++++++++++++++++++++++++++
> >  libavformat/protocols.c |   2 +
> >  5 files changed, 236 insertions(+)
> >  create mode 100644 libavformat/ipfs.c
> >
> > +
> > +static int ipfs_open(URLContext *h, const char *uri, int flags,
> AVDictionary **options)
> > +{
> > +    const char *gatewaysuffix;
> > +    int ret = 0;
> > +    Context *c = h->priv_data;
> > +
> > +    if (!av_strstart(uri, "ipfs://", &gatewaysuffix) &&
> > +        !av_strstart(uri, "ipfs:", &gatewaysuffix)) {
> > +        av_log(h, AV_LOG_ERROR, "Unsupported url %s\n", uri);
> > +        ret = AVERROR(EINVAL);
> > +        goto err;
> > +    }
> > +
> > +    char* ipfs_gateway = "https://ipfs.io/ipfs/";
> >
>
> That's a no from me. I'd rather have native support rather
> than depend on some third party service. Users can just convert
> the link themselves if they want to. Surely the IPFS project
> has libraries one could use instead.
>

I'm sorry, that part isn't in the final version.
I had sent the patches as I made the implementation. This kinda made this
part (and a couple others) weird because a later patch gets rid of it.

I'll send the v2 revision as a single patch which will give a clear picture
of the changes. No fixed url is in it.

Just a little oops from a first time contributor :)


> _______________________________________________
> 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