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 "content/common/gpu/media/h264_parser.h" | 5 #include "content/common/gpu/media/h264_parser.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
10 | 10 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 } | 47 } |
48 | 48 |
49 H264SEIMessage::H264SEIMessage() { | 49 H264SEIMessage::H264SEIMessage() { |
50 memset(this, 0, sizeof(*this)); | 50 memset(this, 0, sizeof(*this)); |
51 } | 51 } |
52 | 52 |
53 H264Parser::H264BitReader::H264BitReader() | 53 H264Parser::H264BitReader::H264BitReader() |
54 : data_(NULL), | 54 : data_(NULL), |
55 bytes_left_(0), | 55 bytes_left_(0), |
56 curr_byte_(0), | 56 curr_byte_(0), |
57 num_remaining_bits_in_curr_byte_(0) { | 57 num_remaining_bits_in_curr_byte_(0), |
| 58 prev_two_bytes_(0) { |
58 } | 59 } |
59 | 60 |
60 H264Parser::H264BitReader::~H264BitReader() {} | 61 H264Parser::H264BitReader::~H264BitReader() {} |
61 | 62 |
62 bool H264Parser::H264BitReader::Initialize(const uint8* data, off_t size) { | 63 bool H264Parser::H264BitReader::Initialize(const uint8* data, off_t size) { |
63 DCHECK(data); | 64 DCHECK(data); |
64 | 65 |
65 if (size < 1) | 66 if (size < 1) |
66 return false; | 67 return false; |
67 | 68 |
(...skipping 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1201 | 1202 |
1202 default: | 1203 default: |
1203 DVLOG(4) << "Unsupported SEI message"; | 1204 DVLOG(4) << "Unsupported SEI message"; |
1204 break; | 1205 break; |
1205 } | 1206 } |
1206 | 1207 |
1207 return kOk; | 1208 return kOk; |
1208 } | 1209 } |
1209 | 1210 |
1210 } // namespace content | 1211 } // namespace content |
OLD | NEW |