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 337625 - [patch] Streaming support for wavparse
[patch] Streaming support for wavparse
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.10.2
Other Linux
: Normal normal
: 0.10.3
Assigned To: Stefan Sauer (gstreamer, gtkdoc dev)
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-04-07 13:27 UTC by Tommi Myöhänen
Modified: 2006-04-28 23:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for wavparse that contains streaming support (17.27 KB, patch)
2006-04-07 13:29 UTC, Tommi Myöhänen
none Details | Review
Patch for wavparse that contains streaming support (28.16 KB, patch)
2006-04-26 21:15 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
none Details | Review
Patch for wavparse that contains streaming support (28.30 KB, patch)
2006-04-28 08:21 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
none Details | Review

Description Tommi Myöhänen 2006-04-07 13:27:45 UTC
Wavparse element lacks streaming support. Attached is patch that contains push-based functionality for GstWavparse element.
Comment 1 Tommi Myöhänen 2006-04-07 13:29:34 UTC
Created attachment 62911 [details] [review]
Patch for wavparse that contains streaming support

Please feel free to review and comment the patch.
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2006-04-17 20:07:55 UTC
Tommi, can you give an example gst-launch line to test the streaming support?
Comment 3 Tommi Myöhänen 2006-04-18 10:15:09 UTC
Here is one example:
gst-launch-0.10 gnomevfssrc location=http://www.moviewavs.com/0058493028/WAVS/Movies/2001/2001_theme.wav ! gstwavparse ! osssink
Comment 4 Tim-Philipp Müller 2006-04-18 10:26:48 UTC
Stefan: you could also just add a 'queue' after filesrc or gnomevfssrc, that will make wavparse operate chain-based as well.
Comment 5 Edward Hervey 2006-04-22 19:48:02 UTC
patch seems fine.

One comment though, this :
+ * Copyright (C) <2006> Nokia Corporation.

It would be more productive to put your actual name and email adress (possible your nokia.com one) instead of just the company hiring you. Like:
+ * Copyright (C) <2006> Tommi Myohanen <ext-tommi.myohanen@nokia.com>

It's still puts your company there, but most importantly you, the person who wrote that code and to which we can ask questions if bugs/issues about that file are seen later on.
Comment 6 Stefan Sauer (gstreamer, gtkdoc dev) 2006-04-26 20:05:43 UTC
there is still a problem with the streaming behaviour: after the first _chain() call it switches back to _loop() - huh?:

$ gdb --args gst-launch-0.10 filesrc location=/home/ensonic/temp/gsr-record-Untitled-7547.g02Kwn.wav ! queue ! wavparse ! audioconvert ! alsasink

(gdb) break gst_wavparse_stream_data
Function "gst_wavparse_stream_data" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (gst_wavparse_stream_data) pending.
(gdb) run
Starting program: /usr/bin/gst-launch-0.10 filesrc location=/home/ensonic/temp/gsr-record-Untitled-7547.g02Kwn.wav \! queue \! wavparse \! audioconvert \! alsasink

Breakpoint 2, gst_wavparse_stream_data (wav=0xb71ec1dc) at gstwavparse.c:1335
1335    {
(gdb) bt

Thread NaN (LWP 22452)

  • #0 gst_wavparse_stream_data
    at gstwavparse.c line 1335
  • #1 gst_wavparse_loop
    at gstwavparse.c line 1502
  • #2 gst_task_func
    at gsttask.c line 193
  • #3 g_thread_pool_free
    from /usr/lib/libglib-2.0.so.0
  • #4 ??
    from /usr/lib/libglib-2.0.so.0

Comment 7 Stefan Sauer (gstreamer, gtkdoc dev) 2006-04-26 21:15:30 UTC
Created attachment 64350 [details] [review]
Patch for wavparse that contains streaming support

previous patch was sending events on unallocated pad
TODO: figure out why push mode falls back to pull mode after first buffer
Comment 8 Tim-Philipp Müller 2006-04-26 23:09:35 UTC
Minor nitpick:

+  if (gst_pad_is_linked (wav->srcpad)) {
+    if ((res = gst_pad_push (wav->srcpad, buf)) != GST_FLOW_OK)
+      goto push_error;
+  } else {
+    gst_buffer_unref (buf);
+    goto not_linked;
+  }

that's unnecessary, if not racy. There's no need to check if the pad is linked in advance, GST_FLOW_NOT_LINKED should just be handled like any other non-FLOW_OK flow value.
Comment 9 Stefan Sauer (gstreamer, gtkdoc dev) 2006-04-28 08:21:08 UTC
Created attachment 64452 [details] [review]
Patch for wavparse that contains streaming support

now streaming works