Re: [FFmpeg-devel] [PATCH v2 1/1] avformat: Add IPFS protocol support.

2022-02-04 Thread Mark Gaiser
On Fri, Feb 4, 2022 at 11:29 AM Tomas Härdin wrote: > ons 2022-02-02 klockan 14:56 +0100 skrev Mark Gaiser: > > On Wed, Feb 2, 2022 at 2:21 PM Tomas Härdin > > wrote: > > > > > tis 2022-02-01 klockan 22:58 +0100 skrev Mark Gaiser: > > > > > > > > > > > +typedef struct Context { > > > > +AVCl

Re: [FFmpeg-devel] [PATCH v2 1/1] avformat: Add IPFS protocol support.

2022-02-04 Thread Tomas Härdin
ons 2022-02-02 klockan 14:56 +0100 skrev Mark Gaiser: > On Wed, Feb 2, 2022 at 2:21 PM Tomas Härdin > wrote: > > > tis 2022-02-01 klockan 22:58 +0100 skrev Mark Gaiser: > > > > > > > > +typedef struct Context { > > > +    AVClass *class; > > > +    URLContext *inner; > > > +    char *gateway; >

Re: [FFmpeg-devel] [PATCH v2 1/1] avformat: Add IPFS protocol support.

2022-02-03 Thread Michael Niedermayer
On Wed, Feb 02, 2022 at 03:23:34PM +0100, Mark Gaiser wrote: > On Wed, Feb 2, 2022 at 2:29 PM Michael Niedermayer > wrote: > > > On Tue, Feb 01, 2022 at 10:58:30PM +0100, Mark Gaiser wrote: [...] > > > > > > > +AVClass *class; > > > +URLContext *inner; > > > +char *gateway; > > > +} C

Re: [FFmpeg-devel] [PATCH v2 1/1] avformat: Add IPFS protocol support.

2022-02-02 Thread Mark Gaiser
On Wed, Feb 2, 2022 at 3:24 PM Timo Rothenpieler wrote: > On 02.02.2022 14:56, Mark Gaiser wrote: > > On Wed, Feb 2, 2022 at 2:21 PM Tomas Härdin wrote: > > > >> tis 2022-02-01 klockan 22:58 +0100 skrev Mark Gaiser: > >> > >>> > >>> +typedef struct Context { > >>> +AVClass *class; > >>> +

Re: [FFmpeg-devel] [PATCH v2 1/1] avformat: Add IPFS protocol support.

2022-02-02 Thread Mark Gaiser
On Wed, Feb 2, 2022 at 2:29 PM Michael Niedermayer wrote: > On Tue, Feb 01, 2022 at 10:58:30PM +0100, Mark Gaiser wrote: > > This patch adds support for: > > - ffplay ipfs:// > > - ffplay ipns:// > > > > IPFS data can be played from so called "ipfs gateways". > > A gateway is essentially a webser

Re: [FFmpeg-devel] [PATCH v2 1/1] avformat: Add IPFS protocol support.

2022-02-02 Thread Timo Rothenpieler
On 02.02.2022 14:56, Mark Gaiser wrote: On Wed, Feb 2, 2022 at 2:21 PM Tomas Härdin wrote: tis 2022-02-01 klockan 22:58 +0100 skrev Mark Gaiser: +typedef struct Context { +AVClass *class; +URLContext *inner; +char *gateway; Is there not a maximum length that an HTTP URL can be

Re: [FFmpeg-devel] [PATCH v2 1/1] avformat: Add IPFS protocol support.

2022-02-02 Thread Mark Gaiser
On Wed, Feb 2, 2022 at 2:21 PM Tomas Härdin wrote: > tis 2022-02-01 klockan 22:58 +0100 skrev Mark Gaiser: > > > > > +typedef struct Context { > > +AVClass *class; > > +URLContext *inner; > > +char *gateway; > > Is there not a maximum length that an HTTP URL can be? At least without >

Re: [FFmpeg-devel] [PATCH v2 1/1] avformat: Add IPFS protocol support.

2022-02-02 Thread Michael Niedermayer
On Tue, Feb 01, 2022 at 10:58:30PM +0100, Mark Gaiser wrote: > This patch adds support for: > - ffplay ipfs:// > - ffplay ipns:// > > IPFS data can be played from so called "ipfs gateways". > A gateway is essentially a webserver that gives access to the > distributed IPFS network. > > This protoc

Re: [FFmpeg-devel] [PATCH v2 1/1] avformat: Add IPFS protocol support.

2022-02-02 Thread Tomas Härdin
tis 2022-02-01 klockan 22:58 +0100 skrev Mark Gaiser: > > +typedef struct Context { > +    AVClass *class; > +    URLContext *inner; > +    char *gateway; Is there not a maximum length that an HTTP URL can be? At least without query parameters. That way you avoid dynamic allocations. You'd have

Re: [FFmpeg-devel] [PATCH v2 1/1] avformat: Add IPFS protocol support.

2022-02-02 Thread Lynne
2 Feb 2022, 03:51 by mark...@gmail.com: > On Wed, Feb 2, 2022 at 3:29 AM Lynne wrote: > >> 1 Feb 2022, 22:58 by mark...@gmail.com: >> >> > This patch adds support for: >> > - ffplay ipfs:// >> > - ffplay ipns:// >> > >> > IPFS data can be played from so called "ipfs gateways". >> > A gateway is e

Re: [FFmpeg-devel] [PATCH v2 1/1] avformat: Add IPFS protocol support.

2022-02-01 Thread Mark Gaiser
On Wed, Feb 2, 2022 at 3:29 AM Lynne wrote: > 1 Feb 2022, 22:58 by mark...@gmail.com: > > > This patch adds support for: > > - ffplay ipfs:// > > - ffplay ipns:// > > > > IPFS data can be played from so called "ipfs gateways". > > A gateway is essentially a webserver that gives access to the > >

Re: [FFmpeg-devel] [PATCH v2 1/1] avformat: Add IPFS protocol support.

2022-02-01 Thread Lynne
1 Feb 2022, 22:58 by mark...@gmail.com: > This patch adds support for: > - ffplay ipfs:// > - ffplay ipns:// > > IPFS data can be played from so called "ipfs gateways". > A gateway is essentially a webserver that gives access to the > distributed IPFS network. > > This protocol support (ipfs and i

Re: [FFmpeg-devel] [PATCH v2 1/1] avformat: Add IPFS protocol support.

2022-02-01 Thread Mark Gaiser
On Wed, Feb 2, 2022 at 1:54 AM Timo Rothenpieler wrote: > On 02.02.2022 01:50, Mark Gaiser wrote: > >> Ah, yeah. That's a very confusing side effect there. > >> I guess it's fine, but I can't say I like using it like that. > >> Since there's a large risk someone else might in the future think the

Re: [FFmpeg-devel] [PATCH v2 1/1] avformat: Add IPFS protocol support.

2022-02-01 Thread Timo Rothenpieler
On 02.02.2022 01:50, Mark Gaiser wrote: Ah, yeah. That's a very confusing side effect there. I guess it's fine, but I can't say I like using it like that. Since there's a large risk someone else might in the future think the same and break it. I'm fine changing it to someone that would feel mo

Re: [FFmpeg-devel] [PATCH v2 1/1] avformat: Add IPFS protocol support.

2022-02-01 Thread Mark Gaiser
On Wed, Feb 2, 2022 at 1:49 AM Timo Rothenpieler wrote: > On 02.02.2022 01:44, Andreas Rheinhardt wrote: > > Timo Rothenpieler: > >> On 02.02.2022 01:33, Mark Gaiser wrote: > >>> On Wed, Feb 2, 2022 at 1:27 AM Timo Rothenpieler < > t...@rothenpieler.org> > >>> wrote: > >>> > On 01.02.2022 22

Re: [FFmpeg-devel] [PATCH v2 1/1] avformat: Add IPFS protocol support.

2022-02-01 Thread Timo Rothenpieler
On 02.02.2022 01:44, Andreas Rheinhardt wrote: Timo Rothenpieler: On 02.02.2022 01:33, Mark Gaiser wrote: On Wed, Feb 2, 2022 at 1:27 AM Timo Rothenpieler wrote: On 01.02.2022 22:58, Mark Gaiser wrote: +static int translate_ipfs_to_http(URLContext *h, const char *uri, int flags, AVDictiona

Re: [FFmpeg-devel] [PATCH v2 1/1] avformat: Add IPFS protocol support.

2022-02-01 Thread Andreas Rheinhardt
Timo Rothenpieler: > On 02.02.2022 01:33, Mark Gaiser wrote: >> On Wed, Feb 2, 2022 at 1:27 AM Timo Rothenpieler >> wrote: >> >>> On 01.02.2022 22:58, Mark Gaiser wrote: +static int translate_ipfs_to_http(URLContext *h, const char *uri, int >>> flags, AVDictionary **options) +{ +   

Re: [FFmpeg-devel] [PATCH v2 1/1] avformat: Add IPFS protocol support.

2022-02-01 Thread Timo Rothenpieler
On 02.02.2022 01:33, Mark Gaiser wrote: On Wed, Feb 2, 2022 at 1:27 AM Timo Rothenpieler wrote: On 01.02.2022 22:58, Mark Gaiser wrote: +static int translate_ipfs_to_http(URLContext *h, const char *uri, int flags, AVDictionary **options) +{ +const char *ipfs_cid; +const char *protoc

Re: [FFmpeg-devel] [PATCH v2 1/1] avformat: Add IPFS protocol support.

2022-02-01 Thread Mark Gaiser
On Wed, Feb 2, 2022 at 1:33 AM Mark Gaiser wrote: > On Wed, Feb 2, 2022 at 1:27 AM Timo Rothenpieler > wrote: > >> On 01.02.2022 22:58, Mark Gaiser wrote: >> > +static int translate_ipfs_to_http(URLContext *h, const char *uri, int >> flags, AVDictionary **options) >> > +{ >> > +const char *i

Re: [FFmpeg-devel] [PATCH v2 1/1] avformat: Add IPFS protocol support.

2022-02-01 Thread Mark Gaiser
On Wed, Feb 2, 2022 at 1:27 AM Timo Rothenpieler wrote: > On 01.02.2022 22:58, Mark Gaiser wrote: > > +static int translate_ipfs_to_http(URLContext *h, const char *uri, int > flags, AVDictionary **options) > > +{ > > +const char *ipfs_cid; > > +const char *protocol_path_suffix = "ipfs/";

Re: [FFmpeg-devel] [PATCH v2 1/1] avformat: Add IPFS protocol support.

2022-02-01 Thread Timo Rothenpieler
On 01.02.2022 22:58, Mark Gaiser wrote: +static int translate_ipfs_to_http(URLContext *h, const char *uri, int flags, AVDictionary **options) +{ +const char *ipfs_cid; +const char *protocol_path_suffix = "ipfs/"; +char *fulluri; +int ret; +Context *c = h->priv_data; +int

[FFmpeg-devel] [PATCH v2 1/1] avformat: Add IPFS protocol support.

2022-02-01 Thread Mark Gaiser
This patch adds support for: - ffplay ipfs:// - ffplay ipns:// IPFS data can be played from so called "ipfs gateways". A gateway is essentially a webserver that gives access to the distributed IPFS network. This protocol support (ipfs and ipns) therefore translates ipfs:// and ipns:// to a http:/