dom/media/gmp/GMPTypes.ipdlh
author Chris Pearce <cpearce@mozilla.com>
Sat, 14 Jan 2017 16:14:32 +0800
changeset 374847 8b358c1267b2f770ec2bdbdf1ce23989a2cbf8a4
parent 359761 e8c434e31c2df27f9ea02dbb29ef7c8121335b05
child 397533 6e4c1af85be74c4ec0e018f84951469cc0dc4e2d
permissions -rw-r--r--
Bug 1329543 - Remove PGMPAudioDecoder. r=gerald MozReview-Commit-ID: nwW4s4MtJX

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

using GMPBufferType from "gmp-video-codec.h";
using GMPMediaKeyStatus from "gmp-decryption.h";

namespace mozilla {
namespace gmp {

struct GMPDecryptionData {
  uint8_t[] mKeyId;
  uint8_t[] mIV;
  uint16_t[] mClearBytes;
  uint32_t[] mCipherBytes;
  nsCString[] mSessionIds;
};

struct GMPVideoEncodedFrameData
{
  uint32_t mEncodedWidth;
  uint32_t mEncodedHeight;
  uint64_t mTimestamp; // microseconds
  uint64_t mDuration; // microseconds
  uint32_t mFrameType;
  uint32_t mSize;
  GMPBufferType mBufferType;
  Shmem mBuffer;
  bool mCompleteFrame;
  GMPDecryptionData mDecryptionData;
};

struct GMPPlaneData
{
  int32_t mSize;
  int32_t mStride;
  Shmem mBuffer;
};

struct GMPVideoi420FrameData
{
  GMPPlaneData mYPlane;
  GMPPlaneData mUPlane;
  GMPPlaneData mVPlane;
  int32_t mWidth;
  int32_t mHeight;
  uint64_t mTimestamp; // microseconds
  uint64_t mDuration; // microseconds
};

struct GMPKeyInformation {
  uint8_t[] keyId;
  GMPMediaKeyStatus status;
};

}
}