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

Side by Side Diff: webrtc/media/base/fakevideocapturer.h

Issue 2772033002: Add content type information to encoded images and corresponding rtp extension header (Closed)
Patch Set: Fix Mac CE Created 3 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2004 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 // VideoCapturerTest.SinkWantsMaxPixelAndMaxPixelCountStepUp 93 // VideoCapturerTest.SinkWantsMaxPixelAndMaxPixelCountStepUp
94 // depends on this. 94 // depends on this.
95 if (AdaptFrame(width, height, 0, 0, &adapted_width, &adapted_height, 95 if (AdaptFrame(width, height, 0, 0, &adapted_width, &adapted_height,
96 &crop_width, &crop_height, &crop_x, &crop_y, nullptr)) { 96 &crop_width, &crop_height, &crop_x, &crop_y, nullptr)) {
97 rtc::scoped_refptr<webrtc::I420Buffer> buffer( 97 rtc::scoped_refptr<webrtc::I420Buffer> buffer(
98 webrtc::I420Buffer::Create(adapted_width, adapted_height)); 98 webrtc::I420Buffer::Create(adapted_width, adapted_height));
99 buffer->InitializeData(); 99 buffer->InitializeData();
100 100
101 OnFrame(webrtc::VideoFrame( 101 OnFrame(webrtc::VideoFrame(
102 buffer, rotation_, 102 buffer, rotation_,
103 is_screencast_ ? webrtc::VideoContentType::kScreenshare
104 : webrtc::VideoContentType::kDefault,
103 next_timestamp_ / rtc::kNumNanosecsPerMicrosec), 105 next_timestamp_ / rtc::kNumNanosecsPerMicrosec),
104 width, height); 106 width, height);
105 } 107 }
106 next_timestamp_ += timestamp_interval; 108 next_timestamp_ += timestamp_interval;
107 109
108 return true; 110 return true;
109 } 111 }
110 112
111 sigslot::signal1<FakeVideoCapturer*> SignalDestroyed; 113 sigslot::signal1<FakeVideoCapturer*> SignalDestroyed;
112 114
(...skipping 26 matching lines...) Expand all
139 bool running_; 141 bool running_;
140 int64_t initial_timestamp_; 142 int64_t initial_timestamp_;
141 int64_t next_timestamp_; 143 int64_t next_timestamp_;
142 const bool is_screencast_; 144 const bool is_screencast_;
143 webrtc::VideoRotation rotation_; 145 webrtc::VideoRotation rotation_;
144 }; 146 };
145 147
146 } // namespace cricket 148 } // namespace cricket
147 149
148 #endif // WEBRTC_MEDIA_BASE_FAKEVIDEOCAPTURER_H_ 150 #endif // WEBRTC_MEDIA_BASE_FAKEVIDEOCAPTURER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698