[Bug 730749] New: Failed to determine keyframeness of audio/x-opus packet

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon May 26 01:22:47 PDT 2014


https://bugzilla.gnome.org/show_bug.cgi?id=730749
  GStreamer | gst-plugins-base | 1.2.4

           Summary: Failed to determine keyframeness of audio/x-opus
                    packet
    Classification: Platform
           Product: GStreamer
           Version: 1.2.4
        OS/Version: other
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gst-plugins-base
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: lee.matthews at spaceapplications.com
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


Using gstreamer-1.0-android-arm-1.2.4.1-debug I have built a streaming
application that receives an audio stream over a tcp connection. The stream is
encoded to opus and placed within an ogg container.

Whilst decoding the stream, I receive the following messages permanently in
logcat :

W/GStreamer+oggdemux(20979): 0:01:11.763208515 0x766b5780
gstoggstream.c:212:gst_ogg_stream_packet_is_key_frame Failed to determine
keyframeness of audio/x-opus packet
W/GStreamer+oggdemux(20979): 0:01:11.792104765 0x766b5780
gstoggstream.c:212:gst_ogg_stream_packet_is_key_frame Failed to determine
keyframeness of audio/x-opus packet
W/GStreamer+oggdemux(20979): 0:01:11.815665754 0x766b5780
gstoggstream.c:212:gst_ogg_stream_packet_is_key_frame Failed to determine
keyframeness of audio/x-opus packet
W/GStreamer+oggdemux(20979): 0:01:11.832747369 0x766b5780
gstoggstream.c:212:gst_ogg_stream_packet_is_key_frame Failed to determine
keyframeness of audio/x-opus packet
W/GStreamer+oggdemux(20979): 0:01:11.847653723 0x766b5780
gstoggstream.c:212:gst_ogg_stream_packet_is_key_frame Failed to determine
keyframeness of audio/x-opus packet

Here is the code that I use to build the audio pipeline :

/**
 * Initialise the audio network pipeline
 * Create the gstreamer elements
 * @param[in/out]
 * @param[in/out]
 */
int init_pipeline_stream()
{
    DEBUG("+init_pipeline_stream.\n");

    pipeline_audio_stream.pipeline  = gst_pipeline_new ("audio-stream");

    /* Create the elements */

    pipeline_audio_stream.tcpsrc    = gst_element_factory_make ("tcpclientsrc",
"source");
    if(!pipeline_audio_stream.tcpsrc) 
    {
        DEBUG("tcpclientsrc element could not be created.\n");
        return AUDIO_SINK_FAILURE;
    }

    pipeline_audio_stream.mux    = gst_element_factory_make ("oggdemux",    
"demux");
    if(!pipeline_audio_stream.mux) 
    {
        DEBUG("oggdemux element could not be created.\n");
        return AUDIO_SINK_FAILURE;
    }

    pipeline_audio_stream.decode    = gst_element_factory_make ("opusdec",     
"opus");
    if(!pipeline_audio_stream.decode) 
    {
        DEBUG("opusdec element could not be created.\n");
        return AUDIO_SINK_FAILURE;
    }

    pipeline_audio_stream.convert   = gst_element_factory_make ("audioconvert",
"convert");
    if(!pipeline_audio_stream.convert) 
    {
        DEBUG("audioconvert element could not be created.\n");
        return AUDIO_SINK_FAILURE;
    }

#ifdef __ANDROID__
        pipeline_audio_stream.audiosink = gst_element_factory_make
("openslessink", "audiosink");
    if(!pipeline_audio_stream.audiosink) 
    {
        DEBUG("openslessink element could not be created.\n");
        return AUDIO_SINK_FAILURE;
    }
#else
    pipeline_audio_stream.audiosink = gst_element_factory_make
("autoaudiosink", "audiosink");
    if(!pipeline_audio_stream.audiosink) 
    {
        DEBUG("autoaudiosink element could not be created.\n");
        return AUDIO_SINK_FAILURE;
    }
#endif

    DEBUG("-init_pipeline_stream.\n");

    return AUDIO_SINK_SUCCESS;
}


