CameraPreviewMediaStream::CameraPreviewMediaStream(DOMMediaStream* aWrapper)
  : MediaStream(aWrapper)
  , mMutex("mozilla::camera::CameraPreviewMediaStream")
  , mInvalidatePending(0)
  , mDiscardedFrames(0)
  , mRateLimit(false)
{
  SetGraphImpl(MediaStreamGraph::GetInstance());
  mIsConsumed = false;
}
CameraPreviewMediaStream::CameraPreviewMediaStream(DOMMediaStream* aWrapper)
    : ProcessedMediaStream(aWrapper)
    , mMutex("mozilla::camera::CameraPreviewMediaStream")
    , mInvalidatePending(0)
    , mDiscardedFrames(0)
    , mRateLimit(false)
    , mTrackCreated(false)
{
    SetGraphImpl(
        MediaStreamGraph::GetInstance(
            MediaStreamGraph::SYSTEM_THREAD_DRIVER, AudioChannel::Normal));
    mFakeMediaStreamGraph = new FakeMediaStreamGraph();
}