Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Windos
win32.3rdparty
win32.directx.audio
win32.directx.ddk
win32.directx.graphics
win32.directx.input
win32.directx.managed
win32.directx.misc
win32.directx.networking
win32.directx.sdk
win32.directx.video
win32.dirx.grap.shaders
win32.gdi
win32.international
win32.kernel
win32.messaging
win32.mmedia
win32.networks
win32.ole
win32.rtc
win32.tapi
win32.tapi.beta
win32.tools
win32.ui
win32.wince
win32.wmi
windows.mediacenter
winfx.aero
winfx.announcements
winfx.avalon
winfx.collaboration
winfx.fundamentals
winfx.general
winfx.indigo
winfx.sdk
winfx.winfs
  
 
date: Mon, 7 Apr 2008 16:38:26 -0700 (PDT),    group: microsoft.public.win32.programmer.directx.audio        back       


Directshow Filter to load audio file upstream to AVStream driver   
I need to create Directshow filter that's similar to "Capture" filter
that loads either an input audio/video file and send buffer data to
upstream to AVStream driver.  How can I approach this?  Thanks.
date: Mon, 7 Apr 2008 16:38:26 -0700 (PDT)   author:   unknown

Re: Directshow Filter to load audio file upstream to AVStream driver   
On Mon, 7 Apr 2008 16:38:26 -0700 (PDT), gottoit7@gmail.com wrote:

> I need to create Directshow filter that's similar to "Capture" filter
> that loads either an input audio/video file and send buffer data to
> upstream to AVStream driver.  How can I approach this?  Thanks.

What do you mean here by "upstream"?

What will it be connected to?

-- 
http://www.chrisnet.net/code.htm
[MS MVP for DirectShow / MediaFoundation]
date: Tue, 8 Apr 2008 11:27:17 -0400   author:   Chris P.

Re: Directshow Filter to load audio file upstream to AVStream driver   
On Apr 8, 8:27 am, "Chris P."  wrote:
> On Mon, 7 Apr 2008 16:38:26 -0700 (PDT), gotto...@gmail.com wrote:
> > I need to create Directshow filter that's similar to "Capture" filter
> > that loads either an input audio/video file and send buffer data to
> > upstream to AVStream driver.  How can I approach this?  Thanks.
>
> What do you mean here by "upstream"?
>
> What will it be connected to?
>
> --http://www.chrisnet.net/code.htm
> [MS MVP for DirectShow / MediaFoundation]

Basically I want to make a filter that's able to load an input file
(e.g. .mpeg file or .wav file) then feed it to my AVStream class
driver.  Then when I hit play in GraphEdit, it'll stream the file.
Like picture below in a graph.

______________________                ________________
_______________
| Test.mpeg or  Audio.wav |     ==>    |      Custom Filter   |
==>    |    Render Filter   |
|_____________________|                |________________|            |
_______________|
date: Tue, 8 Apr 2008 10:45:52 -0700 (PDT)   author:   unknown

Re: Directshow Filter to load audio file upstream to AVStream driver   
On Apr 8, 8:27 am, "Chris P."  wrote:
> On Mon, 7 Apr 2008 16:38:26 -0700 (PDT), gotto...@gmail.com wrote:
> > I need to create Directshow filter that's similar to "Capture" filter
> > that loads either an input audio/video file and send buffer data to
> > upstream to AVStream driver.  How can I approach this?  Thanks.
>
> What do you mean here by "upstream"?
>
> What will it be connected to?
>
> --http://www.chrisnet.net/code.htm
> [MS MVP for DirectShow / MediaFoundation]

Basically I want to make a filter that's able to load an input file
(e.g. .mpeg file or .wav file) then feed it to my AVStream class
driver.  Then when I hit play in GraphEdit, it'll stream the file.
Like picture below in a graph.

______________________                ________________
_______________
| Test.mpeg or  Audio.wav |     ==>    |      Custom Filter   |
==>    |    Render Filter   |
|_____________________|                |________________|            |
_______________|
date: Tue, 8 Apr 2008 10:47:58 -0700 (PDT)   author:   unknown

Re: Directshow Filter to load audio file upstream to AVStream driver   
On Apr 8, 8:27 am, "Chris P."  wrote:
> What do you mean here by "upstream"?
> What will it be connected to?

Basically I want to make a filter that's able to load an input file
(e.g. .mpeg file or .wav file) then feed it to my AVStream class
driver.  Then when I hit play in GraphEdit, it'll stream the file.
Like picture below in a graph.


|Test.mpeg | ==> | Custom Filter |  ==>  |RenderFilter |
date: Tue, 8 Apr 2008 10:52:40 -0700 (PDT)   author:   unknown

Re: Directshow Filter to load audio file upstream to AVStream driver   
On Tue, 8 Apr 2008 10:52:40 -0700 (PDT), gottoit7@gmail.com wrote:

> Basically I want to make a filter that's able to load an input file
> (e.g. .mpeg file or .wav file) then feed it to my AVStream class
> driver.  Then when I hit play in GraphEdit, it'll stream the file.
> Like picture below in a graph.
> 
>|Test.mpeg | ==> | Custom Filter |  ==>  |RenderFilter |

How about making a sub-graph like above with a custom renderer filter,
rather than playing the audio to the sound card it delivers the audio
stream to you class driver via a private connection.

-- 
http://www.chrisnet.net/code.htm
[MS MVP for DirectShow / MediaFoundation]
date: Tue, 8 Apr 2008 14:53:14 -0400   author:   Chris P.

Re: Directshow Filter to load audio file upstream to AVStream driver   
>
> How about making a sub-graph like above with a custom renderer filter,
> rather than playing the audio to the sound card it delivers the audio
> stream to you class driver via a private connection.

Thanks for the reply.  But I want to create a filter that loads an
input file and send data packets to my AVS driver.  How I can I
achieve such filter.
date: Tue, 8 Apr 2008 12:16:53 -0700 (PDT)   author:   unknown

Re: Directshow Filter to load audio file upstream to AVStream driver   
On Tue, 8 Apr 2008 12:16:53 -0700 (PDT), gottoit7@gmail.com wrote:

>>
>> How about making a sub-graph like above with a custom renderer filter,
>> rather than playing the audio to the sound card it delivers the audio
>> stream to you class driver via a private connection.
> 
> Thanks for the reply.  But I want to create a filter that loads an
> input file and send data packets to my AVS driver.  How I can I
> achieve such filter.

You place the DirectShow graph I described inside the filter.

-- 
http://www.chrisnet.net/code.htm
[MS MVP for DirectShow / MediaFoundation]
date: Tue, 8 Apr 2008 18:41:46 -0400   author:   Chris P.

Re: Directshow Filter to load audio file upstream to AVStream driver   
On Apr 8, 3:41 pm, "Chris P."  wrote:
> On Tue, 8 Apr 2008 12:16:53 -0700 (PDT), gotto...@gmail.com wrote:
>
> >> How about making a sub-graph like above with a custom renderer filter,
> >> rather than playing the audio to the sound card it delivers the audio
> >> stream to you class driver via a private connection.
>
> > Thanks for the reply.  But I want to create a filter that loads an
> > input file and send data packets to my AVS driver.  How I can I
> > achieve such filter.
>
> You place the DirectShow graph I described inside the filter.
>
> --http://www.chrisnet.net/code.htm
> [MS MVP for DirectShow / MediaFoundation]

So how do I do what you just described "make a sub-graph with a custom
renderer filter that delivers the audio
stream to the class driver via a private connection" then place this
graph inside the filter?  I need more guiding, please. Thanks.
date: Tue, 8 Apr 2008 15:54:39 -0700 (PDT)   author:   unknown

Re: Directshow Filter to load audio file upstream to AVStream driver   
On Tue, 8 Apr 2008 15:54:39 -0700 (PDT), gottoit7@gmail.com wrote:

> So how do I do what you just described "make a sub-graph with a custom
> renderer filter that delivers the audio
> stream to the class driver via a private connection" then place this
> graph inside the filter?  I need more guiding, please. Thanks.

As was making the assumption that your custom AVStream class driver is a
source, if this is incorrect let me know.

Step 1.
Start with a test project outside of the filter.  Create a DirectShow graph
and insert a SampleGrabber (configured for PCM mediatype) and a
NULL_Renderer, and then call RenderFile() with the filename of the source
file.  Implement a SampleGrabber callback function to receive the samples.
Once you are happy that you are receiving the PCM sample data correctly
move on to step 2.

Step 2.
Test out if you can successfully integrate the above DirectShow graph
directly inside your AVStream driver.

Step 3.
Create a custom renderer filter and eliminate the SampleGrabber and
NULL_Renderer.  This will allow you to have better control over the timing
and data deliver.

Step 4.
Test the final package.

-- 
http://www.chrisnet.net/code.htm
[MS MVP for DirectShow / MediaFoundation]
date: Wed, 9 Apr 2008 12:48:43 -0400   author:   Chris P.

Re: Directshow Filter to load audio file upstream to AVStream driver   
> As was making the assumption that your custom AVStream class driver is a
> source, if this is incorrect let me know.

