vp9_picture.cc 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. #include "media/gpu/vp9_picture.h"
  5. #include <memory>
  6. namespace media {
  7. VP9Picture::VP9Picture() : frame_hdr(new Vp9FrameHeader()) {}
  8. VP9Picture::~VP9Picture() = default;
  9. V4L2VP9Picture* VP9Picture::AsV4L2VP9Picture() {
  10. return nullptr;
  11. }
  12. VaapiVP9Picture* VP9Picture::AsVaapiVP9Picture() {
  13. return nullptr;
  14. }
  15. scoped_refptr<VP9Picture> VP9Picture::Duplicate() {
  16. scoped_refptr<VP9Picture> ret = CreateDuplicate();
  17. if (ret == nullptr)
  18. return nullptr;
  19. // Copy member of VP9Picture.
  20. ret->frame_hdr = std::make_unique<Vp9FrameHeader>();
  21. memcpy(ret->frame_hdr.get(), frame_hdr.get(), sizeof(Vp9FrameHeader));
  22. // Copy member of CodecPicture.
  23. // Note that decrypt_config_ is not used in here, so skip copying it.
  24. ret->set_bitstream_id(bitstream_id());
  25. ret->set_visible_rect(visible_rect());
  26. ret->set_colorspace(get_colorspace());
  27. return ret;
  28. }
  29. scoped_refptr<VP9Picture> VP9Picture::CreateDuplicate() {
  30. return nullptr;
  31. }
  32. } // namespace media