Re: How to implement a DS source/splitter filter that accept live video
- From: "Alessandro Angeli" <nobody@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 27 Feb 2009 00:20:17 -0500
From: "fifth"
Hi all, I'm on a project that design a client for web
camera. Here's my case details.
Basically, live data is transfered over network, but
video and audio are in separate stream.
At client, I think I should receive streams and deliver
it downstream. I use ffdshow to do decoding, so looks
like I have to implement a source filter to introduce
data in, and looks like there's no need for a new
splitter since video and audio are already in separate
stream. Am I right?
So far, I still don't understand what this source filter
should do, and how to synchronize video and audio, and
where.
You need to write a live push source filter. If you pull
data from the network source, you can use the
CSource/CSourceStream base classes (see the PushSource and
Ball samples). If you receive data asynchrously, you can
still use those base classes but CBaseFilter/CBaseOutputPin
(with some worker threads and output queues, possibly based
on CAMThread and COutputQueue). You can use
CBaseReferenceClock to implement the clock.
Synchronization is achieved by attaching the right
timestamps to the samples you output.
http://msdn.microsoft.com/en-us/library/dd377472(VS.85).aspx
http://msdn.microsoft.com/en-us/library/dd377506(VS.85).aspx
http://msdn.microsoft.com/en-us/library/dd390645(VS.85).aspx
I suggest you start by reading the following sections first:
http://msdn.microsoft.com/en-us/library/dd373389(VS.85).aspx
http://msdn.microsoft.com/en-us/library/dd391013(VS.85).aspx
--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm
.
- Follow-Ups:
- References:
- Prev by Date: Re: IMediaSample
- Next by Date: Re: How to implement a DS source/splitter filter that accept live video
- Previous by thread: How to implement a DS source/splitter filter that accept live video
- Next by thread: Re: How to implement a DS source/splitter filter that accept live video
- Index(es):
Relevant Pages
|
Loading