Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se |
|
|
#1 | Link | ||
|
Soul Architect
Join Date: Apr 2014
Posts: 2,455
|
Can I Pass Clip Metadata Between Filters
Is it possible to pass metadata from one filter to the next?
Here's what I want to do. Instead of this... (which if you tried SuperRes/Shader, you'll see it is very expensive on memory) Quote:
Quote:
Is it possible? Well... yes it is possible, worse case scenario I could store the metadata as a struct within the input video's memory but that would be VERY ugly programming. Is there a better way to pass metadata from one filter to the next? |
||
|
|
|
|
|
#3 | Link |
|
Soul Architect
Join Date: Apr 2014
Posts: 2,455
|
OK. It wouldn't be doing the hack of storing in vi.num_audio_samples if it was possible to pass parameters. I'd need to pass more data than that, too.
So I guess the only way to do it would be to encode the structure as a byte array to replace the frame data. In .NET, serializing data in such a way is easy. In C++, however, I'm not sure how I would do it. String data would be especially complicated to serialize. That's when I wish I was using C#... Is there an easy way in C++ to convert an array of structures into binary, when it contains strings and each item in the list has a different length? |
|
|
|
|
|
#4 | Link | |
|
Formerly davidh*****
![]() Join Date: Jan 2004
Posts: 2,888
|
Quote:
Code:
struct my_struct x[100]; memcpy(storage, x, 100*sizeof(my_object)); ... struct my_struct y[100]; memcpy(y, storage, 100*sizeof(my_object)); Last edited by wonkey_monkey; 10th October 2015 at 11:11. |
|
|
|
|
|
|
#5 | Link |
|
Soul Architect
Join Date: Apr 2014
Posts: 2,455
|
Yeah I know what a struct is and how to store it.
I just realized. I'm not serializing data to the hard drive or over the network or something like that. I'm only storing it in memory to read it afterwards. Truth is, by simply passing a pointer into any field of VideoInfo, we could pass unlimited data. Since it's only storing it in memory to read it afterwards, simply passing pointers to the strings should be good enough. Simple regular structs then. Flushing the video data, and storing one struct per line. Each call to Shader would add one row to the clip. |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
|