cplussharp / graph-studio-next

GraphStudioNext is a tool for developers to build and test DirectShow Graphs
355 stars 94 forks source link

Loading GRF of GRFX file should preserve 'use clock' status of graph #268

Closed mikecopperwhite closed 9 years ago

mikecopperwhite commented 9 years ago

To reproduce:

Expected: Use clock is disabled Actual: Use clock is enabled.

GraphEdit remembers this when the graph is reloaded from a GRF file. Graph Studio Next should do the same.

I suspect our post loading processing is overriding the clock used by the graph.

roman380 commented 9 years ago

Well we might also like to have persistent setting for use filter X as clock as well... I don't think it's used often though, and I don't think GRF can hold that, but GRFX can easily reuse new clock XML value which is empty/"none" now and can also have index of specific filter.

mikecopperwhite commented 9 years ago

I think we've made conflicting changes. The clock setting should ideally occur in the GRFX specific code.

The default GRF loading sets the clock itself.

The internal GRF parser should do the same. The GRF does seem to contain the filter index of the selected clock - see where clock_index is set at the end of GRF_File::Load. clock_index is not currently used.

roman380 commented 9 years ago

Regarding GRF, the default implementation of persistence does not affect clock, or no? If it does not modify clock then we can only add it as a side setting in the structured document file. I would perhaps rather not bother with it, especially that GRFX is already a superior option (to me it looks as obvious superior option because I can edit the file and modify/fix paths contained there).

I saw the conflicting changes but I think I merged them? Now I re-checked and I think this still needs an update.

I also see that clock_index exists but is not used (is to be used if/when we implement clock as specific filter).

mikecopperwhite commented 9 years ago

Default GRF persistence does set the clock to the same filter as when saved though I'm not sure how it represents the distinction between system clock and no clock. Need to test further but may not get a chance until next week.

Great to have the GRF X support in.

GRF files are not entirely dead. The internal graph parser will prompt to fix up paths at load time. Also very easy to save and load GRF files from other code.

On 30 Jun 2015 10:48, "Roman R." notifications@github.com wrote:

Regarding GRF, the default implementation of persistence does not affect clock, or no? If it does not modify clock then we can only add it as a side setting in the structured document file. I would perhaps rather not bother with it, especially that GRFX is already a superior option (to me it looks as obvious superior option because I can edit the file and modify/fix paths contained there).

I saw the conflicting changes but I think I merged them? Now I re-checked and I think this still needs an update.

I also see that clock_index exists but is not used (is to be used if/when we implement clock as specific filter).

— Reply to this email directly or view it on GitHub https://github.com/cplussharp/graph-studio-next/issues/268#issuecomment-117100201 .