/src/mozilla-central/dom/media/VideoStreamTrack.cpp
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 | | #include "VideoStreamTrack.h" |
7 | | |
8 | | #include "MediaStreamVideoSink.h" |
9 | | #include "MediaStreamGraph.h" |
10 | | #include "nsContentUtils.h" |
11 | | |
12 | | #include "mozilla/dom/VideoStreamTrackBinding.h" |
13 | | |
14 | | namespace mozilla { |
15 | | namespace dom { |
16 | | |
17 | | JSObject* |
18 | | VideoStreamTrack::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) |
19 | 0 | { |
20 | 0 | return VideoStreamTrack_Binding::Wrap(aCx, this, aGivenProto); |
21 | 0 | } |
22 | | |
23 | | void |
24 | | VideoStreamTrack::AddVideoOutput(MediaStreamVideoSink* aSink) |
25 | 0 | { |
26 | 0 | GetOwnedStream()->AddVideoOutput(aSink, mTrackID); |
27 | 0 | } |
28 | | |
29 | | void |
30 | | VideoStreamTrack::RemoveVideoOutput(MediaStreamVideoSink* aSink) |
31 | 0 | { |
32 | 0 | GetOwnedStream()->RemoveVideoOutput(aSink, mTrackID); |
33 | 0 | } |
34 | | |
35 | | void |
36 | | VideoStreamTrack::GetLabel(nsAString& aLabel, CallerType aCallerType) |
37 | 0 | { |
38 | 0 | if (nsContentUtils::ResistFingerprinting(aCallerType)) { |
39 | 0 | aLabel.AssignLiteral("Internal Camera"); |
40 | 0 | return; |
41 | 0 | } |
42 | 0 | MediaStreamTrack::GetLabel(aLabel, aCallerType); |
43 | 0 | } |
44 | | |
45 | | } // namespace dom |
46 | | } // namespace mozilla |