mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1097740 - use NS_INLINE_DECL_REFCOUNTING for Fake_MediaStreamTrack in FakeMediaStreams.h; r=jesup
This commit is contained in:
parent
f7cb16fe38
commit
b1cd8c83e4
@ -12,10 +12,10 @@
|
|||||||
#include "nsComponentManagerUtils.h"
|
#include "nsComponentManagerUtils.h"
|
||||||
#include "nsIComponentManager.h"
|
#include "nsIComponentManager.h"
|
||||||
#include "nsIComponentRegistrar.h"
|
#include "nsIComponentRegistrar.h"
|
||||||
|
#include "nsISupportsImpl.h"
|
||||||
|
|
||||||
// #includes from MediaStream.h
|
// #includes from MediaStream.h
|
||||||
#include "mozilla/Mutex.h"
|
#include "mozilla/Mutex.h"
|
||||||
#include "mozilla/RefPtr.h"
|
|
||||||
#include "AudioSegment.h"
|
#include "AudioSegment.h"
|
||||||
#include "MediaSegment.h"
|
#include "MediaSegment.h"
|
||||||
#include "StreamBuffer.h"
|
#include "StreamBuffer.h"
|
||||||
@ -215,9 +215,11 @@ class Fake_SourceMediaStream : public Fake_MediaStream {
|
|||||||
|
|
||||||
class Fake_DOMMediaStream;
|
class Fake_DOMMediaStream;
|
||||||
|
|
||||||
class Fake_MediaStreamTrack : public mozilla::RefCounted<Fake_MediaStreamTrack>
|
class Fake_MediaStreamTrack
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
NS_INLINE_DECL_REFCOUNTING(Fake_MediaStreamTrack)
|
||||||
|
|
||||||
explicit Fake_MediaStreamTrack(bool aIsVideo) : mIsVideo (aIsVideo) {}
|
explicit Fake_MediaStreamTrack(bool aIsVideo) : mIsVideo (aIsVideo) {}
|
||||||
mozilla::TrackID GetTrackID() { return mIsVideo ? 1 : 0; }
|
mozilla::TrackID GetTrackID() { return mIsVideo ? 1 : 0; }
|
||||||
Fake_DOMMediaStream *GetStream() { return nullptr; }
|
Fake_DOMMediaStream *GetStream() { return nullptr; }
|
||||||
@ -230,6 +232,8 @@ public:
|
|||||||
return mIsVideo? nullptr : this;
|
return mIsVideo? nullptr : this;
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
|
~Fake_MediaStreamTrack() {}
|
||||||
|
|
||||||
const bool mIsVideo;
|
const bool mIsVideo;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user