| 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 <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 struct Movie; | 23 struct Movie; |
| 24 class BoxReader; | 24 class BoxReader; |
| 25 | 25 |
| 26 class MEDIA_EXPORT MP4StreamParser : public StreamParser { | 26 class MEDIA_EXPORT MP4StreamParser : public StreamParser { |
| 27 public: | 27 public: |
| 28 MP4StreamParser(const std::set<int>& audio_object_types, bool has_sbr); | 28 MP4StreamParser(const std::set<int>& audio_object_types, bool has_sbr); |
| 29 virtual ~MP4StreamParser(); | 29 virtual ~MP4StreamParser(); |
| 30 | 30 |
| 31 virtual void Init(const InitCB& init_cb, const NewConfigCB& config_cb, | 31 virtual void Init(const InitCB& init_cb, const NewConfigCB& config_cb, |
| 32 const NewBuffersCB& audio_cb, | 32 const NewBuffersCB& new_buffers_cb, |
| 33 const NewBuffersCB& video_cb, | |
| 34 const NewTextBuffersCB& text_cb, | 33 const NewTextBuffersCB& text_cb, |
| 35 const NeedKeyCB& need_key_cb, | 34 const NeedKeyCB& need_key_cb, |
| 36 const AddTextTrackCB& add_text_track_cb, | 35 const AddTextTrackCB& add_text_track_cb, |
| 37 const NewMediaSegmentCB& new_segment_cb, | 36 const NewMediaSegmentCB& new_segment_cb, |
| 38 const base::Closure& end_of_segment_cb, | 37 const base::Closure& end_of_segment_cb, |
| 39 const LogCB& log_cb) OVERRIDE; | 38 const LogCB& log_cb) OVERRIDE; |
| 40 virtual void Flush() OVERRIDE; | 39 virtual void Flush() OVERRIDE; |
| 41 virtual bool Parse(const uint8* buf, int size) OVERRIDE; | 40 virtual bool Parse(const uint8* buf, int size) OVERRIDE; |
| 42 | 41 |
| 43 private: | 42 private: |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 BufferQueue* video_buffers, | 75 BufferQueue* video_buffers, |
| 77 bool* err); | 76 bool* err); |
| 78 bool SendAndFlushSamples(BufferQueue* audio_buffers, | 77 bool SendAndFlushSamples(BufferQueue* audio_buffers, |
| 79 BufferQueue* video_buffers); | 78 BufferQueue* video_buffers); |
| 80 | 79 |
| 81 void Reset(); | 80 void Reset(); |
| 82 | 81 |
| 83 State state_; | 82 State state_; |
| 84 InitCB init_cb_; | 83 InitCB init_cb_; |
| 85 NewConfigCB config_cb_; | 84 NewConfigCB config_cb_; |
| 86 NewBuffersCB audio_cb_; | 85 NewBuffersCB new_buffers_cb_; |
| 87 NewBuffersCB video_cb_; | |
| 88 NeedKeyCB need_key_cb_; | 86 NeedKeyCB need_key_cb_; |
| 89 NewMediaSegmentCB new_segment_cb_; | 87 NewMediaSegmentCB new_segment_cb_; |
| 90 base::Closure end_of_segment_cb_; | 88 base::Closure end_of_segment_cb_; |
| 91 LogCB log_cb_; | 89 LogCB log_cb_; |
| 92 | 90 |
| 93 OffsetByteQueue queue_; | 91 OffsetByteQueue queue_; |
| 94 | 92 |
| 95 // These two parameters are only valid in the |kEmittingSegments| state. | 93 // These two parameters are only valid in the |kEmittingSegments| state. |
| 96 // | 94 // |
| 97 // |moof_head_| is the offset of the start of the most recently parsed moof | 95 // |moof_head_| is the offset of the start of the most recently parsed moof |
| (...skipping 17 matching lines...) Expand all Loading... |
| 115 bool is_audio_track_encrypted_; | 113 bool is_audio_track_encrypted_; |
| 116 bool is_video_track_encrypted_; | 114 bool is_video_track_encrypted_; |
| 117 | 115 |
| 118 DISALLOW_COPY_AND_ASSIGN(MP4StreamParser); | 116 DISALLOW_COPY_AND_ASSIGN(MP4StreamParser); |
| 119 }; | 117 }; |
| 120 | 118 |
| 121 } // namespace mp4 | 119 } // namespace mp4 |
| 122 } // namespace media | 120 } // namespace media |
| 123 | 121 |
| 124 #endif // MEDIA_MP4_MP4_STREAM_PARSER_H_ | 122 #endif // MEDIA_MP4_MP4_STREAM_PARSER_H_ |
| OLD | NEW |