dom/media/gmp/GMPTypes.ipdlh
author Mike Hommey <mh+mozilla@glandium.org>
Thu, 26 Mar 2015 12:07:17 +0900
changeset 258314 fc1e894eec2fbd34b745cd94f505080427d24705
parent 258131 730f3ecb847b71cd20061fa2fd13cf0a7a15cc16
child 359761 e8c434e31c2df27f9ea02dbb29ef7c8121335b05
permissions -rw-r--r--
Bug 1147207 - Add a ComposedFinder class that acts like a FileFinder proxy over multiple FileFinders. r=gps, a=sledru

/* -*- 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 GMPAudioCodecType from "gmp-audio-codec.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 GMPAudioCodecData
{
  GMPAudioCodecType mCodecType;
  uint32_t mChannelCount;
  uint32_t mBitsPerChannel;
  uint32_t mSamplesPerSecond;

  uint8_t[] mExtraData;
};

struct GMPAudioEncodedSampleData
{
  uint8_t[] mData;
  uint64_t mTimeStamp; // microseconds.
  GMPDecryptionData mDecryptionData;
  uint32_t mChannelCount;
  uint32_t mSamplesPerSecond;
};

struct GMPAudioDecodedSampleData
{
  int16_t[] mData;
  uint64_t mTimeStamp; // microseconds.
  uint32_t mChannelCount;
  uint32_t mSamplesPerSecond;
};

}
}