Thanks for your feedback! > It is an interesting functionality. If I understood it correctly it would > signal when a stream is not active anymore (in a transient or permanent way?).
Pretty much. > If I got it right you can use two flags to signal when the stream is active > and when it is no more and avoid the carrier type that way. Yes, but I wanted to avoid having a flag raised all the time. The notes on event_flags states that the user is responsible for clearing them between calls, and a "stream carrier present" flag would break the obvious "event_flags = 0" unless all demuxers handle it. I'd prefer to keep the general impact of this as small as possible. carrier_type and its default behavior of changing nothing was the best compromise I could think of at the time. Regards, John Högberg -----Original Message----- From: libav-devel [mailto:[email protected]] On Behalf Of Luca Barbato Sent: Thursday, May 07, 2015 16:47 To: [email protected] Subject: [libav-devel] Re: [RFC] Add a stream event for detecting carrier loss. On 07/05/15 15:41, John Högberg wrote: > Hi, > > libavformat currently doesn't provide any mechanism for detecting when > a substream is no longer present but the stream as a whole is > otherwise OK. Your best guess is to check when you last got any frames > on it, which tends to work for video and audio but not for substreams > that sometimes spend a long amount of time without presenting anything, like > subtitles. It is an interesting functionality. If I understood it correctly it would signal when a stream is not active anymore (in a transient or permanent way?). > I've attached my first attempt at a detection mechanism, implemented > as an AVSTREAM_EVENT_FLAG. Depending on the demultiplexer it's either > raised when the substream carrier has died (e.g. if you have one pipe > per substream and that one in particular broke), or if its presence > wasn't detected during the last call to av_read_frame. I've added it > to the MPEG-TS demultiplexer as that's where it itches, but I could see it > being somewhat relevant for other formats as well. > Does this sound useful to anyone but me? I think it is. > If yes, can you think of a better way of exposing this functionality? I got a little confused about the terminology. If I got it right you can use two flags to signal when the stream is active and when it is no more and avoid the carrier type that way. The functionality sounds quite good when you have to delay the probe since you know that a stream with that id will be present but no data for it is available yet. lu _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
