Hello, Josh and John and list,
I'm playing with the GStreamer stuff on Fedora. With the latest stuff, and some changes (attached), I managed to play a .ogg file that *only* has video track. But there are a few questions: * I needed to use the subclasses of GstElemFakeSink to play back, assuming that GStreamerElementForSqueak... are being obsoleted. Is it right? * #checkDimension is only sent but not implemented. I assumed that it wants to check whether the dimension of video is sane, and I thought that "sane-ness" is just checking both width and height are bigger than zero. Is it right? * #openFile: was written under the assumption that .ogg file is either "video and audio" or "audio only" but I have a file that is "video only". If I open a video only file with older definition, it basically forever paused and wait until it is ready and doesn't play it back. #openFile: should check the type of tracks and call a proper #oggHookupToSqueak... method. But is there a simple way to query it when I have the filesrc element? Thank you! -- Yoshiki People are often on vacation around this time of year, so have fun... but at your convenient time, please think about Squeak stuff^^; GSTAug11-yo.2.cs (11K) Download Attachment |
On Aug 13, 2008, at 8:01 AM, Yoshiki Ohshima wrote: > Hello, Josh and John and list, > > I'm playing with the GStreamer stuff on Fedora. With the latest > stuff, and some changes (attached), I managed to play a .ogg file that > *only* has video track. But there are a few questions: > > * I needed to use the subclasses of GstElemFakeSink to play back, > assuming that GStreamerElementForSqueak... are being obsoleted. > Is it right? > > * #checkDimension is only sent but not implemented. I assumed that > it wants to check whether the dimension of video is sane, and I > thought that "sane-ness" is just checking both width and height > are bigger than zero. Is it right? Joshua was refactoring all that, I'll look later tonight > > > * #openFile: was written under the assumption that .ogg file is > either "video and audio" or "audio only" but I have a file that > is "video only". If I open a video only file with older > definition, it basically forever paused and wait until it is > ready and doesn't play it back. #openFile: should check the type > of tracks and call a proper #oggHookupToSqueak... method. But is > there a simple way to query it when I have the filesrc element? Yes there is a problem there, I was looking at "typefind" to see if we could decide what type of file it is, but that might require a plugin change in order to get the CAPS element back. I was also trying to see if you could resolve pipeline setup as always both setup with audio/video and work with that, but haven't gotten around to testing it, however you are welcome to try. In this case you could ask the elments for attribute data to see if there are frames, or audio? > > > Thank you! > > -- Yoshiki > > People are often on vacation around this time of year, so have > fun... but at your convenient time, please think about Squeak stuff^^; > > <GSTAug11-yo.2.cs> -- = = = ======================================================================== John M. McIntosh <[hidden email]> Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com = = = ======================================================================== |
John M McIntosh wrote:
> > On Aug 13, 2008, at 8:01 AM, Yoshiki Ohshima wrote: > >> Hello, Josh and John and list, >> >> I'm playing with the GStreamer stuff on Fedora. With the latest >> stuff, and some changes (attached), I managed to play a .ogg file that >> *only* has video track. But there are a few questions: >> >> * I needed to use the subclasses of GstElemFakeSink to play back, >> assuming that GStreamerElementForSqueak... are being obsoleted. >> Is it right? carrying on with the work right now. I tried to not disturb code that was already working, so the other GStreamerElementForSqueakEtc classes should continue to work. In other words, you should be able to revert the implementors of #makeFakeSinkElement: to JMM's versions using the "old" classes. However, I think that instantiating the GstElemEtc classes is significantly nicer, especially for ad-hoc creation of pipelines in a Workspace. If I had time to spend, I would continue in this direction. >> >> * #checkDimension is only sent but not implemented. You are seeing sends of #checkDimension in #videoFrameHeight/Width/Rate, right? Sorry, my fault... I thought that I removed all senders (but these were in the GStreamer-UI package, which must be why I missed them). It should be safe to remove those sends of #checkDimension. In fact, I went ahead and did this; the changes are checked in. Let me know if this works, or if other bugs pop up (quite possible, since I apparently only tested the latest updates with Workspace snippets and unit tests, not the Morphic UI). >> I assumed that >> it wants to check whether the dimension of video is sane, and I >> thought that "sane-ness" is just checking both width and height >> are bigger than zero. Is it right? #checkDimension used to look like this: checkDimension self width ifNotNil: [^self]. width := self squeakerVideo getWidth. height := self squeakerVideo getHeight. fps := (self squeakerVideo getFrameRateNumerator) / (self squeakerVideo getFrameRateDenominator). However, it doesn't make much sense to retrieve the width, height, and frame-rate each time you want to access one of the three. Cheers, Josh > > Joshua was refactoring all that, I'll look later tonight > >> >> >> * #openFile: was written under the assumption that .ogg file is >> either "video and audio" or "audio only" but I have a file that >> is "video only". If I open a video only file with older >> definition, it basically forever paused and wait until it is >> ready and doesn't play it back. #openFile: should check the type >> of tracks and call a proper #oggHookupToSqueak... method. But is >> there a simple way to query it when I have the filesrc element? > > Yes there is a problem there, I was looking at "typefind" to see if we > could decide what type of file it is, but > that might require a plugin change in order to get the CAPS element > back. I was also trying to see if you > could resolve pipeline setup as always both setup with audio/video and > work with that, but haven't gotten > around to testing it, however you are welcome to try. In this case you > could ask the elments for attribute data to see > if there are frames, or audio? > >> >> >> Thank you! >> >> -- Yoshiki >> >> People are often on vacation around this time of year, so have >> fun... but at your convenient time, please think about Squeak stuff^^; >> >> <GSTAug11-yo.2.cs> > > -- > =========================================================================== > > John M. McIntosh <[hidden email]> > Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com > =========================================================================== > > > |
In reply to this post by johnmci
> > * #openFile: was written under the assumption that .ogg file is
> > either "video and audio" or "audio only" but I have a file that > > is "video only". If I open a video only file with older > > definition, it basically forever paused and wait until it is > > ready and doesn't play it back. #openFile: should check the type > > of tracks and call a proper #oggHookupToSqueak... method. But is > > there a simple way to query it when I have the filesrc element? > > Yes there is a problem there, I was looking at "typefind" to see if we > could decide what type of file it is, but > that might require a plugin change in order to get the CAPS element > back. I was also trying to see if you > could resolve pipeline setup as always both setup with audio/video and > work with that, but haven't gotten > around to testing it, however you are welcome to try. In this case you > could ask the elments for attribute data to see > if there are frames, or audio? I'll give it a try. Thank you! -- Yoshiki |
In reply to this post by Joshua Gargus-2
At Wed, 13 Aug 2008 16:06:27 -0700,
Joshua Gargus wrote: > > >> * #checkDimension is only sent but not implemented. > > You are seeing sends of #checkDimension in #videoFrameHeight/Width/Rate, > right? Sorry, my fault... I thought that I removed all senders (but > these were in the GStreamer-UI package, which must be why I missed them). > > It should be safe to remove those sends of #checkDimension. In fact, I > went ahead and did this; the changes are checked in. > > Let me know if this works, or if other bugs pop up (quite possible, > since I apparently only tested the latest updates with Workspace > snippets and unit tests, not the Morphic UI). Thank you. I'm also working on so that the movie player morph can survive during the saving and restarting image, etc. > checkDimension > self width ifNotNil: [^self]. > width := self squeakerVideo getWidth. > height := self squeakerVideo getHeight. > fps := (self squeakerVideo getFrameRateNumerator) / > (self squeakerVideo getFrameRateDenominator). > > However, it doesn't make much sense to retrieve the width, height, and > frame-rate each time you want to access one of the three. Ok. Thanks.y -- Yoshiki |
In reply to this post by Yoshiki Ohshima-2
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 On Aug 14, 2008, at 11:51 PM, Yoshiki Ohshima wrote: >>> * #openFile: was written under the assumption that .ogg file is >>> either "video and audio" or "audio only" but I have a file that >>> is "video only". If I open a video only file with older >>> definition, it basically forever paused and wait until it is >>> ready and doesn't play it back. #openFile: should check the type >>> of tracks and call a proper #oggHookupToSqueak... method. But is >>> there a simple way to query it when I have the filesrc element? >> >> Yes there is a problem there, I was looking at "typefind" to see if >> we >> could decide what type of file it is, but >> that might require a plugin change in order to get the CAPS element >> back. I was also trying to see if you >> could resolve pipeline setup as always both setup with audio/video >> and >> work with that, but haven't gotten >> around to testing it, however you are welcome to try. In this case >> you >> could ask the elments for attribute data to see >> if there are frames, or audio? > > I'll give it a try. Thank you! > > -- Yoshiki -- = = = ======================================================================== John M. McIntosh <[hidden email]> Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com = = = ======================================================================== |
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 |
Free forum by Nabble | Edit this page |