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 789467 - videoencoder: add qos property
videoencoder: add qos property
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal enhancement
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-10-25 10:18 UTC by Guillaume Desmottes
Modified: 2017-10-26 07:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
videoencoder: add qos property (7.17 KB, patch)
2017-10-25 10:18 UTC, Guillaume Desmottes
committed Details | Review

Description Guillaume Desmottes 2017-10-25 10:18:26 UTC
As discussed in bug #582166 the videoencoder base class should have a QoS property so users can control if they want encoders to perform QoS or not.
Comment 1 Guillaume Desmottes 2017-10-25 10:18:46 UTC
Created attachment 362244 [details] [review]
videoencoder: add qos property

This new property control if the encoder base class should gather QoS
stats and if subclasses should use them by dropping late frames.
Comment 2 Mathieu Duponchelle 2017-10-25 11:34:43 UTC
Review of attachment 362244 [details] [review]:

Looks good to me apart from that :)

::: gst-libs/gst/video/gstvideoencoder.c
@@ +174,2 @@
   /* QoS properties */
+  gint qos_enabled;             /* ATOMIC */

Hm, why not just protect with the object lock as well? It's taken right next to where you check the variable already, just need to protect  the getters / setters
Comment 3 Guillaume Desmottes 2017-10-25 11:48:48 UTC
I implemented it as in gstbasesink. I don't mind changing if it's considered as a better pattern.
Comment 4 Mathieu Duponchelle 2017-10-25 11:59:30 UTC
(In reply to Guillaume Desmottes from comment #3)
> I implemented it as in gstbasesink. I don't mind changing if it's considered
> as a better pattern.

I'd say for consistency's sake it is a better one here at least :)
Comment 5 Mathieu Duponchelle 2017-10-25 12:03:17 UTC
It requires the subclass to release the object lock before checking if qos is enabled, maybe that is the reason why it is done that way in base sink though ?
Comment 6 Mathieu Duponchelle 2017-10-25 12:06:54 UTC
Review of attachment 362244 [details] [review]:

The atomic approach has the advantage of not requiring the subclass to release the object lock when checking, accepted
Comment 7 Mathieu Duponchelle 2017-10-25 12:22:36 UTC
Attachment 362244 [details] pushed as 7950a46 - videoencoder: add qos property
Comment 8 Rico Tzschichholz 2017-10-26 07:37:30 UTC
"gst_video_encoder_is_qos_enabled" should be called "gst_video_encoder_get_qos_enabled" for proper naming of a gobject-property-accessor
Comment 9 Guillaume Desmottes 2017-10-26 07:47:00 UTC
I named it as 'gst_base_sink_is_qos_enabled'. Do we want to always enforce the get/set name pattern?