[squeak-dev] Re: GStreamer

Yoshiki Ohshima yoshiki at vpri.org
Thu Aug 14 22:29:05 UTC 2008


At Fri, 15 Aug 2008 00:15:40 +0200,
John M McIntosh wrote:
> 
> For the typefind one I had tried to use
> 
> openFile: aFileName
> 	| player checkForPending decoder capsPointer capsData capsDataString |
> 
> 	player := self new.
> 	player filesrc: aFileName.
> 	player oggHookupToTypeFind.
> 	decoder := player pipeLine findElementCalled: 'typefind'.
> 	player play.
> 	capsPointer := decoder getKeyValuePointer: 'caps'.
> 	self halt.
> 	capsData := GStreamerCaps handle: capsPointer.
> 	capsDataString := capsData getString.
> 	self halt.
> ....
> 
> 
> 
> oggHookupToTypeFind
> 	| file  result typeFind |
> 
> 	file := GStreamerElement elementFactoryMake: 'filesrc' name: 'filesrc'.
> 	file setKey: 'location' toStringValue: self filesrc.
> 	typeFind := GStreamerElement elementFactoryMake: 'typefind' name:  
> 'typefind'.
> 
> 	"Setup the pipeline"
> 	pipeLine := GStreamerPipeline name: 'my-pipeline'.
> 	pipeLine addElement: file.
> 	pipeLine addElement: typeFind.
> 
> 	result := GStreamerSystem default linkElementSrc: file toDest:  
> typeFind.
> 
> 
> 
> to get back the caps
> 
>   caps                : detected capabilities in stream
>                          flags: readable
>                          Caps (NULL)
> 
> But that returns
> 
> capsDataString -> "'application/ogg'"
> 
> for both audio and video files which is not helpful

  Yes, the command line version (gst-typefind) also returns it.  But
the documentation seems a bit more promising so there may have some
chance.

  I'll also look into if we can use the spider element somehow.

-- Yoshiki



More information about the Squeak-dev mailing list