Just to verify, the source is an input file (.wav or .mpg) that I need
to send up to my AVS driver.  Also, how can i verify the PCM sample
data I received is matching with the input? Thank you.
date: Thu, 10 Apr 2008 19:16:36 -0700 (PDT)   author:   unknown

Re: Directshow Filter to load audio file upstream to AVStream driver   
On Thu, 10 Apr 2008 19:16:36 -0700 (PDT), gottoit7@gmail.com wrote:

> Just to verify, the source is an input file (.wav or .mpg) that I need
> to send up to my AVS driver.  Also, how can i verify the PCM sample
> data I received is matching with the input? Thank you.

I still don't understand exactly what your AVS driver is doing so I can't
tell if this is the easiest or best approach.  You need to describe better
what purpose the AVS driver is serving here.

-- 
http://www.chrisnet.net/code.htm
[MS MVP for DirectShow / MediaFoundation]
date: Fri, 11 Apr 2008 10:00:14 -0400   author:   Chris P.

Re: Directshow Filter to load audio file upstream to AVStream driver   
On Apr 11, 7:00 am, "Chris P."  wrote:
> On Thu, 10 Apr 2008 19:16:36 -0700 (PDT), gotto...@gmail.com wrote:
> > Just to verify, the source is an input file (.wav or .mpg) that I need
> > to send up to my AVS driver.  Also, how can i verify the PCM sample
> > data I received is matching with the input? Thank you.
>
> I still don't understand exactly what your AVS driver is doing so I can't
> tell if this is the easiest or best approach.  You need to describe better
> what purpose the AVS driver is serving here.
>
> --http://www.chrisnet.net/code.htm
> [MS MVP for DirectShow / MediaFoundation]

My AVStream driver is a video capture driver that has Crossbar Filter
& Capture Filter already integrated in the driver.  It's able to do
downstream video.  So my question is how can I do "UPSTREAM" to my
device ?  Thanks.
date: Mon, 14 Apr 2008 13:45:32 -0700 (PDT)   author:   unknown

Re: Directshow Filter to load audio file upstream to AVStream driver   
On Mon, 14 Apr 2008 13:45:32 -0700 (PDT), gottoit7@gmail.com wrote:

> My AVStream driver is a video capture driver that has Crossbar Filter
> & Capture Filter already integrated in the driver.  It's able to do
> downstream video.  So my question is how can I do "UPSTREAM" to my
> device ?  Thanks.

There is no such thing as upstream, you can only simulate it by pulling the
data from file and delivering it with appropriate timing.

-- 
http://www.chrisnet.net/code.htm
[MS MVP for DirectShow / MediaFoundation]
date: Mon, 21 Apr 2008 13:45:58 -0400   author:   Chris P.

Re: Directshow Filter to load audio file upstream to AVStream driver   
On Apr 21, 10:45 am, "Chris P."  wrote:
> On Mon, 14 Apr 2008 13:45:32 -0700 (PDT), gotto...@gmail.com wrote:
> > My AVStream driver is a video capture driver that has Crossbar Filter
> > & Capture Filter already integrated in the driver.  It's able to do
> > downstream video.  So my question is how can I do "UPSTREAM" to my
> > device ?  Thanks.
>
> There is no such thing as upstream, you can only simulate it by pulling the
> data from file and delivering it with appropriate timing.
>
> --http://www.chrisnet.net/code.htm
> [MS MVP for DirectShow / MediaFoundation]

1) So to achieve this, how I correctly get data from video file
(.asf)?
2) Would I just deliver the data (IMediaSample) to output pin of my
capture filter?
3) Do I have to do any conversion before deliver the data?
4) While delivering the data to output pin, how do I manage good
timing?  Which base class to use?

Thanks a lot.
date: Thu, 24 Apr 2008 18:37:07 -0700 (PDT)   author:   unknown

Re: Directshow Filter to load audio file upstream to AVStream driver   
On Thu, 24 Apr 2008 18:37:07 -0700 (PDT), gottoit7@gmail.com wrote:

> 1) So to achieve this, how I correctly get data from video file
> (.asf)?

I would use the IWMReader directly.

> 2) Would I just deliver the data (IMediaSample) to output pin of my
> capture filter?

Basically yes.

> 3) Do I have to do any conversion before deliver the data?

Shouldn't have to.  You will have the option of outputting compressed or
uncompressed data.

> 4) While delivering the data to output pin, how do I manage good
> timing?  Which base class to use?

Maintaining accurate timing is optional and whether or not it is necessary
will depend on the intended use.  If you do maintain the timing you can use
the timestamp on the samples.

-- 
http://www.chrisnet.net/code.htm
[MS MVP for DirectShow / MediaFoundation]
date: Fri, 25 Apr 2008 09:41:00 -0400   author:   Chris P.

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us