[gst-devel] How to play video using gstreamer/c++
Marlos C. Machado
marlos at dcc.ufmg.br
Fri Oct 22 19:56:27 CEST 2010
Hello, I need to play this line on gstreamer using c++:
filesrc location=Video2.avi ! decodebin2 name=dec ! queue ! ffmpegcolorspace
! autovideosink dec. ! queue ! audioconvert ! audioresample ! autoaudiosink
This code does this:
*#include <gst/gst.h>
int main(int argc, char *argv[])
{
char str [] = "filesrc location=Video2.avi ! decodebin2 name=dec ! \
queue ! ffmpegcolorspace ! autovideosink dec. ! \
queue ! audioconvert ! audioresample ! autoaudiosink";
GError *error = NULL;
GstElement *element;
gst_init (&argc, &argv);
element = gst_parse_launch(str, &error);
gst_element_set_state (element, GST_STATE_PLAYING);
if (!element) {
fprintf (stderr, "Parse error: %s\n", error->message);
exit(1);
}
while(1){}
return 1;
}*
But I need to play this video on a texture, how do I bind the video with a
texture in OpenGL, for example? I mean, I do not know how to access the
stream, the code above plays on a window created by gstreamer.
If I'm able to access the stream i'm able to bind it to OpenGL. I'd prefer
to use no-specific OpenGL plugins since I do not know what rendering system
I'm going to use.
Thanks a lot!
--
Marlos Cholodovskis Machado
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20101022/e08f720b/attachment.htm>
More information about the gstreamer-devel
mailing list