On 5/5/18 2:47 PM, Zebediah Figura wrote:
Hello all,
It would be really nice to be able to link to Wine's strmbase in tests. There is already one test that implements large parts of the filter and pin functionality that is used there, and it seems to me that it would be in our interest to be able to add more tests that would involve putting our own filters in graphs, e.g. to be able to test filter and pin methods directly, or to stream large amounts of data without having to put it in resource files.
This almost "just works". The only thing preventing simply adding "#include <wine/strmbase.h>" and linking to strmbase is that the latter uses debug functions which live in libwine, and so cross-compiling results in undefined references to wine_dbg_log() and wine_dbg_sprintf().
I've attached a patch as a proof-of-concept, which provides stubs for these functions (actually they are semi-stubs, as they proved useful when debugging the patch itself). As can be seen, it reduces the code necessary to set up test_render_filter_priority() to 1/3 of its original length (and it might be possible to reduce it further by using BaseRenderer and TransformFilter).
Is this something that would be workable?
ἔρρωσθε, Zeb
Just remember that strmbase is actually based off a REAL development library in the Microsoft SDK. It is not identical and the only reason we would care is if we continue to support source ports via Wine. If we want to support that then we need to try to get strmbase to be as identical to that one as possible.
If we have abandoned source ports all together then it matters little.
-aric