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 353680 - qos-query + qos reporting
qos-query + qos reporting
Status: RESOLVED WONTFIX
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal enhancement
: git master
Assigned To: Stefan Sauer (gstreamer, gtkdoc dev)
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-08-31 11:49 UTC by Stefan Sauer (gstreamer, gtkdoc dev)
Modified: 2011-03-02 07:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
implement qos-queries and reporting (13.07 KB, patch)
2006-08-31 11:52 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
none Details | Review
plot data files generated by qos reporting (526 bytes, application/octet-stream)
2006-08-31 11:53 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
  Details
implement qos-queries and reporting (12.90 KB, patch)
2007-06-14 12:15 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
none Details | Review
mockup of plot with additional data (7.41 KB, image/png)
2007-06-15 05:39 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
  Details

Description Stefan Sauer (gstreamer, gtkdoc dev) 2006-08-31 11:49:43 UTC
The idea is described in the = qos profiling = section of:
http://webcvs.freedesktop.org/gstreamer/gstreamer/docs/random/ensonic/profiling.txt?view=markup
Comment 1 Stefan Sauer (gstreamer, gtkdoc dev) 2006-08-31 11:52:42 UTC
Created attachment 71957 [details] [review]
implement qos-queries and reporting
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2006-08-31 11:53:33 UTC
Created attachment 71958 [details]
plot data files generated by qos reporting
Comment 3 Tim-Philipp Müller 2006-09-01 11:02:16 UTC
Since the QoS mechanism is pretty generic and not bound to a particular medium, maybe the QoS statistics querying should be medium-independent as well? Put differently: should we use something more generic in place of 'frames' here?
Comment 4 Stefan Sauer (gstreamer, gtkdoc dev) 2006-09-13 10:15:12 UTC
@tim: good point, what about dropped/rendered-buffers.

Beside we only do QoS or video right now and don't drop audio in general, so I am not sure. For me this is quite useful as it is right now.
Comment 5 Tim-Philipp Müller 2006-09-13 10:31:13 UTC
My position hasn't really changed since our IRC conversation about this:

 Sep 01 12:11:38 <ensonic>	__tim: thanks for your comment on the qos-reporting patch, what about "buffers" instead of "frames"?
 Sep 01 12:12:35 <__tim>	'buffer' isn't really meaningful if the buffers aren't of uniform size/frequency, is it?
 Sep 01 12:12:55 <__tim>	depends what you want to measure I suppose
 Sep 01 12:14:00 <wtay>	yeah, too specific
 Sep 01 12:17:05 <ensonic>	wtay: any idea?
 Sep 01 12:17:26 <wtay>	 was thinking about an interface on the videosink

I was just idly commenting though, you should probably talk to Wim ...
Comment 6 Stefan Sauer (gstreamer, gtkdoc dev) 2007-03-15 08:34:37 UTC
After thinking more about this the term 'frames' is quite generic. The frame is the atomic quantity of media that goes through a pipeline. For video this one field (e.g. full picture), for audio a frame is one sample value for each channel.

Audiosinks can drop some frames of a buffer in the sink too. This they could also keep stats and report them. The report as such could maybe include the media type (e.g. audio/x-raw-int), so that the report can group the output by major madia type (audio/video).
Comment 7 Julien MOUTTE 2007-05-04 16:25:58 UTC
Looks like a good idea IMHO.
Comment 8 Stefan Sauer (gstreamer, gtkdoc dev) 2007-05-22 13:24:22 UTC
To undermine that 'frames' is not that far-fetched, in gst-libs/gst/audio/audio.h we use the term frames in the context of audio.
Comment 9 Stefan Sauer (gstreamer, gtkdoc dev) 2007-05-22 13:29:11 UTC
TODO:
__tim> 
small nitpick unrelated to the API: please use a GArray for the gst-launch 
reporting, or at the very least g_slist_prepend() and then reverse the list before writing out the report, 's a bit more efficient: )

MikeS>
clearly moving reset_qos is wrong; you need to provide some other way to do what you want for that

-> maybe I should split, resetting qos data and stats
Comment 10 Jan Schmidt 2007-05-22 14:31:43 UTC
I haven't commented on this bug so far, because other people seemed to be voicing my objections for me.

I'm against committing this for the current release for the following reasons:

  * It doesn't represent critical functionality or a regression - it's an enhancement and it's one where the specifics are still contentious.

  * I don't like the idea of adding our first multimedia-specific terminology to the core. So far, we've kept the core (almost) completely video/audio agnostic and  I like that separation - it speaks to me about keeping a good abstraction. There must be a more general way to express the idea. Other people have suggested counting dropped buffers. Another idea would be to count the dropped vs kept percentage in some GstFormat - TIME, DEFAULT (samples or frames depending on the raw type), BUFFERS and BYTES are the way we normally express our units of processed-content, and I think they can apply here too.

  * I don't like the idea of dropping a qos.data file in gst-launch's current directory - the command line options should include a way of redirecting that.

