OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "media/cast/sender/external_video_encoder.h" | 5 #include "media/cast/sender/external_video_encoder.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 } | 83 } |
84 | 84 |
85 // Initialize the real HW encoder. | 85 // Initialize the real HW encoder. |
86 void Initialize(const VideoSenderConfig& video_config) { | 86 void Initialize(const VideoSenderConfig& video_config) { |
87 DCHECK(encoder_task_runner_); | 87 DCHECK(encoder_task_runner_); |
88 DCHECK(encoder_task_runner_->RunsTasksOnCurrentThread()); | 88 DCHECK(encoder_task_runner_->RunsTasksOnCurrentThread()); |
89 | 89 |
90 VideoCodecProfile output_profile = media::VIDEO_CODEC_PROFILE_UNKNOWN; | 90 VideoCodecProfile output_profile = media::VIDEO_CODEC_PROFILE_UNKNOWN; |
91 switch (video_config.codec) { | 91 switch (video_config.codec) { |
92 case CODEC_VIDEO_VP8: | 92 case CODEC_VIDEO_VP8: |
93 output_profile = media::VP8PROFILE_MAIN; | 93 output_profile = media::VP8PROFILE_ANY; |
94 break; | 94 break; |
95 case CODEC_VIDEO_H264: | 95 case CODEC_VIDEO_H264: |
96 output_profile = media::H264PROFILE_MAIN; | 96 output_profile = media::H264PROFILE_MAIN; |
97 break; | 97 break; |
98 case CODEC_VIDEO_FAKE: | 98 case CODEC_VIDEO_FAKE: |
99 NOTREACHED() << "Fake software video encoder cannot be external"; | 99 NOTREACHED() << "Fake software video encoder cannot be external"; |
100 break; | 100 break; |
101 default: | 101 default: |
102 NOTREACHED() << "Video codec not specified or not supported"; | 102 NOTREACHED() << "Video codec not specified or not supported"; |
103 break; | 103 break; |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); | 465 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); |
466 key_frame_requested_ = true; | 466 key_frame_requested_ = true; |
467 } | 467 } |
468 | 468 |
469 // Inform the encoder to only reference frames older or equal to frame_id; | 469 // Inform the encoder to only reference frames older or equal to frame_id; |
470 void ExternalVideoEncoder::LatestFrameIdToReference(uint32 /*frame_id*/) { | 470 void ExternalVideoEncoder::LatestFrameIdToReference(uint32 /*frame_id*/) { |
471 // Do nothing not supported. | 471 // Do nothing not supported. |
472 } | 472 } |
473 } // namespace cast | 473 } // namespace cast |
474 } // namespace media | 474 } // namespace media |
OLD | NEW |