/**
 * Configure the audio network pipeline
 * Link the gstreamer elements
 * @param[in/out]
 * @param[in/out]
 */
int config_pipeline_stream()
{
    gboolean  status;
    gboolean link_ok;
    GstCaps *caps;

    // gst-launch -v tcpclientsrc host= port=7821 ! oggdemux ! opusdec !
audioconvert ! openslessink/autoaudiosink

    DEBUG("+config_pipeline_stream.\n");

    /* Build the pipeline. Note that we are NOT linking the source at this
point */
    status = gst_bin_add (GST_BIN (pipeline_audio_stream.pipeline),
pipeline_audio_stream.tcpsrc);
    if(!status) 
    {
        DEBUG("tcpclientsrc could not be added to pipeline.\n");
        return AUDIO_SINK_FAILURE;
    }

    status = gst_bin_add (GST_BIN (pipeline_audio_stream.pipeline),
pipeline_audio_stream.mux);
    if(!status) 
    {
        DEBUG("oggdemux could not be added to pipeline.\n");
        return AUDIO_SINK_FAILURE;
    }

    status = gst_bin_add (GST_BIN (pipeline_audio_stream.pipeline),
pipeline_audio_stream.decode);
    if(!status) 
    {
        DEBUG("opusdec could not be added to pipeline.\n");
        return AUDIO_SINK_FAILURE;
    }

    status = gst_bin_add (GST_BIN (pipeline_audio_stream.pipeline),
pipeline_audio_stream.convert);
    if(!status) 
    {
        DEBUG("audioconvert could not be added to pipeline.\n");
        return AUDIO_SINK_FAILURE;
    }

    status = gst_bin_add (GST_BIN (pipeline_audio_stream.pipeline),
pipeline_audio_stream.audiosink);
    if(!status) 
    {
        DEBUG("audiosink could not be added to pipeline.\n");
        return AUDIO_SINK_FAILURE;
    }

    link_ok = gst_element_link(pipeline_audio_stream.tcpsrc,
pipeline_audio_stream.mux);

    if (!link_ok)
    {
        DEBUG("Failed to link tcpsrc and decode mux!");
        return AUDIO_SINK_FAILURE;
    } 
    else
        DEBUG("Linked tcpsrc and mux elements!");

    // It is not possible to link the multiplexor to the decoder before the
stream has started.
    // The multiplexor needs to receive the stream before it knows whether the
contents contain
    // audio/video. A callback is used to perform the link once the oggdemux
sink pad is created.
    g_signal_connect (pipeline_audio_stream.mux, "pad-added", G_CALLBACK
(on_pad_added_stream), pipeline_audio_stream.decode);

     /* Set the capabilities between autoaudiosrc and volume elements */
    caps = gst_caps_new_simple ("audio/x-raw", "format", G_TYPE_STRING,
"S16LE", "rate", G_TYPE_INT, 
                    __audioSamplingRate, "channels", G_TYPE_INT,
__audioChannels,  NULL); 

    link_ok = gst_element_link_filtered (pipeline_audio_stream.decode,
pipeline_audio_stream.convert, caps);

    gst_caps_unref (caps);

    if (!link_ok)
    {
        DEBUG("Failed to link decode and convert elements!\n");
        return AUDIO_SINK_FAILURE;
    } 
    else
        DEBUG("Linked decode and convert elements.\n");

    link_ok = gst_element_link(pipeline_audio_stream.convert,
pipeline_audio_stream.audiosink);

    if(!link_ok) 
    {
        DEBUG("Unable to link elements.\n");
        return AUDIO_SINK_FAILURE;
    }    
    else
        DEBUG("Linked remaining elements\n");

    DEBUG("Setting tcpclientsrc config\n");
    g_object_set (pipeline_audio_stream.tcpsrc, "port",
AUDIO_SINK_INTERFACE_PORT, NULL); // set the port
    g_object_set (pipeline_audio_stream.tcpsrc, "host", "localhost", NULL); //
set the host

    DEBUG("-config_pipeline_stream.\n");

    return AUDIO_SINK_SUCCESS;
}

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list