After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 796308 - vaapi: gobjectify internal classes
vaapi: gobjectify internal classes
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer-vaapi
unspecified
Other All
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-05-21 15:13 UTC by Víctor Manuel Jáquez Leal
Modified: 2018-11-03 15:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
libs: decoder: refactor decoders as gobject (39.31 KB, patch)
2018-05-21 15:13 UTC, Víctor Manuel Jáquez Leal
committed Details | Review
libs: decoder: remove gst_vaapi_decoder_new() (1.63 KB, patch)
2018-05-21 15:13 UTC, Víctor Manuel Jáquez Leal
committed Details | Review
libs: decoder: remove gst_vaapi_decoder_ref() (1.55 KB, patch)
2018-05-21 15:14 UTC, Víctor Manuel Jáquez Leal
committed Details | Review
libs: decoder: remove gst_vaapi_decoder_unref() (2.97 KB, patch)
2018-05-21 15:14 UTC, Víctor Manuel Jáquez Leal
committed Details | Review
libs: decoder: h264: remove create() and destroy() callbacks (1.14 KB, patch)
2018-05-21 15:14 UTC, Víctor Manuel Jáquez Leal
committed Details | Review
libs: decoder: h265: implement reset() callback (1.98 KB, patch)
2018-05-21 15:14 UTC, Víctor Manuel Jáquez Leal
committed Details | Review
libs: decoder: jpeg: implement reset() callback (1.61 KB, patch)
2018-05-21 15:14 UTC, Víctor Manuel Jáquez Leal
committed Details | Review
libs: decoder: mpeg2: implement reset() callback (1.62 KB, patch)
2018-05-21 15:15 UTC, Víctor Manuel Jáquez Leal
committed Details | Review
libs: decoder: mpeg4: implement reset() callback (1.63 KB, patch)
2018-05-21 15:15 UTC, Víctor Manuel Jáquez Leal
committed Details | Review
libs: decoder: vc1: implement reset() callback (2.19 KB, patch)
2018-05-21 15:15 UTC, Víctor Manuel Jáquez Leal
committed Details | Review
libs: decoder: vp8: implement reset() callback (1.64 KB, patch)
2018-05-21 15:15 UTC, Víctor Manuel Jáquez Leal
committed Details | Review
libs: decoder: vp9: implement reset() callback (1.68 KB, patch)
2018-05-21 15:15 UTC, Víctor Manuel Jáquez Leal
committed Details | Review
libs: decoder: remove destoy() and create() callbacks (1.71 KB, patch)
2018-05-21 15:15 UTC, Víctor Manuel Jáquez Leal
committed Details | Review
libs: filter: refactor filter as gobject (7.33 KB, patch)
2018-05-22 15:24 UTC, Víctor Manuel Jáquez Leal
committed Details | Review
libs: filters: remove custom ref() and unref() (3.35 KB, patch)
2018-05-22 15:24 UTC, Víctor Manuel Jáquez Leal
none Details | Review
libs: filter: remove custom ref() and unref() (3.35 KB, patch)
2018-05-22 15:24 UTC, Víctor Manuel Jáquez Leal
committed Details | Review

Description Víctor Manuel Jáquez Leal 2018-05-21 15:13:33 UTC
gobjectivy internal decoder class and its derivate classes
Comment 1 Víctor Manuel Jáquez Leal 2018-05-21 15:13:45 UTC
Created attachment 372297 [details] [review]
libs: decoder: refactor decoders as gobject
Comment 2 Víctor Manuel Jáquez Leal 2018-05-21 15:13:55 UTC
Created attachment 372298 [details] [review]
libs: decoder: remove gst_vaapi_decoder_new()
Comment 3 Víctor Manuel Jáquez Leal 2018-05-21 15:14:04 UTC
Created attachment 372299 [details] [review]
libs: decoder: remove gst_vaapi_decoder_ref()
Comment 4 Víctor Manuel Jáquez Leal 2018-05-21 15:14:14 UTC
Created attachment 372300 [details] [review]
libs: decoder: remove gst_vaapi_decoder_unref()

Replaced by gst_object_unref() in tests
Comment 5 Víctor Manuel Jáquez Leal 2018-05-21 15:14:25 UTC
Created attachment 372301 [details] [review]
libs: decoder: h264: remove create() and destroy() callbacks
Comment 6 Víctor Manuel Jáquez Leal 2018-05-21 15:14:35 UTC
Created attachment 372302 [details] [review]
libs: decoder: h265: implement reset() callback

and remove create() and destroy()
and use g_clear_pointer for dpb structure
Comment 7 Víctor Manuel Jáquez Leal 2018-05-21 15:14:48 UTC
Created attachment 372304 [details] [review]
libs: decoder: jpeg: implement reset() callback

and remove create() and destroy() callbacks.
Comment 8 Víctor Manuel Jáquez Leal 2018-05-21 15:15:00 UTC
Created attachment 372305 [details] [review]
libs: decoder: mpeg2: implement reset() callback

remove create() and destroy() callbacks
Comment 9 Víctor Manuel Jáquez Leal 2018-05-21 15:15:07 UTC
Created attachment 372306 [details] [review]
libs: decoder: mpeg4: implement reset() callback

remove destroy() and create() callback
Comment 10 Víctor Manuel Jáquez Leal 2018-05-21 15:15:14 UTC
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
Comment 11 Víctor Manuel Jáquez Leal 2018-05-21 15:15:21 UTC
Created attachment 372308 [details] [review]
libs: decoder: vp8: implement reset() callback

remove create() and destroy() callbacks
Comment 12 Víctor Manuel Jáquez Leal 2018-05-21 15:15:27 UTC
Created attachment 372309 [details] [review]
libs: decoder: vp9: implement reset() callback

remove destroy() and create() callback
Comment 13 Víctor Manuel Jáquez Leal 2018-05-21 15:15:33 UTC
Created attachment 372310 [details] [review]
libs: decoder: remove destoy() and create() callbacks

They were all replaced by reset()
Comment 14 Víctor Manuel Jáquez Leal 2018-05-22 15:24:04 UTC
Created attachment 372338 [details] [review]
libs: filter: refactor filter as gobject
Comment 15 Víctor Manuel Jáquez Leal 2018-05-22 15:24:11 UTC
Created attachment 372339 [details] [review]
libs: filters: remove custom ref() and unref()

Replacing them by gst_object_ref() and gst_object_unref()
Comment 16 Víctor Manuel Jáquez Leal 2018-05-22 15:24:56 UTC
Created attachment 372340 [details] [review]
libs: filter: remove custom ref() and unref()

Replacing them by gst_object_ref() and gst_object_unref()
Comment 17 sreerenj 2018-05-23 19:02:20 UTC
Do you have any benchmarking results to share?; memory footprint when replacing gstvaapiminiobject with gstobject?
Comment 18 Víctor Manuel Jáquez Leal 2018-05-24 09:56:07 UTC
(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.
Comment 19 Víctor Manuel Jáquez Leal 2018-08-30 18:07:01 UTC
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
Comment 20 Víctor Manuel Jáquez Leal 2018-09-03 16:02:31 UTC
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()
Comment 21 Víctor Manuel Jáquez Leal 2018-09-03 16:07:21 UTC
GstVaapiWindow and all the encoders are still susceptible to be GObject descendants. That's pending work so I don't close this bug yet.
Comment 22 GStreamer system administrator 2018-11-03 15:54:36 UTC
-- 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.