Discussion:
Reconfiguring exsiting graph
(too old to reply)
max
2003-07-31 09:22:57 UTC
Permalink
Hi there,

Overall setup is as follows:
graph (in Graphedit):
compressed data stream capture HW -> custom transform filter -> color space
converter -> video renderer

Graph is not running;
On user request stream format (resolution only) of the source is changed;
GraphEdit reports "Error connecting" - "This format is not currently
available"
This happens since my custom transform filter fails respective
CheckTransform call.
Such behavior can be reproduced with "TestCap Capture" in RGB24 output mode
connected to "color space converter" to renderer at the end.
Surprisingly setting up graph as "TestCap Capture" in UYVY output mode and
connection it directly to video renderer shows desired behavior - resolution
can be changed.

Questions:
- What should I do with my filter's input/output pins and all the down side
of graph to propagate respective change?
- Is it ever possible to have such functionality also for running graph?

Another question (not related to the above stuff):
- I have to pass some additional data (kinda context) from source to filter
with some (not all) mediasamples, but would like to keep it separate from
the main data buffer. The data size is just a couple of DWORDS. Are there
any other possibility as to create one more pin pair on source and filter or
as appending that data to media sample data?

Thanks for reading

Max
Thore B. Karlsen
2003-07-31 13:14:37 UTC
Permalink
Post by max
Hi there,
compressed data stream capture HW -> custom transform filter -> color space
converter -> video renderer
Graph is not running;
On user request stream format (resolution only) of the source is changed;
GraphEdit reports "Error connecting" - "This format is not currently
available"
This happens since my custom transform filter fails respective
CheckTransform call.
Such behavior can be reproduced with "TestCap Capture" in RGB24 output mode
connected to "color space converter" to renderer at the end.
Surprisingly setting up graph as "TestCap Capture" in UYVY output mode and
connection it directly to video renderer shows desired behavior - resolution
can be changed.
- What should I do with my filter's input/output pins and all the down side
of graph to propagate respective change?
Depending on how the graph is built, it may never be as simple as that.
If there is a color space converter inserted and you change to something
that it won't accept, you'll have to remove it manually.
Post by max
- Is it ever possible to have such functionality also for running graph?
Unfortunately, dynamic graph configuration does not work very well with
DirectShow. That is IMHO its biggest shortcoming.
Post by max
- I have to pass some additional data (kinda context) from source to filter
with some (not all) mediasamples, but would like to keep it separate from
the main data buffer. The data size is just a couple of DWORDS. Are there
any other possibility as to create one more pin pair on source and filter or
as appending that data to media sample data?
What I would do is make a new media sample class that can hold your
context data. Implement your own interface on it that will allow you to
retrieve the data, and implement IMediaSample/IMediaSample2 so that the
calls to those functions are simply passed through to an existing
contained sample.

This is a useful technique to know, in general.
--
Be seeing you.
Loading...