Also log IBStream metadata keys

This commit is contained in:
Robbert van der Helm
2021-02-13 17:29:35 +01:00
parent 907925d660
commit e57c642cfe
2 changed files with 16 additions and 7 deletions
+12 -3
View File
@@ -29,9 +29,18 @@
std::string format_bstream(const YaBStream& stream) {
std::ostringstream formatted;
formatted << "<IBStream* ";
if (stream.supports_stream_attributes) {
// TODO: Log the keys for the stored values
formatted << "with meta data ";
if (stream.supports_stream_attributes && stream.attributes) {
formatted << "with meta data [";
for (bool first = true;
const auto& key_type : stream.attributes->keys_and_types()) {
if (!first) {
formatted << ", ";
}
formatted << key_type;
first = false;
}
formatted << "] ";
}
if (stream.file_name) {
formatted << "for \"" << VST3::StringConvert::convert(*stream.file_name)
+4 -4
View File
@@ -112,15 +112,15 @@ class YaBStream : public Steinberg::IBStream,
*/
std::optional<std::u16string> file_name;
private:
std::vector<uint8_t> buffer;
size_t seek_position = 0;
/**
* The stream's meta data if we've copied from a stream that supports meta
* data.
*/
std::optional<YaAttributeList> attributes;
private:
std::vector<uint8_t> buffer;
size_t seek_position = 0;
};
#pragma GCC diagnostic pop