<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hello Thiago<br>
<br>
Thanks for your suggestions. I read the playbin2 docs, and it said
that I could use the fakesink's handoff signal to grab the buffer from
the playbin2 video. I tried to set that up, but my signal handler
never gets called. Here is the code snippet that I have:<br>
<br>
static void<br>
cb_handoff (GstElement *fakesink,<br>
GstBuffer *buffer,<br>
GstPad *pad,<br>
gpointer user_data)<br>
{<br>
static gboolean white = FALSE;<br>
<br>
/* this makes the image black/white */<br>
printf("new buffer is happening\n");<br>
}<br>
<br>
<br>
.... Initlization function stuff ....<br>
<br>
videosink = gst_element_factory_make ("fakesink", "videosink");<br>
g_object_set (G_OBJECT (videosink), "signal-handoffs", TRUE,
NULL);<br>
g_signal_connect (videosink, "handoff", G_CALLBACK
(cb_handoff), NULL);<br>
gs_data->pipeline = gst_element_factory_make ("playbin2",
"my-player");<br>
g_object_set (G_OBJECT (gs_data->pipeline), "video-sink",
videosink, NULL);<br>
g_object_set (G_OBJECT (gs_data->pipeline), "uri",
"<path_to_mp4>", NULL);<br>
<br>
This plays the sound from the mp4, but I can't grab the buffer. Am I
missing a step? Do I have to setup a video-bin, with a filter,
converter, and sink?<br>
<br>
Thanks,<br>
Rodney<br>
<br>
On 10-05-31 11:40 PM, <a class="moz-txt-link-abbreviated" href="mailto:thiagossantos@gmail.com">thiagossantos@gmail.com</a> wrote:
<blockquote
cite="mid:AANLkTinXRiwvDfLkyNngT243A2RVfEvO31i_on5eDVvk@mail.gmail.com"
type="cite"><br>
<br>
<div class="gmail_quote">On Mon, May 31, 2010 at 11:53 PM, Rodney
Dowdall <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:rdowdall@cranksoftware.com">rdowdall@cranksoftware.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">Hello<br>
<br>
I am trying to play the audio and the video from a mp4 file. If I run
the following line:<br>
<br>
gst-launch -vvvvv --gst-debug-level=2 playbin
uri=<a moz-do-not-send="true">file:///</a><path_to_mp4_file><br>
<br>
Then it plays the file's audio. I'm not putting the video anywhere, so
I can't see if it is playing or not, but I assume it is based on the
debug output. <br>
<br>
If I do the following line:<br>
<br>
gst-launch -vvv --gst-debug-level=2 filesrc
location=<path_to_mp4_file> ! decodebin2 name=decoder decoder. !
audioconvert ! audioresample ! osssink decoder. ! ffmpegcolorspace !
xvimagesink<br>
<br>
It hangs at:<br>
<br>
Setting pipeline to PAUSED ..<br>
/GstPipeline:pipeline0/GstDecodeBin2:decoder/GstTypeFindElement:typefind.GstPad:src:
caps
= audio/x-m4a<br>
Pipeline is PREROLLING ...<br>
<audio debug output snipped><br>
</div>
</blockquote>
<div><br>
You need to put 'queue' after each decodebin2's branch to start a new
thread for them. The docs should have some more information about this:
<a moz-do-not-send="true"
href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-threads.html#section-threads-uses">http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-threads.html#section-threads-uses</a><br>
</div>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000"> <br>
I need to open this file in C code, and grab access to the buffers. I
was planning on using appsink to do it, but any time I pass in a video
sink to the pipeline, it just hangs, never playing the audio, or moving
forward. As I said, I need access to the video buffer, so either I
need a way to grab it from the pipeline created from gst_parse_launch,
or I was thinking that if I set up the pipeline myself, I could use a
handoff signal on the last video sink, or mayber use the appsink
methods. <br>
</div>
</blockquote>
<div><br>
FYI, you can set the video-sink property in playbin2 to your appsink
and get the buffers from there.<br>
</div>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000"><br>
I have a feeling that I am missing something simple, and was hoping
someone could point that out. <br>
<br>
Thanks,<br>
Rodney<br>
<div>-- <br>
<br>
<p><font face="Arial, sans-serif"><font style="font-size: 10pt;"
size="2"><b>Rodney
Dowdall<br>
</b></font></font><font face="Arial, sans-serif"><font
style="font-size: 10pt;" size="2"><b>Crank
Software Inc.<br>
</b></font></font><font color="#b4d023"><font
face="Arial, sans-serif"><font style="font-size: 10pt;" size="2"><span
lang="en-US"><b>Office</b></span></font></font></font><font
face="Arial, sans-serif"><font style="font-size: 10pt;" size="2"><span
lang="en-US">:
613-595-1999<br>
</span></font></font><font color="#b4d023"><font
face="Arial, sans-serif"><font style="font-size: 10pt;" size="2"><span
lang="en-US"><b>Online</b></span></font></font></font><font
face="Arial, sans-serif"><font style="font-size: 10pt;" size="2"><span
lang="en-US">:
</span></font></font><font color="#0000ff"><font
face="Calibri, sans-serif"><font style="font-size: 10pt;" size="2"><span
lang="en-US"><a moz-do-not-send="true"
href="http://www.cranksoftware.com/" target="_blank">www.cranksoftware.com</a><br>
</span></font></font></font><font color="#b4d023"><font
face="Arial, sans-serif"><font style="font-size: 10pt;" size="2"><span
lang="en-US"><b>Check
out</b></span></font></font></font><font face="Arial, sans-serif"><font
style="font-size: 10pt;" size="2"><span lang="en-US">:
</span></font></font><a moz-do-not-send="true"
href="http://cranksoftware.com/blog/" target="_blank"><font
color="#0000ff"><font face="Calibri, sans-serif"><font
style="font-size: 10pt;" size="2"><span lang="en-US">Crank
Software’s Blog</span></font></font></font></a></p>
<p style="margin-bottom: 0cm;"><br>
</p>
</div>
</div>
<br>
------------------------------------------------------------------------------<br>
<br>
<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a moz-do-not-send="true"
href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
<a moz-do-not-send="true"
href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel"
target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
Thiago Sousa Santos<br>
</blockquote>
<br>
<br>
<div class="moz-signature">-- <br>
<meta http-equiv="CONTENT-TYPE"
content="text/html; charset=windows-1252">
<title></title>
<meta name="GENERATOR" content="OpenOffice.org 3.2 (Unix)">
<meta name="AUTHOR" content="Rodney Dowdall">
<meta name="CREATED" content="20100531;22163400">
<meta name="CHANGEDBY" content="Rodney Dowdall">
<meta name="CHANGED" content="20100531;22324000">
<style type="text/css">
        <!--
                @page { margin: 2cm }
                P { margin-bottom: 0.21cm }
                A:link { so-language: zxx }
        -->
        </style>
