Re: synchronization of different media
From: Peter Duniho (NpOeStPeAdM_at_NnOwSlPiAnMk.com)
Date: 08/14/04
- Next message: Steven Tang: "Re: Does anyone know where to and how to retrieve local TV Guide data?"
- Previous message: The March Hare (MVP): "Re: DV camcorder"
- In reply to: Mailto635: "Re: synchronization of different media"
- Next in thread: Mailto635: "Re: synchronization of different media"
- Reply: Mailto635: "Re: synchronization of different media"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 14 Aug 2004 15:36:21 -0700
"Mailto635" <mailto635@yahoo.com> wrote in message
news:622a3479.0408140133.6c77cec5@posting.google.com...
> [...] I want to
> forward the sample as and when it arrives and the timing will be taken
> care by the hardware driver. I am left with two options here
> 1. Use CBaseFilter rather than CBaseRenderer
> 2. Override the CBaseRenderer::Receive function.
> Which one is better? are there any good solutions to this?
How will timing be taken care of by the hardware driver? If the hardware
driver is taking care of the timing, why are you allowing CBaseRenderer to
also try to take care of the timing? Just because you derive from that
class, that doesn't mean you have to accept 100% of its functionality.
Seems like you should override the Receive method so that you don't wait in
your render filter, as you suggest.
As far as the question of which class to derive from, I guess that depends
on what your filter does. If you filter is the endpoint in the graph, that
says to me it's a renderer and should be a render filter. Of course, you
can still derive a render filter on CBaseFilter, rather than CBaseRenderer,
but if CBaseRenderer offers some functionality you'd like to take advantage
of, then seems like it would be better to derive from that, even if you have
to override the Receive method.
That said, in the end the question of which filter to derive from is a
question only you can answer with authority.
> Yes, it is a slow computer. I am working on an embedded system. I can
> expect the audio portion of the stream to arrive late due to low
> processing speed and the processer might be busy processing something
> else. If I get a audio frame late, should I skip that audio frame or
> adjust the reference clock time?
Here's another question that only you can answer with authority.
If it were me, I'd probably try to use the audio stream to create the
reference clock. But only if I were dealing with a latency issue, and not a
"sometimes, there will be gaps in the audio stream". If it's simply
impossible for your hardware to keep up with the audio demand 100% of the
time, then you are going to have noticeable glitches in the audio regardless
of what you do, in which case I suppose you might as well not bother trying
to synchronize everything else with the audio.
Of course, that begs the question of why, if you are able to use a hardware
decoder for the video, you cannot also implement the audio processing in
hardware? It's a strange situation indeed IMHO for your audio to be what
bogs down the processor. Not since the days of the 50 to 90Mhz Pentiums
have I used a computer that had trouble processing audio in real time while
doing several other things too.
Anyway, at some point, you're going to have to do what the rest of us
usually wind up having to do: write a bunch of code, see what works and what
doesn't, start all over and do it again, until you get something you like.
The questions you're asking are difficult enough for someone who knows all
the specifics to answer, never mind folks like me just reading little bits
and pieces about what you're working on in a newsgroup.
Pete
- Next message: Steven Tang: "Re: Does anyone know where to and how to retrieve local TV Guide data?"
- Previous message: The March Hare (MVP): "Re: DV camcorder"
- In reply to: Mailto635: "Re: synchronization of different media"
- Next in thread: Mailto635: "Re: synchronization of different media"
- Reply: Mailto635: "Re: synchronization of different media"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|