[gst-devel] appsrc and appsink elements

Stefan Kost ensonic at hora-obscura.de
Tue Jan 6 14:15:26 CET 2009


Andres Colubri schrieb:
> Hi,
> 
> I've been struggling for a while with the appsrc element, and I wonder 
> if anyone has any ideas about this. Basically, I'm trying to capture the 
> contents of the screen into a video file. I'm not sure how to construct 
> the pipeline to do it. I know that it has to start with an appsrc and 
> end at a filesink, but I don't know how to initialize the appsrc (caps, 
> max-bytes, etc) and what other intermediate elements are needed 
> (encoders, demuxers). I looked at the examples that come with the source 
> of appsrc, but these are for different scenarios (reading data from a 
> file, streaming).

Appsrc is for injecting data from applications. Appsrc & appsink allow to
integrate gstreamer into a mulimedia application that uses a diffrent framework
already.
For screencapture you could use ximagesrc at the start of your pipeline.

Stefan

> 
> Any help will be greatly appreciated.
> 
> Thanks,
> Andres
> 
> 
> Jure Zitnik wrote:
>> Hi Andres,
>> The appsrc and appsink are not part of the binary gstreamer-plugins-bad 
>> package on ubuntu 8.10 (reasoning is that they "still randomly change 
>> API and ABI" :-)
>> But you can always build them from source:
>> apt-get source gstreamer0.10-plugins-bad
>> cd gst-plugins-bad0.10-0.10.5 (you might need to cange the version here)
>> ./configure
>> make
>>
>> After successful build, you can copy required shared libraries manually 
>> (if you just need appsrc/appsink) as follows:
>> cp gst/app/.libs/libgstapp.so /usr/lib/gstreamer-0.10/
>> cp gst-libs/gst/app/.libs/libgstapp-0.10.so.0.0.0  /usr/local/lib
>> You might need to create additional symbolic links in /usr/local/lib 
>> (both linking to libgstapp-0.10.so.0.0.0) : libgstapp-0.10.so.0 and 
>> libgstapp-0.10.so
>>
>> Now use gst-inspect to see if everything works fine...
>>
>> Jure
>>
>> Andres Colubri wrote:
>>   
>>> Hello,
>>>
>>> I have tried to use appsrc, but for some reason it doesn't seem to be
>>> recognized (I'm using gst-plugins-bad 0.10.8 on ubuntu 0.8.10) by
>>> gstreamer. For example, when I run the appsrc_ex example, I get an
>>> assertion error right after
>>> app->src = gst_element_factory_make("appsrc", NULL);
>>> so seems that app->src is null
>>>
>>> Also, gst-inspect doesn't find neither appsrc nor appsink.
>>>
>>> Thanks
>>> Andres
>>>
>>> Wim Taymans wrote:
>>>   
>>>     
>>>> On Wed, 2008-07-30 at 12:03 +0200, David SIORPAES wrote:
>>>>
>>>>     
>>>>       
>>>>> Hello,
>>>>>
>>>>> I would like to exchange buffers which are allocated and managed by an
>>>>> application of mine to and from a GStreamer pipeline.
>>>>>
>>>>> By reading the documentation it looks like the appsrc/appsink are the
>>>>> solution for me, but I am also reading here
>>>>> http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/section-data-spoof.html
>>>>> that
>>>>>
>>>>> "New API is being developed at the moment to make data insertion and
>>>>> extraction less painful for applications. It can be found as GstAppSrc
>>>>> and GstAppSink in the gst-plugins-bad module. At the time of writing
>>>>> (October 2007), this API is not quite stable and ready yet, even though
>>>>> it may work fine for your purposes."
>>>>>
>>>>> So, may I ask whether it is safe to use such elements or not ? Or are
>>>>> there alternative solutions ?
>>>>>
>>>>>       
>>>>>         
>>>> The versionsof appsink/appsrc in the latest release of gst-plugins-bad
>>>> are full-featured and ready for consumption. See
>>>> http://webcvs.freedesktop.org/gstreamer/gst-plugins-bad/examples/app/
>>>> for a whole bunch of examples of different use cases.
>>>>
>>>> Wim
>>>>
>>>>     
>>>>       
>>>>> Thanks,
>>>>>
>>>>> David S.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> -------------------------------------------------------------------------
>>>>> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
>>>>> Build the coolest Linux based applications with Moblin SDK & win great prizes
>>>>> Grand prize is a trip for two to an Open Source event anywhere in the world
>>>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>>>>> _______________________________________________
>>>>> gstreamer-devel mailing list
>>>>> gstreamer-devel at lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>>>>>
>>>>>       
>>>>>         
>>>> -------------------------------------------------------------------------
>>>> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
>>>> Build the coolest Linux based applications with Moblin SDK & win great prizes
>>>> Grand prize is a trip for two to an Open Source event anywhere in the world
>>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>>>> _______________________________________________
>>>> gstreamer-devel mailing list
>>>> gstreamer-devel at lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>>>>
>>>>
>>>>     
>>>>       
>>> ------------------------------------------------------------------------------
>>> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
>>> The future of the web can't happen without you.  Join us at MIX09 to help
>>> pave the way to the Next Web now. Learn more and register at
>>> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
>>> _______________________________________________
>>> gstreamer-devel mailing list
>>> gstreamer-devel at lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>>>   
>>>     
>>
>> ------------------------------------------------------------------------------
>> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
>> The future of the web can't happen without you.  Join us at MIX09 to help
>> pave the way to the Next Web now. Learn more and register at
>> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>>
>>   
> 
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel





More information about the gstreamer-devel mailing list