[Libav-user] Determine if input protocol is RTSP or file
lukas.bommes at gmx.de
Fri Jul 5 09:23:48 EEST 2019
I patched some files of libavformat and libavcodec to include timestamps
from RTPDemuxContext in the AVPacket (I did it similar to ). This is
for the purpose of synchronizing multiple streams on the receiver side
and works fine. Of course, it only works when the stream protocol is
RTSP or RTP, not if the input is a file or another protocol that does
not use RTPDemuxContext.
Is there any value in AVFormatContext (or similar) which indicates of
what protocol an opened stream is? Or do I have to manually parse the
url to determine, if a RTSP source or a file is opened?
Also, it would be helpful if the RTP and NTP timestamps from
RTPDemuxContext would be exposed in the public API, so that no patch is
needed. I found some solutions  which use the internal header files,
but finally decided to just patch the public API since I could not get
it compiled with the internal headers. Would it make sense to include
this modification? Or does it brake compatibility with other protocols?
More information about the Libav-user