We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MetadataSchema
MetadataDesc
Metadata
auto schema = make_shared<MetadataSchema>("schema-name", "author"); VMF_METADATA_BEGIN("channel-name"); VMF_FIELD_STR("field1"); VMF_FIELD_INT("field2"); VMF_METADATA_END(schema); mdStream.addSchema(schema); auto desc = schema->findMetadataDesc("channel-name"); auto md = std::make_shared<Metadata>(desc); md->push_back(FieldValue("algo-id", "qqq")); md->push_back(FieldValue("data", "qqq")); mdStream.add(md);
mdStream.addSchema( MetadataSchema("schema-name", "author", MetadataDesc("channel-name", FieldDesc("field1", vmf_string), FieldDesc("field2", vmf_integer) ), MetadataDesc( ... ) ) ); mdStream.add( Metadata("channel-name", FieldValue("field1", "qqq"), FieldValue("field2", 10) ) );
Less code, no shared_ptr => faster!
shared_ptr
The text was updated successfully, but these errors were encountered:
class VMF_EXPORT Format { public: typedef std::map<std::string, std::string> AttribMap; /*! * \brief Export various metadata stream items to a string representation. Used in particular for "stream.serialize()" implementation. */ virtual std::string store( const MetadataSet& set, const std::vector<std::shared_ptr<MetadataSchema>>& schemas = {}, const std::vector<std::shared_ptr<MetadataStream::VideoSegment>>& segments = {}, const std::vector<Stat>& stats = {}, const AttribMap& attribs = {} // nextId, checksum, etc ) = 0; /*! * \brief Deserialize input string to stream metadata and related stuff. Used in particular for "stream.deserialize(text)" implementation. */ virtual std::array<int, 5> parse( const std::string& text, std::vector<std::shared_ptr<MetadataInternal>>& metadata, std::vector<std::shared_ptr<MetadataSchema>>& schemas, std::vector<std::shared_ptr<MetadataStream::VideoSegment>>& segments, std::vector<Stat>& stats, AttribMap& attribs // nextId, checksum, etc ) = 0; ;
Simpler API.
Sorry, something went wrong.
apavlenko
No branches or pull requests
1)
MetadataSchema
,MetadataDesc
,Metadata
Less code, no
shared_ptr
=> faster!The text was updated successfully, but these errors were encountered: