av1_picture.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright 2020 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef MEDIA_GPU_AV1_PICTURE_H_
  5. #define MEDIA_GPU_AV1_PICTURE_H_
  6. #include "media/gpu/codec_picture.h"
  7. #include "media/gpu/media_gpu_export.h"
  8. #include "third_party/libgav1/src/src/utils/types.h"
  9. namespace media {
  10. // AV1Picture carries the parsed frame header needed for decoding an AV1 frame.
  11. // It also owns the decoded frame itself.
  12. class MEDIA_GPU_EXPORT AV1Picture : public CodecPicture {
  13. public:
  14. AV1Picture();
  15. AV1Picture(const AV1Picture&) = delete;
  16. AV1Picture& operator=(const AV1Picture&) = delete;
  17. // Create a duplicate instance and copy the data to it. It is used to support
  18. // the AV1 show_existing_frame feature. Return the scoped_refptr pointing to
  19. // the duplicate instance, or nullptr on failure.
  20. scoped_refptr<AV1Picture> Duplicate();
  21. libgav1::ObuFrameHeader frame_header = {};
  22. protected:
  23. ~AV1Picture() override;
  24. private:
  25. // Create a duplicate instance.
  26. virtual scoped_refptr<AV1Picture> CreateDuplicate();
  27. };
  28. } // namespace media
  29. #endif // MEDIA_GPU_AV1_PICTURE_H_