Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Side by Side Diff: webrtc/api/jsepsessiondescription.cc

Issue 2408153002: Remove cricket::VideoCodec with, height and framerate properties (Closed)
Patch Set: Rebased Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/api/jsepsessiondescription.h ('k') | webrtc/api/jsepsessiondescription_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 25 matching lines...) Expand all
36 } 36 }
37 } 37 }
38 return type_supported; 38 return type_supported;
39 } 39 }
40 40
41 const char SessionDescriptionInterface::kOffer[] = "offer"; 41 const char SessionDescriptionInterface::kOffer[] = "offer";
42 const char SessionDescriptionInterface::kPrAnswer[] = "pranswer"; 42 const char SessionDescriptionInterface::kPrAnswer[] = "pranswer";
43 const char SessionDescriptionInterface::kAnswer[] = "answer"; 43 const char SessionDescriptionInterface::kAnswer[] = "answer";
44 44
45 const int JsepSessionDescription::kDefaultVideoCodecId = 100; 45 const int JsepSessionDescription::kDefaultVideoCodecId = 100;
46 // This is effectively a max value of the frame rate. 30 is default from camera.
47 const int JsepSessionDescription::kDefaultVideoCodecFramerate = 60;
48 const char JsepSessionDescription::kDefaultVideoCodecName[] = "VP8"; 46 const char JsepSessionDescription::kDefaultVideoCodecName[] = "VP8";
49 // Used as default max video codec size before we have it in signaling.
50 #if defined(ANDROID) || defined(WEBRTC_IOS)
51 // Limit default max video codec size for Android to avoid
52 // HW VP8 codec initialization failure for resolutions higher
53 // than 1280x720 or 720x1280.
54 // Same patch for iOS to support 720P in portrait mode.
55 const int JsepSessionDescription::kMaxVideoCodecWidth = 1280;
56 const int JsepSessionDescription::kMaxVideoCodecHeight = 1280;
57 #else
58 const int JsepSessionDescription::kMaxVideoCodecWidth = 1920;
59 const int JsepSessionDescription::kMaxVideoCodecHeight = 1080;
60 #endif
61 47
62 SessionDescriptionInterface* CreateSessionDescription(const std::string& type, 48 SessionDescriptionInterface* CreateSessionDescription(const std::string& type,
63 const std::string& sdp, 49 const std::string& sdp,
64 SdpParseError* error) { 50 SdpParseError* error) {
65 if (!IsTypeSupported(type)) { 51 if (!IsTypeSupported(type)) {
66 return NULL; 52 return NULL;
67 } 53 }
68 54
69 JsepSessionDescription* jsep_desc = new JsepSessionDescription(type); 55 JsepSessionDescription* jsep_desc = new JsepSessionDescription(type);
70 if (!jsep_desc->Initialize(sdp, error)) { 56 if (!jsep_desc->Initialize(sdp, error)) {
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 const std::string& transport_name = candidate.transport_name(); 190 const std::string& transport_name = candidate.transport_name();
205 for (size_t i = 0; i < description_->contents().size(); ++i) { 191 for (size_t i = 0; i < description_->contents().size(); ++i) {
206 if (transport_name == description_->contents().at(i).name) { 192 if (transport_name == description_->contents().at(i).name) {
207 return static_cast<int>(i); 193 return static_cast<int>(i);
208 } 194 }
209 } 195 }
210 return -1; 196 return -1;
211 } 197 }
212 198
213 } // namespace webrtc 199 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/api/jsepsessiondescription.h ('k') | webrtc/api/jsepsessiondescription_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698