Discussion:
how to create ksproxy.ax capture filters
(too old to reply)
David
2006-06-05 02:56:10 UTC
Permalink
Hi All,

I create capture filter and reg into system after that i use GraphicEdit and
see it display following:
- CANYON CN-WCAM23 PC-CAM
Filename: ksproxy.ax

- My Virtual Webcam
Filename: MyVitualWebcam.ax

- I download a virtual webcam on internet and install to system then i see
is: Filename : ksproxy.ax the same real webcam.

If i use DirectShow to query webcam's name then MyVirtualWebcam dispalay on
name list.
But if i program use functions of Video For Window to query name then name
list just display : real webcam and webcam of software that i installed, my
webcam is not display, i think creating my Virtual Webcam incorrect, i must
create Virtual Webcam have file name is: ksproxy.ax then ok, correct???

pls can anybody help me to solve this problem?
Thanks very much,

David,
novakinblood
2006-06-05 16:49:03 UTC
Permalink
David wrote:
--snip--
Post by David
But if i program use functions of Video For Window to query name then name
list just display : real webcam and webcam of software that i installed, my
webcam is not display, i think creating my Virtual Webcam incorrect, i must
create Virtual Webcam have file name is: ksproxy.ax then ok, correct???
pls can anybody help me to solve this problem?
Thanks very much,
David,
When you use Graphedit to choose your filter, which category does it
reside under; is it under the "Directshow Filter" tree or the "Video
Capture Sources" tree?

You may need to change in your filter's "DllRegisterServer()" function
this line:
pFilterMapper->RegisterFilter(
CLSID_MySource, // Filter CLSID.
SOURCE_NAME, // Filter name.
NULL, // Device moniker.
&CLSID_VideoInputDeviceCategory, // Video compressor category.
SOURCE_NAME, // Instance data.
&rf2FilterReg // Pointer to filter
information.
David
2006-06-06 01:49:06 UTC
Permalink
thanks very much,

My Virtaul Webcam at "Video Capture Sources" tree,

and my filter's "DllRegisterServer" function:

IFilterMapper2 *fm = 0;
hr = fm->RegisterFilter(CLSID_MySource,
SOURCE_NAME,
&pMoniker,
&CLSID_VideoInputDeviceCategory,
NULL,
&rf2);

anything above is correct?

David,
Post by novakinblood
--snip--
Post by David
But if i program use functions of Video For Window to query name then name
list just display : real webcam and webcam of software that i installed, my
webcam is not display, i think creating my Virtual Webcam incorrect, i must
create Virtual Webcam have file name is: ksproxy.ax then ok, correct???
pls can anybody help me to solve this problem?
Thanks very much,
David,
When you use Graphedit to choose your filter, which category does it
reside under; is it under the "Directshow Filter" tree or the "Video
Capture Sources" tree?
You may need to change in your filter's "DllRegisterServer()" function
pFilterMapper->RegisterFilter(
CLSID_MySource, // Filter CLSID.
SOURCE_NAME, // Filter name.
NULL, // Device moniker.
&CLSID_VideoInputDeviceCategory, // Video compressor category.
SOURCE_NAME, // Instance data.
&rf2FilterReg // Pointer to filter
information.
novakinblood
2006-06-06 04:52:49 UTC
Permalink
Post by David
thanks very much,
My Virtaul Webcam at "Video Capture Sources" tree,
IFilterMapper2 *fm = 0;
hr = fm->RegisterFilter(CLSID_MySource,
SOURCE_NAME,
&pMoniker,
&CLSID_VideoInputDeviceCategory,
NULL,
&rf2);
anything above is correct?
David,
You may try setting the second to last paramter to SOURCE_NAME, other
than that it appears OK
SmartSentry
2006-06-06 07:40:37 UTC
Permalink
If it's any help - a minor point:

It's not in your post, but I take it you do have a line to create the mapper
after you've declared it? eg ...

hr = CoCreateInstance(CLSID_FilterMapper2, NULL, CLSCTX_INPROC,
IID_IFilterMapper2, (void **) &fm);

Regards
Mike
Post by novakinblood
Post by David
thanks very much,
My Virtaul Webcam at "Video Capture Sources" tree,
IFilterMapper2 *fm = 0;
hr = fm->RegisterFilter(CLSID_MySource,
SOURCE_NAME,
&pMoniker,
&CLSID_VideoInputDeviceCategory,
NULL,
&rf2);
anything above is correct?
David,
You may try setting the second to last paramter to SOURCE_NAME, other
than that it appears OK
David
2006-06-06 10:48:43 UTC
Permalink
Thanks for reply

i try to set SOURCE_NAME, but it still not display when i use
capDlgVideoSource( hCapWndE ) function of Window.
Post by novakinblood
Post by David
thanks very much,
My Virtaul Webcam at "Video Capture Sources" tree,
IFilterMapper2 *fm = 0;
hr = fm->RegisterFilter(CLSID_MySource,
SOURCE_NAME,
&pMoniker,
&CLSID_VideoInputDeviceCategory,
NULL,
&rf2);
anything above is correct?
David,
You may try setting the second to last paramter to SOURCE_NAME, other
than that it appears OK
novakinblood
2006-06-06 15:21:47 UTC
Permalink
Post by David
Thanks for reply
i try to set SOURCE_NAME, but it still not display when i use
capDlgVideoSource( hCapWndE ) function of Window.
It appears this section of the code is OK.

Look into the directx docs and search for
"How Hardware Devices Participate in the Filter Graph"
and
"ksproxy"

This should give you a much better idea of why it exists and why you
shouldn't have your filter filename to be "ksproxy.ax"
David
2006-06-07 03:08:00 UTC
Permalink
thanks very much, but i feel very hard to have any idea to dev, i can not
know starting :).
Post by novakinblood
Post by David
Thanks for reply
i try to set SOURCE_NAME, but it still not display when i use
capDlgVideoSource( hCapWndE ) function of Window.
It appears this section of the code is OK.
Look into the directx docs and search for
"How Hardware Devices Participate in the Filter Graph"
and
"ksproxy"
This should give you a much better idea of why it exists and why you
shouldn't have your filter filename to be "ksproxy.ax"
novakinblood
2006-06-12 16:03:36 UTC
Permalink
Post by David
thanks very much, but i feel very hard to have any idea to dev, i can not
know starting :).
You would need the Windows DDK in order to develop with ksproxy.

Are you trying to write a filter than can be enumerated in a VFW
environment; or what's your main goal?
VietDoor
2006-06-13 18:24:41 UTC
Permalink
I have the same problem,
I am writing a virtual webcam (writing a filter), apps as yahoo, skype
woring with DirectShow, so they can use my virtual wc, but Java (JMF) work
with VFW, so it can n't use my virtual wc.

I found an article at Microsoft's site, it is said that
- Way 1 - We must develop a driver to support VFW
- Way 2 - take full features of DirectShow to support VFW

Any idea? Pls help me, thanks.
Post by novakinblood
Post by David
thanks very much, but i feel very hard to have any idea to dev, i can not
know starting :).
You would need the Windows DDK in order to develop with ksproxy.
Are you trying to write a filter than can be enumerated in a VFW
environment; or what's your main goal?
rep_movsd
2006-06-13 14:17:09 UTC
Permalink
Hi

I have done this just a month or 2 back.
I started out with a user mode filter ( the rudimentary version of
which is there at downloads section of tmhare.mvps.org )

That wasnt upto spec wrt working in all apps seamlessly so I went ahead
and wrote a Device driver. It was uphill all the way....

I cant reveal all details as to how i went about it ( coz i did the
work commercially )
Suffice to say that the TestCap sample in the Windows DDK is a great
starting point.

Look at that code and ask yourself "Where do you want to go today TM ?"
:p

The VFW sample seemed very much more simpleat first glance, but I gave
up after being unable to compile the samples.

You can see the whole history of my development by searching on google
for my posts, theres a lot of stuff I went thru that you can avoid and
learn from my mistakes and stumblings.

Good luck and Regards
Vivek
Peter Duniho
2006-06-13 17:18:46 UTC
Permalink
Post by rep_movsd
I cant reveal all details as to how i went about it ( coz i did the
work commercially )
I don't see why not. Unless the work you did involves proprietary secrets
(and given that you presumably did the work using a public API, it's hard to
see how it could), I don't see how your work could possibly be construed as
un-shareable. At least with respect to the technical details (I can easily
see how the copyrighted code itself cannot be republished, but the general
descriptions of what the code does shouldn't be private).

Conversely, it seems to me that a person doing work for which he cannot
share the results, not even in general technical terms, should not be asking
for help in a public forum such as this. The word "leech" comes to mind.
Post by rep_movsd
[...]
You can see the whole history of my development by searching on google
for my posts, theres a lot of stuff I went thru that you can avoid and
learn from my mistakes and stumblings.
Rather than being so opaque about it, how about just posting a summary of
what you learned, so everyone else doesn't have to repeat all of your
mistakes? If you're not willing to do that, then perhaps you should
reconsider accepting help from other people in this forum.

Pete
rep_movsd
2006-06-13 20:09:18 UTC
Permalink
Post by Peter Duniho
Post by rep_movsd
I cant reveal all details as to how i went about it ( coz i did the
work commercially )
I don't see why not. Unless the work you did involves proprietary secrets
(and given that you presumably did the work using a public API, it's hard to
see how it could), I don't see how your work could possibly be construed as
un-shareable. At least with respect to the technical details (I can easily
see how the copyrighted code itself cannot be republished, but the general
descriptions of what the code does shouldn't be private).
All right officer, turn off the bright lights, put away the
thumbscrews, rack and the cattle prod, Ill talk....

Basically I started out with
1) Removed support for the NABTS, CC and Analog video pins from the
test cap sample. You have to be careful doing this, making sure you do
not break the RGB out functionality
2) I struggled a lot trying to pass data from user mode to kernel mode
( obviously I dont want to attempt a task of generating or reading
video data to render in kernel mode). Since its a WDM driver the
DeviceIOControl stuff doesn't seem to work as it does for plain old
drivers ( or maybe its just that I couldnt get it to work ). One other
thing i tried was to have a named mmaped section . But it didnt work
either, for the reason that I could not access that section from the
IRQL at which the frame generating function ran.
So then I came across this sample function somewhere on google groups(
links below) which let me alloc the memory in kernel mode and pass the
pointer back to userspace thru a custom KS property set. It finally
worked.
Post by Peter Duniho
Conversely, it seems to me that a person doing work for which he cannot
share the results, not even in general technical terms, should not be asking
for help in a public forum such as this. The word "leech" comes to mind.
Well thats a bit uncalled for...
Of all the postings i ever made here I recall only once or twice that
my problem was actually solved by input here.
More like I've been the guy replying to folks wrt their dshow issues.
And as for leeching, you can go to http://tmhare.mvps.org/downloads.htm
and see for yourself that 3 of the 6 downloads there are stuff that i
released free and unrestricted.
FYI It also includes a usermode virtual capture device.

Please do your homework before namecalling....
I'm sure regulars like Alessandro Angeli and The March Hare would
disagree wrt to the leeching part.
Post by Peter Duniho
Rather than being so opaque about it, how about just posting a summary of
what you learned, so everyone else doesn't have to repeat all of your
mistakes? If you're not willing to do that, then perhaps you should
reconsider accepting help from other people in this forum.
It's bad enough that i started from scratch with no DDK experience and
had to struggle so hard to finish it.Its worse that someone cant grep
the newsgroups and blames me for hiding information.

For those who want to be spoonfed :
Heres a link showng all the posts i made about the DDK version of the
virtual webcam.If I could write/read all that then whoever wants can
click the links and get the info.

