FROM : Scott Anguish
DATE : Thu Nov 22 11:36:42 2007
On Nov 22, 2007, at 4:07 AM, John Clayton wrote:
> :-)
>
> Scott, I guess you *may* have seen my DTS support request for
> CARenderer then? (I think it *is* very convoluted code [that I
> have], I cant get the thing to go, its all new to me - but I'm
> willing to learn).
Nope, I'm not in DTS and we don't have access to the support requests.
I've been asking around for a CARenderer example because my current
method of making the movies for the documentation is not precise
enough when it comes to start/stop times and timeline, etc. The one
example I managed to get is really complicated, and I'm not sure what
it's doing. This is always the problem with just grabbing someone
else's test app, who knows what the => button does. :-)
once I understand CARenderer I want to add an article to the CA
Cookbook that describes what needs to be done.
> I will file a bug report for this then, I have a spike/test solution
> that demonstrates clearly that the rendering fails for a
> QTMovieLayer that is calling renderInContext:
>
> I guess I can fire you the question thats been hanging around in my
> head since day 1 then (about 8 months ago actually). Q is this:
> how would I use core-anim to render any CALayer tree onto a view,
> but only at a particular time (i.e. 2.6 seconds) and also make use
> of all the transitions and animations and so on [that core anim is
> good at doing]? E.g. I have a complex CALayer and one of the
> contained layers has an animation at 2 seconds for a duration of 5
> seconds that fades that layer out. (think: layers as movie timelines
> and using a slider to scrub back and forth in time).\
I wish I knew. The one bit I've seen let's you pause an in progress
animation and it'll do something when you push a button, but I have no
idea exactly what the result is I'm getting in the example. And I've
not had time to figure it out from the code. (and the guy I got it
from is out this week, so I can't ask him. it's driving me crazy).
>
>
> I've tried *a lot* of ways, and the basic problem appears to be
> telling layers that they should indeed render for time 't',
> regardless of what the CACurrentMediaTime() and underlying core-anim
> time-line is.
>
I assume you've tried beginFrameAtTime:timeStamp:?
the one bit I've got seems to
[renderer beginFrameAtTime:timeInterval timeStamp:NULL];
[renderer addUpdateRect:CGRectMake(0.0, 0.0, w, h)];
[renderer render];
in the -(void)drawInCGLContext:(CGLContextObj)glContext pixelFormat:
(CGLPixelFormatObj)pixelFormat forLayerTime:
(CFTimeInterval)timeInterval displayTime:(const CVTimeStamp *)timeStamp
implementation of an opengl layer. the open gl layer has the layers to
render as it's sublayers.
> Anyways, I'll file a bug report along with my spike solution and let
> you know its ID.
>
Yes please!
> --
> John Clayton
>
> On Nov 22, 2007, at 9:48 AM, Scott Anguish wrote:
>
>>
>> On Nov 22, 2007, at 3:22 AM, John Clayton wrote:
>>
>>> I'm not, that renderInContext: is a call on CALayer, allowing one
>>> to place the content of a layer into a CGContextRef
>>>
>>
>> Gah, sorry. I miss read the original email. I should have
>> recognized the method, I wrote the reference doc for it.
>>
>>
>>> The CovertFlow example uses this technique to take content into a
>>> bitmap based context.
>>
>> Wow, it does. but I wonder why. It's just creating a bitmap with
>> a string in it.
>>
>> I'm not sure whose example that is, but I've asked engineering.
>>
>> If you determine that QTMovieLayer isn't rendering using that
>> method, please file a bug and let me know.
>>
>>
>>> I've got requirements to basically render arbitrarily complex
>>> CALayer hierarchies onto a view, but I want to render them for a
>>> particular time.
>>>
>>> What is CARenderer intended for then? (I've used CARenderer in
>>> another different spike/test solution so have experience with it).
>>>
>>
>> Yes, that would be a CARenderer situation. I've only seen one
>> example of it in use and it was, shall we say, convoluted.
>>
>>> Thanks.
>>>
>>> --
>>> John Clayton
>>> http://www.coderage-software.com/
>>>
>>>
>>>
>>> On Nov 22, 2007, at 9:11 AM, Scott Anguish wrote:
>>>
>>>> I'm not sure of the answer..
>>>>
>>>> but why are you using CARenderer to put movie content into a view?
>>>>
>>>> it shouldn't be used for display purposes.
>>>>
>>>>
>>>> On Nov 22, 2007, at 1:47 AM, John Clayton wrote:
>>>>
>>>>> Hi All,
>>>>>
>>>>> I am trying to use the CALayer renderInContext: call to put the
>>>>> contents of a QTMovieLayer instance onto a view, but I get a
>>>>> blank view - nothing renders.
>>>>>
>>>>> Is this call supposed to work for a QTMovieLayer? I suppose the
>>>>> question could be expanded to: is the renderInContext: method
>>>>> supposed to work for any type of open-gl based layer class?
>>>>>
>>>>> Thanks,
>>>>> --
>>>>> John Clayton
>>>>> http://www.coderage-software.com/
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>>
>>>>> Cocoa-dev mailing list (<email_removed>)
>>>>>
>>>>> 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:
>>>>> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>>>>>
>>>>> This email sent to <email_removed>
>>>>
>>>
>>
>
DATE : Thu Nov 22 11:36:42 2007
On Nov 22, 2007, at 4:07 AM, John Clayton wrote:
> :-)
>
> Scott, I guess you *may* have seen my DTS support request for
> CARenderer then? (I think it *is* very convoluted code [that I
> have], I cant get the thing to go, its all new to me - but I'm
> willing to learn).
Nope, I'm not in DTS and we don't have access to the support requests.
I've been asking around for a CARenderer example because my current
method of making the movies for the documentation is not precise
enough when it comes to start/stop times and timeline, etc. The one
example I managed to get is really complicated, and I'm not sure what
it's doing. This is always the problem with just grabbing someone
else's test app, who knows what the => button does. :-)
once I understand CARenderer I want to add an article to the CA
Cookbook that describes what needs to be done.
> I will file a bug report for this then, I have a spike/test solution
> that demonstrates clearly that the rendering fails for a
> QTMovieLayer that is calling renderInContext:
>
> I guess I can fire you the question thats been hanging around in my
> head since day 1 then (about 8 months ago actually). Q is this:
> how would I use core-anim to render any CALayer tree onto a view,
> but only at a particular time (i.e. 2.6 seconds) and also make use
> of all the transitions and animations and so on [that core anim is
> good at doing]? E.g. I have a complex CALayer and one of the
> contained layers has an animation at 2 seconds for a duration of 5
> seconds that fades that layer out. (think: layers as movie timelines
> and using a slider to scrub back and forth in time).\
I wish I knew. The one bit I've seen let's you pause an in progress
animation and it'll do something when you push a button, but I have no
idea exactly what the result is I'm getting in the example. And I've
not had time to figure it out from the code. (and the guy I got it
from is out this week, so I can't ask him. it's driving me crazy).
>
>
> I've tried *a lot* of ways, and the basic problem appears to be
> telling layers that they should indeed render for time 't',
> regardless of what the CACurrentMediaTime() and underlying core-anim
> time-line is.
>
I assume you've tried beginFrameAtTime:timeStamp:?
the one bit I've got seems to
[renderer beginFrameAtTime:timeInterval timeStamp:NULL];
[renderer addUpdateRect:CGRectMake(0.0, 0.0, w, h)];
[renderer render];
in the -(void)drawInCGLContext:(CGLContextObj)glContext pixelFormat:
(CGLPixelFormatObj)pixelFormat forLayerTime:
(CFTimeInterval)timeInterval displayTime:(const CVTimeStamp *)timeStamp
implementation of an opengl layer. the open gl layer has the layers to
render as it's sublayers.
> Anyways, I'll file a bug report along with my spike solution and let
> you know its ID.
>
Yes please!
> --
> John Clayton
>
> On Nov 22, 2007, at 9:48 AM, Scott Anguish wrote:
>
>>
>> On Nov 22, 2007, at 3:22 AM, John Clayton wrote:
>>
>>> I'm not, that renderInContext: is a call on CALayer, allowing one
>>> to place the content of a layer into a CGContextRef
>>>
>>
>> Gah, sorry. I miss read the original email. I should have
>> recognized the method, I wrote the reference doc for it.
>>
>>
>>> The CovertFlow example uses this technique to take content into a
>>> bitmap based context.
>>
>> Wow, it does. but I wonder why. It's just creating a bitmap with
>> a string in it.
>>
>> I'm not sure whose example that is, but I've asked engineering.
>>
>> If you determine that QTMovieLayer isn't rendering using that
>> method, please file a bug and let me know.
>>
>>
>>> I've got requirements to basically render arbitrarily complex
>>> CALayer hierarchies onto a view, but I want to render them for a
>>> particular time.
>>>
>>> What is CARenderer intended for then? (I've used CARenderer in
>>> another different spike/test solution so have experience with it).
>>>
>>
>> Yes, that would be a CARenderer situation. I've only seen one
>> example of it in use and it was, shall we say, convoluted.
>>
>>> Thanks.
>>>
>>> --
>>> John Clayton
>>> http://www.coderage-software.com/
>>>
>>>
>>>
>>> On Nov 22, 2007, at 9:11 AM, Scott Anguish wrote:
>>>
>>>> I'm not sure of the answer..
>>>>
>>>> but why are you using CARenderer to put movie content into a view?
>>>>
>>>> it shouldn't be used for display purposes.
>>>>
>>>>
>>>> On Nov 22, 2007, at 1:47 AM, John Clayton wrote:
>>>>
>>>>> Hi All,
>>>>>
>>>>> I am trying to use the CALayer renderInContext: call to put the
>>>>> contents of a QTMovieLayer instance onto a view, but I get a
>>>>> blank view - nothing renders.
>>>>>
>>>>> Is this call supposed to work for a QTMovieLayer? I suppose the
>>>>> question could be expanded to: is the renderInContext: method
>>>>> supposed to work for any type of open-gl based layer class?
>>>>>
>>>>> Thanks,
>>>>> --
>>>>> John Clayton
>>>>> http://www.coderage-software.com/
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>>
>>>>> Cocoa-dev mailing list (<email_removed>)
>>>>>
>>>>> 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:
>>>>> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>>>>>
>>>>> This email sent to <email_removed>
>>>>
>>>
>>
>
| Related mails | Author | Date |
|---|---|---|
| John Clayton | Nov 22, 07:47 | |
| John Clayton | Nov 22, 10:07 | |
| Scott Anguish | Nov 22, 11:36 | |
| Scott Anguish | Nov 22, 11:42 | |
| Bill Dudney | Nov 22, 13:27 | |
| John Clayton | Nov 22, 15:24 | |
| Bill Dudney | Nov 23, 14:41 | |
| John Clayton | Nov 23, 16:14 | |
| Bill Dudney | Nov 23, 16:27 |






Cocoa mail archive

