vp9_picture.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // Copyright 2015 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_VP9_PICTURE_H_
  5. #define MEDIA_GPU_VP9_PICTURE_H_
  6. #include <memory>
  7. #include "media/filters/vp9_parser.h"
  8. #include "media/gpu/codec_picture.h"
  9. #include "media/video/video_encode_accelerator.h"
  10. #include "third_party/abseil-cpp/absl/types/optional.h"
  11. namespace media {
  12. class V4L2VP9Picture;
  13. class VaapiVP9Picture;
  14. class MEDIA_GPU_EXPORT VP9Picture : public CodecPicture {
  15. public:
  16. VP9Picture();
  17. VP9Picture(const VP9Picture&) = delete;
  18. VP9Picture& operator=(const VP9Picture&) = delete;
  19. // TODO(tmathmeyer) remove these and just use static casts everywhere.
  20. virtual V4L2VP9Picture* AsV4L2VP9Picture();
  21. virtual VaapiVP9Picture* AsVaapiVP9Picture();
  22. // Create a duplicate instance and copy the data to it. It is used to support
  23. // VP9 show_existing_frame feature. Return the scoped_refptr pointing to the
  24. // duplicate instance, or nullptr on failure.
  25. scoped_refptr<VP9Picture> Duplicate();
  26. std::unique_ptr<Vp9FrameHeader> frame_hdr;
  27. absl::optional<Vp9Metadata> metadata_for_encoding;
  28. protected:
  29. ~VP9Picture() override;
  30. private:
  31. // Create a duplicate instance.
  32. virtual scoped_refptr<VP9Picture> CreateDuplicate();
  33. };
  34. } // namespace media
  35. #endif // MEDIA_GPU_VP9_PICTURE_H_