[gst-embedded] Help: Handle stream from non-gst demux directly
H Y
hy110001 at gmail.com
Wed Aug 5 03:15:00 PDT 2009
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>
More information about the Gstreamer-embedded
mailing list