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

Side by Side Diff: webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm

Issue 2772033002: Add content type information to encoded images and corresponding rtp extension header (Closed)
Patch Set: Set EncodedImage content_type from vie_encoder 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 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2015 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
11 #include "avfoundationvideocapturer.h" 11 #include "avfoundationvideocapturer.h"
12 12
13 #import <AVFoundation/AVFoundation.h> 13 #import <AVFoundation/AVFoundation.h>
14 14
15 #import "RTCAVFoundationVideoCapturerInternal.h" 15 #import "RTCAVFoundationVideoCapturerInternal.h"
16 #import "RTCDispatcher+Private.h" 16 #import "RTCDispatcher+Private.h"
17 #import "WebRTC/RTCLogging.h" 17 #import "WebRTC/RTCLogging.h"
18 18
19 #include "avfoundationformatmapper.h" 19 #include "avfoundationformatmapper.h"
20 20
21 #include "webrtc/api/video/video_rotation.h" 21 #include "webrtc/api/video/video_rotation.h"
22 #include "webrtc/api/video/video_content_type.h"
22 #include "webrtc/base/bind.h" 23 #include "webrtc/base/bind.h"
23 #include "webrtc/base/checks.h" 24 #include "webrtc/base/checks.h"
24 #include "webrtc/base/logging.h" 25 #include "webrtc/base/logging.h"
25 #include "webrtc/base/thread.h" 26 #include "webrtc/base/thread.h"
26 #include "webrtc/common_video/include/corevideo_frame_buffer.h" 27 #include "webrtc/common_video/include/corevideo_frame_buffer.h"
27 28
28 namespace webrtc { 29 namespace webrtc {
29 30
30 enum AVFoundationVideoCapturerMessageType : uint32_t { 31 enum AVFoundationVideoCapturerMessageType : uint32_t {
31 kMessageTypeFrame, 32 kMessageTypeFrame,
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 if (apply_rotation() && rotation != kVideoRotation_0) { 163 if (apply_rotation() && rotation != kVideoRotation_0) {
163 buffer = I420Buffer::Rotate(buffer->NativeToI420Buffer(), 164 buffer = I420Buffer::Rotate(buffer->NativeToI420Buffer(),
164 rotation); 165 rotation);
165 if (rotation == kVideoRotation_90 || rotation == kVideoRotation_270) { 166 if (rotation == kVideoRotation_90 || rotation == kVideoRotation_270) {
166 std::swap(captured_width, captured_height); 167 std::swap(captured_width, captured_height);
167 } 168 }
168 169
169 rotation = kVideoRotation_0; 170 rotation = kVideoRotation_0;
170 } 171 }
171 172
172 OnFrame(webrtc::VideoFrame(buffer, rotation, translated_camera_time_us), 173 OnFrame(webrtc::VideoFrame(buffer, rotation, kVideoContent_Default,
174 translated_camera_time_us),
173 captured_width, captured_height); 175 captured_width, captured_height);
174 } 176 }
175 177
176 } // namespace webrtc 178 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698