"Yannick" <Yan...@discussions.microsoft.com> schrieb im Newsbeitrag
news:F11AB212-4499-4BF9...@microsoft.com...
Thomas Hansen
"Yannick" <Yan...@discussions.microsoft.com> wrote in message
news:F11AB212-4499-4BF9...@microsoft.com...
Yannick,
I wish I could send you some code, but unfortunately it's not mine to send
(owned by my company, so that'd be a big no-no on my part). Is your project
commercial or open source?
My recommendation to you is to write a custom rendering filter and a custom
source filter. The rendering filter takes the samples and sends them over
the network. The Source filter picks up the samples and forwards them on
into DirectShow, where you do whatever you want with them.
Unfortunately, writing a filter *is* a pain in the ass the first time
around. However, after you've done one or two, they're actually pretty easy
to crank out.
> Once again Jeremy Noring told me I used to do something similar with great
> result but I haven't found any resources related on the internet so I
> could
> at least start doing something.
I had the exact issues you did--needed < 1 second delay using the windows
media format, but no available stuff worked for me. I stumbled through the
DSNetwork filters for a while (which are utter garbage, I might add), and
finally just started writing my own filter because there really aren't any
other options.
Start with the Ball Sample for the source filter. Read the code line by
line. Instead of generating samples like that code does, in FillBuffer()
you'd receive data off of the network and render it. Also, take a long look
at the section in the DXSDK concerning writing custom and read about the
CSource and CSourceStream base classes. Also, read about CBaseRenderer.
Also, look at this RTP library. It's completely free, and should adapt well
for what you want to do:
http://research.edm.luc.ac.be/jori/jrtplib/jrtplib.html
Before you write any filters, write a simple application to send and receive
dummy data with the RTP library, to get a feel for how it works. So, here's
what you need to write to get this job done:
webcam capture -> Encoder -> CUSTOM RTP RENDER FILTER
Somewhere out on your LAN, you have another computer running a separate
filter graph that looks like so:
CUSTOM RTP SOURCE FILTER -> Decoder -> VMR or Disk or Whatever...
Step by step:
1. Download JRTPLIB (the RTP library)
2. Set up simple client/server app with JRTPLIB to send dummy data (doesn't
matter what the data is)
3. Read all the documentation about writing source filters
4. Read about the following base classes: CSource, CSourceStream, and
CBaseRenderer
5. Read the Ball Source Filter sample in the DXSDK line by line. Make sure
you understand it well. Modify it if that helps you understand it.
6. Read the Dump Filter sample (a rendering filter) line by line. Instead
of writing the samples to a TEXT FILE, make it send the samples out via the
RTP library. This should be easy since you previous wrote a client app, and
nothing is different. Data on the network is just data on the
network--there's nothing special about it, really.
7. Write the source filter.
8. Debug like crazy.
9. Deliver the goods.
> So in the last resort, I choose the DSNetwork filter to acheive some kind
> of
> real time videoconference but I'm stuck again and again on the MPEG2
> source.
> In graphedit I add my webcam capture filter and the DSNetwork sender and
> it
> says it can't find any intermediate filter to connect them !?
> What's wrong ?
> I'm desperate please help me with details or code samples
I personally wouldn't bother with the DSNetwork sample. It's convoluted,
difficult to understand, and complicated. It also doesn't work very well.
I would strongly urge you to read the Ball Source filter carefully, read the
documentation concerning custom filter development, and start writing a pair
of filters to send and receive data. It's really the only option available
to developers that doesn't suck.
Sorry to be the bearer of bad news, but....DirectShow doesn't have a very
friendly learning curve.
Good luck--feel free to email me (k i d j a n @ y a h o o d o t c o m) with
questions. Cheers.
--
Where am I going?
And why am I in this handbasket?