Newsgroups: microsoft.public.win32.programmer.directx.video
From: "Alessandro Angeli [MVP::DS/MF]" <nob...@nowhere.in.the.net>
Date: Thu, 16 Feb 2006 20:34:15 +0100
Local: Thurs, Feb 16 2006 2:34 pm
Subject: Re: Help regarding writing a Source Filter
DevX wrote: Instead I disagree. A push model would be easier to > I agree to your suggestion of a pull model from the > Filter. But only some more questions (sorry again, I'm > very newbie on DirectShow and low-level COM Programming): implement. See below. > my real problem is a confusion about where/when/how the Your source filter can be created in 2 ways and it's up to > CSourceStream-derived class is created when building the > filter graph. you to decide: 1. you create it anyway you like and add it to the graph 2. the filter graph adds it when it tries to render a custom If your filter is only used internally in your application, > Later, in your reply, you suggest using named pipe. If I An alternative would be using UDP sockets: they are > understand correctly, in this manner you suggest a > completely separated mode of operation between the dotNET > code (that write on the pipe unaware of the client) and > the filter (that can read from the pipe, unaware of the > writer)...this approach can be Ok for me and much more > easier to implement, message-based instead of stream-based, so that they would preserve the sample boundaries without you implementing your own framing, and as efficient (since they would be routed over the virtual loopback device), but you would need to implement your own inter-process security, if local security is a concern (local meaning on the same machine, since total security from the outside world would be provided the socket itself). > but a more coupled approach (like Yes. You can do it in any number of ways depending on your > the one I tried to describe with the questions above) is > possible? needs and how complex you want it to be, but this is the easiest: 1. derive your filter class from CBaseFilter and your output 2. in your filter class, override GetPin() and GetPinCount() 3. in your output pin class override GetMediaType(), 4. add a custom interface to your filter class that has a 5. you may want to add a couple more methods to the custom From the application point of view, pushing data through the This works well unless you need asynchronous processing or -- You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||