Click here to Skip to main content
Rate this: bad
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 at 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 at 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 at 10-Jan-13 6:58am
Yes, I wrote you note regarding that.
Tarun Batra at 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 at 10-Jan-13 7:11am
Sure, but had you asking the question to yourself: "what for it is needed?"
Tarun Batra at 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 at 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 at 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 at 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 at 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
0 Peter Leow 315
1 Mika Wendelius 275
2 CHill60 190
3 TheRealSteveJudge 184
4 Abhinav S 170
0 Sergey Alexandrovich Kryukov 8,613
1 OriginalGriff 6,546
2 Peter Leow 3,897
3 Zoltán Zörgő 3,456
4 Richard MacCutchan 2,472

Advertise | Privacy | Mobile
Web02 | 2.8.150123.1 | Last Updated 10 Jan 2013
Copyright © CodeProject, 1999-2015
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