| 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 #ifndef MEDIA_MP4_MP4_STREAM_PARSER_H_ | 5 #ifndef MEDIA_MP4_MP4_STREAM_PARSER_H_ |
| 6 #define MEDIA_MP4_MP4_STREAM_PARSER_H_ | 6 #define MEDIA_MP4_MP4_STREAM_PARSER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "media/base/media_export.h" | 12 #include "media/base/media_export.h" |
| 13 #include "media/base/stream_parser.h" | 13 #include "media/base/stream_parser.h" |
| 14 #include "media/mp4/offset_byte_queue.h" | 14 #include "media/mp4/offset_byte_queue.h" |
| 15 #include "media/mp4/track_run_iterator.h" | 15 #include "media/mp4/track_run_iterator.h" |
| 16 | 16 |
| 17 namespace media { | 17 namespace media { |
| 18 namespace mp4 { | 18 namespace mp4 { |
| 19 | 19 |
| 20 struct Movie; | 20 struct Movie; |
| 21 class BoxReader; | 21 class BoxReader; |
| 22 | 22 |
| 23 class MEDIA_EXPORT MP4StreamParser : public StreamParser { | 23 class MEDIA_EXPORT MP4StreamParser : public StreamParser { |
| 24 public: | 24 public: |
| 25 MP4StreamParser(); | 25 MP4StreamParser(bool has_sbr); |
| 26 virtual ~MP4StreamParser(); | 26 virtual ~MP4StreamParser(); |
| 27 | 27 |
| 28 virtual void Init(const InitCB& init_cb, const NewConfigCB& config_cb, | 28 virtual void Init(const InitCB& init_cb, const NewConfigCB& config_cb, |
| 29 const NewBuffersCB& audio_cb, | 29 const NewBuffersCB& audio_cb, |
| 30 const NewBuffersCB& video_cb, | 30 const NewBuffersCB& video_cb, |
| 31 const NeedKeyCB& need_key_cb, | 31 const NeedKeyCB& need_key_cb, |
| 32 const NewMediaSegmentCB& new_segment_cb) OVERRIDE; | 32 const NewMediaSegmentCB& new_segment_cb) OVERRIDE; |
| 33 virtual void Flush() OVERRIDE; | 33 virtual void Flush() OVERRIDE; |
| 34 virtual bool Parse(const uint8* buf, int size) OVERRIDE; | 34 virtual bool Parse(const uint8* buf, int size) OVERRIDE; |
| 35 | 35 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 // Valid iff it is greater than the head of the queue. | 76 // Valid iff it is greater than the head of the queue. |
| 77 int64 mdat_tail_; | 77 int64 mdat_tail_; |
| 78 | 78 |
| 79 scoped_ptr<mp4::Movie> moov_; | 79 scoped_ptr<mp4::Movie> moov_; |
| 80 scoped_ptr<mp4::TrackRunIterator> runs_; | 80 scoped_ptr<mp4::TrackRunIterator> runs_; |
| 81 | 81 |
| 82 bool has_audio_; | 82 bool has_audio_; |
| 83 bool has_video_; | 83 bool has_video_; |
| 84 uint32 audio_track_id_; | 84 uint32 audio_track_id_; |
| 85 uint32 video_track_id_; | 85 uint32 video_track_id_; |
| 86 bool has_sbr_; |
| 86 | 87 |
| 87 DISALLOW_COPY_AND_ASSIGN(MP4StreamParser); | 88 DISALLOW_COPY_AND_ASSIGN(MP4StreamParser); |
| 88 }; | 89 }; |
| 89 | 90 |
| 90 } // namespace mp4 | 91 } // namespace mp4 |
| 91 } // namespace media | 92 } // namespace media |
| 92 | 93 |
| 93 #endif // MEDIA_MP4_MP4_STREAM_PARSER_H_ | 94 #endif // MEDIA_MP4_MP4_STREAM_PARSER_H_ |
| OLD | NEW |