gecko/dom/media/webrtc/MediaEngineTabVideoSource.h
Ehsan Akhgari 33bb32f549 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00

87 lines
2.9 KiB
C++

/* 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/. */
#include "nsIDOMEventListener.h"
#include "MediaEngine.h"
#include "ImageContainer.h"
#include "nsITimer.h"
#include "mozilla/Monitor.h"
#include "nsITabSource.h"
namespace mozilla {
class MediaEngineTabVideoSource : public MediaEngineVideoSource, nsIDOMEventListener, nsITimerCallback {
public:
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIDOMEVENTLISTENER
NS_DECL_NSITIMERCALLBACK
MediaEngineTabVideoSource();
virtual void GetName(nsAString_internal&) override;
virtual void GetUUID(nsAString_internal&) override;
virtual nsresult Allocate(const dom::MediaTrackConstraints &,
const mozilla::MediaEnginePrefs&) override;
virtual nsresult Deallocate() override;
virtual nsresult Start(mozilla::SourceMediaStream*, mozilla::TrackID) override;
virtual void SetDirectListeners(bool aHasDirectListeners) override {};
virtual void NotifyPull(mozilla::MediaStreamGraph*, mozilla::SourceMediaStream*, mozilla::TrackID, mozilla::StreamTime) override;
virtual nsresult Stop(mozilla::SourceMediaStream*, mozilla::TrackID) override;
virtual nsresult Config(bool, uint32_t, bool, uint32_t, bool, uint32_t, int32_t) override;
virtual bool IsFake() override;
virtual const dom::MediaSourceEnum GetMediaSource() override {
return dom::MediaSourceEnum::Browser;
}
virtual uint32_t GetBestFitnessDistance(
const nsTArray<const dom::MediaTrackConstraintSet*>& aConstraintSets) override
{
return 0;
}
virtual nsresult TakePhoto(PhotoCallback* aCallback) override
{
return NS_ERROR_NOT_IMPLEMENTED;
}
void Draw();
class StartRunnable : public nsRunnable {
public:
explicit StartRunnable(MediaEngineTabVideoSource *videoSource) : mVideoSource(videoSource) {}
NS_IMETHOD Run();
nsRefPtr<MediaEngineTabVideoSource> mVideoSource;
};
class StopRunnable : public nsRunnable {
public:
explicit StopRunnable(MediaEngineTabVideoSource *videoSource) : mVideoSource(videoSource) {}
NS_IMETHOD Run();
nsRefPtr<MediaEngineTabVideoSource> mVideoSource;
};
class InitRunnable : public nsRunnable {
public:
explicit InitRunnable(MediaEngineTabVideoSource *videoSource) : mVideoSource(videoSource) {}
NS_IMETHOD Run();
nsRefPtr<MediaEngineTabVideoSource> mVideoSource;
};
protected:
~MediaEngineTabVideoSource() {}
private:
int mBufWidthMax;
int mBufHeightMax;
int64_t mWindowId;
bool mScrollWithPage;
int mTimePerFrame;
ScopedFreePtr<unsigned char> mData;
size_t mDataSize;
nsCOMPtr<nsIDOMWindow> mWindow;
nsRefPtr<layers::CairoImage> mImage;
nsCOMPtr<nsITimer> mTimer;
Monitor mMonitor;
nsCOMPtr<nsITabSource> mTabSource;
};
}