Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/dom/media/webrtc/MediaEngineSource.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 "MediaEngineSource.h"
7
8
#include "mozilla/dom/MediaTrackSettingsBinding.h"
9
10
namespace mozilla {
11
12
using dom::MediaSourceEnum;
13
using dom::MediaTrackSettings;
14
15
// These need a definition somewhere because template
16
// code is allowed to take their address, and they aren't
17
// guaranteed to have one without this.
18
const unsigned int MediaEngineSource::kMaxDeviceNameLength;
19
const unsigned int MediaEngineSource::kMaxUniqueIdLength;
20
21
/* static */ bool
22
MediaEngineSource::IsVideo(MediaSourceEnum aSource)
23
0
{
24
0
  switch (aSource) {
25
0
    case MediaSourceEnum::Camera:
26
0
    case MediaSourceEnum::Screen:
27
0
    case MediaSourceEnum::Application:
28
0
    case MediaSourceEnum::Window:
29
0
    case MediaSourceEnum::Browser:
30
0
      return true;
31
0
    case MediaSourceEnum::Microphone:
32
0
    case MediaSourceEnum::AudioCapture:
33
0
    case MediaSourceEnum::Other:
34
0
      return false;
35
0
    default:
36
0
      MOZ_ASSERT_UNREACHABLE("Unknown type");
37
0
      return false;
38
0
  }
39
0
}
40
41
bool
42
MediaEngineSource::RequiresSharing() const
43
0
{
44
0
  return false;
45
0
}
46
47
bool
48
MediaEngineSource::IsFake() const
49
0
{
50
0
  return false;
51
0
}
52
53
bool
54
MediaEngineSource::GetScary() const
55
0
{
56
0
  return false;
57
0
}
58
59
nsresult
60
MediaEngineSource::FocusOnSelectedSource(const RefPtr<const AllocationHandle>& aHandle)
61
0
{
62
0
  return NS_ERROR_NOT_AVAILABLE;
63
0
}
64
65
void
66
MediaEngineSource::Shutdown()
67
0
{
68
0
}
69
70
nsresult
71
MediaEngineSource::TakePhoto(MediaEnginePhotoCallback* aCallback)
72
0
{
73
0
  return NS_ERROR_NOT_IMPLEMENTED;
74
0
}
75
76
void
77
MediaEngineSource::GetSettings(MediaTrackSettings& aOutSettings) const
78
0
{
79
0
  MediaTrackSettings empty;
80
0
  aOutSettings = empty;
81
0
}
82
83
0
MediaEngineSource::~MediaEngineSource() = default;
84
85
} // namespace mozilla