Re: QTMovieLayer and QCCompositionLayer Don't Start
Re: QTMovieLayer and QCCompositionLayer Don't Start
- Subject: Re: QTMovieLayer and QCCompositionLayer Don't Start
- From: Gordon Apple <email@hidden>
- Date: Tue, 06 Jan 2009 13:53:53 -0600
- Thread-topic: QTMovieLayer and QCCompositionLayer Don't Start
Documentation for QTMovieLayer:
"layerWithMovie:
Creates an autoreleased QTMovieLayer associated with the specified QTMovie
object.
+ (id)layerWithMovie:(QTMovie *)movie
Discussion
By default, the movie starts playing immediately at rate 1.0 from the
beginning of the movie. These default characteristics can be modified by
setting layer properties or movie properties."
Note: This is no BFD. As you said, I just call [movie play] and it plays.
Documentation for QCCompositionLayer:
"The QCCompositionLayer class loads, plays, and controls Quartz Composer
compositions in a Core Animation layer hierarchy. The composition tracks the
Core Animation layer time and is rendered directly at the current dimensions
of the QCCompositionLayer object.
An archived QCCompositionLayer object saves the composition that¹s loaded at
the time the layer is archived. It detects layer usage and pauses or resumes
the composition appropriately. A QCCompositionLayer object starts rendering
the composition automatically when the layer is placed in a visible layer
hierarchy. The layer stops rendering when it is hidden or removed from the
visible layer hierarchy."
Note: There is no equivalent to "play" for a composition (at least that I
am aware of). I get the initial frame and no play. My composition layer is
four levels deep: viewLayer:contentLayer:attentionLayer:compositionLayer.
Other stuff, including movieLayers, work fine at that level. I'm using
standard compositions (plus one of my own derived from the tutorial) which
all play just fine independently and in Quartz Composer.
Is there something about " composition tracks the Core Animation layer time"
that I am missing, on need to include? I notice that all of the sample code
includes animating some parameter. I just want the composition to play. Do
I need to be feeding it an animation "clock" signal to make it play?
On 1/6/09 9:37 AM, "Matt Long" <email@hidden> wrote:
> A QTMovieLayer "starts" when you call [QTMovie play] on the movie you
> initialized the layer with. What "specs" make the claim that a
> QTMovieLayer starts automatically? A QCCompositionLayer does start
> automatically. If your composition is not playing, check it in Quartz
> Composer first and make sure it plays there.
>
> I can help more if you provide some code. I wrote a blog post on how
> to use QCCompositionLayer. You can see it here:
>
> http://www.cimgf.com/2008/09/24/core-animation-tutorial-core-animation-and-qua
> rtz-composer-qccompositionlayer/
>
> -Matt
>
>
> On Jan 2, 2009, at 11:34 AM, Gordon Apple wrote:
>
>> The specs claim that both QTMovieLayer and QCCompositionLayer start
>> automatically. They don't. I have to explicitly start Movies and I
>> haven't
>> figured out yet how to start a QCCompositionLayer. I get the
>> initial image
>> in a QCCompositionLayer, but no play. How do you start it?
>>
>> A related question (also posted in the QC Forum) is how can you
>> tell
>> when a composition finishes (if it does)?
>>
>>
>> _______________________________________________
>>
G. Apple
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden