apavlenko / vmf

http://01org.github.io/vmf/
Apache License 2.0
0 stars 3 forks source link

IReader+IWriter => Format #54

Closed apavlenko closed 8 years ago

apavlenko commented 8 years ago

as stated in #23

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;

typedef union {
            struct { int metadata, schemas, segments, stats, attribs; };
            int cnt[5];
        } ParseCounters;
    /*!
    * \brief Deserialize input string to stream metadata and related stuff. Used in particular for "stream.deserialize(text)" implementation.
    */
    virtual ParseCounters 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.

apavlenko commented 8 years ago

@savuor , please add FormatCompressed implementation here

apavlenko commented 8 years ago

@anna-plyakina , please add Java wrapper and tests for Format

coveralls commented 8 years ago

Coverage Status

Coverage decreased (-0.7%) to 76.884% when pulling 5ee18681f9f99d45e54b5d5ff89cb11a36b95b6f on new_api_format into a756947d8e58bce902134b9e4c9aa5198c48224e on vmf-3.0.

coveralls commented 8 years ago

Coverage Status

Coverage decreased (-0.7%) to 76.884% when pulling d475c245b8d8e5f1b8ab2551aa58aaa7065310b9 on new_api_format into a756947d8e58bce902134b9e4c9aa5198c48224e on vmf-3.0.

coveralls commented 8 years ago

Coverage Status

Coverage decreased (-0.7%) to 76.884% when pulling 93f2fbca72b96a7459cfe4fcd99a32f9596a30c3 on new_api_format into a756947d8e58bce902134b9e4c9aa5198c48224e on vmf-3.0.

codecov-io commented 8 years ago

Current coverage is 77.74%

Merging #54 into vmf-3.0 will increase coverage by +0.17% as of ecf24c4

@@            vmf-3.0     #54   diff @@
=======================================
  Files            67      59     -8
  Stmts          6832    6240   -592
  Branches          0       0       
  Methods                           
=======================================
- Hit            5300    4851   -449
  Partial           0       0       
+ Missed         1532    1389   -143

Review entire Coverage Diff as of ecf24c4


Uncovered Suggestions

  1. +0.15% via ...f_MetadataStream.cpp#823...831
  2. +0.13% via ...f_MetadataStream.cpp#785...792
  3. +0.09% via ..._vmf_MetadataSet.cpp#24...28
  4. See 7 more...

Powered by Codecov. Updated on successful CI builds.

coveralls commented 8 years ago

Coverage Status

Coverage decreased (-0.7%) to 76.884% when pulling 53122f1023ff2bef3a6b42cc11bcd57583de6a31 on new_api_format into a756947d8e58bce902134b9e4c9aa5198c48224e on vmf-3.0.

coveralls commented 8 years ago

Coverage Status

Coverage decreased (-0.4%) to 77.226% when pulling 71ea80bbd322ba3b19fde841c738e8119ac948ac on new_api_format into a756947d8e58bce902134b9e4c9aa5198c48224e on vmf-3.0.

coveralls commented 8 years ago

Coverage Status

Coverage decreased (-0.4%) to 77.226% when pulling a41391f6afbaac320611c7426ed4f3683f26186d on new_api_format into a756947d8e58bce902134b9e4c9aa5198c48224e on vmf-3.0.

coveralls commented 8 years ago

Coverage Status

Coverage decreased (-0.2%) to 77.39% when pulling d67c6e46e442e567b2df65e45d131b640e2b46ed on new_api_format into a756947d8e58bce902134b9e4c9aa5198c48224e on vmf-3.0.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.2%) to 77.74% when pulling b8a96eae0beae14bdf55f806666feb2137a94245 on new_api_format into a756947d8e58bce902134b9e4c9aa5198c48224e on vmf-3.0.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.2%) to 77.74% when pulling c0df782b3b7435e4818695a262152723f45f0a41 on new_api_format into a756947d8e58bce902134b9e4c9aa5198c48224e on vmf-3.0.

savuor commented 8 years ago

:+1: