Opened 12 years ago

Closed 12 years ago

#2059 closed defect (needs_more_info)

There is no way to define a protocol outside of ffmpeg

Reported by: Hristo Venev Owned by:
Priority: normal Component: avformat
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

After the removal of libavformat/url.h there is no way (I think) to define a protocol outside of ffmpeg. This is needed by gstreamer's gst-libav to build against ffmpeg.

Or maybe I'm wrong. Is there a way to define a protocol without url.h?

Change History (3)

in reply to:  description comment:1 by Carl Eugen Hoyos, 12 years ago

Replying to mustrumr:

After the removal of libavformat/url.h

There is a file libavformat/url.h in my current git checkout.
Could you elaborate?

comment:2 by reimar, 12 years ago

That file will no longer be installed.
I think we are generally open to adding it back (that change originated from Libav), but you might consider just using avio_alloc_context and use that to set the pb field of the AVFormatContext.
See e.g. MPlayer's demux_lavf.c. It should result in simpler code than providing your own protocol.
Of course it's not impossible that you have some other use case where this is not a possible workaround?
Another example for its usage is in MPlayer's stream/stream_ffmpeg.c, but that is the case when you want to use FFmpeg's protocols, not when you want to write your own protocols, so it might not be interesting (but it demonstrates one way to use AVIO_FLAG_DIRECT, which avoids issues due to the buffering that using the new API forces onto you).

comment:3 by Carl Eugen Hoyos, 12 years ago

Resolution: needs_more_info
Status: newclosed

Please reopen this ticket if you can add more information.

Please understand that FFmpeg should allow you to define a protocol when using the libraries, if this can only be solved by installing url.h, it will be possible to implement this, but not without additional information.

Note: See TracTickets for help on using tickets.