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
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Gstreamer-embedded mailing list
Gstreamer-embedded@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstreamer-embedded

Reply via email to