-
Notifications
You must be signed in to change notification settings - Fork 1
/
0003-force-the-video-resolution-to-176x144.patch
86 lines (80 loc) · 3.76 KB
/
0003-force-the-video-resolution-to-176x144.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
From 75ea778de9b9f6bff65804eb67fc3b98d88397ed Mon Sep 17 00:00:00 2001
From: slee <[email protected]>
Date: Fri, 7 Jun 2013 11:49:07 +0800
Subject: [PATCH 03/10] force-the-video-resolution-to-176x144
---
content/media/webrtc/MediaEngineDefault.cpp | 2 ++
content/media/webrtc/MediaEngineWebRTCVideo.cpp | 4 ++--
dom/media/MediaManager.cpp | 2 +-
media/webrtc/signaling/src/media-conduit/VideoConduit.cpp | 3 ++-
media/webrtc/signaling/src/sipcc/core/gsm/gsm_sdp.c | 4 ++--
5 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/content/media/webrtc/MediaEngineDefault.cpp b/content/media/webrtc/MediaEngineDefault.cpp
index dea9647..a0c4173 100644
--- a/content/media/webrtc/MediaEngineDefault.cpp
+++ b/content/media/webrtc/MediaEngineDefault.cpp
@@ -61,6 +61,8 @@ MediaEngineDefaultVideoSource::Allocate(const MediaEnginePrefs &aPrefs)
}
mOpts = aPrefs;
+ mOpts.mWidth = 176;
+ mOpts.mHeight = 144;
mState = kAllocated;
return NS_OK;
}
diff --git a/content/media/webrtc/MediaEngineWebRTCVideo.cpp b/content/media/webrtc/MediaEngineWebRTCVideo.cpp
index c038385..8161f55 100644
--- a/content/media/webrtc/MediaEngineWebRTCVideo.cpp
+++ b/content/media/webrtc/MediaEngineWebRTCVideo.cpp
@@ -157,8 +157,8 @@ void
MediaEngineWebRTCVideoSource::ChooseCapability(const MediaEnginePrefs &aPrefs)
{
#ifdef MOZ_B2G_CAMERA
- mCapability.width = aPrefs.mWidth;
- mCapability.height = aPrefs.mHeight;
+ mCapability.width = 176;//aPrefs.mWidth;
+ mCapability.height = 144;//aPrefs.mHeight;
#else
int num = mViECapture->NumberOfCapabilities(mUniqueId, KMaxUniqueIdLength);
diff --git a/dom/media/MediaManager.cpp b/dom/media/MediaManager.cpp
index 13e7090..3cce3e4 100644
--- a/dom/media/MediaManager.cpp
+++ b/dom/media/MediaManager.cpp
@@ -1110,7 +1110,7 @@ MediaManager::GetUserMedia(bool aPrivileged, nsPIDOMWindow* aWindow,
}
#endif
// XXX No full support for picture in Desktop yet (needs proper UI)
- if (aPrivileged || fake) {
+ if (aPrivileged || fake || 1) { /* For this path, since B2G cannot prompt permission dialog before bug 853356 is landed.*/
mMediaThread->Dispatch(gUMRunnable, NS_DISPATCH_NORMAL);
} else {
// Ask for user permission, and dispatch runnable (or not) when a response
diff --git a/media/webrtc/signaling/src/media-conduit/VideoConduit.cpp b/media/webrtc/signaling/src/media-conduit/VideoConduit.cpp
index 69545a2..471854c 100644
--- a/media/webrtc/signaling/src/media-conduit/VideoConduit.cpp
+++ b/media/webrtc/signaling/src/media-conduit/VideoConduit.cpp
@@ -548,7 +548,8 @@ WebrtcVideoConduit::SendVideoFrame(unsigned char* video_frame,
VideoType video_type,
uint64_t capture_time)
{
-
+ static int i = 0;
+ if (i++ % 2 != 1) return kMediaConduitNoError;
CSFLogDebug(logTag, "%s ", __FUNCTION__);
//check for the parameters sanity
diff --git a/media/webrtc/signaling/src/sipcc/core/gsm/gsm_sdp.c b/media/webrtc/signaling/src/sipcc/core/gsm/gsm_sdp.c
index f133920..3003fce 100644
--- a/media/webrtc/signaling/src/sipcc/core/gsm/gsm_sdp.c
+++ b/media/webrtc/signaling/src/sipcc/core/gsm/gsm_sdp.c
@@ -3229,8 +3229,8 @@ gsmsdp_negotiate_codec (fsmdef_dcb_t *dcb_p, cc_sdp_t *sdp_p,
if present */
switch (codec) {
case RTP_VP8:
- payload_info->video.width = 640;
- payload_info->video.height = 480;
+ payload_info->video.width = 176;
+ payload_info->video.height = 144;
break;
case RTP_I420:
payload_info->video.width = 176;
--
1.7.12.4 (Apple Git-37)