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

Side by Side Diff: webrtc/media/base/adaptedvideotracksource.cc

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 (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 pending rotation despite some sink with wants.rotation_applied == 44 pending rotation despite some sink with wants.rotation_applied ==
45 true was just added. The VideoBroadcaster enforces 45 true was just added. The VideoBroadcaster enforces
46 synchronization for us in this case, by not passing the frame on 46 synchronization for us in this case, by not passing the frame on
47 to sinks which don't want it. */ 47 to sinks which don't want it. */
48 if (apply_rotation() && 48 if (apply_rotation() &&
49 frame.rotation() != webrtc::kVideoRotation_0 && 49 frame.rotation() != webrtc::kVideoRotation_0 &&
50 !buffer->native_handle()) { 50 !buffer->native_handle()) {
51 /* Apply pending rotation. */ 51 /* Apply pending rotation. */
52 broadcaster_.OnFrame(webrtc::VideoFrame( 52 broadcaster_.OnFrame(webrtc::VideoFrame(
53 webrtc::I420Buffer::Rotate(*buffer, frame.rotation()), 53 webrtc::I420Buffer::Rotate(*buffer, frame.rotation()),
54 webrtc::kVideoRotation_0, frame.timestamp_us())); 54 webrtc::kVideoRotation_0, frame.content_type(), frame.timestamp_us()));
55 } else { 55 } else {
56 broadcaster_.OnFrame(frame); 56 broadcaster_.OnFrame(frame);
57 } 57 }
58 } 58 }
59 59
60 void AdaptedVideoTrackSource::AddOrUpdateSink( 60 void AdaptedVideoTrackSource::AddOrUpdateSink(
61 rtc::VideoSinkInterface<webrtc::VideoFrame>* sink, 61 rtc::VideoSinkInterface<webrtc::VideoFrame>* sink,
62 const rtc::VideoSinkWants& wants) { 62 const rtc::VideoSinkWants& wants) {
63 RTC_DCHECK(thread_checker_.CalledOnValidThread()); 63 RTC_DCHECK(thread_checker_.CalledOnValidThread());
64 64
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 // VideoAdapter dropped the frame. 109 // VideoAdapter dropped the frame.
110 return false; 110 return false;
111 } 111 }
112 112
113 *crop_x = (width - *crop_width) / 2; 113 *crop_x = (width - *crop_width) / 2;
114 *crop_y = (height - *crop_height) / 2; 114 *crop_y = (height - *crop_height) / 2;
115 return true; 115 return true;
116 } 116 }
117 117
118 } // namespace rtc 118 } // namespace rtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698