Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

re: Smartphone to Smartphone video Streaming using DirectShow

3 views
Skip to first unread message

espada

unread,
Dec 3, 2009, 7:45:51 AM12/3/09
to
Hi all, I am doing a project which requires me to stream a live video
from a smartphone camera to another smartphone(both Windows Mobile)
over direct wireless(without going thru router). I have decided on
using directshow, but I have some doubts on my filtergraph.

Does CameraFilter->Encoder->SampleGrabber->NullRenderer work? Or
should it be CameraFilter->SampleGrabber->Encoder ? I need to send it
out using sockets, or should I use ASFwriter instead?

Hope to get your advice, thanks all !

Alessandro Angeli

unread,
Dec 3, 2009, 2:15:47 PM12/3/09
to
From: "espada"

[...]


> Does CameraFilter->Encoder->SampleGrabber->NullRenderer
> work? Or should it be
> CameraFilter->SampleGrabber->Encoder ? I need to send it
> out using sockets, or should I use ASFwriter instead?

The ASFWriter filter in WM only creates files, so it is
useless and you need a SampleGrabber or a custom sink. The
encoder must go before the grabber/sink.

You will need a custom push source on the receiving side.


--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm


espada

unread,
Dec 4, 2009, 11:20:14 PM12/4/09
to
Hi Alessandro,

Thanks for the reply! In this case, my filtergraph will be as u
suggest camerafilter->encoder->samplegrabber->nullrenderer. I don't
understand about the custom push source on the receiving side, could
you explain further? How do I decode the received data on the
receiving side because it seems its not possible to use the same
filtergraph as the source.

I saw samples for a simple udp server/client, will these work?
http://www.java2s.com/Code/CSharp/Network/SimpleUdpServer.htm
http://www.java2s.com/Code/CSharp/Network/SimpleUdpClient.htm

Thanks again, please advise me :)

Jeremy Noring

unread,
Dec 7, 2009, 2:49:59 PM12/7/09
to
On Dec 4, 8:20 pm, espada <jdx...@yahoo.com.sg> wrote:
> Hi Alessandro,
>
> Thanks for the reply! In this case, my filtergraph will be as u
> suggest camerafilter->encoder->samplegrabber->nullrenderer. I don't
> understand about the custom push source on the receiving side, could
> you explain further? How do I decode the received data on the
> receiving side because it seems its not possible to use the same
> filtergraph as the source.
>
> I saw samples for a simple udp server/client, will these work?http://www.java2s.com/Code/CSharp/Network/SimpleUdpServer.htmhttp://www.java2s.com/Code/CSharp/Network/SimpleUdpClient.htm

>
> Thanks again, please advise me :)

No, you will use a _different_ filter graph on the receiving side to
render the incoming video.

So one graph on the sender side looks like:

camera filter -> encoder -> sample grabber -> null renderer

...on the receiver side, you'll need something like:

custom source filter -> decoder -> renderer

The custom source filter can either implement the receiving code
itself, or you can pass in samples through some interface you define,
etc. But basically, you need some method of injecting samples into a
directshow graph on the receiving client. (either that, or you can do
your decoding/rendering outside dshow entirely, but that's something
that depends more on the specifics of your project). Assuming you
want to use dshow to decode/render incoming video, you'll need this
"custom source filter"

UDP will work, although keep in mind that UDP is unreliable. So your
data can potentially A) be lost or B) arrive out of order. Assuming
that's OK, UDP will work for you. TCP has reliable delivery
mechanisms, but if your media is real-time or network congestion is an
issue, it's not a good solution.

espada

unread,
Dec 13, 2009, 9:55:02 AM12/13/09
to
Hi Alessandro,

I understand about your concept of the "custom source filter", do you
have any code samples or resources for me to get a better idea?
Currently, I am able to get the Bitmap image from the Samplegrabber
buffer. To achieve a video streaming on the client side, I am supposed
to keep sending this Bitmap image over? Do I need Directshow to
display it as a video or does refreshing the image work? Because I
might want to add support for streaming the audio component in future
also.

Thanks you!

0 new messages