Confused about the displaylink callback
Confused about the displaylink callback
- Subject: Confused about the displaylink callback
- From: Kenny Lövrin <email@hidden>
- Date: Tue, 22 Sep 2009 10:38:40 +0200
Hi
I am trying to learn a bit Core Video, and have read through the
programming guide several times. In short, I want to use Core Video to
display video, but I want to get the frames from ffmpeg. So far I have
a very basic working setup, where it actually does display my frames
by drawing with Core Image into the opengl context as the example in
the CV programming guide.
One thing that confuses me though is that it is stated that the
display link "takes care of the syncing" in that way that it calls
back when it needs a new frame to display. I'm not sure I'm
understanding this correctly though as my callback runs really fast.
So, do I need to pass some kind of timebase or something to the
display link so that it know how frequently it needs to request a
frame. Or do I actually need to decide in the callback wether I want
to give it a frame or not? In that case, should I have it render the
last frame if I don't have a new one? I can see how it wants to render
with the display frame rate, but the movie probably wont have a fps
that is the same as the screen refresh rate.
My first thought when I read about it was "nice, it will just ask for
a frame at the correct frame rate". Obviously it doesn't work like
that for me. So either I misunderstood the whole concept, or I am
missing to tell it how often to call back for a frame.
So, I'm not after actual code here, but the theory behind it, as I
cannot really sort it out by reading the programming guide. Please
bear with me, I know I'm a bit in over my head here, but I won't learn
unless I try to push it. :)
So, is there anyone that has experience with Core Video that would be
willing to shortly explain the theory behind it in regards to the
callback frequency.
Thanks!
Kenny
_______________________________________________
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