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 642356 - [Index] review api and add an example
[Index] review api and add an example
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other Linux
: Normal enhancement
: 0.10.33
Assigned To: Stefan Sauer (gstreamer, gtkdoc dev)
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-02-15 09:03 UTC by Stefan Sauer (gstreamer, gtkdoc dev)
Modified: 2011-02-24 13:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
WIP for better index docs (1.11 KB, patch)
2011-02-15 09:03 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
none Details | Review
WIP for an index example (7.00 KB, patch)
2011-02-15 09:03 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
none Details | Review
WIP for better index docs (1.43 KB, patch)
2011-02-15 09:08 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
none Details | Review
WIP for better index docs (1.56 KB, patch)
2011-02-17 15:52 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
committed Details | Review
WIP for an index example (11.55 KB, patch)
2011-02-17 15:55 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
none Details | Review
WIP for an index example (11.77 KB, patch)
2011-02-17 16:16 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
none Details | Review
WIP for an index example (11.82 KB, patch)
2011-02-18 14:03 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
rejected Details | Review
add index support in gst-launch (7.69 KB, patch)
2011-02-21 09:29 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
committed Details | Review

Description Stefan Sauer (gstreamer, gtkdoc dev) 2011-02-15 09:03:10 UTC
Created attachment 180876 [details] [review]
WIP for better index docs

Imho the index api is not useful for applications as it is now. For a start I like to docuement it better and add a test app that demonstrates how to use it. The only thing I found so far is:
gst-plugins-bad/tests/examples/indexing/indexmpeg.c
Comment 1 Stefan Sauer (gstreamer, gtkdoc dev) 2011-02-15 09:03:58 UTC
Created attachment 180877 [details] [review]
WIP for an index example

Please look at the FIXME comments and let me know how it can be done better.
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2011-02-15 09:08:53 UTC
Created attachment 180879 [details] [review]
WIP for better index docs
Comment 3 Sebastian Dröge (slomo) 2011-02-15 09:14:29 UTC
The GstIndex API is also not very good for bindings
Comment 4 Stefan Sauer (gstreamer, gtkdoc dev) 2011-02-17 15:52:38 UTC
Created attachment 181136 [details] [review]
WIP for better index docs
Comment 5 Stefan Sauer (gstreamer, gtkdoc dev) 2011-02-17 15:53:32 UTC
(In reply to comment #3)
> The GstIndex API is also not very good for bindings

Can you be more specific. It would be nice to atleast have some FIXME: about it in the code.
Comment 6 Stefan Sauer (gstreamer, gtkdoc dev) 2011-02-17 15:55:49 UTC
Created attachment 181138 [details] [review]
WIP for an index example

This is now comming nice together and I was wondering if that would make a nice addition to gst-launch (add a -i, --index option). Example output:

$ ./index file:///home/ensonic/Videos/TheChubbChubbs.mp4
indexing file:///home/ensonic/Videos/TheChubbChubbs.mp4...
id 1 describes writer GstQTDemux
id 1, GstQTDemux stats
  total time          = 0:05:27.640000000
  number of frames    = 23550
  number of keyframes = 15536
  keyframe rate       = 1,515834
  min keyframe gap    = 0:00:00.000000000
  avg keyframe gap    = 0:00:00.021031135
  max keyframe gap    = 0:00:00.021354167
Comment 7 Stefan Sauer (gstreamer, gtkdoc dev) 2011-02-17 16:16:43 UTC
Created attachment 181146 [details] [review]
WIP for an index example

Improve the output.
Comment 8 Sebastian Dröge (slomo) 2011-02-17 17:27:31 UTC
(In reply to comment #5)
> (In reply to comment #3)
> > The GstIndex API is also not very good for bindings
> 
> Can you be more specific. It would be nice to atleast have some FIXME: about it
> in the code.

Sure, I hope I still have my notes somewhere... otherwise I'll try to find some time to write everything down again this weekend. Creating the GstIndex bindings was very annoying for C# and IIRC the Vala bindings are not optimal yet either because of the same problems.
Comment 9 Stefan Sauer (gstreamer, gtkdoc dev) 2011-02-18 14:03:59 UTC
Created attachment 181210 [details] [review]
WIP for an index example

Any comments about the idea to add this to gst-launch?
Comment 10 Stefan Sauer (gstreamer, gtkdoc dev) 2011-02-21 09:29:14 UTC
Created attachment 181441 [details] [review]
add index support in gst-launch

now added to gst-launch. Example output (sorry partly german local) below.

...
Execution ended after 258579345031 ns.
Leitung wird auf PAUSIERT gesetzt ...
Leitung wird auf BEREIT gesetzt ...
Index statistics
id 1, GstAviDemux
  total time               = 0:04:20.020050000
  frame/keyframe rate      = 13059 / 6621 = 1,972361
  min/avg/max keyframe gap = 0:00:00.000000000, 0:00:00.039005640, 0:00:00.500000000
id 2, GstAviDemux.video_00
  total time               = 0:04:20.000000000
  frame/keyframe rate      = 6501 / 63 = 103,190476
  min/avg/max keyframe gap = 0:00:00.040000000, 0:00:03.409494099, 0:00:12.000000000
id 3, GstMpegAudioParse
  no stats
id 4, GstAviDemux.audio_00
  total time               = 0:04:20.020050000
  frame/keyframe rate      = 6558 / 6558 = 1,000000
  min/avg/max keyframe gap = 0:00:00.000050000, 0:00:00.039723930, 0:00:00.500000000
id 5, GstMad
  total time               = 0:04:19.700050000
  frame/keyframe rate      = 9943 / 0 = -
Leitung wird auf NULL gesetzt ...
...
Comment 11 Stefan Sauer (gstreamer, gtkdoc dev) 2011-02-24 13:41:37 UTC
Comment on attachment 181210 [details] [review]
WIP for an index example

we go for the gst-launch one
Comment 12 Stefan Sauer (gstreamer, gtkdoc dev) 2011-02-24 13:42:17 UTC
Comment on attachment 181441 [details] [review]
add index support in gst-launch

Commit include man-page update.

commit 88cda9893948efca11290bc2656532b994a98718
Author: Stefan Kost <ensonic@users.sf.net>
Date:   Mon Feb 21 11:24:45 2011 +0200

    gst-launch: add index support
    
    When option "-i" is given, set an index object on the pipeline and compute
    statistics for all index writers. Print a sumary when shutting down the
    pipeline.