I want to add input pin to the Vcam so that an some other application
can write frames on the input pin, the sequence might be something
like this.
1. an Application will write data on input pin of virtual webcam
adapter
2. input pin will receive the data and pass on to the Transform filter.
3
3. Transform filter will queue the buffer ( by copying or by
incrementing the reference count)
4. output pin will ask the buffer from Transform filter whenever its
"FillBuffer" is called and Transform filter will provide it the buffer
from the queue.
does it seems achievable ?
thank in advance for the help.
> is it possible to extend Vcam ( virtual webcam adapter ) to use
> Transform filter ?
Are you talking about the vcam sample source filter by Vivek on TMH's
web site?
> I want to add input pin to the Vcam so that an some other application
> can write frames on the input pin, the sequence might be something
> like this.
Pins are used by filters to talk to other filters. There is no standard
way for code outside the graph to push data into the graph. However,
nobody prevents you from implementing a custom interface on your source
filter that the application can use to communicate with it.
> 1. an Application will write data on input pin of virtual webcam
> adapter
> 2. input pin will receive the data and pass on to the Transform
> filter. 3
> 3. Transform filter will queue the buffer ( by copying or by
> incrementing the reference count)
> 4. output pin will ask the buffer from Transform filter whenever its
> "FillBuffer" is called and Transform filter will provide it the buffer
> from the queue.
FillBuffer() is not a standard method and, if you are referring to the
BaseClasses, it only exists in the CSourceStream class used to implement
output pins for CSource, which is a push source filter. CTransformFilter
does not have a FillBuffer() abstract method.
You should explain what you want to do instead of guessing at how to do
it.
Where does you data comes from?
Where does the data go to?
Is the transform a pre-package filter or your own code?
And so on...
--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm
On Jun 16, 10:17 pm, "Alessandro Angeli" <nob...@nowhere.in.the.net>
wrote:
> From: "pankaj"
>
> > is it possible to extend Vcam ( virtual webcam adapter ) to use
> > Transform filter ?
>
> Are you talking about the vcam sample source filter by Vivek on TMH's
> web site?
yes i m talking about Vivek's sample. I am using it to play some
content inside the browser using Adobe flash.
>
> > I want to add input pin to the Vcam so that an some other application
> > can write frames on the input pin, the sequence might be something
> > like this.
>
> Pins are used by filters to talk to other filters. There is no standard
> way for code outside the graph to push data into the graph. However,
> nobody prevents you from implementing a custom interface on your source
> filter that the application can use to communicate with it.
How many methods do i need to over ride to add a input pin in CSource
( CVCam class) ?
>
> > 1. an Application will write data on input pin of virtual webcam
> > adapter
> > 2. input pin will receive the data and pass on to the Transform
> > filter. 3
> > 3. Transform filter will queue the buffer ( by copying or by
> > incrementing the reference count)
> > 4. output pin will ask the buffer from Transform filter whenever its
> > "FillBuffer" is called and Transform filter will provide it the buffer
> > from the queue.
>
> FillBuffer() is not a standard method and, if you are referring to the
> BaseClasses, it only exists in the CSourceStream class used to implement
> output pins for CSource, which is a push source filter. CTransformFilter
> does not have a FillBuffer() abstract method.
thanks for the explanation. :). I will keep this in mind.
>
> You should explain what you want to do instead of guessing at how to do
> it.
>
> Where does you data comes from?
>
> Where does the data go to?
>
> Is the transform a pre-package filter or your own code?
>
> And so on...
I want to play network stream in the web browser using flash player.
This will be a rtp stream, i have an application which can read this
rtp stream and play it locally. Now i want write a virtual webcam
adapter which can be read by the flash player. Vivek's vcam does
playback the content,but it doesn't take input from anywhere ( as it
is left for other people to implement their own way).
I wanted to add an input pin to Vcam class, after that I can add one
output filter in my application which an provide frames to that input
pin of Vcam.
Now when i look at the Ctransformfilter, it gives both input and
output pin, I was thinking earlier that it might possible to use
CVCamStream as input pin for CTransfrom filter.
now can you tell me what would be simpler to implement ?
1. adding a input pin to already CVCam class and override some methods
of csource to provide functionality for input pin.
2. Using a new class which inherit Ctransform filter and add
functionality to this one.
thanks in advance.
>> Pins are used by filters to talk to other filters. There is no
>> standard way for code outside the graph to push data into the graph.
>> However, nobody prevents you from implementing a custom interface on
>> your source filter that the application can use to communicate with
>> it.
>
> How many methods do i need to over ride to add a input pin in CSource
> ( CVCam class) ?
Zero. You don't seem to grasp the concept of pins and filters.
Pins are the sub-objects filters use to communicate with each other
inside the graph, ONLY with each other. Capture filters are live push
source filters and a source filter is a filter with ZERO input pins.
> now can you tell me what would be simpler to implement ?
> 1. adding a input pin to already CVCam class and override some methods
> of csource to provide functionality for input pin.
The VCam sample is a virtual capture filter and thus can not have input
pins nor can a CSource-based filter.
> 2. Using a new class which inherit Ctransform filter and add
> functionality to this one.
A transform filter is not a source filter and thus not a capture one.
Most likely Flash expects uncompressed data to come out of a capture
filter and will not have any idea that it should add other filters to
the ITS graph (it's Flash's graph, not yours to play with).
Inside your VCam-derived filter, you need to produce the uncompressed
FINAL data and output it. How you do that, has NOTHING to do with
DurectShow.
If you produce your final data using a DirectShow graph, just create
that graph inside you VCam-based filter and add a grabber at the end of
the pipeline to extract the processed data that you can then output from
the filter. You can use the stock SampleGrabber + NullRenderer or write
your own sink filter (that is, a renderer that does not really render
the samples).
The 2 graphs (your internal one and Flash's one) do NOT communicate with
each other: your VCam code extracts samples from your internal graph and
copies them into samples allocated by the VCam's output pin, so that
they will be fed to Flash's graph, of which your VCam filter is part.