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 339772 - Python example showing segment seeking and looping
Python example showing segment seeking and looping
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-python
git master
Other Linux
: Normal enhancement
: 0.10.20
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-04-26 03:42 UTC by Артём Попов
Modified: 2010-09-07 11:30 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12


Attachments
The example itself (5.36 KB, text/x-python)
2006-04-26 03:43 UTC, Артём Попов
Details

Description Артём Попов 2006-04-26 03:42:33 UTC
This is an example that shows how to do simple segment seeking and looping within a playbin. Thanks to Andy Wingo, for pointing out a huge incorrectness.
Comment 1 Артём Попов 2006-04-26 03:43:00 UTC
Created attachment 64298 [details]
The example itself
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2007-11-07 06:22:11 UTC
There is one with ui already in gst-plugins-base/tests/examples/seek. Maybe that one should be mentioned in the docs?
Comment 3 Stefan Sauer (gstreamer, gtkdoc dev) 2010-08-11 11:46:00 UTC
Edward, want to include it?

Artem, right now I get random fails from it:
 python /home/ensonic/Desktop/Segments.py /home/ensonic/Musik/ErsDemo2.mp3 1 5 1
python: malloc.c:4628: _int_malloc: Assertion `(unsigned long)(size) >= (unsigned long)(nb)' failed.
Aborted
Comment 4 Артём Попов 2010-08-12 05:57:22 UTC
Woah, completely forgot about this.

Stefan, the code still works for me on different files without errors (Ubuntu Maverick, GStreamer 0.10.30, Python 2.6.6rc1, PyGST 0.10.19).
Comment 5 Stefan Sauer (gstreamer, gtkdoc dev) 2010-08-30 07:10:47 UTC
This is really weired. I am using git HEAD of all gstreamer modules. I get 3 behaviour:
- it works
- it fails as in comment #3
- it fails as in below:

$ python ./examples/segments.py /home/ensonic/Musik/klingon.mp3 2 4 0
python: malloc.c:4628: _int_malloc: Assertion `(unsigned long)(size) >= (unsigned long)(nb)' failed.
Aborted
ensonic@mautz:~/projects/gstreamer/gst-python$ python ./examples/segments.py /home/ensonic/Musik/klingon.mp3 2 4 0

(segments.py:7339): GStreamer-CRITICAL **: gst_value_is_fixed: assertion `G_IS_VALUE (value)' failed

(segments.py:7339): GStreamer-CRITICAL **: gst_pad_set_caps: assertion `caps == NULL || gst_caps_is_fixed (caps)' failed
*** glibc detected *** python: free(): invalid pointer: 0xb6d2c7b8 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(+0x6b591)[0x2cd591]
/lib/tls/i686/cmov/libc.so.6(+0x6cde8)[0x2cede8]
/lib/tls/i686/cmov/libc.so.6(cfree+0x6d)[0x2d1ecd]
/lib/libglib-2.0.so.0(g_free+0x36)[0x510fc6]
/lib/libglib-2.0.so.0(g_array_free+0x87)[0x4e18a7]
/usr/lib/libgstreamer-0.10.so.0(gst_structure_free+0xc6)[0x47eae6]
/usr/lib/libgstreamer-0.10.so.0(gst_caps_unref+0x14a)[0x434bfa]
/usr/lib/libgstreamer-0.10.so.0(gst_caps_replace+0x59)[0x434e49]
/usr/lib/libgstreamer-0.10.so.0(gst_pad_set_caps+0xf3)[0x45aa93]
/usr/lib/libgstreamer-0.10.so.0(+0x3a21a)[0x43f21a]
/usr/lib/libgstreamer-0.10.so.0(gst_iterator_fold+0x67)[0x451d47]
/usr/lib/libgstreamer-0.10.so.0(+0x3a19f)[0x43f19f]
/usr/lib/libgstreamer-0.10.so.0(+0x3c933)[0x441933]
/usr/lib/libgstreamer-0.10.so.0(+0x3edb9)[0x443db9]
/usr/lib/gstreamer-0.10/libgstmpg123.so(+0x21a6)[0x7961a6]
/usr/lib/libgstreamer-0.10.so.0(gst_element_change_state+0x35)[0x440355]
/usr/lib/libgstreamer-0.10.so.0(+0x3eac8)[0x443ac8]
/usr/lib/libgstreamer-0.10.so.0(gst_element_set_state+0x90)[0x43f710]
/usr/lib/libgstreamer-0.10.so.0(+0x29f4f)[0x42ef4f]
/usr/lib/gstreamer-0.10/libgstdecodebin.so(+0x6a2f)[0x673a2f]
/usr/lib/libgstreamer-0.10.so.0(gst_element_change_state+0x35)[0x440355]
/usr/lib/libgstreamer-0.10.so.0(+0x3eac8)[0x443ac8]
/usr/lib/libgstreamer-0.10.so.0(gst_element_set_state+0x90)[0x43f710]
/usr/lib/libgstreamer-0.10.so.0(+0x29f4f)[0x42ef4f]
/usr/lib/libgstreamer-0.10.so.0(+0x5f372)[0x464372]
/usr/lib/gstreamer-0.10/libgstplaybin.so(+0x23d3b)[0x71cd3b]
/usr/lib/gstreamer-0.10/libgstplaybin.so(+0xa2dd)[0x7032dd]
/usr/lib/libgstreamer-0.10.so.0(gst_element_change_state+0x35)[0x440355]
/usr/lib/libgstreamer-0.10.so.0(+0x3eac8)[0x443ac8]
/usr/lib/libgstreamer-0.10.so.0(gst_element_set_state+0x90)[0x43f710]
/usr/lib/python2.6/dist-packages/gst-0.10/gst/_gst.so(+0x4529e)[0xad429e]
python(PyEval_EvalFrameEx+0x4221)[0x80e0a21]
python(PyEval_EvalCodeEx+0x857)[0x80e2807]
python(PyEval_EvalFrameEx+0x448b)[0x80e0c8b]
python(PyEval_EvalCodeEx+0x857)[0x80e2807]
python[0x816b2ac]
python(PyObject_Call+0x4a)[0x806245a]
python[0x806a45c]
python(PyObject_Call+0x4a)[0x806245a]
python(PyEval_CallObjectWithKeywords+0x42)[0x80db892]
python(PyObject_CallObject+0x20)[0x80624f0]
/usr/lib/python2.6/dist-packages/gst-0.10/gst/_gst.so(+0x3f448)[0xace448]
/usr/lib/libgstreamer-0.10.so.0(+0x2e325)[0x433325]
/lib/libglib-2.0.so.0(g_main_context_dispatch+0x1d5)[0x5085e5]
/lib/libglib-2.0.so.0(+0x3f2d8)[0x50c2d8]
/lib/libglib-2.0.so.0(g_main_loop_run+0x187)[0x50c817]
/usr/lib/pymodules/python2.6/gtk-2.0/glib/_glib.so(+0x81aa)[0x59f1aa]
python(PyEval_EvalFrameEx+0x479c)[0x80e0f9c]
python(PyEval_EvalCodeEx+0x857)[0x80e2807]
python(PyEval_EvalCode+0x57)[0x80e2907]
python(PyRun_FileExFlags+0x12d)[0x81005ad]
python(PyRun_SimpleFileExFlags+0xc2)[0x8100812]
python(Py_Main+0xadc)[0x805de5c]
python(main+0x1b)[0x805d03b]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6)[0x278bd6]
python[0x805cf81]
======= Memory map: ========
00110000-00248000 r-xp 00000000 08:01 1133       /lib/i686/cmov/libcrypto.so.0.9.8
00248000-00250000 r--p 00137000 08:01 1133       /lib/i686/cmov/libcrypto.so.0.9.8
00250000-0025e000 rw-p 0013f000 08:01 1133       /lib/i686/cmov/libcrypto.so.0.9.8
0025e000-00262000 rw-p 00000000 00:00 0 
00262000-003b5000 r-xp 00000000 08:01 131199     /lib/tls/i686/cmov/libc-2.11.1.so
003b5000-003b6000 ---p 00153000 08:01 131199     /lib/tls/i686/cmov/libc-2.11.1.so
003b6000-003b8000 r--p 00153000 08:01 131199     /lib/tls/i686/cmov/libc-2.11.1.so
003b8000-003b9000 rw-p 00155000 08:01 131199     /lib/tls/i686/cmov/libc-2.11.1.so
003b9000-003bc000 rw-p 00000000 00:00 0 
003bc000-003c2000 r-xp 00000000 08:01 263155     /usr/lib/libgstnet-0.10.so.0.26.0
003c2000-003c3000 r--p 00005000 08:01 263155     /usr/lib/libgstnet-0.10.so.0.26.0
003c3000-003c4000 rw-p 00006000 08:01 263155     /usr/lib/libgstnet-0.10.so.0.26.0
003c4000-00403000 r-xp 00000000 08:01 264986     /usr/lib/libgstbase-0.10.so.0.26.0
00403000-00404000 r--p 0003e000 08:01 264986     /usr/lib/libgstbase-0.10.so.0.26.0
00404000-00405000 rw-p 0003f000 08:01 264986     /usr/lib/libgstbase-0.10.so.0.26.0
00405000-004c7000 r-xp 00000000 08:01 263471     /usr/lib/libgstreamer-0.10.so.0.26.0
004c7000-004ca000 r--p 000c1000 08:01 263471     /usr/lib/libgstreamer-0.10.so.0.26.0
004ca000-004cc000 rw-p 000c4000 08:01 263471     /usr/lib/libgstreamer-0.10.so.0.26.0
004cc000-004cd000 rw-p 00000000 00:00 0 
004cd000-00595000 r-xp 00000000 08:01 753        /lib/libglib-2.0.so.0.2400.1
00595000-00596000 r--p 000c7000 08:01 753        /lib/libglib-2.0.so.0.2400.1
00596000-00597000 rw-p 000c8000 08:01 753        /lib/libglib-2.0.so.0.2400.1
00597000-005a4000 r-xp 00000000 08:01 760897     /usr/lib/pyshared/python2.6/gtk-2.0/glib/_glib.so
005a4000-005a5000 r--p 0000c000 08:01 760897     /usr/lib/pyshared/python2.6/gtk-2.0/glib/_glib.so
005a5000-005a7000 rw-p 0000d000 08:01 760897     /usr/lib/pyshared/python2.6/gtk-2.0/glib/_glib.so
005a7000-005c3000 r-xp 00000000 08:01 760896     /usr/lib/pyshared/python2.6/gtk-2.0/gobject/_gobject.so
005c3000-005c4000 r--p 0001b000 08:01 760896     /usr/lib/pyshared/python2.6/gtk-2.0/gobject/_gobject.so
005c4000-005c6000 rw-p 0001c000 08:01 760896     /usr/lib/pyshared/python2.6/gtk-2.0/gobject/_gobject.so
005c6000-005cc000 r-xp 00000000 08:01 131210     /lib/tls/i686/cmov/libnss_compat-2.11.1.so
005cc000-005cd000 r--p 00006000 08:01 131210     /lib/tls/i686/cmov/libnss_compat-2.11.1.so
005cd000-005ce000 rw-p 00007000 08:01 131210     /lib/tls/i686/cmov/libnss_compat-2.11.1.so
005ce000-005d5000 r-xp 00000000 08:01 266874     /usr/lib/libgstvideo-0.10.so.0.21.0
005d5000-005d6000 r--p 00006000 08:01 266874     /usr/lib/libgstvideo-0.10.so.0.21.0
005d6000-005d7000 rw-p 00007000 08:01 266874     /usr/lib/libgstvideo-0.10.so.0.21.0
005d7000-00617000 r-xp 00000000 08:01 526211     /usr/lib/pyshared/python2.6/libxml2mod.so
00617000-00618000 r--p 0003f000 08:01 526211     /usr/lib/pyshared/python2.6/libxml2mod.so
00618000-0061d000 rw-p 00040000 08:01 526211     /usr/lib/pyshared/python2.6/libxml2mod.so
0061d000-00630000 r-xp 00000000 08:01 131209     /lib/tls/i686/cmov/libnsl-2.11.1.so
00630000-00631000 r--p 00012000 08:01 131209     /lib/tls/i686/cmov/libnsl-2.11.1.so
00631000-00632000 rw-p 00013000 08:01 131209     /lib/tls/i686/cmov/libnsl-2.11.1.so
00632000-00634000 rw-p 00000000 00:00 0 
00634000-0063e000 r-xp 00000000 08:01 131212     /lib/tls/i686/cmov/libnss_files-2.11.1.so
0063e000-0063f000 r--p 00009000 08:01 131212     /lib/tls/i686/cmov/libnss_files-2.11.1.so
0063f000-00640000 rw-p 0000a000 08:01 131212     /lib/tls/i686/cmov/libnss_files-2.11.1.so
00640000-0064d000 r-xp 00000000 08:01 1048967    /usr/lib/python2.6/dist-packages/gst-0.10/gst/interfaces.soAborted
Comment 6 Stefan Sauer (gstreamer, gtkdoc dev) 2010-08-30 07:13:06 UTC
Irks, thousand times sorry. Bug in the mp3 decoder element. The example works fine. Edward, okay to add this after the freeze?
Comment 7 Stefan Sauer (gstreamer, gtkdoc dev) 2010-09-07 11:30:47 UTC
commit b921832369de0a84db57389749b4c9ed0091f016
Author: Артём Попов <artfwo@gmail.com>
Date:   Tue Sep 7 14:28:14 2010 +0300

    examples: add an example to show looping using segments
    
    Fixes #339772.