diff --git a/vrs/RecordFormat.cpp b/vrs/RecordFormat.cpp index f9acc4fd..697b5816 100644 --- a/vrs/RecordFormat.cpp +++ b/vrs/RecordFormat.cpp @@ -336,6 +336,17 @@ void ImageContentBlockSpec::clear() { codecQuality_ = kQualityUndefined; } +ImageContentBlockSpec ImageContentBlockSpec::core() const { + return { + imageFormat_, + pixelFormat_, + width_, + height_, + stride_ > 0 && stride_ != getDefaultStride() ? stride_ : 0, + stride2_ > 0 && stride2_ != getDefaultStride2() ? stride2_ : 0, + codecName_}; +} + bool ImageContentBlockSpec::operator==(const ImageContentBlockSpec& rhs) const { auto tie = [](const ImageContentBlockSpec& v) { return std::tie( diff --git a/vrs/RecordFormat.h b/vrs/RecordFormat.h index ef98e721..a17d6e1c 100644 --- a/vrs/RecordFormat.h +++ b/vrs/RecordFormat.h @@ -192,7 +192,11 @@ class ImageContentBlockSpec { /// Clear/reset object to default values. void clear(); - /// Convert to string, to store on disk & reconstruct later using factory constructor. @internal + /// Return base of format (no codec quality nor key frame info) + ImageContentBlockSpec core() const; + + /// Convert to string, to store on disk & reconstruct later using factory constructor. + /// @internal string asString() const; /// Get the number of bytes for this content block, or ContentBlock::kSizeUnknown.