Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(608)

Side by Side Diff: content/common/gpu/media/vaapi_h264_decoder.cc

Issue 27498002: Add vaapi_h264_decoder_test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review comments Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1493 matching lines...) Expand 10 before | Expand all | Expand 10 after
1504 } 1504 }
1505 } 1505 }
1506 1506
1507 #define SET_ERROR_AND_RETURN() \ 1507 #define SET_ERROR_AND_RETURN() \
1508 do { \ 1508 do { \
1509 DVLOG(1) << "Error during decode"; \ 1509 DVLOG(1) << "Error during decode"; \
1510 state_ = kError; \ 1510 state_ = kError; \
1511 return VaapiH264Decoder::kDecodeError; \ 1511 return VaapiH264Decoder::kDecodeError; \
1512 } while (0) 1512 } while (0)
1513 1513
1514 void VaapiH264Decoder::SetStream(uint8* ptr, size_t size, int32 input_id) { 1514 void VaapiH264Decoder::SetStream(const uint8* ptr,
1515 size_t size,
1516 int32 input_id) {
1515 DCHECK(ptr); 1517 DCHECK(ptr);
1516 DCHECK(size); 1518 DCHECK(size);
1517 1519
1518 // Got new input stream data from the client. 1520 // Got new input stream data from the client.
1519 DVLOG(4) << "New input stream id: " << input_id << " at: " << (void*) ptr 1521 DVLOG(4) << "New input stream id: " << input_id << " at: " << (void*) ptr
1520 << " size: " << size; 1522 << " size: " << size;
1521 parser_.SetStream(ptr, size); 1523 parser_.SetStream(ptr, size);
1522 curr_input_id_ = input_id; 1524 curr_input_id_ = input_id;
1523 } 1525 }
1524 1526
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
1625 break; 1627 break;
1626 } 1628 }
1627 } 1629 }
1628 } 1630 }
1629 1631
1630 size_t VaapiH264Decoder::GetRequiredNumOfPictures() { 1632 size_t VaapiH264Decoder::GetRequiredNumOfPictures() {
1631 return dpb_.max_num_pics() + kPicsInPipeline; 1633 return dpb_.max_num_pics() + kPicsInPipeline;
1632 } 1634 }
1633 1635
1634 } // namespace content 1636 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698