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

Side by Side Diff: webrtc/api/android/jni/androidmediaencoder_jni.cc

Issue 2337453002: H.264 packetization mode 0 (try 2) (Closed)
Patch Set: Upload try 2 (with rebase) Created 4 years, 1 month 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 | « no previous file | webrtc/common_types.h » ('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 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
(...skipping 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after
1106 info.codecSpecific.VP9.gof_idx = 1106 info.codecSpecific.VP9.gof_idx =
1107 static_cast<uint8_t>(gof_idx_++ % gof_.num_frames_in_gof); 1107 static_cast<uint8_t>(gof_idx_++ % gof_.num_frames_in_gof);
1108 info.codecSpecific.VP9.num_spatial_layers = 1; 1108 info.codecSpecific.VP9.num_spatial_layers = 1;
1109 info.codecSpecific.VP9.spatial_layer_resolution_present = false; 1109 info.codecSpecific.VP9.spatial_layer_resolution_present = false;
1110 if (info.codecSpecific.VP9.ss_data_available) { 1110 if (info.codecSpecific.VP9.ss_data_available) {
1111 info.codecSpecific.VP9.spatial_layer_resolution_present = true; 1111 info.codecSpecific.VP9.spatial_layer_resolution_present = true;
1112 info.codecSpecific.VP9.width[0] = width_; 1112 info.codecSpecific.VP9.width[0] = width_;
1113 info.codecSpecific.VP9.height[0] = height_; 1113 info.codecSpecific.VP9.height[0] = height_;
1114 info.codecSpecific.VP9.gof.CopyGofInfoVP9(gof_); 1114 info.codecSpecific.VP9.gof.CopyGofInfoVP9(gof_);
1115 } 1115 }
1116 } else if (codecType_ == kVideoCodecH264) {
1117 info.codecSpecific.H264.packetization_mode =
1118 webrtc::kH264PacketizationMode1;
1116 } 1119 }
1117 picture_id_ = (picture_id_ + 1) & 0x7FFF; 1120 picture_id_ = (picture_id_ + 1) & 0x7FFF;
1118 1121
1119 // Generate a header describing a single fragment. 1122 // Generate a header describing a single fragment.
1120 webrtc::RTPFragmentationHeader header; 1123 webrtc::RTPFragmentationHeader header;
1121 memset(&header, 0, sizeof(header)); 1124 memset(&header, 0, sizeof(header));
1122 if (codecType_ == kVideoCodecVP8 || codecType_ == kVideoCodecVP9) { 1125 if (codecType_ == kVideoCodecVP8 || codecType_ == kVideoCodecVP9) {
1123 header.VerifyAndAllocateFragmentationHeader(1); 1126 header.VerifyAndAllocateFragmentationHeader(1);
1124 header.fragmentationOffset[0] = 0; 1127 header.fragmentationOffset[0] = 0;
1125 header.fragmentationLength[0] = image->_length; 1128 header.fragmentationLength[0] = image->_length;
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
1370 return supported_codecs_; 1373 return supported_codecs_;
1371 } 1374 }
1372 1375
1373 void MediaCodecVideoEncoderFactory::DestroyVideoEncoder( 1376 void MediaCodecVideoEncoderFactory::DestroyVideoEncoder(
1374 webrtc::VideoEncoder* encoder) { 1377 webrtc::VideoEncoder* encoder) {
1375 ALOGD << "Destroy video encoder."; 1378 ALOGD << "Destroy video encoder.";
1376 delete encoder; 1379 delete encoder;
1377 } 1380 }
1378 1381
1379 } // namespace webrtc_jni 1382 } // namespace webrtc_jni
OLDNEW
« no previous file with comments | « no previous file | webrtc/common_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698