Hi again,

Luca Barbato wrote:
> Thank you for your help on getting the mpegts support in a better shape =)

Anytime. :)

> Usually when a new stream appears you just have a new stream appearing and the
> current "hacky" way to be aware of it is monitor the nb_streams.

Yeah that's rather ugly. I think it would be nice to add an event like
AVSTREAM_EVENT_FLAG_STREAM_ADDED and raise it in avformat_new_stream(), on both
the stream itself and the format context. It ought to work for all existing
formats out of the box.

> Adding STREAM_ACTIVE is not really necessary since you would notice while
> sending STREAM_GONE/NO_CARRIER should deliver enough interesting information
> to the user (that then could react to the fact that stream is finished, e.g. 
> by closing the file if he was saving that specific stream)
>
> That if I understood correctly how the carrier signal is working.

To clarify, NO_CARRIER doesn't necessarily mean that the stream in question is
finished, just that it hasn't had any presence since the last time the user
reset the events.

For some formats this might mean that it's finished, but for MPEG-TS in
particular it just means that no packet related to the stream has been seen in
that time. The format provides no way to conclusively determine whether it's
there or not, so it's up to the user to determine when to consider it actually
dead.

Regards,
John Högberg
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to