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

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

Issue 2995953002: Revert of Add a flags field to video timing extension. (Closed)
Patch Set: Created 3 years, 4 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) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 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 */
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 frame.buffer = [NSData dataWithBytesNoCopy:buffer->data() length:buffer->size( ) freeWhenDone:NO]; 650 frame.buffer = [NSData dataWithBytesNoCopy:buffer->data() length:buffer->size( ) freeWhenDone:NO];
651 frame.encodedWidth = width; 651 frame.encodedWidth = width;
652 frame.encodedHeight = height; 652 frame.encodedHeight = height;
653 frame.completeFrame = YES; 653 frame.completeFrame = YES;
654 frame.frameType = isKeyframe ? RTCFrameTypeVideoFrameKey : RTCFrameTypeVideoFr ameDelta; 654 frame.frameType = isKeyframe ? RTCFrameTypeVideoFrameKey : RTCFrameTypeVideoFr ameDelta;
655 frame.captureTimeMs = renderTimeMs; 655 frame.captureTimeMs = renderTimeMs;
656 frame.timeStamp = timestamp; 656 frame.timeStamp = timestamp;
657 frame.rotation = rotation; 657 frame.rotation = rotation;
658 frame.contentType = (_mode == RTCVideoCodecModeScreensharing) ? RTCVideoConten tTypeScreenshare : 658 frame.contentType = (_mode == RTCVideoCodecModeScreensharing) ? RTCVideoConten tTypeScreenshare :
659 RTCVideoConten tTypeUnspecified; 659 RTCVideoConten tTypeUnspecified;
660 frame.flags = webrtc::TimingFrameFlags::kInvalid; 660 frame.isTimingFrame = NO;
661 661
662 int qp; 662 int qp;
663 _h264BitstreamParser.ParseBitstream(buffer->data(), buffer->size()); 663 _h264BitstreamParser.ParseBitstream(buffer->data(), buffer->size());
664 _h264BitstreamParser.GetLastSliceQp(&qp); 664 _h264BitstreamParser.GetLastSliceQp(&qp);
665 frame.qp = @(qp); 665 frame.qp = @(qp);
666 666
667 BOOL res = _callback(frame, codecSpecificInfo, header); 667 BOOL res = _callback(frame, codecSpecificInfo, header);
668 if (!res) { 668 if (!res) {
669 LOG(LS_ERROR) << "Encode callback failed"; 669 LOG(LS_ERROR) << "Encode callback failed";
670 return; 670 return;
671 } 671 }
672 _bitrateAdjuster->Update(frame.buffer.length); 672 _bitrateAdjuster->Update(frame.buffer.length);
673 } 673 }
674 674
675 - (RTCVideoEncoderQpThresholds *)scalingSettings { 675 - (RTCVideoEncoderQpThresholds *)scalingSettings {
676 return [[RTCVideoEncoderQpThresholds alloc] initWithThresholdsLow:kLowH264QpTh reshold 676 return [[RTCVideoEncoderQpThresholds alloc] initWithThresholdsLow:kLowH264QpTh reshold
677 high:kHighH264QpT hreshold]; 677 high:kHighH264QpT hreshold];
678 } 678 }
679 679
680 @end 680 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698