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 // This file contains an implementation of an H264 Annex-B video stream parser. | 5 // This file contains an implementation of an H264 Annex-B video stream parser. |
6 | 6 |
7 #ifndef CONTENT_COMMON_GPU_MEDIA_H264_PARSER_H_ | 7 #ifndef CONTENT_COMMON_GPU_MEDIA_H264_PARSER_H_ |
8 #define CONTENT_COMMON_GPU_MEDIA_H264_PARSER_H_ | 8 #define CONTENT_COMMON_GPU_MEDIA_H264_PARSER_H_ |
9 | 9 |
| 10 #include <sys/types.h> |
| 11 |
10 #include <map> | 12 #include <map> |
11 | 13 |
12 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
13 #include "base/memory/scoped_ptr.h" | |
14 | 15 |
15 namespace content { | 16 namespace content { |
16 | 17 |
17 // For explanations of each struct and its members, see H.264 specification | 18 // For explanations of each struct and its members, see H.264 specification |
18 // at http://www.itu.int/rec/T-REC-H.264. | 19 // at http://www.itu.int/rec/T-REC-H.264. |
19 struct H264NALU { | 20 struct H264NALU { |
20 H264NALU(); | 21 H264NALU(); |
21 | 22 |
22 enum Type { | 23 enum Type { |
23 kUnspecified = 0, | 24 kUnspecified = 0, |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 | 394 |
394 // PPSes and SPSes stored for future reference. | 395 // PPSes and SPSes stored for future reference. |
395 typedef std::map<int, H264SPS*> SPSById; | 396 typedef std::map<int, H264SPS*> SPSById; |
396 typedef std::map<int, H264PPS*> PPSById; | 397 typedef std::map<int, H264PPS*> PPSById; |
397 SPSById active_SPSes_; | 398 SPSById active_SPSes_; |
398 PPSById active_PPSes_; | 399 PPSById active_PPSes_; |
399 | 400 |
400 DISALLOW_COPY_AND_ASSIGN(H264Parser); | 401 DISALLOW_COPY_AND_ASSIGN(H264Parser); |
401 }; | 402 }; |
402 | 403 |
403 } // namespace content | 404 } // namespace content |
404 | 405 |
405 #endif // CONTENT_COMMON_GPU_MEDIA_H264_PARSER_H_ | 406 #endif // CONTENT_COMMON_GPU_MEDIA_H264_PARSER_H_ |
406 | |
OLD | NEW |