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 666626 - [dtmfsrc] Fixing source pad event handler
[dtmfsrc] Fixing source pad event handler
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 0.11.x
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-12-21 01:06 UTC by tiagokatcipis
Modified: 2012-07-09 16:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch that fixes the source pad event handler (1.12 KB, patch)
2011-12-21 01:06 UTC, tiagokatcipis
needs-work Details | Review

Description tiagokatcipis 2011-12-21 01:06:22 UTC
Created attachment 204007 [details] [review]
patch that fixes the source pad event handler

I had some problems using the dtmfsrc plugin on blackfin (uCLinux), taking a look at the code, this seemed to be the problem:

gstbin.c(2375): gst_bin_do_latency_func (): /GstPipeline:pipeline3:
Failed to configure latency of 0:00:00.210000000 Internal GStreamer error: clock problem. Please file a bug at http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer.

Following up the cause of the error it seems that it is caused by the dtmfsrc gst_dtmf_src_handle_event function that is always returning FALSE when the event is not of type GST_EVENT_CUSTOM_UPSTREAM. Calling the GstBaseSrc event function when the event is not of type GST_EVENT_CUSTOM_UPSTREAM resolved my problem (when a latency message was received it was returning FALSE, causing the error).

The only thing i don't understand is why it only happens on blackfin, but with the attached patch it seems to work fine now, on blackfin and on x86.

Dont know if i handled this the right way, but at least is working now, i hope the patch helps.

Best regards,
Tiago Katcipis
Comment 1 Olivier Crête 2011-12-21 01:33:32 UTC
Review of attachment 204007 [details] [review]:

You're definitely right that something is wrong here..

::: gst/dtmf/gstdtmfsrc.c
@@ +412,3 @@
   GST_DEBUG_OBJECT (dtmfsrc, "Received an event on the src pad");
   if (GST_EVENT_TYPE (event) == GST_EVENT_CUSTOM_UPSTREAM) {
+    return gst_dtmf_src_handle_custom_upstream (dtmfsrc, event);

I would do this and always pass it to the base class in case BaseSrc starts accepting some custom upstream events in the future

if (GST_EVENT_TYPE (event) == GST_EVENT_CUSTOM_UPSTREAM)
 gst_dtmf_src_handle_custom_upstream (dtmfsrc, event)
Comment 2 Tim-Philipp Müller 2012-07-08 10:52:29 UTC
I couldn't reproduce the problem you described, but I agree it's all a bit wrong. I've pushed this to git master now:

 commit ea65e5d501b048453d6816c3557e17d2f7833d65
 Author: Tim-Philipp Müller <tim@centricular.net>
 Date:   Sun Jul 8 00:08:55 2012 +0100

    dtmfsrc: pass unhandled non-custom events to the base class
    
    https://bugzilla.gnome.org/show_bug.cgi?id=666626

Please re-open if there are still issues remaining.
Comment 3 tiagokatcipis 2012-07-09 16:47:38 UTC
(In reply to comment #2)
> I couldn't reproduce the problem you described, but I agree it's all a bit
> wrong. I've pushed this to git master now:
> 
>  commit ea65e5d501b048453d6816c3557e17d2f7833d65
>  Author: Tim-Philipp Müller <tim@centricular.net>
>  Date:   Sun Jul 8 00:08:55 2012 +0100
> 
>     dtmfsrc: pass unhandled non-custom events to the base class
> 
>     https://bugzilla.gnome.org/show_bug.cgi?id=666626
> 
> Please re-open if there are still issues remaining.

I cant reproduce it on a PC either. It only happens on my embedded environment, which is Blackfin 537 processor + development board + uCLinux 2010.

With the patch the problem seems to be solved, it works fine on PC and on my embedded environment.
Comment 4 Tim-Philipp Müller 2012-07-09 16:49:51 UTC
Great, thanks for confirming.