Re: How to implement a DS source/splitter filter that accept live video



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


.



Relevant Pages

  • Re: Burning a video to DVD from AIFF and MPEG-2 files
    ... I have never attempted to burn a video to DVD. ... video and audio are available for download as separate files. ... depending on whether I wanted an AC3 or MP2 audio stream. ... for the higher video bitrate when using an MP2 audio stream is because ...
    (alt.os.linux.suse)
  • Managing one video source with 2 audio sources....
    ... We have some issues that are keeping us from improving our video quality. ... The main issue is having audio streams for a given region of the country. ... The problem comes in where we've got to manage each audio stream separately, ... keeping our separate audio streams which is important to our customers. ...
    (microsoft.public.windowsmedia.sdk)
  • Re: video playback speed too fast
    ... If I play the video stream only the playback speed appears to be correct! ... Under proposed solutions and tests doing just the audio stream all of the solutions failed. ... I tried unchecking all the converters and with the default set both with same 'fast' playback. ...
    (microsoft.public.windows.vista.music_pictures_video)
  • Re: (OT?): Could DTV become the new Radio
    ... If you got the bit stream down to around a half a megabit ... The video could be minimal, ... audio of an associated radio station. ... could transmit *only* the audio stream. ...
    (rec.radio.shortwave)
  • Re: Video network streaming
    ... > Would i be able to stream video over a TCP stream socket connection (using ... > Winsock2), using DirectShow interfaces, without using Windows Media ... If you don't need to do any video processing on the server, ... - First create your own source filter that reads samples from a local file. ...
    (microsoft.public.win32.programmer.directx.video)

Loading