<p><font face="Arial, sans-serif"><font style="font-size: 10pt;"
size="2"><b><br>
Rodney
Dowdall<br>
</b></font></font><font face="Arial, sans-serif"><font
style="font-size: 10pt;" size="2"><b>Crank
Software Inc.<br>
</b></font></font><font color="#b4d023"><font face="Arial, sans-serif"><font
style="font-size: 10pt;" size="2"><span lang="en-US"><b>Office</b></span></font></font></font><font
face="Arial, sans-serif"><font style="font-size: 10pt;" size="2"><span
lang="en-US">:
613-595-1999<br>
</span></font></font><font color="#b4d023"><font
face="Arial, sans-serif"><font style="font-size: 10pt;" size="2"><span
lang="en-US"><b>Online</b></span></font></font></font><font
face="Arial, sans-serif"><font style="font-size: 10pt;" size="2"><span
lang="en-US">:
</span></font></font><font color="#0000ff"><font
face="Calibri, sans-serif"><font style="font-size: 10pt;" size="2"><span
lang="en-US"><a href="http://www.cranksoftware.com/">www.cranksoftware.com</a><br>
</span></font></font></font><font color="#b4d023"><font
face="Arial, sans-serif"><font style="font-size: 10pt;" size="2"><span
lang="en-US"><b>Check
out</b></span></font></font></font><font face="Arial, sans-serif"><font
style="font-size: 10pt;" size="2"><span lang="en-US">:
</span></font></font><a href="http://cranksoftware.com/blog/"><font
color="#0000ff"><font face="Calibri, sans-serif"><font
style="font-size: 10pt;" size="2"><span lang="en-US">Crank
Software’s Blog</span></font></font></font></a></p>
<p style="margin-bottom: 0cm;"><br>
</p>
</div>
</body>
</html>