tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

WidevineVideoFrame.h (1555B)


      1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* This Source Code Form is subject to the terms of the Mozilla Public
      3 * License, v. 2.0. If a copy of the MPL was not distributed with this
      4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      5 
      6 #ifndef WidevineVideoFrame_h_
      7 #define WidevineVideoFrame_h_
      8 
      9 #include "content_decryption_module.h"
     10 #include "stddef.h"
     11 
     12 namespace mozilla {
     13 
     14 class WidevineVideoFrame : public cdm::VideoFrame {
     15 public:
     16  WidevineVideoFrame();
     17  WidevineVideoFrame(WidevineVideoFrame&& other);
     18  ~WidevineVideoFrame();
     19 
     20  void SetFormat(cdm::VideoFormat aFormat) override;
     21  cdm::VideoFormat Format() const override;
     22 
     23  void SetSize(cdm::Size aSize) override;
     24  cdm::Size Size() const override;
     25 
     26  void SetFrameBuffer(cdm::Buffer* aFrameBuffer) override;
     27  cdm::Buffer* FrameBuffer() override;
     28 
     29  void SetPlaneOffset(cdm::VideoPlane aPlane, uint32_t aOffset) override;
     30  uint32_t PlaneOffset(cdm::VideoPlane aPlane) override;
     31 
     32  void SetStride(cdm::VideoPlane aPlane, uint32_t aStride) override;
     33  uint32_t Stride(cdm::VideoPlane aPlane) override;
     34 
     35  void SetTimestamp(int64_t aTimestamp) override;
     36  int64_t Timestamp() const override;
     37 
     38  [[nodiscard]] bool InitToBlack(int32_t aWidth, int32_t aHeight,
     39                                 int64_t aTimeStamp);
     40 
     41 protected:
     42  cdm::VideoFormat mFormat;
     43  cdm::Size mSize;
     44  cdm::Buffer* mBuffer;
     45  uint32_t mPlaneOffsets[cdm::kMaxPlanes];
     46  uint32_t mPlaneStrides[cdm::kMaxPlanes];
     47  int64_t mTimestamp;
     48 };
     49 
     50 }  // namespace mozilla
     51 
     52 #endif