Quoting John Högberg (2015-05-19 00:14:02) > Hi, > > Anton Khirnov wrote: > > maybe I'm not seeing something obvious, but why don't you flip the meaning > > of > > the flag, thus avoiding the need for the new function? > > That's a good question. I implemented it that way at first, but I decided to > try > this route since I wanted to avoid forcing the user to add special-cases in > their event-handling code. Essentially, my line if thinking was; > > If you handle a "no carrier" event you know for certain that no carrier was > present regardless of format because the demultiplexer would not raise the > event > unless it was relevant. It also fits fairly well into an event since its > opposite is the norm. > > If you handle the lack of a "carrier present" event, is the carrier actually > gone, or is the idea of a stream carrier not applicable for the format in > question? This avoids the need for an explicit reset function, but we'd need > to > provide a "format has separate stream carriers" flag which the user needs to > honor before handling the event, and the idea of the norm being an event > feels a > bit off.
Well, as you're saying elsewhere, the actual meaning of this flag is very much format-dependent. So the caller has to make some format-specifica assumptions anyway. -- Anton Khirnov _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
