[Libav-user] Determine if input protocol is RTSP or file
philippe.gorley at savoirfairelinux.com
Fri Jul 5 16:12:40 EEST 2019
On 2019-07-05 2:23 a.m., lukas wrote:
> Dear libavusers,
> 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?
AVFormatContext.iformat.name should be "rtp" or "rtsp".
> 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?
I'd suggest having a chat with the devs over on #ffmpeg-devel
(freenode). They're better placed to give you an answer.
> Kind regards,
> Lukas Bommes
>  https://github.com/bytedeco/javacpp-presets/issues/374
> Libav-user mailing list
> Libav-user at ffmpeg.org
> To unsubscribe, visit link above, or email
> libav-user-request at ffmpeg.org with subject "unsubscribe".
Free Software Consultant | Montréal, Qc
More information about the Libav-user