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

Side by Side Diff: webrtc/video/video_quality_test.cc

Issue 1306813009: H.264 video codec support using OpenH264/FFmpeg (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Re-enable H264 in video_loopback and screenshare_loopback after rebase (video_quality_test) Created 5 years, 2 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
« webrtc/video/end_to_end_tests.cc ('K') | « webrtc/video/full_stack.cc ('k') | no next file » | 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) 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 #include <stdio.h> 10 #include <stdio.h>
(...skipping 17 matching lines...) Expand all
28 #include "webrtc/test/statistics.h" 28 #include "webrtc/test/statistics.h"
29 #include "webrtc/test/testsupport/fileutils.h" 29 #include "webrtc/test/testsupport/fileutils.h"
30 #include "webrtc/test/video_renderer.h" 30 #include "webrtc/test/video_renderer.h"
31 #include "webrtc/video/video_quality_test.h" 31 #include "webrtc/video/video_quality_test.h"
32 32
33 namespace webrtc { 33 namespace webrtc {
34 34
35 static const int kTransportSeqExtensionId = 35 static const int kTransportSeqExtensionId =
36 VideoQualityTest::kAbsSendTimeExtensionId + 1; 36 VideoQualityTest::kAbsSendTimeExtensionId + 1;
37 static const int kSendStatsPollingIntervalMs = 1000; 37 static const int kSendStatsPollingIntervalMs = 1000;
38 static const int kPayloadTypeH264 = 122;
38 static const int kPayloadTypeVP8 = 123; 39 static const int kPayloadTypeVP8 = 123;
39 static const int kPayloadTypeVP9 = 124; 40 static const int kPayloadTypeVP9 = 124;
40 41
41 class VideoAnalyzer : public PacketReceiver, 42 class VideoAnalyzer : public PacketReceiver,
42 public Transport, 43 public Transport,
43 public VideoRenderer, 44 public VideoRenderer,
44 public VideoCaptureInput, 45 public VideoCaptureInput,
45 public EncodedFrameObserver { 46 public EncodedFrameObserver {
46 public: 47 public:
47 VideoAnalyzer(VideoCaptureInput* input, 48 VideoAnalyzer(VideoCaptureInput* input,
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 576
576 void VideoQualityTest::SetupFullStack(const Params& params, 577 void VideoQualityTest::SetupFullStack(const Params& params,
577 Transport* send_transport, 578 Transport* send_transport,
578 Transport* recv_transport) { 579 Transport* recv_transport) {
579 if (params.logs) 580 if (params.logs)
580 trace_to_stderr_.reset(new test::TraceToStderr); 581 trace_to_stderr_.reset(new test::TraceToStderr);
581 582
582 CreateSendConfig(1, send_transport); 583 CreateSendConfig(1, send_transport);
583 584
584 int payload_type; 585 int payload_type;
585 if (params.common.codec == "VP8") { 586 if (params.common.codec == "H264") {
587 encoder_.reset(VideoEncoder::Create(VideoEncoder::kH264));
588 payload_type = kPayloadTypeH264;
589 } else if (params.common.codec == "VP8") {
586 encoder_.reset(VideoEncoder::Create(VideoEncoder::kVp8)); 590 encoder_.reset(VideoEncoder::Create(VideoEncoder::kVp8));
587 payload_type = kPayloadTypeVP8; 591 payload_type = kPayloadTypeVP8;
588 } else if (params.common.codec == "VP9") { 592 } else if (params.common.codec == "VP9") {
589 encoder_.reset(VideoEncoder::Create(VideoEncoder::kVp9)); 593 encoder_.reset(VideoEncoder::Create(VideoEncoder::kVp9));
590 payload_type = kPayloadTypeVP9; 594 payload_type = kPayloadTypeVP9;
591 } else { 595 } else {
592 RTC_NOTREACHED() << "Codec not supported!"; 596 RTC_NOTREACHED() << "Codec not supported!";
593 return; 597 return;
594 } 598 }
595 send_config_.encoder_settings.encoder = encoder_.get(); 599 send_config_.encoder_settings.encoder = encoder_.get();
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 send_stream_->Stop(); 834 send_stream_->Stop();
831 receive_stream->Stop(); 835 receive_stream->Stop();
832 836
833 call->DestroyVideoReceiveStream(receive_stream); 837 call->DestroyVideoReceiveStream(receive_stream);
834 call->DestroyVideoSendStream(send_stream_); 838 call->DestroyVideoSendStream(send_stream_);
835 839
836 transport.StopSending(); 840 transport.StopSending();
837 } 841 }
838 842
839 } // namespace webrtc 843 } // namespace webrtc
OLDNEW
« webrtc/video/end_to_end_tests.cc ('K') | « webrtc/video/full_stack.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698