http://groups.google.com/groups?q=group%3Amicrosoft.public.*+insubject%3Avirtual+author%3Arep.movsd%40gmail.com&start=0&num=100&hl=en&lr=&as_drrb=q&as_mind=1&as_minm=1&as_miny=1981&as_maxd=14&as_maxm=6&as_maxy=2006&safe=off&filter=0

Anyway if someone succeeds with this after me, remember you heard it
here first!!!

Regards
Vivek
The March Hare [MVP]
2006-06-13 22:49:35 UTC
Permalink
Post by rep_movsd
Post by Peter Duniho
I don't see why not. Unless the work you did involves proprietary secrets
(and given that you presumably did the work using a public API, it's hard to
see how it could), I don't see how your work could possibly be construed as
un-shareable. At least with respect to the technical details (I can easily
see how the copyrighted code itself cannot be republished, but the general
descriptions of what the code does shouldn't be private).
All right officer, turn off the bright lights, put away the
thumbscrews, rack and the cattle prod, Ill talk....
...

I will add that I think Peter, with whom I generally agree, is, IMO, a
little out of line with at least the tone of his post. Vivek has been
quite helpful in the dshow newsgroups in the past and has contributed
several samples that are on my site.

There is a "leetch" hangs around here almost exclusively to promote his own
product but that isn't Vivek ;)
--
Please read this before replying:
1. Dshow & posting help: http://tmhare.mvps.org/help.htm
2. Trim & respond inline (please don't top post or snip everything)
3. Benefit others: follow up if you are helped or you found a solution
Peter Duniho
2006-06-13 23:40:01 UTC
Permalink
Post by The March Hare [MVP]
I will add that I think Peter, with whom I generally agree, is, IMO, a
little out of line with at least the tone of his post.
Fine...I take back "leech". It's true that you have, Vivek, contributed
plenty to the cause. I apologize for the overly-harsh tone.

Still, a solution to this kind of messy problem is exactly the kind of gems
that need to be shared here, and not simply by sending a person on a
potential wild goose chase. If you know the details, there's no good reason
to not go ahead and summarize them in one easy-to-find post, especially when
the details are apparently already public knowledge for the person who
spends the time searching various messages in the newsgroup to put all the
pieces together.

Very few of the questions asked here cannot be answered with careful reading
of the documentation. So if the argument is to be "the answer is already
written down somewhere", I find that less than compelling. And of course,
I've already stated my objection to the argument "I solved this for a
commercial product", when the help that provided the solution was found
right here (obviously independent, non-public work has no expectation of
public sharing).

So, thank you for relenting and posting the details for all to see in one
convenient location, and I'm sorry for going a bit too far with my
criticism.

Pete
rep_movsd
2006-06-14 06:55:01 UTC
Permalink
Thanks & Regards
Vivek

rep_movsd
2006-06-13 14:35:38 UTC
Permalink
Hi

I have done this just a month or 2 back.
I started out with a user mode filter ( the rudimentary version of
which is there at downloads section of tmhare.mvps.org )

That wasnt upto spec wrt working in all apps seamlessly so I went ahead
and wrote a Device driver. It was uphill all the way....

I cant reveal all details as to how i went about it ( coz i did the
work commercially )
Suffice to say that the TestCap sample in the Windows DDK is a great
starting point.

Look at that code and ask yourself "Where do you want to go today TM ?"
:p

The VFW sample seemed very much more simpleat first glance, but I gave
up after being unable to compile the samples.

You can see the whole history of my development by searching on google
for my posts, theres a lot of stuff I went thru that you can avoid and
learn from my mistakes and stumblings.

Good luck and Regards
Vivek
Continue reading on narkive:
Search results for 'how to create ksproxy.ax capture filters' (Questions and Answers)
3
replies
My halo PC is acting weird.?
started 2008-01-22 18:20:34 UTC
software
Loading...