![]() |
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? |
Check the source code of MSuper
|
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? |
Quote:
Code:
struct my_struct x[100]; |
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. |
| All times are GMT +1. The time now is 16:52. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.