GNOME Bugzilla – Bug 796308
vaapi: gobjectify internal classes
Last modified: 2018-11-03 15:54:36 UTC
gobjectivy internal decoder class and its derivate classes
Created attachment 372297 [details] [review] libs: decoder: refactor decoders as gobject
Created attachment 372298 [details] [review] libs: decoder: remove gst_vaapi_decoder_new()
Created attachment 372299 [details] [review] libs: decoder: remove gst_vaapi_decoder_ref()
Created attachment 372300 [details] [review] libs: decoder: remove gst_vaapi_decoder_unref() Replaced by gst_object_unref() in tests
Created attachment 372301 [details] [review] libs: decoder: h264: remove create() and destroy() callbacks
Created attachment 372302 [details] [review] libs: decoder: h265: implement reset() callback and remove create() and destroy() and use g_clear_pointer for dpb structure
Created attachment 372304 [details] [review] libs: decoder: jpeg: implement reset() callback and remove create() and destroy() callbacks.
Created attachment 372305 [details] [review] libs: decoder: mpeg2: implement reset() callback remove create() and destroy() callbacks
Created attachment 372306 [details] [review] libs: decoder: mpeg4: implement reset() callback remove destroy() and create() callback
Created attachment 372307 [details] [review] libs: decoder: vc1: implement reset() callback remove destroy() and create() callbacks use g_clear_pointer for rbdu_buffer no cast for enum
Created attachment 372308 [details] [review] libs: decoder: vp8: implement reset() callback remove create() and destroy() callbacks
Created attachment 372309 [details] [review] libs: decoder: vp9: implement reset() callback remove destroy() and create() callback
Created attachment 372310 [details] [review] libs: decoder: remove destoy() and create() callbacks They were all replaced by reset()
Created attachment 372338 [details] [review] libs: filter: refactor filter as gobject
Created attachment 372339 [details] [review] libs: filters: remove custom ref() and unref() Replacing them by gst_object_ref() and gst_object_unref()
Created attachment 372340 [details] [review] libs: filter: remove custom ref() and unref() Replacing them by gst_object_ref() and gst_object_unref()
Do you have any benchmarking results to share?; memory footprint when replacing gstvaapiminiobject with gstobject?
(In reply to sreerenj from comment #17) > Do you have any benchmarking results to share?; memory footprint when > replacing gstvaapiminiobject with gstobject? Nope. Though they would nice to have. I look for it. Still, these patches changes only affects to the internal decoder and filter (next will the encoders). Decoders and encoders only exists one per element (1:1 mapping), in the case of the filter it may be used in other elements. And I thing that GstObject offer more tooling (such as leak tracing). Another story would be surfaces and buffers, where they might be replaces with GstMiniObject, but that other story for now.
Ok... Finally I devoted some time to do a simple benchmark using valgrind's massif tool. The test program launches 4 videos to be rendered with a vaapisink in drm (headless). After initialization, with and without the patches, the memory consumption is similar: ~17.5M in total. Nonetheless, the peaks at initialization are significantly different: WITHOUT these patches 47.14M WITH these patches 44M
Attachment 372297 [details] pushed as 0ca49a1 - libs: decoder: refactor decoders as gobject Attachment 372298 [details] pushed as a75329c - libs: decoder: remove gst_vaapi_decoder_new() Attachment 372299 [details] pushed as ad5eb75 - libs: decoder: remove gst_vaapi_decoder_ref() Attachment 372300 [details] pushed as 4649ac1 - libs: decoder: remove gst_vaapi_decoder_unref() Attachment 372301 [details] pushed as 7a9f7f0 - libs: decoder: h264: remove create() and destroy() callbacks Attachment 372302 [details] pushed as 3dbddfa - libs: decoder: h265: implement reset() callback Attachment 372304 [details] pushed as c1d65cf - libs: decoder: jpeg: implement reset() callback Attachment 372305 [details] pushed as 0374a8c - libs: decoder: mpeg2: implement reset() callback Attachment 372306 [details] pushed as 5b3f6eb - libs: decoder: mpeg4: implement reset() callback Attachment 372307 [details] pushed as 2b207a4 - libs: decoder: vc1: implement reset() callback Attachment 372308 [details] pushed as e493420 - libs: decoder: vp8: implement reset() callback Attachment 372309 [details] pushed as 60dad9f - libs: decoder: vp9: implement reset() callback Attachment 372310 [details] pushed as a2f923f - libs: decoder: remove destoy() and create() callbacks Attachment 372338 [details] pushed as 99183e0 - libs: filter: refactor filter as gobject Attachment 372340 [details] pushed as ae46b1a - libs: filter: remove custom ref() and unref()
GstVaapiWindow and all the encoders are still susceptible to be GObject descendants. That's pending work so I don't close this bug yet.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/issues/96.