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

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: Add gfx_geometry dependency Created 6 years, 10 months 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 1503 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « content/common/gpu/media/vaapi_h264_decoder.h ('k') | content/common/gpu/media/vaapi_h264_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698