Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-dvb] Re: dvb_get_delay/timestamp ?
On Mon, Oct 27, 2003 at 04:41:27PM +0100, Dr. Werner Fink wrote:
> On Mon, Oct 27, 2003 at 04:17:25PM +0100, Johannes Stezenbach wrote:
> >
> > Could you please elaborate on that? What does bitstreamout do,
> > and why does it need timestamps? And doesn't DMX_GET_STC do
> > what you want?
>
> Bitstreamout is a plugin of VDR which uses the interface of VDR to
> get the private stream 1 used for AC3 (e.g. ZDF, Sat1, Pro7). It
> puts the AC3 frames in the payload into appropiate PCM frames and
> redirect them to the S/P-DIF out of a sound card. Sven's version
> of bistreamout is also able to redirect the mpeg audio encoded into
> PCM to the S/P-DIF out of a sound card.
>
> Now the problem is that is very difficult to get the audio into
> sync with the corresponding picture currently viewed. I use
> in the bitstreamout plugin simply a configurable timeoffset
> once the plugin has received data and started the redirecting
> thread.
>
> The result depends on the channel and system load, this leads to
> more or less A/V sync. Now for a real solution a trigger
> interface in the DVB driver like
>
> waitonpid_syscall(int pid, unsigned long long pts);
>
> would be an option to solve this problem. In other words
> within the user space program the call could be something like
>
> waitonpid(video_pid, start_pts); // will be awake by driver
> start(); // Start output to S/P-DIF
>
> ... that is the idea. Clearly if the the start_pts is already
> expired in comparision to the video pid the system call does
> not sleep.
You can do that by calling DMX_GET_STC and sleep if the AC3 PTS is
greater that the current STC. If you give the audio task a high
priority the timing will be accurate enough, I think.
The V4 API will support a "wake up at STC == foobar" event, but I
don't know how to implement it for AV7110 ;-(
Johannes
--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe linux-dvb" as subject.
Home |
Main Index |
Thread Index