-
Windows Media Encoder SDK - Custom Capture Filter
Hey,
I am trying to use a custom DirectShow video capture filter to source Windows Media Encoder. I have parts of the filter completed. Basically, I can register it and looks like a video capture filter. It's just haven't implemented the "work" it has to do. It also shows up in the Windows Media Encoder UI as a possible capture device. So far so good.
The next part that I was working on was writing a simple command-line tool that fit all the pieces together.
I set the input on the IWMEncSource like so:
Code:
videoSrc->SetInput("device://RTP Video Capture Filter");
In order for me to tell the filter about the RTP stream, I implemented the IFileSourceFilter interface. This allows me to load the details using SDP. Next, reading through documentation I see that I must call IWMEncoder::PrepareToEncode() before it will actually try to create an instance of the specified input. Easy enough.
Based on a log my capture filter creates, I can see that WME is instantiating an instance of it (Actually, it seems to create 8 copies. All of which it releases except the last). Now, I need to get a hold of that instance, so that I can call IFileSourceFilter methods.
Code:
videoSrc->GetSourcePlugin(&unk);
unk->QueryInterface(IID_IFileSourceFilter, &fSrcFilter);
Here is where the problem begins. QueryInterface() fails with E_NOINTERFACE (and yes, I have tested to make sure that my filter handles the QueryInterface() call properly). I have tried querying for numerous different interfaces to see what I could find out about the "source plugin", but they all failed with the same error.
So, my question is: what does GetSourcePlugin() return? And if it's not my capture filter, how do I get it?
Sorry for the long post. I figured that I would give all the details.
Cheers,
Amac
Similar Threads
-
By Daniel Rolfe in forum .NET
Replies: 0
Last Post: 08-21-2002, 05:51 PM
-
Replies: 1
Last Post: 09-02-2001, 08:00 AM
-
Replies: 0
Last Post: 08-31-2001, 09:15 AM
-
By Ory Adler in forum ASP.NET
Replies: 1
Last Post: 07-23-2001, 03:14 AM
-
By Ory Adler in forum ASP.NET
Replies: 0
Last Post: 07-17-2001, 11:46 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks