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