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 <algorithm> | 5 #include <algorithm> |
6 #include <limits> | 6 #include <limits> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
(...skipping 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1134 if (!UpdateMaxNumReorderFrames(sps)) | 1134 if (!UpdateMaxNumReorderFrames(sps)) |
1135 return false; | 1135 return false; |
1136 DVLOG(1) << "max_num_reorder_frames: " << max_num_reorder_frames_; | 1136 DVLOG(1) << "max_num_reorder_frames: " << max_num_reorder_frames_; |
1137 | 1137 |
1138 *need_new_buffers = true; | 1138 *need_new_buffers = true; |
1139 return true; | 1139 return true; |
1140 } | 1140 } |
1141 | 1141 |
1142 bool H264Decoder::FinishPrevFrameIfPresent() { | 1142 bool H264Decoder::FinishPrevFrameIfPresent() { |
1143 // If we already have a frame waiting to be decoded, decode it and finish. | 1143 // If we already have a frame waiting to be decoded, decode it and finish. |
1144 if (curr_pic_ != NULL) { | 1144 if (curr_pic_) { |
1145 if (!DecodePicture()) | 1145 if (!DecodePicture()) |
1146 return false; | 1146 return false; |
1147 | 1147 |
1148 scoped_refptr<H264Picture> pic = curr_pic_; | 1148 scoped_refptr<H264Picture> pic = curr_pic_; |
1149 curr_pic_ = nullptr; | 1149 curr_pic_ = nullptr; |
1150 return FinishPicture(pic); | 1150 return FinishPicture(pic); |
1151 } | 1151 } |
1152 | 1152 |
1153 return true; | 1153 return true; |
1154 } | 1154 } |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1429 | 1429 |
1430 gfx::Size H264Decoder::GetPicSize() const { | 1430 gfx::Size H264Decoder::GetPicSize() const { |
1431 return pic_size_; | 1431 return pic_size_; |
1432 } | 1432 } |
1433 | 1433 |
1434 size_t H264Decoder::GetRequiredNumOfPictures() const { | 1434 size_t H264Decoder::GetRequiredNumOfPictures() const { |
1435 return dpb_.max_num_pics() + kPicsInPipeline; | 1435 return dpb_.max_num_pics() + kPicsInPipeline; |
1436 } | 1436 } |
1437 | 1437 |
1438 } // namespace media | 1438 } // namespace media |
OLD | NEW |