Results 1 to 7 of 7

Thread: Recording from Gstreamer fails (stops at PAUSED state)

  1. #1
    Join Date
    Jan 2006
    Location
    Grønland,Oslo
    Beans
    618

    Recording from Gstreamer fails (stops at PAUSED state)

    Hello,
    I have started to port my audio-recorder to Ubuntu 12.10. The recorder uses Gstreamer-pipeline to record sound from all kinds of audio devices.

    The problem is this:
    The recording pipeline stops very, very often at PAUSED state. It's virtually impossible to make the pipeline rolling after it blocks at PAUSED. Stopping the pipeline freezes the application/GUI and it has to be killed off. Only each 5.th attempt of recording succeeds.

    Here is a minimal test-application (test10.c).
    Please grab it, compile and test it on your Ubuntu 12.10 installation.
    Ref: http://www.futuredesktop.org/tmp/test10.c

    Compile it:
    Code:
    gcc -Wall test10.c -o test10 $(pkg-config --cflags --libs gtk+-3.0 gthread-2.0 gstreamer-0.10)
    
    And run:
    ./test10
    Click the [Create pipeline/start recording] button to create a recording-pipeline. It should go to GST_STATE_PLAYING state.

    This is a normal output.
    It outputs level values (audio peak values) in a terminal window.
    Code:
    Setting state to GST_STATE_PLAYING. Should NOT stop at PAUSED!
    Pipeline state changed from NULL to: READY  (stat=PAUSED pending=PLAYING).
    Pipeline state changed from READY to: PAUSED  (stat=PAUSED pending=PLAYING).
    Pipeline state changed from PAUSED to: PLAYING  (stat=PLAYING pending=VOID_PENDING).
    level value=0.140
    level value=0.219
    level value=0.249
    level value=0.163
    ...
    level value=0.250
    This is erroneus output.
    The pipeline stops at PAUSED, and PLAYING state is pending for ever/forever.
    Code:
    Setting state to GST_STATE_PLAYING. Should NOT stop at PAUSED!
    Pipeline state changed from NULL to: READY  (stat=PAUSED pending=PLAYING).
    Pipeline state changed from READY to: PAUSED  (stat=PAUSED pending=PLAYING).
    This works absolutely correct on Ubuntu 12.04.

    The audio-recorder in question:
    https://launchpad.net/audio-recorder

    EDIT: GNOME's own sound recorder has the same issue. It freezes too.
    The funny
    Last edited by moma; October 8th, 2012 at 02:08 PM.

  2. #2
    Join Date
    Jun 2007
    Beans
    13,019

    Re: Recording from Gstreamer fails (stops at PAUSED state)

    seems to work ok (test10), starts, stops, starts, ect. or starts, pause, continue, pause, continue, ect.

    Haven't had it refuse to start. The only 'issue' with test10 is it records at a fairly low volume compared to regular ar

    (previously had tested precise version in 12.10 - it also worked ok though occasionally the indicator would lock up & do nothing

  3. #3
    Join Date
    Jan 2006
    Location
    Grønland,Oslo
    Beans
    618

    Re: Recording from Gstreamer fails (stops at PAUSED state)

    Hello
    Very good mc4man.
    I used rather old image to install this Ubuntu 12.10, although I upgraded it with latest packages. I will make a re-installation. I will let you know the result after that (maybe tomorrow ou quarta-feira).

    Ok, I marked the latest code good-enough and pumped it to launchpad.net". Replaced GTK3's deprecated functions with newer syntax.
    $ bzr push lp:~osmoma/audio-recorder/trunk
    Pushed up to revision 194.
    http://bazaar.launchpad.net/~osmoma/...trunk/changes/
    Of course, the code is not tested at all because the pipeline-bug.
    Last edited by moma; October 8th, 2012 at 08:51 PM.

  4. #4
    Join Date
    May 2008
    Beans
    1,020

    Re: Recording from Gstreamer fails (stops at PAUSED state)

    It would be nice if you'd use gstreamer1.0 instead of gstreamer0.10 ?
    OB-untu. #!crunchbang

  5. #5
    Join Date
    Jan 2006
    Location
    Grønland,Oslo
    Beans
    618

    Re: Recording from Gstreamer fails (stops at PAUSED state)

    Hello,
    Good idea Xebian.

    Will Gstreamer 1.0 be installed in Ubuntu 12.10 and Fedora 18 as default? Or should I make Gstreamer 1.0 a dependency of audio-recorder so it is installed automatically.

    EDIT: The changes in audio-recorder for Gstreamer-1.0 are relatively few. I also compiled the sample test10.c with gstreamer-1.0 and it has the same failure (as gstreamer-0.10) on this Quantal-machine.

    Ref: http://cgit.freedesktop.org/gstreame...ing-to-1.0.txt

    I have decided to go for Gstreamer 1.0. I cannot see any good reason for this move, but it has to be done sooner or later; and the word sooner tastes better.
    Last edited by moma; October 9th, 2012 at 01:37 PM.

  6. #6
    Join Date
    Jan 2006
    Location
    Grønland,Oslo
    Beans
    618

    Re: Recording from Gstreamer fails (stops at PAUSED state)

    Re-hello,
    Ok, the application behaves much better after new 12.10 installation. So that bug is now buried.

    Other coisas:

    The recorder uses libgnome-media-profiles-dev to get audio- profiles from GNOME's configuration registry.

    Start gconf-editor and browse to:
    system -> gstreamer -> 0.10 -> audio -> profiles.

    This library now fails when ran with Gstreamer 1.0.

    The error lies in gm_audio_profile_get_active_list() function.

    It obviously tries to create gstreamer1.0 pipelines from Gstreamer 0.10 profiles, and prints:

    (audio-recorder:8810): GStreamer-WARNING **: 0.10-style raw audio caps are being created. Should be audio/x-raw,format=(string).. now.

    (audio-recorder:8810): GStreamer-WARNING **: 0.10-style raw audio caps are being created. Should be audio/x-raw,format=(string).. now.
    ....
    ....
    And it fails to return values.

    To support Gstreamer 1.0, they should replace "audio/x-raw-int" and "audio/x-raw-float" with "audio/x-raw".
    Eg. see: https://wiki.ubuntu.com/Novacut/GStreamer1.0

    Gstreamer 1.0 should have its own values in GNOME's registry (in GConf or DConf) with path: system -> gstreamer -> 1.0 -> audio -> profiles.

    Any opinions.
    -------

    EDIT: I can temporarily avoid this error by using gm_audio_profile_get_list() instead of gm_audio_profile_get_active_list().

    GList *gm_audio_profile_get_list(void);

    // This fails: media_profiles_list = gm_audio_profile_get_active_list();
    media_profiles_list = gm_audio_profile_get_list ();

    We have to wait util Totem or some other GNOME-app upgrades to Gstreamer 1.0 and puts new values to DGonf or CGonf registry.

    Until then we use this implementation.
    http://bazaar.launchpad.net/~osmoma/...dia-profiles.c

    EDIT: Another small bug resolved here.
    http://lists.freedesktop.org/archive...er/037526.html

    Things look good.
    Last edited by moma; October 12th, 2012 at 09:20 PM.

  7. #7
    Join Date
    Jan 2006
    Location
    Grønland,Oslo
    Beans
    618

    Re: Recording from Gstreamer fails (stops at PAUSED state)

    Re-hi,
    Audio-recorder for Ubuntu 12.10/Gstreamer 1.0 is starting to take shape. I have only tested basic recording tasks but it behaves very well.

    Go on and test you too. Grab the code from
    https://code.launchpad.net/audio-recorder
    INSTALL file will tell you about dependencies.
    Last edited by moma; October 12th, 2012 at 11:43 AM.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •