Click here to Skip to main content
13,298,348 members (71,924 online)
Rate this:
Please Sign up or sign in to vote.
I want to create and use a filter in which i have to make socket connection receive the data and then pass the data to the direct show filter for playing....can you give me some guidance how to do this and which samples do i read?
Posted 2-Jan-13 3:45am
Sandeep Mewara 2-Jan-13 23:16pm
Tried to find material on net?

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1


If you need C++ solution you should check DSNetwork Sample[^]
It is in old DirectX 9 SDK in DirectShow Filters Samples it can be easy modify to work not only with mpeg2 transport streams.

If you need C# solution example you can check my sample filters: Pure .NET DirectShow Filters in C#[^]

Tarun Batra 10-Jan-13 6:54am
Thanks for the reply sir but i was trying to convert into c# filter using your solution but i got stuck in "COM plumbing" part of the above link,i was not able to get the c# code of the "COM plumbing" part
Maxim Kartavenkov 10-Jan-13 6:58am
Yes, I wrote you note regarding that.
Tarun Batra 10-Jan-13 7:04am
but i am not able to get the CUnknown class and NonDelegatingQueryInterface(REFIID riid, void **ppv) interface in your base classes code how to get that as you can see the below code return s the CUnknown pointer
CUnknown* WINAPI CLiveSource::CreateInstance(LPUNKNOWN pUnk, HRESULT *phr)
CUnknown* pNewFilter = new CLiveSource(pUnk, phr);

if (phr)
if (pNewFilter == NULL)
*phr = S_OK;

return pNewFilter;
Maxim Kartavenkov 10-Jan-13 7:11am
Sure, but had you asking the question to yourself: "what for it is needed?"
Tarun Batra 10-Jan-13 7:15am
i am asking to you sir where can i find the CUnknown class in your base classes and NonDelegatingQueryInterface(REFIID riid, void **ppv) as there is no thing like REFIID in your samples,are there any alternative for these?
Maxim Kartavenkov 10-Jan-13 7:22am
Sure bcs C# and C++ it is different languages and I told you to review C# specification of what you are planing to do.
Tarun Batra 10-Jan-13 7:25am
sir sorry for the silly ques but i am not much familiar with C# can you please give me the equivalent c# code for the above c++ code i only want to implement the filter of which i have given you link in C#,as you are much familiar with direct show,it will be so kind of you
Maxim Kartavenkov 10-Jan-13 7:41am
Why are you doing conversion from C++ into C# if you not much familar with C#? - use C++ code. I already wrote you - there is no equivalent, I already gave you the URL which you should read.
Tarun Batra 10-Jan-13 7:45am
you are absolutely correct sir we have should use the c++ code so i tryed to make the DLL of above link but it gives .ax file and actually i have to receive the rtsp stream from socket connection i tryed it in c++ but was not able to but when i use your soket connection to recieve the data we were able to get so we thought to transform c++ code into c#

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.171207.1 | Last Updated 10 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100