Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/VideoStreamTrack.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 VIDEOSTREAMTRACK_H_
7
#define VIDEOSTREAMTRACK_H_
8
9
#include "MediaStreamTrack.h"
10
#include "DOMMediaStream.h"
11
12
namespace mozilla {
13
14
class MediaStreamVideoSink;
15
16
namespace dom {
17
18
class VideoStreamTrack : public MediaStreamTrack {
19
public:
20
  VideoStreamTrack(DOMMediaStream* aStream, TrackID aTrackID,
21
                   TrackID aInputTrackID,
22
                   MediaStreamTrackSource* aSource,
23
                   const MediaTrackConstraints& aConstraints = MediaTrackConstraints())
24
0
    : MediaStreamTrack(aStream, aTrackID, aInputTrackID, aSource, aConstraints) {}
25
26
  JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
27
28
0
  VideoStreamTrack* AsVideoStreamTrack() override { return this; }
29
30
0
  const VideoStreamTrack* AsVideoStreamTrack() const override { return this; }
31
32
  void AddVideoOutput(MediaStreamVideoSink* aSink);
33
  void RemoveVideoOutput(MediaStreamVideoSink* aSink);
34
35
  // WebIDL
36
0
  void GetKind(nsAString& aKind) override { aKind.AssignLiteral("video"); }
37
38
  void GetLabel(nsAString& aLabel, CallerType aCallerType) override;
39
40
protected:
41
  already_AddRefed<MediaStreamTrack> CloneInternal(DOMMediaStream* aOwningStream,
42
                                                   TrackID aTrackID) override
43
0
  {
44
0
    return do_AddRef(new VideoStreamTrack(aOwningStream,
45
0
                                          aTrackID,
46
0
                                          mInputTrackID,
47
0
                                          mSource,
48
0
                                          mConstraints));
49
0
  }
50
};
51
52
} // namespace dom
53
} // namespace mozilla
54
55
#endif /* VIDEOSTREAMTRACK_H_ */