Help: Handle stream from non-gst demux directly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Hi,
For some reason, I need handle the stream from a non-gst demux. I use the
GStreamer as follows:

                             | ---> queue2 [videoQ] ---> h264dec --->
overlay2sink
non-gst demux ---> |
                             | ---> queue2 [audioQ] ---> aacdec --->
alsasink


I put the audio into the sinkpad and video into the sinkpad of queue2. Just
like the code as follows:

non-gst-demux.onVideo(guint timestamp, guint8 *data, guint size)
{
      // The x-h264 NAL data

      gst_playback->inputVideo(timestamp, data, size);
}

non-gst-demux.onAudio(guint timestamp, guint8 *data, guint size)
{
      gst_playback->inputAudio(timestamp, data, size);
}


GstPad *audioP = gst_element_get_static_pad(audioQ, "sink");
GstPad *videoP = gst_element_get_static_pad(videoQ, "sink");

......inputVideo(guint timestamp, guint8 *data, guint size)
{
    GstBuffer *buffer = gst_buffer_new_and_alloc(size);

    memcpy(GST_BUFFER_DATA(buffer), data, size);
    GST_BUFFER_SIZE(buffer) = size;
    GST_BUFFER_TIMESTAMP(buffer) = timeStamp;

    gst_pad_chain(m_videoP, buffer);
}

......

It seems that it only can play the first frame. I got the info that the
queue buffer was full frequently. Does somebody can help me out of the
trouble? And any advices are warmly welcome!





-- 
   H.Y
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-embedded/attachments/20090805/c9790223/attachment.htm>


[Index of Archives]     [Linux Embedded]     [Linux ARM Kernel]     [Linux for ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux Media]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux