Quicktime player

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Quicktime player

Chris Cunnington
Just some thoughts on my exploration of Sophie and how to make a Quicktime player. I haven't dropped this. 

The key is a hierarchy of classes topped by SophieMovie. They are all subclassed from a Tweak CObject. These classes are separate from the player. It's the player that requires FFI. For that reason, I'm inclined to take the movie classes, and then dump the player for a simpler one. The MPEGMoviePlayerMorph is a good model for something in Quicktime. All that stuff was added, I'd say, to produce a professional level of redundancy for various possible situations. 

The simplest player is the one in Scratch. You have three classes: one for the movie; one for the morph that is the screen; and one for the controls. The MPEGMoviePlayerMorph is a bit more complicated than that basic template, I'd figure. If I can figure out how it's a more advanced version of the Scratch player, then I'd like to retrofit one of those for Quicktime. 

There is also another twist in Sophie. In the Scratch player, you create an instance of a class to for the audio, and then tuck that into the player. Sophie does something different. It makes the movie class a subclass of the audio class. I haven't figured that part out yet, but it looks nifty. 

Sophie uses semaphores for individual frames and the simpler players don't. I'm not sure why at the moment. I mean there's a benefit for it, but I haven't gleaned it yet. At the moment if I use: 

SophieQuickTimeMovie new openMovieFromURI: 'file:///Users/chriscunnington/Desktop/chaz.mov'

I get a semaphore related error: Movie failed NewMovieFromDataRef. 

Sophie is sophisticated stuff. I fear I'm being a bit reductionist. It's hard for me to see how I'd take the whole engine and put it into 4.1.

John, I'd be happy to hear your thoughts on these impressions. 

Chris 


Reply | Threaded
Open this post in threaded view
|

Re: Quicktime player

johnmci
I think the MPEGMoviePlayerMorph stuff which you put in the squeaksource is just the old video/sound logic from the early part of the last decade and we abandon it.  
The same I think applies to the Scratch player.

SophieMovie is the key guy here, it's off a tweak object because it allows you to send notifications of state change to listeners, but you can set to Object and then 
consider the tweak specific calls and how to replace them. 

Yes Sophie uses semaphores because the older stuff used timers and polling and just didn't work well. 

NewMovieFromDataRef  
Sounds like an FFI call not working what's the stack? 


On 2010-09-02, at 7:33 PM, Chris Cunnington wrote:

Just some thoughts on my exploration of Sophie and how to make a Quicktime player. I haven't dropped this. 

The key is a hierarchy of classes topped by SophieMovie. They are all subclassed from a Tweak CObject. These classes are separate from the player. It's the player that requires FFI. For that reason, I'm inclined to take the movie classes, and then dump the player for a simpler one. The MPEGMoviePlayerMorph is a good model for something in Quicktime. All that stuff was added, I'd say, to produce a professional level of redundancy for various possible situations. 

The simplest player is the one in Scratch. You have three classes: one for the movie; one for the morph that is the screen; and one for the controls. The MPEGMoviePlayerMorph is a bit more complicated than that basic template, I'd figure. If I can figure out how it's a more advanced version of the Scratch player, then I'd like to retrofit one of those for Quicktime. 

There is also another twist in Sophie. In the Scratch player, you create an instance of a class to for the audio, and then tuck that into the player. Sophie does something different. It makes the movie class a subclass of the audio class. I haven't figured that part out yet, but it looks nifty. 

Sophie uses semaphores for individual frames and the simpler players don't. I'm not sure why at the moment. I mean there's a benefit for it, but I haven't gleaned it yet. At the moment if I use: 

SophieQuickTimeMovie new openMovieFromURI: 'file:///Users/chriscunnington/Desktop/chaz.mov'

I get a semaphore related error: Movie failed NewMovieFromDataRef. 

Sophie is sophisticated stuff. I fear I'm being a bit reductionist. It's hard for me to see how I'd take the whole engine and put it into 4.1.

John, I'd be happy to hear your thoughts on these impressions. 

Chris 


--
===========================================================================
John M. McIntosh <[hidden email]>   Twitter:  squeaker68882
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================







smime.p7s (5K) Download Attachment