My application had a pipeline execution model based on plugin filters, like GStreamer and DirectShow: <br><br> aquisition => decompression => processing => vizualization => compression => storage => transmission<br>
<br>The main codecs that the decompression uses are: jpeg, mpeg4 and h264 (the codecs used by camera manufacturers). If I run my application in a Intel based machine, I'm using Intel IPP to do the decoding, but if I'm using a AMD or some kind of embeded systems that uses ffmpeg, I use ffmpeg to decode frames. Suppose that I want to use OMAP from Texas Instruments.... that board uses GStreamer with a plugin from texas that use the texas DSP. Is it possible I call a Gstreamer API to do only the decoding step? like I do with ffmpeg....<br>
<br>bool load_decoder(...) {<br> /* alloc and initialize AVCodecContext */<br> m_pCodecCtx = avcodec_alloc_context();<br> <br>/* set AVCodecContext properties */<br> m_pCodecCtx->codec_type = CODEC_TYPE_VIDEO; /* video codec type */<br>
<br> if (_cameraInfo.decoder == "mpeg4") {<br> m_pCodecCtx->codec_id = CODEC_ID_MPEG4; /* MJPEG decoder id */<br> } else if (_cameraInfo.decoder == "jpeg") {<br> m_pCodecCtx->codec_id = CODEC_ID_MJPEG; /* MJPEG decoder id */<br>
} else if (_cameraInfo.decoder == "h264") {<br> m_pCodecCtx->codec_id = CODEC_ID_H264; /* MJPEG decoder id */<br> } <br> <br> m_pCodecCtx->width = _cameraInfo.width; /* image width */<br>
m_pCodecCtx->height = _cameraInfo.height; /* image height */<br> m_pCodecCtx->flags |= CODEC_FLAG_EMU_EDGE | CODEC_FLAG_PART;<br> <br> /* find the decoder for the video stream */<br> m_pCodec = avcodec_find_decoder(m_pCodecCtx->codec_id);<br>
if (!m_pCodec) {<br> m_strError = string("Unable to locate codec decoder");<br> return false;<br> }<br><br> /* open codec */<br> if (avcodec_open(m_pCodecCtx, m_pCodec) < 0) {<br> m_strError = "Cannot open codec";<br>
return false;<br> }<br><br> /* alloc audio/video frame */<br> m_pFrame = avcodec_alloc_frame();<br> if (!m_pFrame) {<br> m_strError = "Cannot alloc audio/video frame";<br> return false;<br>
}<br>}<br><br><br><br><br><div class="gmail_quote">2010/3/19 wl2776 <span dir="ltr"><<a href="mailto:wl2776@gmail.com">wl2776@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br>
<br>
Nuno Cardoso-2 wrote:<br>
><br>
> The gstreamer framework uses ffmpeg codecs to encode/decode data?<br>
><br>
</div>Most of codecs don't use ffmpeg's codecs.<br>
There is a separate plugin, gst-ffmpeg, which uses ffmpeg's muxers, demuxers<br>
and codecs.<br>
<div class="im"><br>
<br>
Nuno Cardoso-2 wrote:<br>
><br>
> Or can I develop a gstreamer plugin for my application that uses decoders<br>
> from<br>
> gstreamer?<br>
><br>
</div>Surely, nothing can stop you from developing a plugin.<br>
There is a Plugin Writers' Guide and a template, which you can get from git<br>
repository.<br>
<br>
However, FFmpeg is very different from the GStreamer in the concepts.<br>
FFmpeg allows you to get an encoded frame or a decoded picture in memory<br>
(and encoding also).<br>
If you need to draw it, or sync with audio data, then you're on your own.<br>
<br>
GStreamer provides a pipeline, allowing media data to stream from a source<br>
(file, device, network server, ...) to a sink (screen, sound card, file,<br>
etc) and takes care about synchronization.<br>
<font color="#888888">--<br>
View this message in context: <a href="http://n4.nabble.com/gstreamer-decoder-tp1599272p1599309.html" target="_blank">http://n4.nabble.com/gstreamer-decoder-tp1599272p1599309.html</a><br>
</font><div class="im">Sent from the GStreamer-devel mailing list archive at Nabble.com.<br>
<br>
------------------------------------------------------------------------------<br>
</div><div><div></div><div class="h5">Download Intel&#174; Parallel Studio Eval<br>
Try the new software tools for yourself. Speed compiling, find bugs<br>
proactively, and fine-tune applications for parallel performance.<br>
See why Intel Parallel Studio got high marks during beta.<br>
<a href="http://p.sf.net/sfu/intel-sw-dev" target="_blank">http://p.sf.net/sfu/intel-sw-dev</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
</div></div></blockquote></div><br>