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 687991 - videodecoder: add getter for QoS proportion
videodecoder: add getter for QoS proportion
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
unspecified
Other All
: Normal enhancement
: 1.0.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 687990 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-11-09 14:43 UTC by Andoni Morales
Modified: 2012-11-20 14:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
videodecoder: add getter for QoS proportion (1.89 KB, patch)
2012-11-09 14:43 UTC, Andoni Morales
needs-work Details | Review
videodecoder: add getter for QoS proportion (3.02 KB, patch)
2012-11-09 16:28 UTC, Andoni Morales
none Details | Review
videodecoder: add getter for QoS proportion (2.97 KB, patch)
2012-11-09 16:29 UTC, Andoni Morales
none Details | Review
videodecoder: add getter for QoS proportion (2.97 KB, patch)
2012-11-09 16:31 UTC, Andoni Morales
rejected Details | Review
videodecoder: add getter for QoS proportion and earliest_time (2.52 KB, patch)
2012-11-15 09:54 UTC, Andoni Morales
committed Details | Review

Description Andoni Morales 2012-11-09 14:43:31 UTC
Add a getter for the QoS proportion, to help subclasses do better
estimations based on the proportion.
Comment 1 Andoni Morales 2012-11-09 14:43:33 UTC
Created attachment 228572 [details] [review]
videodecoder: add getter for QoS proportion

Add a getter for the QoS proportion, to help subclasses do better
estimations based on the proportion.
Comment 2 Andoni Morales 2012-11-09 14:45:57 UTC
Even though it's new API, it would be nice if it can be considered a bug and be included in the 1.0.x series, as otherwise sub classes would need to have a different logic depending on whether it's 1.0.x or >= 1.2.x
Comment 3 Sebastian Dröge (slomo) 2012-11-09 15:38:15 UTC
*** Bug 687990 has been marked as a duplicate of this bug. ***
Comment 4 Sebastian Dröge (slomo) 2012-11-09 15:40:17 UTC
Review of attachment 228572 [details] [review]:

IMHO can be added to 1.0, that shouldn't be a problem

::: gst-libs/gst/video/gstvideodecoder.c
@@ +3170,3 @@
+  g_return_val_if_fail (GST_IS_VIDEO_DECODER (decoder), 1);
+
+  return decoder->priv->proportion;

Needs to use the object lock here

::: gst-libs/gst/video/gstvideodecoder.h
@@ +354,3 @@
 							GstVideoCodecFrame *frame);
 
+gdouble          gst_video_decoder_get_qos_proportion (GstVideoDecoder *decoder);

I would do something like
gst_video_decoder_get_qos_whatever (decoder, &proportion, &earliest_time, other_fields)
Comment 5 Andoni Morales 2012-11-09 16:28:28 UTC
Created attachment 228591 [details] [review]
videodecoder: add getter for QoS proportion

Add a getter for the QoS proportion, to help subclasses do better
estimations based on the proportion.

https://bugzilla.gnome.org/show_bug.cgi?id=687991

https://bugzilla.gnome.org/show_bug.cgi?id=687990
Comment 6 Andoni Morales 2012-11-09 16:29:49 UTC
Created attachment 228592 [details] [review]
videodecoder: add getter for QoS proportion

Add a getter for the QoS proportion, to help subclasses do better
estimations based on the proportion.
Comment 7 Andoni Morales 2012-11-09 16:31:12 UTC
Created attachment 228593 [details] [review]
videodecoder: add getter for QoS proportion

Add a getter for the QoS proportion, to help subclasses do better
estimations based on the proportion.
Comment 8 Andoni Morales 2012-11-09 16:31:34 UTC
Sorry for the mess :)
Comment 9 Tim-Philipp Müller 2012-11-09 17:15:36 UTC
You could also get and store this info in the subclass from the event via the src_event handler, I think. It's fine to pick this into 1.0.x IMHO.
Comment 10 Sebastian Dröge (slomo) 2012-11-12 08:18:55 UTC
Does the function name sound fine to you, Tim?
Comment 11 Andoni Morales 2012-11-12 10:08:10 UTC
Other options might be:
  * get_qos_state
  * get_qos_stats
Comment 12 Tim-Philipp Müller 2012-11-12 13:00:43 UTC
I would prefer _get_qos_info() or _get_qos_stats() over _get_qos_state(). Both sound fine to me.
Comment 13 Tim-Philipp Müller 2012-11-14 23:45:59 UTC
Ok, so what to do with this?

Is there any value in the dropped/processed_frames count (for the subclass) ?
Comment 14 Sebastian Dröge (slomo) 2012-11-15 08:38:37 UTC
Let's use get_qos_info() then. Don't think the dropped/processed frames are useful for the subclass, also they're not part of the QOS events.
Comment 15 Andoni Morales 2012-11-15 09:19:23 UTC
To me there is only one value needed, which is the proportion, as for earliest_time we can use the get_max_decoding_time API. That's why I proposed in my first patch a single getter for this value. It's also more future-proof as if something new is added, it is easier adding a new getter than a get_qos_info_full.
Comment 16 Andoni Morales 2012-11-15 09:54:21 UTC
Created attachment 229031 [details] [review]
videodecoder: add getter for QoS proportion and earliest_time

Add a getter for the QoS proportion and earliest_time to help
subclasses do better estimations based on the proportion.
Comment 17 Tim-Philipp Müller 2012-11-20 00:01:24 UTC
Add 'Since' markers, a 'Returns:' tag, and added the function to the .def file with the exported symbols and docs/libs/*sections.txt.

 commit 5f55ea1ef31ab598751d2b98b5a66360f647ea1b
 Author: Andoni Morales Alastruey <ylatuya@gmail.com>
 Date:   Fri Nov 9 15:37:57 2012 +0100

    videodecoder: add getter for QoS proportion and earliest_time
    
    Add a getter for the QoS proportion and earliest_time to help
    subclasses do better estimations based on the proportion.
    
    API: gst_video_decoder_get_qos_info()
    
    https://bugzilla.gnome.org/show_bug.cgi?id=687991
Comment 18 Sebastian Dröge (slomo) 2012-11-20 08:06:50 UTC
I thought we decided on only adding get_qos_proportion() in the end because of extensibility concerns
Comment 19 Tim-Philipp Müller 2012-11-20 09:47:37 UTC
I did not have any such concerns (we don't plan any changes there in the near future, so why worry).

My impression was that no one felt like making a decision, so I pushed the version that's closest to the event API.

If you want to change it to _get_propertion(), that works for me too.
Comment 20 Tim-Philipp Müller 2012-11-20 14:09:03 UTC
commit 67455643b902a181cc64cb1fecc6bc5587255afc
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Tue Nov 20 12:21:08 2012 +0100

    videodecoder: Return the proportion directly

commit a6aba8a97927d5e5c1bf0dd9344d51ca9fd0fdb4
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Tue Nov 20 12:08:26 2012 +0100

    videodecoder: Rename from get_qos_info() to get_qos_proportion()
    
    And only return the proportion. The earliest time already can be
    retrieved from get_max_decode_time() and by renaming we allow this
    to be more extensible in the future.