2013-03-27 05:32:51 +04:00
|
|
|
/* -*- 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 AUDIOSTREAMTRACK_H_
|
|
|
|
#define AUDIOSTREAMTRACK_H_
|
|
|
|
|
|
|
|
#include "MediaStreamTrack.h"
|
2013-09-06 00:25:17 +04:00
|
|
|
#include "DOMMediaStream.h"
|
2013-03-27 05:32:51 +04:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
|
|
|
class AudioStreamTrack : public MediaStreamTrack {
|
|
|
|
public:
|
2016-04-06 15:46:56 +03:00
|
|
|
AudioStreamTrack(DOMMediaStream* aStream, TrackID aTrackID,
|
2016-01-22 11:27:37 +03:00
|
|
|
TrackID aInputTrackID,
|
2016-01-05 05:16:22 +03:00
|
|
|
MediaStreamTrackSource* aSource)
|
2016-01-22 11:27:37 +03:00
|
|
|
: MediaStreamTrack(aStream, aTrackID, aInputTrackID, aSource) {}
|
2013-03-27 05:32:51 +04:00
|
|
|
|
2016-01-18 06:50:29 +03:00
|
|
|
JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
|
2013-03-27 05:32:51 +04:00
|
|
|
|
2016-01-18 06:50:29 +03:00
|
|
|
AudioStreamTrack* AsAudioStreamTrack() override { return this; }
|
2013-03-27 05:32:51 +04:00
|
|
|
|
2016-02-01 17:43:38 +03:00
|
|
|
const AudioStreamTrack* AsAudioStreamTrack() const override { return this; }
|
|
|
|
|
2013-03-27 05:32:51 +04:00
|
|
|
// WebIDL
|
2016-01-18 06:50:29 +03:00
|
|
|
void GetKind(nsAString& aKind) override { aKind.AssignLiteral("audio"); }
|
2016-01-22 11:27:51 +03:00
|
|
|
|
|
|
|
protected:
|
|
|
|
already_AddRefed<MediaStreamTrack> CloneInternal(DOMMediaStream* aOwningStream,
|
|
|
|
TrackID aTrackID) override
|
|
|
|
{
|
|
|
|
return do_AddRef(new AudioStreamTrack(aOwningStream,
|
|
|
|
aTrackID,
|
|
|
|
mInputTrackID,
|
|
|
|
mSource));
|
|
|
|
}
|
2013-03-27 05:32:51 +04:00
|
|
|
};
|
|
|
|
|
2015-07-13 18:25:42 +03:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
2013-03-27 05:32:51 +04:00
|
|
|
|
|
|
|
#endif /* AUDIOSTREAMTRACK_H_ */
|