Skip to content

Commit

Permalink
Bug 1304597 - Remove hardcoded capabilities on OSX that are no longer…
Browse files Browse the repository at this point in the history
… used r=jesup

MozReview-Commit-ID: 4vENDI1Q9U1

UltraBlame original commit: 29c1b972c04d1b88be2c68547ab71cb78a371cc5
  • Loading branch information
marco-c committed Sep 30, 2019
1 parent 09675b2 commit 586408e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 173 deletions.
12 changes: 10 additions & 2 deletions dom/media/webrtc/MediaEngineCameraVideoSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,17 @@ Length
aOut
=
mHardcodedCapabilities
[
.
SafeElementAt
(
aIndex
]
webrtc
:
:
CaptureCapability
(
)
)
;
}
uint32_t
Expand Down
182 changes: 11 additions & 171 deletions dom/media/webrtc/MediaEngineRemoteVideoSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2038,6 +2038,12 @@ NumCapabilities
)
const
{
mHardcodedCapabilities
.
Clear
(
)
;
int
num
=
Expand Down Expand Up @@ -2073,199 +2079,33 @@ get
if
(
num
>
0
)
{
return
num
;
}
switch
(
mMediaSource
)
{
case
dom
:
:
MediaSourceEnum
:
:
Camera
:
#
ifdef
XP_MACOSX
if
(
mHardcodedCapabilities
.
IsEmpty
(
)
)
{
for
(
int
i
=
0
;
i
<
9
;
i
+
+
1
)
{
webrtc
:
:
CaptureCapability
c
;
c
.
width
=
1920
-
i
*
128
;
c
.
height
=
1080
-
i
*
72
;
c
.
maxFPS
=
30
;
mHardcodedCapabilities
.
AppendElement
(
c
)
;
}
for
(
int
i
=
0
;
i
<
16
;
i
+
+
)
{
webrtc
:
:
CaptureCapability
c
;
c
.
width
=
640
-
i
*
40
;
c
.
height
=
480
-
i
*
30
;
c
.
maxFPS
=
30
;
mHardcodedCapabilities
.
AppendElement
(
c
)
)
;
}
}
break
;
#
endif
default
:
webrtc
:
:
CaptureCapability
c
;
c
.
width
=
0
;
c
.
height
=
0
;
c
.
maxFPS
num
=
0
;
mHardcodedCapabilities
.
AppendElement
Length
(
c
)
;
break
;
}
return
mHardcodedCapabilities
.
Length
(
)
num
;
}
bool
Expand Down

0 comments on commit 586408e

Please sign in to comment.