Opened 8 years ago

Closed 8 years ago

#2059 closed defect (needs_more_info)

There is no way to define a protocol outside of ffmpeg

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


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)

comment:1 in reply to: ↑ description Changed 8 years ago by cehoyos

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 Changed 8 years ago by reimar

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 Changed 8 years ago by cehoyos

  • Resolution set to needs_more_info
  • Status changed from new to closed

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.