diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2021-04-03 03:06:02 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2021-04-03 03:06:02 +0000 |
commit | bac9295dc824737c7993a09f067680af22566100 (patch) | |
tree | b00698868815190b90a7863d12d2bbf8d78f0804 | |
parent | c8808b85d2804c4b092757f047388a2689763dd1 (diff) | |
parent | 2d2ba2625aa3e1ac14792c7409a27a282fb0e581 (diff) | |
download | v4l2_codec2-bac9295dc824737c7993a09f067680af22566100.tar.gz |
Snap for 7256110 from 2d2ba2625aa3e1ac14792c7409a27a282fb0e581 to sc-release
Change-Id: Icfffd5f8aa76adf712b86544bdaab7380b07e7b0
4 files changed, 12 insertions, 0 deletions
diff --git a/components/V4L2DecodeInterface.cpp b/components/V4L2DecodeInterface.cpp index 7a43a07..305af4a 100644 --- a/components/V4L2DecodeInterface.cpp +++ b/components/V4L2DecodeInterface.cpp @@ -122,6 +122,10 @@ V4L2DecodeInterface::V4L2DecodeInterface(const std::string& name, return; } + addParameter(DefineParam(mKind, C2_PARAMKEY_COMPONENT_KIND) + .withConstValue(new C2ComponentKindSetting(C2Component::KIND_DECODER)) + .build()); + std::string inputMime; switch (*mVideoCodec) { case VideoCodec::H264: diff --git a/components/V4L2EncodeInterface.cpp b/components/V4L2EncodeInterface.cpp index d5a9bc4..7b4d96c 100644 --- a/components/V4L2EncodeInterface.cpp +++ b/components/V4L2EncodeInterface.cpp @@ -343,6 +343,10 @@ void V4L2EncodeInterface::Initialize(const C2String& name) { // parameters. Please make sure the dependent parameters are added prior to the // one needs the setter dependency. + addParameter(DefineParam(mKind, C2_PARAMKEY_COMPONENT_KIND) + .withConstValue(new C2ComponentKindSetting(C2Component::KIND_ENCODER)) + .build()); + addParameter(DefineParam(mInputVisibleSize, C2_PARAMKEY_PICTURE_SIZE) .withDefault(new C2StreamPictureSizeInfo::input(0u, 320, 240)) .withFields({ diff --git a/components/include/v4l2_codec2/components/V4L2DecodeInterface.h b/components/include/v4l2_codec2/components/V4L2DecodeInterface.h index 204496c..3dc97fa 100644 --- a/components/include/v4l2_codec2/components/V4L2DecodeInterface.h +++ b/components/include/v4l2_codec2/components/V4L2DecodeInterface.h @@ -50,6 +50,8 @@ private: const C2P<C2StreamColorAspectsTuning::output>& def, const C2P<C2StreamColorAspectsInfo::input>& coded); + // The kind of the component; should be C2Component::KIND_DECODER. + std::shared_ptr<C2ComponentKindSetting> mKind; // The input format kind; should be C2FormatCompressed. std::shared_ptr<C2StreamBufferTypeSetting::input> mInputFormat; // The memory usage flag of input buffer; should be BufferUsage::VIDEO_DECODER. diff --git a/components/include/v4l2_codec2/components/V4L2EncodeInterface.h b/components/include/v4l2_codec2/components/V4L2EncodeInterface.h index 73d6d5c..47ffd53 100644 --- a/components/include/v4l2_codec2/components/V4L2EncodeInterface.h +++ b/components/include/v4l2_codec2/components/V4L2EncodeInterface.h @@ -63,6 +63,8 @@ protected: // Constant parameters + // The kind of the component; should be C2Component::KIND_ENCODER. + std::shared_ptr<C2ComponentKindSetting> mKind; // The input format kind; should be C2FormatVideo. std::shared_ptr<C2StreamBufferTypeSetting::input> mInputFormat; // The memory usage flag of input buffer; should be BufferUsage::VIDEO_ENCODER. |