<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hey everyone,<br>
<br>
I'm working on a prototype video timeline interface, and I'm trying
to simplify how I'm using gStreamer. I've had a lot of really useful
feedback and help, and on this particular matter Matthew has been
especially helpful previously. The entire gStreamer team seems like
a lovely bunch of people. So hugs all around!<br>
<br>
Anyway - back to my problem. I'm using the cinder framework and want
to have gStreamers processed data end up on an OpenGL texture for me
to use. My currently working code does this in a fairly ugly manner.
It uses the following caps and pipeline:<br>
<br>
std::string CAPS = "video/x-raw,format=RGB,pixel-aspect-ratio=1/1";<br>
pipelineLaunchString = "uridecodebin uri=" + mPathToVideoFile + "
! videoconvert ! appsink name=sink caps=\"" + CAPS + "\"";<br>
<br>
and then waits for frames (samples) to arrive via the appsink
callback function, promptly copying and uploading the gStreamer data
on to the GPU for cinder to use. I basically have one OpenGL texture
I'm constantly supplying the data gStreamer delivers, to.<br>
<br>
Matthew suggested that by simply throwing in a 'glcolorscale'
element, the data would automatically get to the GPU by way of
gStreamer (instead of having me upload it). Great! So now my
pipeline and caps looks as follows:<br>
<br>
std::string CAPS =
"video/x-raw(memory:GLMemory),format=RGBA,pixel-aspect-ratio=1/1";<br>
pipelineLaunchString = "uridecodebin uri=" + mPathToVideoFile + "
! videoconvert ! glcolorscale ! appsink name=sink caps=\"" + CAPS +
"\"";<br>
<br>
But here's where adventures end and my questions begin... I'm
wondering about the following:<br>
<br>
1. Is defining 'video/x-raw(memory:GLMemory)' considered correct? Is
this how I should have the GL data flow to the appsink?<br>
<br>
2. I've looked at the cluttershare example which seems to use a
fakesink. Given that the data is now flowing over the GPU and the
end result I want in my hands is a texture ID leading me to the
video data (rather than the actual data), is it more proper to use a
fakesink than an appsink?<br>
<br>
3. And finally, I don't know much of clutter - in fact, I know
nothing at all, and the sample code is hard for me to figure out. I
am pretty clueless as how to actually get ahold of the GstGLMemory
object - could anyone give me a few hints or point me in the right
direction?<br>
<br>
Much obliged!<br>
Lasse<br>
<br>
<div class="moz-signature">-- <br>
Lasse Farnung Laursen<br>
Researcher at the University of Tokyo<br>
<a href="http://www.lasselaursen.com">www.lasselaursen.com</a><br>
FB: <a href="https://www.facebook.com/lasse.laursen">lasse.laursen
</a><br>
Twitter: <a href="https://twitter.com/PMP_J">@PMP_J</a></div>
</body>
</html>