mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-31 22:25:30 +00:00
ee5913bb8b
MozReview-Commit-ID: Aj7Cht4zxc6 --HG-- extra : rebase_source : c454a9f2b81a6a1eb574c1abee0fab64abbe5b72
46 lines
1.5 KiB
C++
46 lines
1.5 KiB
C++
/* -*- 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/. */
|
|
|
|
#ifndef VIDEOSTREAMTRACK_H_
|
|
#define VIDEOSTREAMTRACK_H_
|
|
|
|
#include "MediaStreamTrack.h"
|
|
#include "DOMMediaStream.h"
|
|
|
|
namespace mozilla {
|
|
namespace dom {
|
|
|
|
class VideoStreamTrack : public MediaStreamTrack {
|
|
public:
|
|
VideoStreamTrack(DOMMediaStream* aStream, TrackID aTrackID,
|
|
TrackID aInputTrackID,
|
|
MediaStreamTrackSource* aSource)
|
|
: MediaStreamTrack(aStream, aTrackID, aInputTrackID, aSource) {}
|
|
|
|
JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
|
|
|
|
VideoStreamTrack* AsVideoStreamTrack() override { return this; }
|
|
|
|
const VideoStreamTrack* AsVideoStreamTrack() const override { return this; }
|
|
|
|
// WebIDL
|
|
void GetKind(nsAString& aKind) override { aKind.AssignLiteral("video"); }
|
|
|
|
protected:
|
|
already_AddRefed<MediaStreamTrack> CloneInternal(DOMMediaStream* aOwningStream,
|
|
TrackID aTrackID) override
|
|
{
|
|
return do_AddRef(new VideoStreamTrack(aOwningStream,
|
|
aTrackID,
|
|
mInputTrackID,
|
|
mSource));
|
|
}
|
|
};
|
|
|
|
} // namespace dom
|
|
} // namespace mozilla
|
|
|
|
#endif /* VIDEOSTREAMTRACK_H_ */
|