OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef MEDIA_FORMATS_MP2T_ES_PARSER_H264_H_ | 5 #ifndef MEDIA_FORMATS_MP2T_ES_PARSER_H264_H_ |
6 #define MEDIA_FORMATS_MP2T_ES_PARSER_H264_H_ | 6 #define MEDIA_FORMATS_MP2T_ES_PARSER_H264_H_ |
7 | 7 |
8 #include <list> | |
9 #include <utility> | 8 #include <utility> |
10 | 9 |
11 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
12 #include "base/callback.h" | 11 #include "base/callback.h" |
13 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
14 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
15 #include "base/time/time.h" | 14 #include "base/time/time.h" |
16 #include "media/base/media_export.h" | 15 #include "media/base/media_export.h" |
17 #include "media/base/video_decoder_config.h" | 16 #include "media/base/video_decoder_config.h" |
18 #include "media/formats/mp2t/es_adapter_video.h" | 17 #include "media/formats/mp2t/es_adapter_video.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
59 // of the start code parser. | 58 // of the start code parser. |
60 bool FindAUD(int64* stream_pos); | 59 bool FindAUD(int64* stream_pos); |
61 | 60 |
62 // Emit a frame whose position in the ES queue starts at |access_unit_pos|. | 61 // Emit a frame whose position in the ES queue starts at |access_unit_pos|. |
63 // Returns true if successful, false if no PTS is available for the frame. | 62 // Returns true if successful, false if no PTS is available for the frame. |
64 bool EmitFrame(int64 access_unit_pos, int access_unit_size, | 63 bool EmitFrame(int64 access_unit_pos, int access_unit_size, |
65 bool is_key_frame, int pps_id); | 64 bool is_key_frame, int pps_id); |
66 | 65 |
67 // Update the video decoder config based on an H264 SPS. | 66 // Update the video decoder config based on an H264 SPS. |
68 // Return true if successful. | 67 // Return true if successful. |
69 bool UpdateVideoDecoderConfig(const H264SPS* sps); | 68 bool UpdateVideoDecoderConfig(const H264SPS* sps, |
69 const EncryptionScheme& scheme); | |
ddorwin
2015/12/10 18:36:02
Fwd declare?
dougsteed
2015/12/14 21:19:02
Done.
| |
70 | 70 |
71 EsAdapterVideo es_adapter_; | 71 EsAdapterVideo es_adapter_; |
72 | 72 |
73 // H264 parser state. | 73 // H264 parser state. |
74 // - |current_access_unit_pos_| is pointing to an annexB syncword | 74 // - |current_access_unit_pos_| is pointing to an annexB syncword |
75 // representing the first NALU of an H264 access unit. | 75 // representing the first NALU of an H264 access unit. |
76 scoped_ptr<H264Parser> h264_parser_; | 76 scoped_ptr<H264Parser> h264_parser_; |
77 int64 current_access_unit_pos_; | 77 int64 current_access_unit_pos_; |
78 int64 next_access_unit_pos_; | 78 int64 next_access_unit_pos_; |
79 | 79 |
80 // Last video decoder config. | 80 // Last video decoder config. |
81 VideoDecoderConfig last_video_decoder_config_; | 81 VideoDecoderConfig last_video_decoder_config_; |
82 | 82 |
83 DISALLOW_COPY_AND_ASSIGN(EsParserH264); | 83 DISALLOW_COPY_AND_ASSIGN(EsParserH264); |
84 }; | 84 }; |
85 | 85 |
86 } // namespace mp2t | 86 } // namespace mp2t |
87 } // namespace media | 87 } // namespace media |
88 | 88 |
89 #endif | 89 #endif |
OLD | NEW |