| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this |
| 2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
| 3 // LICENSE file. | 3 // LICENSE file. |
| 4 | 4 |
| 5 #include "media/base/video_frame_impl.h" | 5 #include "media/base/video_frame_impl.h" |
| 6 #include "media/filters/ffmpeg_common.h" | 6 #include "media/filters/ffmpeg_common.h" |
| 7 #include "media/filters/ffmpeg_demuxer.h" | 7 #include "media/filters/ffmpeg_demuxer.h" |
| 8 #include "media/filters/ffmpeg_video_decoder.h" | 8 #include "media/filters/ffmpeg_video_decoder.h" |
| 9 | 9 |
| 10 namespace { | 10 namespace { |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 case PIX_FMT_YUVJ422P: | 330 case PIX_FMT_YUVJ422P: |
| 331 return VideoSurface::YV16; | 331 return VideoSurface::YV16; |
| 332 break; | 332 break; |
| 333 default: | 333 default: |
| 334 // TODO(scherkus): More formats here? | 334 // TODO(scherkus): More formats here? |
| 335 return VideoSurface::INVALID; | 335 return VideoSurface::INVALID; |
| 336 } | 336 } |
| 337 } | 337 } |
| 338 | 338 |
| 339 void FFmpegVideoDecoder::SignalPipelineError() { | 339 void FFmpegVideoDecoder::SignalPipelineError() { |
| 340 host()->Error(PIPELINE_ERROR_DECODE); | 340 host()->SetError(PIPELINE_ERROR_DECODE); |
| 341 state_ = kDecodeFinished; | 341 state_ = kDecodeFinished; |
| 342 } | 342 } |
| 343 | 343 |
| 344 // static | 344 // static |
| 345 bool FFmpegVideoDecoder::PtsHeapOrdering::operator()( | 345 bool FFmpegVideoDecoder::PtsHeapOrdering::operator()( |
| 346 const base::TimeDelta& lhs, | 346 const base::TimeDelta& lhs, |
| 347 const base::TimeDelta& rhs) const { | 347 const base::TimeDelta& rhs) const { |
| 348 // std::priority_queue is a max-heap. We want lower timestamps to show up | 348 // std::priority_queue is a max-heap. We want lower timestamps to show up |
| 349 // first so reverse the natural less-than comparison. | 349 // first so reverse the natural less-than comparison. |
| 350 return rhs < lhs; | 350 return rhs < lhs; |
| 351 } | 351 } |
| 352 | 352 |
| 353 } // namespace | 353 } // namespace |
| OLD | NEW |