Hi. Can someone tell me how the file libavformat/protocol_list.c
is created? I assume it is made on the fly. thank you! On Wed, Oct 4, 2017 at 1:29 PM Mahboud Zabetian <[email protected]> wrote: > To create a custom AVIOContext, I looked at: > > AVIOContext *avio_alloc_context( > > unsigned char *buffer, > > int buffer_size, > > int write_flag, > > void *opaque, > > int (*read_packet)(void *opaque, uint8_t *buf, int > buf_size), > > int (*write_packet)(void *opaque, uint8_t *buf, int > buf_size), > > int64_t (*seek)(void *opaque, int64_t offset, int > whence)); > > There are a bunch of parameters that I don't have access to such as > buffer, buffer_size. Also I don't see any handlers for open and close. > > Is there a better way to map ffurl_register_protocol parameters to a > context? > > > What I am trying to replace is: > > cache1_protocol.name = CACHE1_PROTO; > > cache1_protocol.url_open = cache1_open; > > cache1_protocol.url_open2 = 0; > > cache1_protocol.url_read = cache1_read; > > cache1_protocol.url_write = cache1_write; > > cache1_protocol.url_seek = cache1_seek; > > cache1_protocol.url_close = cache1_close; > > ffurl_register_protocol(&cache1_protocol); > > Thanks! > > > > On Tue, Oct 3, 2017 at 7:16 PM Mahboud Zabetian <[email protected]> > wrote: > >> Thank you both! >> On Tue, Oct 3, 2017 at 3:55 PM Hendrik Leppkes <[email protected]> >> wrote: >> >>> On Tue, Oct 3, 2017 at 10:39 PM, Mahboud Zabetian <[email protected]> >>> wrote: >>> > Hi. I have old code that calls ffurl_register_protocol(), and linked >>> with >>> > FFMPEG 3.0.2. >>> > >>> > I'm upgrading to FFMPEG 3.3. It looks like ffurl_register_protocol()n >>> has >>> > been deprecated, although there is not a whole lot of mention of what >>> > replaced it. Google finds only few mentions, such as this one, where >>> someone >>> > is trying to export ffurl_register_protocol() to continue using it. >>> > >>> > Any advice how I should proceed? How can I replace >>> > ffurl_register_protocol()? Or do I look to export it in the latest >>> FFMPEG? >>> > >>> >>> Use a custom avio context with read/write callbacks. Registering >>> protocols externally is not supported, and the ffurl function was >>> always an internal function that was errorneously available in a few >>> versions. >>> >>> - Hendrik >>> _______________________________________________ >>> Libav-user mailing list >>> [email protected] >>> http://ffmpeg.org/mailman/listinfo/libav-user >>> >>
_______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
