| 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/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 1500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1511 } | 1511 } |
| 1512 } | 1512 } |
| 1513 | 1513 |
| 1514 #define SET_ERROR_AND_RETURN() \ | 1514 #define SET_ERROR_AND_RETURN() \ |
| 1515 do { \ | 1515 do { \ |
| 1516 DVLOG(1) << "Error during decode"; \ | 1516 DVLOG(1) << "Error during decode"; \ |
| 1517 state_ = kError; \ | 1517 state_ = kError; \ |
| 1518 return VaapiH264Decoder::kDecodeError; \ | 1518 return VaapiH264Decoder::kDecodeError; \ |
| 1519 } while (0) | 1519 } while (0) |
| 1520 | 1520 |
| 1521 void VaapiH264Decoder::SetStream(uint8* ptr, size_t size, int32 input_id) { | 1521 void VaapiH264Decoder::SetStream(const uint8* ptr, |
| 1522 size_t size, |
| 1523 int32 input_id) { |
| 1522 DCHECK(ptr); | 1524 DCHECK(ptr); |
| 1523 DCHECK(size); | 1525 DCHECK(size); |
| 1524 | 1526 |
| 1525 // Got new input stream data from the client. | 1527 // Got new input stream data from the client. |
| 1526 DVLOG(4) << "New input stream id: " << input_id << " at: " << (void*) ptr | 1528 DVLOG(4) << "New input stream id: " << input_id << " at: " << (void*) ptr |
| 1527 << " size: " << size; | 1529 << " size: " << size; |
| 1528 parser_.SetStream(ptr, size); | 1530 parser_.SetStream(ptr, size); |
| 1529 curr_input_id_ = input_id; | 1531 curr_input_id_ = input_id; |
| 1530 } | 1532 } |
| 1531 | 1533 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1632 break; | 1634 break; |
| 1633 } | 1635 } |
| 1634 } | 1636 } |
| 1635 } | 1637 } |
| 1636 | 1638 |
| 1637 size_t VaapiH264Decoder::GetRequiredNumOfPictures() { | 1639 size_t VaapiH264Decoder::GetRequiredNumOfPictures() { |
| 1638 return dpb_.max_num_pics() + kPicsInPipeline; | 1640 return dpb_.max_num_pics() + kPicsInPipeline; |
| 1639 } | 1641 } |
| 1640 | 1642 |
| 1641 } // namespace content | 1643 } // namespace content |
| OLD | NEW |