OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/filters/gpu_video_decoder.h" | 5 #include "media/filters/gpu_video_decoder.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
144 VideoDecodeAccelerator* vda = | 144 VideoDecodeAccelerator* vda = |
145 factories_->CreateVideoDecodeAccelerator(config.profile(), this); | 145 factories_->CreateVideoDecodeAccelerator(config.profile(), this); |
146 if (!vda) { | 146 if (!vda) { |
147 status_cb.Run(DECODER_ERROR_NOT_SUPPORTED); | 147 status_cb.Run(DECODER_ERROR_NOT_SUPPORTED); |
148 return; | 148 return; |
149 } | 149 } |
150 | 150 |
151 demuxer_stream_ = stream; | 151 demuxer_stream_ = stream; |
152 statistics_cb_ = statistics_cb; | 152 statistics_cb_ = statistics_cb; |
153 | 153 |
154 demuxer_stream_->EnableBitstreamConverter(); | 154 if (config.codec() == kCodecH264) |
155 demuxer_stream_->EnableBitstreamConverter(); | |
scherkus (not reviewing)
2012/07/20 20:20:20
q: do you recall the reason for having the bitstre
Ami GONE FROM CHROMIUM
2012/07/20 20:25:20
The decision long predates my involvement with the
| |
155 | 156 |
156 natural_size_ = config.natural_size(); | 157 natural_size_ = config.natural_size(); |
157 config_frame_duration_ = GetFrameDuration(config); | 158 config_frame_duration_ = GetFrameDuration(config); |
158 | 159 |
159 DVLOG(1) << "GpuVideoDecoder::Initialize() succeeded."; | 160 DVLOG(1) << "GpuVideoDecoder::Initialize() succeeded."; |
160 vda_loop_proxy_->PostTaskAndReply( | 161 vda_loop_proxy_->PostTaskAndReply( |
161 FROM_HERE, | 162 FROM_HERE, |
162 base::Bind(&GpuVideoDecoder::SetVDA, this, vda), | 163 base::Bind(&GpuVideoDecoder::SetVDA, this, vda), |
163 base::Bind(status_cb, PIPELINE_OK)); | 164 base::Bind(status_cb, PIPELINE_OK)); |
164 } | 165 } |
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
558 | 559 |
559 error_occured_ = true; | 560 error_occured_ = true; |
560 | 561 |
561 if (!pending_read_cb_.is_null()) { | 562 if (!pending_read_cb_.is_null()) { |
562 base::ResetAndReturn(&pending_read_cb_).Run(kDecodeError, NULL); | 563 base::ResetAndReturn(&pending_read_cb_).Run(kDecodeError, NULL); |
563 return; | 564 return; |
564 } | 565 } |
565 } | 566 } |
566 | 567 |
567 } // namespace media | 568 } // namespace media |
OLD | NEW |