I'm sorry - I understand that it's frustrating not being able to get traction and comments on a patch for such a long time, but it's also API I think we can get consensus on before it goes in.
Comment 11 Stefan Sauer (gstreamer, gtkdoc dev) 2007-05-23 06:49:12 UTC
I am fine with postponing this for later (you've got valid points in your comment).

* regaring the term 'frames'. Bytes does not make sense imho. Only percent would make sense imho (there is GST_FORMAT_PERCENT). Its maybe even better, because then one can formulate some test criteria that warn if a test-case drops more that a certain percentage of frames. The modification for percent would be simple - I can return
  percent_dropped=percent_dropped/(frames_rendered+frames_dropped);
  (percent_dropped=0.0 if (frames_rendered+frames_dropped)==0)
The value would be a double.

* qos.data file. Right, I can turn '-r' intp '-r <datafile>'. If only '-r' is given, I can just print the sumary table. or should I better add '--qos-data <datafile>' and if that is not given write no datafile.

Jan, its not so much the frustration, it more that this can be quite useful if it can be savely used accross gstreamer, but right now I am reluctant to not have too many local changes. It would be nice to have this in 0.10.14 in a solid way.
Comment 12 Stefan Sauer (gstreamer, gtkdoc dev) 2007-05-24 06:23:46 UTC
I changed the code to add another option: --report-file to specify the data-file-path.

One question: what do you think about extending the query structure-format so that it no just returns the percentage of dropped frames, but optionally also an array/slist of GST_CLOCK_TIME values. Then I could improve the plotting, so that one can see which element dropps when.
Comment 13 Jan Schmidt 2007-05-24 09:54:43 UTC
I thought about something like that too, and my first thought was that it's that same situation as wanting to find out the current position at each point in the pipeline, for example. 

Our usual solution for that is to zip through querying each element and gathering the results - a utility function "gst_bin_query_all" or something that constructs a GList of element references and their response to the query, plus a cleanup function, seems like a more general solution to the problem to me... although I can see others might not think it elegant :)
Comment 14 Stefan Sauer (gstreamer, gtkdoc dev) 2007-06-14 12:15:03 UTC
Created attachment 89941 [details] [review]
implement qos-queries and reporting

add switch for filename
Comment 15 Stefan Sauer (gstreamer, gtkdoc dev) 2007-06-15 05:39:00 UTC
Created attachment 89991 [details]
mockup of plot with additional data

The image shows a fake, that has vertial bars there to indicate when a frame was dropped. I am not sure wheter the element should keep a drop list (needs memory) or it sends a drop message to the bus (only needs memory if the app is collecting the info, but causes more communication overhead).
Comment 16 Stefan Sauer (gstreamer, gtkdoc dev) 2008-04-03 15:11:53 UTC
By the time I came to the conclusion that we probably don't want to add permanent API for such meassurements. I wrote a preload library over the last days which can grab simmilar data, without the need to mess with the code.

http://www.buzztard.org/files/gst-preload-0.1.tar.gz

I wonder it there would be interest to put that as (uninstalled) lib into core?
Comment 17 David Schleef 2008-04-03 16:12:59 UTC
Every time you use LD_PRELOAD, God kills a kitten.
Comment 18 Stefan Sauer (gstreamer, gtkdoc dev) 2009-03-23 20:37:37 UTC
Poor kittens, but despite of alternatives, s/gst-preload/gst-tracelib/ -> http://cgit.freedesktop.org/~ensonic/gst-tracelib/ - 0.2 in preparation.
Comment 19 Stefan Sauer (gstreamer, gtkdoc dev) 2010-03-18 12:55:28 UTC
Some commits went in for bug #322947. With that one can listen for dropped frame on the bus and do stats on EOS for how many frames where dropped and by whom.
Comment 20 Stefan Sauer (gstreamer, gtkdoc dev) 2011-03-01 21:26:34 UTC
I'll close this now due to lack of interest.
Comment 21 Tim-Philipp Müller 2011-03-02 00:06:40 UTC
There's GST_MESSAGE_QOS now...
Comment 22 Stefan Sauer (gstreamer, gtkdoc dev) 2011-03-02 07:36:38 UTC
(In reply to comment #21)
> There's GST_MESSAGE_QOS now...

... that no one posts :/ Maybe a good starting point would be basesinks.