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

Side by Side Diff: webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest.h

Issue 2978623002: Implement H264 codec in Objective-C classes. (Closed)
Patch Set: Fix test after rebase. Created 3 years, 5 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
« no previous file with comments | « webrtc/modules/video_coding/codecs/test/objc_codec_h264_test.mm ('k') | webrtc/sdk/BUILD.gn » ('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 (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 #ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_VIDEOPROCESSOR_INTEGRATIONTEST_H _ 11 #ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_VIDEOPROCESSOR_INTEGRATIONTEST_H _
12 #define WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_VIDEOPROCESSOR_INTEGRATIONTEST_H _ 12 #define WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_VIDEOPROCESSOR_INTEGRATIONTEST_H _
13 13
14 #include <math.h> 14 #include <math.h>
15 15
16 #include <limits> 16 #include <limits>
17 #include <memory> 17 #include <memory>
18 #include <string> 18 #include <string>
19 #include <utility> 19 #include <utility>
20 20
21 #if defined(WEBRTC_ANDROID) 21 #if defined(WEBRTC_ANDROID)
22 #include "webrtc/modules/video_coding/codecs/test/android_test_initializer.h" 22 #include "webrtc/modules/video_coding/codecs/test/android_test_initializer.h"
23 #include "webrtc/sdk/android/src/jni/androidmediadecoder_jni.h" 23 #include "webrtc/sdk/android/src/jni/androidmediadecoder_jni.h"
24 #include "webrtc/sdk/android/src/jni/androidmediaencoder_jni.h" 24 #include "webrtc/sdk/android/src/jni/androidmediaencoder_jni.h"
25 #elif defined(WEBRTC_IOS) 25 #elif defined(WEBRTC_IOS)
26 #include "webrtc/sdk/objc/Framework/Classes/VideoToolbox/decoder.h" 26 #include "webrtc/modules/video_coding/codecs/test/objc_codec_h264_test.h"
27 #include "webrtc/sdk/objc/Framework/Classes/VideoToolbox/encoder.h"
28 #endif 27 #endif
29 28
30 #include "webrtc/media/engine/webrtcvideodecoderfactory.h" 29 #include "webrtc/media/engine/webrtcvideodecoderfactory.h"
31 #include "webrtc/media/engine/webrtcvideoencoderfactory.h" 30 #include "webrtc/media/engine/webrtcvideoencoderfactory.h"
32 #include "webrtc/modules/video_coding/codecs/h264/include/h264.h" 31 #include "webrtc/modules/video_coding/codecs/h264/include/h264.h"
33 #include "webrtc/modules/video_coding/codecs/test/packet_manipulator.h" 32 #include "webrtc/modules/video_coding/codecs/test/packet_manipulator.h"
34 #include "webrtc/modules/video_coding/codecs/test/videoprocessor.h" 33 #include "webrtc/modules/video_coding/codecs/test/videoprocessor.h"
35 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h" 34 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h"
36 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8_common_types.h" 35 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8_common_types.h"
37 #include "webrtc/modules/video_coding/codecs/vp9/include/vp9.h" 36 #include "webrtc/modules/video_coding/codecs/vp9/include/vp9.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 decoder_.reset( 192 decoder_.reset(
194 external_decoder_factory_->CreateVideoDecoder(kVideoCodecVP9)); 193 external_decoder_factory_->CreateVideoDecoder(kVideoCodecVP9));
195 break; 194 break;
196 default: 195 default:
197 RTC_NOTREACHED(); 196 RTC_NOTREACHED();
198 break; 197 break;
199 } 198 }
200 #elif defined(WEBRTC_IOS) 199 #elif defined(WEBRTC_IOS)
201 ASSERT_EQ(kVideoCodecH264, config_.codec_settings->codecType) 200 ASSERT_EQ(kVideoCodecH264, config_.codec_settings->codecType)
202 << "iOS HW codecs only support H264."; 201 << "iOS HW codecs only support H264.";
203 encoder_.reset(new H264VideoToolboxEncoder( 202 ObjCVideoEncoderFactoryWrapper encoder_factory_wrapper;
204 cricket::VideoCodec(cricket::kH264CodecName))); 203 ObjCVideoDecoderFactoryWrapper decoder_factory_wrapper;
205 decoder_.reset(new H264VideoToolboxDecoder()); 204 cricket::VideoCodec codecInfo =
205 encoder_factory_wrapper.wrapped_encoder_factory()
206 ->supported_codecs()
207 .at(0);
208 encoder_.reset(
209 encoder_factory_wrapper.wrapped_encoder_factory()->CreateVideoEncoder(
210 codecInfo));
211 decoder_.reset(
212 decoder_factory_wrapper.wrapped_decoder_factory()->CreateVideoDecoder(
213 kVideoCodecH264));
206 #else 214 #else
207 RTC_NOTREACHED() << "Only support HW codecs on Android and iOS."; 215 RTC_NOTREACHED() << "Only support HW codecs on Android and iOS.";
208 #endif 216 #endif
209 #endif // WEBRTC_VIDEOPROCESSOR_INTEGRATIONTEST_HW_CODECS_ENABLED 217 #endif // WEBRTC_VIDEOPROCESSOR_INTEGRATIONTEST_HW_CODECS_ENABLED
210 RTC_CHECK(encoder_) << "HW encoder not successfully created."; 218 RTC_CHECK(encoder_) << "HW encoder not successfully created.";
211 RTC_CHECK(decoder_) << "HW decoder not successfully created."; 219 RTC_CHECK(decoder_) << "HW decoder not successfully created.";
212 return; 220 return;
213 } 221 }
214 222
215 // SW codecs. 223 // SW codecs.
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 int start_frame_rate_; 800 int start_frame_rate_;
793 801
794 // Codec and network settings. 802 // Codec and network settings.
795 int num_temporal_layers_; 803 int num_temporal_layers_;
796 }; 804 };
797 805
798 } // namespace test 806 } // namespace test
799 } // namespace webrtc 807 } // namespace webrtc
800 808
801 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_VIDEOPROCESSOR_INTEGRATIONTES T_H_ 809 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_VIDEOPROCESSOR_INTEGRATIONTES T_H_
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/codecs/test/objc_codec_h264_test.mm ('k') | webrtc/sdk/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698