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 643469 - fpsdisplaysink: add frames-dropped and frames-rendered properties
fpsdisplaysink: add frames-dropped and frames-rendered properties
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
0.10.20
Other Linux
: Normal enhancement
: 0.10.22
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-02-28 10:51 UTC by Benjamin Gaignard
Modified: 2011-03-28 13:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
add properties to get dropped and rendered values (2.07 KB, patch)
2011-02-28 10:51 UTC, Benjamin Gaignard
needs-work Details | Review
added render and drop frame data in FPS-Measurement signal (1.80 KB, patch)
2011-03-01 09:18 UTC, vishal raj
rejected Details | Review
add "frames-rendered" and "frames-dropped" properties (4.85 KB, patch)
2011-03-16 08:51 UTC, Benjamin Gaignard
committed Details | Review

Description Benjamin Gaignard 2011-02-28 10:51:17 UTC
Created attachment 182082 [details] [review]
add properties to get dropped and rendered values

add properties to export dropped and rendered values outside fpsdisplaysink
Comment 1 vishal raj 2011-03-01 09:18:51 UTC
Created attachment 182164 [details] [review]
added render and drop frame data in FPS-Measurement signal

At present FPS-Measurement signal provides render rate, drop rate and average fps. Two more data(rendered and dropped frames) which is already present in fpsdisplaysink plugin has been added in FPS-Measurement signal in order to get these values also in application.

This is a git patch based on gst-plugins-bad-0.10.20.
Comment 2 Tim-Philipp Müller 2011-03-01 11:29:31 UTC
Couldn't one could use QoS messages to notify the app of rendered/dropped frames?
Comment 3 vishal raj 2011-03-01 12:59:43 UTC
we need render rate, drop rate, average fps, dropped and rendered frames data.
all data should be at specific time interval and time interval should be configurable. at present FPS-Measurement signal in fpsdisplaysink plugin provides this functionality 
we have add the properties to get an easy method to retrieve the values also
Comment 4 Stefan Sauer (gstreamer, gtkdoc dev) 2011-03-03 08:26:37 UTC
Vishal, are you aware that num_dropped would be only the frmaes dropped by the sink. If qos is in use and e.g. a colorspace element would drop frames this would not be counted here.

I am not against the changes as such. Still it is important to understand what you are meassuring. Having a extra section in the doc-blob would be good.

Ultimately, the solution is what Tim mentioned in comment #2. In order to use QOS messages, those would need to be implemented in e.g. basevideosink, ffmpegcolorspace, videoscale (basically all elements that do QOS).
Comment 5 Benjamin Gaignard 2011-03-03 10:15:21 UTC
frames_rendered and frames_dropped are computed from QoS.
the patches only offer others ways to retrieve those values.
Comment 6 Benjamin Gaignard 2011-03-15 16:23:43 UTC
Tim suggest to post a QoS message or to add a new signal, those 2 solutions don't seems suitable for me because they are asynchronous (signal and message will not handle synchronously in the app) be and split wanted data in multiple access and methodes (signal, message).
Comment 7 Tim-Philipp Müller 2011-03-16 00:27:39 UTC
Comment on attachment 182082 [details] [review]
add properties to get dropped and rendered values

Don't see any reason not to add the properties. However:

 - make them uint64 type please, not doubles

 - rename them to "frames-dropped" and
   "frames-rendered" (videorate uses "drop",
   but that doesn't really sound right to me)

 - need to either add proper locking or make
   access here and in the other places atomic.
   I'd just make the internal variables normal
   ints for now and then use g_atomic_int_{inc,get}().
Comment 8 Benjamin Gaignard 2011-03-16 08:51:51 UTC
Created attachment 183498 [details] [review]
add "frames-rendered" and "frames-dropped" properties

this patch follows Tim's advices: change frames_rendered and frames_dropped from guint64 to gint and use g_atomic_int_*
Comment 9 Tim-Philipp Müller 2011-03-18 12:50:09 UTC
Comment on attachment 183498 [details] [review]
add "frames-rendered" and "frames-dropped" properties

Pushed this with miniscule changes, thanks:

commit 8c483758172b308e18708c6606bc51d80c4129c0
Author: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Date:   Wed Mar 16 09:50:34 2011 +0100

    fpsdisplaysink: add "frames-dropped" and "frames-rendered" properties
    
    https://bugzilla.gnome.org/show_bug.cgi?id=643469
Comment 10 Benjamin Gaignard 2011-03-28 12:45:50 UTC
We have changed the application to only use the already commited patch.
http://git.linaro.org/gitweb?p=people/sudip-jain/smartt.git;a=summary

the patch submited by vishal is no more needed for us.
Comment 11 Tim-Philipp Müller 2011-03-28 12:59:34 UTC
Ok, thanks. I think that's the best way.

You can retrieve both values with one single g_object_get() call btw, and you also don't need the G_OBJECT() cast for g_object_get().