Hi.
I have been working on DirectShow source filters. The flash10c.ocx routine that is invoked when you click on any "Featured Highlight" on http://www.ustream.tv can abort and takes ANY browser with it under certain conditions.
After days of work, I have finally narrowed this down to the camera enumeration function(s) in flash10c.ocx. Before beginning this quest, I had no idea that the flash player was enumerating cameras on user's machines.
If you right click on a window playing flash video, and select "Settings" then click on the camera symbol, you will see a drop-down window listing all Direct-Show Source Filters that are on your machine. I have several.
I do not know why most flash video sites do not have a problem.
I do not know why the default flash video on the ustream site does not have a problem.
I also do not know why the other videos listed on that site under "Featured Highlights" DO exhibit a serious problem under the conditions I will describe below.
I have written a DirectShow Source Filter based on Microsoft examples. The actual source of video data is intended to be IP Camera Video from IP addresses so the filter is a little different from a normal webcam (hardware) implementation of a DirectShow Source Filter.
First I was surprised to discover that the flash player was calling my filter!
Then I was dismayed that the flash player crashed and took the browser with it. Any browser...
So I have determined that the flash10c.ocx apparently enumerates all cameras on my machine. One of those is my IP Camera Source Filter. When I click on one of the ustream site's "Featured Highlights" videos, the flash player actually brings up my filter then starts making successive calls to my NonDelegatingQueryInterface. It tries to get interfaces for:
IID_IUnknown (The filter returns S_OK)
IID_IUnknown (The filter returns S_OK)
IID_IPersistPropertyBag (The filter returns E_NOINTERFACE)
IID_IBaseFilter (The filter returns S_OK)
The flash player then invokes ANOTHER instance of my filter. (Don't know why....)
Then it again starts making successive calls to my NonDelegatingQueryInterface. It tries to get interfaces for:
IID_IUnknown (The filter returns S_OK)
IID_IPersistPropertyBag (The filter returns E_NOINTERFACE)
IID_IBaseFilter (The filter returns S_OK)
IID_IAMOpenProgress (The filter returns E_NOINTERFACE)
IID_IAMDeviceRemoval (The filter returns E_NOINTERFACE)
The flash player then calls SetFormat on my filter's output pin!
(How or why I don't know.) The AM_MEDIA_TYPE it is calling with is illegal, it is 0 so I return S_FALSE.
The enumeration routine then aborts which in turn causes the browser to abort. This is not good..
ANALYSIS:
If I had the source code to flash10c.ocx I might be able to fix this. It seems obvious that flash10c.ocx is not checking HRESULT return codes and expects IID_IAMDeviceRemoval to be there even though the Microsoft Documentation says I do not need that interface.
In addition, there must be some way for me to avoid this problem by tweaking MY code. So far NOTHING HAS WORKED.
I have source code that will demonstrate this that I'm willing to provide to anyone why has access to the flash10c.ocx source code and who might be able to help me resolve this. I also have a compiled filter that will demonstrate this effect. All you need to do is put my filter on your machine then run regsvr32 to register it. Then access a "Featured Highlight" flash video on the http://www.ustream.tv site.
I tried to upload the source code zip file but it is 49 KB bigger than the limit.
NOTE: Other flash videos at other sites do not have this problem. I do not know why the "Featured Highlight" flash videos on the http://www.ustream.tv site does exhibit this problem.
This has been driving me absolutely nuts for about three weeks now. I am a highly experienced software guy and really need a solution to this as soon as possible.
Thanks,
Howard





Reply With Quote