Re: conversion needed for syncing audio and video
Re: conversion needed for syncing audio and video
- Subject: Re: conversion needed for syncing audio and video
- From: Jeff Moore <email@hidden>
- Date: Thu, 10 May 2007 15:10:29 -0700
Since your code is dealing with the display link, I'm assuming you're
looking for hints about resampling the video, yes?
I know next to nothing about displaying video frames with Core Video.
So, you'll probably need to talk to folks that know Core Video better
to help out with that.
I will say that the code you presented doesn't look to me like it is
doing anything to compute the how much faster or slower the video
hardware is running than the audio hardware. To do that, you need to
identify the rate scalar of the video hardware and the rate scalar of
the audio hardware and see how they relate. Once you do that you have
your basis for how much to adjust the video.
For the audio hardware, the HAL provides the rate scalar in the time
stamps in the IOProc or you can ask for it with
AudioDeviceTranslateTime. I'm not sure how Core Video exposes this
information, but it is at least capable of being expressed in the
CVTimeStamp. So, you might want to look for it in the display link
callback's time stamps.
On May 10, 2007, at 2:56 PM, Chase wrote:
Generally this means resampling one medium or the other. For audio,
you just figure out the rate and apply a sample rate converter. For
video, you could do the same thing, but this can also be accomplished
by varying the duration of the video frame.
I'm not sure I get (specifically) what you're suggesting here. Can
you be a little more specific (playing off the code I posted).
Thanks, Jeff.
--
Jeff Moore
Core Audio
Apple
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden