GNOME Bugzilla – Bug 739276
y4mdec: porting to videodecoder base class
Last modified: 2018-05-04 09:18:34 UTC
y4mdec should use videodecoder base class instead of element class. Porting the same to videodecoder class The pipeline to test is gst-launch-1.0 filesrc location=../example.y4m ! y4mdec ! videoconvert ! ximagesink
Created attachment 289496 [details] [review] port to videodecoder base class
gsty4mdec.c: In function 'gst_y4mdec_parse': gsty4mdec.c:432:7: error: format '%d' expects argument of type 'int', but argument 8 has type 'gsize' [-Werror=format=] GST_DEBUG ("not enough data for frame %d < %" G_GSIZE_FORMAT, ^
It's not entirely clear to me that this should be ported to the videodecoder base class, since the element is a bit of a mixed bag, it's really more of a parser/demuxer than a decoder, isn't it? What benefits are there from porting it to the videodecoder base class? What about features such as seeking?
The name y4mdec is quite misleading in this case.. it is more of a demuxer rather than a decoder.. I thought maybe it might be better to rename the same to y4mdemux, but Thiago suggested that it might break applications which already use the same.. Will there be any need to create a new element which does just decoding using videodecoder base class, rather than demuxing?? If that doesnt make sense, then probably we can resolve this issue as WONTFIX or NOTABUG... Please advice.
Don't get too hung up on the name. Maybe it's not ideal, but it's not really a problem. There's no need to rename it, and little benefit IMO. How to proceed: as I see it, the question was if GstBaseParse class would be a more suitable base class. The other question was: what about seeking? If I read your patch correctly, you just removed seeking support?
Actually i removed seeking support thinking it is not needed for a decoder..
Might be good to familiarise yourself a little with the y4m format then if you haven't done so yet.
Hi Tim, I have been going through y4m format and baseparse class in general.. if we port y4m to baseparse class, wont it need a decoder again to decode and show the media? right now y4mdec acts more like a decoder as well it is better practice to have decoder/parser/demuxer as separate elements right? the more i look into it the more i get confused about it :(... Regards, Vineeth
This hasn't seen any activity in 4 years. Closing. If you can rebase the patch against current master, please re-open the bug. Thanks.
Still not sure if it's really a good fit for any of the base classes.