On Mon Jun 5 16:48:27 2023 +0000, Zebediah Figura wrote:
Wait, what, why? I know there was discussion about fixing
non-determinism by manually reimplementing decodebin, but why does that need to affect the frontends at all? Why can't we just do it inside of the existing parser?
The main reason is that I think wg_parser is complicated, hard to
debug, and any change risky and difficult to review. I don't understand this reasoning. Yes, the parser is complicated, but all of that complication is necessary, and pretty much none of it is related to the use of decodebin. As far as I can tell all of the complication is going to be necessary for anything that replaces decodebin as well.
I would like to have a synchronous demuxer component used in
media_source only for now, and that works in push mode only. I especially don't understand this. Forcing synchronicity, in the way that wg_transform does, is what makes wg_transform so much more complicated than the parser. Perhaps there is individual bias on both of our parts here, having written the relevant code, but I found the transform quite simple and logical before that part was introduced. I also don't understand how restricting to push mode is going to help anything. It simplifies the entry point a bit, but at the cost of either memory, or sacrificing support for some formats. Note that you still need a thread in this case.
How is wg_transform more complicated than wg_parser? There's no thread involved [*], no race condition or deadlock possible, no mutex and no condition variable (meaning no crash on pthread_exit) necessary.
[*] Regardless of what decoders might do internally, we can assume there's none.