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 #include "media/formats/mp2t/es_parser_h264.h" | 5 #include "media/formats/mp2t/es_parser_h264.h" |
6 | 6 |
7 #include "base/basictypes.h" | |
8 #include "base/logging.h" | 7 #include "base/logging.h" |
9 #include "base/numerics/safe_conversions.h" | 8 #include "base/numerics/safe_conversions.h" |
10 #include "media/base/buffers.h" | 9 #include "media/base/buffers.h" |
11 #include "media/base/stream_parser_buffer.h" | 10 #include "media/base/stream_parser_buffer.h" |
12 #include "media/base/video_frame.h" | 11 #include "media/base/video_frame.h" |
13 #include "media/filters/h264_parser.h" | 12 #include "media/filters/h264_parser.h" |
14 #include "media/formats/common/offset_byte_queue.h" | 13 #include "media/formats/common/offset_byte_queue.h" |
15 #include "media/formats/mp2t/es_adapter_video.h" | |
16 #include "media/formats/mp2t/mp2t_common.h" | 14 #include "media/formats/mp2t/mp2t_common.h" |
17 #include "ui/gfx/geometry/rect.h" | 15 #include "ui/gfx/geometry/rect.h" |
18 #include "ui/gfx/geometry/size.h" | 16 #include "ui/gfx/geometry/size.h" |
19 | 17 |
20 namespace media { | 18 namespace media { |
21 namespace mp2t { | 19 namespace mp2t { |
22 | 20 |
23 // An AUD NALU is at least 4 bytes: | 21 // An AUD NALU is at least 4 bytes: |
24 // 3 bytes for the start code + 1 byte for the NALU type. | 22 // 3 bytes for the start code + 1 byte for the NALU type. |
25 const int kMinAUDSize = 4; | 23 const int kMinAUDSize = 4; |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 << " height=" << sps->sar_height; | 299 << " height=" << sps->sar_height; |
302 last_video_decoder_config_ = video_decoder_config; | 300 last_video_decoder_config_ = video_decoder_config; |
303 es_adapter_.OnConfigChanged(video_decoder_config); | 301 es_adapter_.OnConfigChanged(video_decoder_config); |
304 } | 302 } |
305 | 303 |
306 return true; | 304 return true; |
307 } | 305 } |
308 | 306 |
309 } // namespace mp2t | 307 } // namespace mp2t |
310 } // namespace media | 308 } // namespace media |
OLD | NEW |