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

Mark Gaiser markg85 at gmail.com
Wed Apr 13 16:14:08 EEST 2022


On Wed, Apr 13, 2022 at 2:28 PM Andreas Rheinhardt <
andreas.rheinhardt at outlook.com> wrote:

> Mark Gaiser:
> > On Wed, Apr 13, 2022 at 1:10 AM James Almer <jamrial at gmail.com> wrote:
> >
> >>
> >>
> >> On 4/12/2022 3:02 PM, Michael Niedermayer wrote:
> >>> On Sun, Apr 10, 2022 at 04:41:27PM +0200, Michael Niedermayer wrote:
> >>>> On Wed, Apr 06, 2022 at 02:00:56PM +0200, Mark Gaiser wrote:
> >>>> [...]
> >>>>
> >>>>> +        if (stat_ret < 0) {
> >>>>
> >>>>> +            av_log(h, AV_LOG_INFO, "Unable to find IPFS folder. We
> >> tried:\n");
> >>>>> +            av_log(h, AV_LOG_INFO, "- $IPFS_PATH, which was
> >> empty.\n");
> >>>>> +            av_log(h, AV_LOG_INFO, "- $HOME/.ipfs (full uri: %s)
> >> which doesn't exist.\n", ipfs_full_data_folder);
> >>>>
> >>>> The 3 av_log() can also be combined
> >>>>
> >>>> If nothing else is found then ill change that myself and apply in a
> day
> >> or 2
> >>>
> >>> applied
> >>>
> >>> thx
> >>
> >> This broke msvc
> >>
> >>> C:/Dev/ffmpeg/fate/x86_32-msvc-MD/src/libavformat/ipfsgateway.c(36):
> >> error C2065: 'PATH_MAX': undeclared identifier
> >>> C:/Dev/ffmpeg/fate/x86_32-msvc-MD/src/libavformat/ipfsgateway.c(36):
> >> error C2057: expected constant expression
> >>> C:/Dev/ffmpeg/fate/x86_32-msvc-MD/src/libavformat/ipfsgateway.c(46):
> >> error C2065: 'PATH_MAX': undeclared identifier
> >>> C:/Dev/ffmpeg/fate/x86_32-msvc-MD/src/libavformat/ipfsgateway.c(46):
> >> error C2057: expected constant expression
> >>> C:/Dev/ffmpeg/fate/x86_32-msvc-MD/src/libavformat/ipfsgateway.c(46):
> >> error C2466: cannot allocate an array of constant size 0
> >>> C:/Dev/ffmpeg/fate/x86_32-msvc-MD/src/libavformat/ipfsgateway.c(46):
> >> error C2133: 'ipfs_full_data_folder': unknown size
> >>> C:/Dev/ffmpeg/fate/x86_32-msvc-MD/src/libavformat/ipfsgateway.c(47):
> >> error C2065: 'PATH_MAX': undeclared identifier
> >>> C:/Dev/ffmpeg/fate/x86_32-msvc-MD/src/libavformat/ipfsgateway.c(47):
> >> error C2057: expected constant expression
> >>> C:/Dev/ffmpeg/fate/x86_32-msvc-MD/src/libavformat/ipfsgateway.c(47):
> >> error C2466: cannot allocate an array of constant size 0
> >>> C:/Dev/ffmpeg/fate/x86_32-msvc-MD/src/libavformat/ipfsgateway.c(47):
> >> error C2133: 'ipfs_gateway_file': unknown size
> >>
> >> PATH_MAX seems to be POSIX only.
> >>
> >
> > Seriously?
> >
> > Shouldn't that define work on windows too?
>
> For "that define" to work that define needs to exist. Windows has
> MAX_PATH, but it is pretty small (260).
>
> > And why didn't patchwork catch this?
> >
>
> Because there is no MSVC patchwork box.
>
> > What is the intended define to use for this?
> > Note that it used to be a fixed number in the code itself (4096?) but I
> > changed it to PATH_MAX as per review suggestions....
>
> Then how about just adding
> #ifndef MAX_PATH
> #define MAX_PATH 4096
> #endif
> or something like that.
>

I'm fine with that but given past feedback I'll wait a little longer for a
2nd opinion too.


>
> > I grepped over the ffmpeg source. This code is indeed the first cross
> > platform code in ffmpeg that uses it. The sole other user is v4l2_m2m.h
> but
> > that's obviously for windows only.
>
> You mean "not for Windows".
>

Oops. Yes, exactly!


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