Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/dom/media/AudioStreamTrack.h
Line
Count
Source (jump to first uncovered line)
1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-*/
2
/* This Source Code Form is subject to the terms of the Mozilla Public
3
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4
 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6
#ifndef AUDIOSTREAMTRACK_H_
7
#define AUDIOSTREAMTRACK_H_
8
9
#include "MediaStreamTrack.h"
10
#include "DOMMediaStream.h"
11
12
namespace mozilla {
13
namespace dom {
14
15
class AudioStreamTrack : public MediaStreamTrack {
16
public:
17
  AudioStreamTrack(DOMMediaStream* aStream, TrackID aTrackID,
18
                   TrackID aInputTrackID,
19
                   MediaStreamTrackSource* aSource,
20
                   const MediaTrackConstraints& aConstraints = MediaTrackConstraints())
21
0
    : MediaStreamTrack(aStream, aTrackID, aInputTrackID, aSource, aConstraints) {}
22
23
  JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
24
25
0
  AudioStreamTrack* AsAudioStreamTrack() override { return this; }
26
27
0
  const AudioStreamTrack* AsAudioStreamTrack() const override { return this; }
28
29
  // WebIDL
30
0
  void GetKind(nsAString& aKind) override { aKind.AssignLiteral("audio"); }
31
32
  void GetLabel(nsAString& aLabel, CallerType aCallerType) override;
33
34
protected:
35
  already_AddRefed<MediaStreamTrack> CloneInternal(DOMMediaStream* aOwningStream,
36
                                                   TrackID aTrackID) override
37
0
  {
38
0
    return do_AddRef(new AudioStreamTrack(aOwningStream,
39
0
                                          aTrackID,
40
0
                                          mInputTrackID,
41
0
                                          mSource,
42
0
                                          mConstraints));
43
0
  }
44
};
45
46
} // namespace dom
47
} // namespace mozilla
48
49
#endif /* AUDIOSTREAMTRACK_H_ */