7 #ifndef MEDIA_BASE_DEMUXER_H_
8 #define MEDIA_BASE_DEMUXER_H_
13 #include "packager/base/compiler_specific.h"
14 #include "packager/base/memory/ref_counted.h"
15 #include "packager/base/memory/scoped_ptr.h"
16 #include "packager/media/base/container_names.h"
17 #include "packager/media/base/status.h"
37 explicit Demuxer(
const std::string& file_name);
68 const std::vector<MediaStream*>&
streams() {
return streams_; }
76 QueuedSample(uint32_t track_id, scoped_refptr<MediaSample> sample);
80 scoped_refptr<MediaSample> sample;
84 void ParserInitEvent(
const std::vector<scoped_refptr<StreamInfo> >&
streams);
88 bool NewSampleEvent(uint32_t track_id,
89 const scoped_refptr<MediaSample>& sample);
91 bool PushSample(uint32_t track_id,
const scoped_refptr<MediaSample>& sample);
93 std::string file_name_;
95 bool init_event_received_;
96 Status init_parsing_status_;
98 std::deque<QueuedSample> queued_samples_;
99 scoped_ptr<MediaParser> parser_;
100 std::vector<MediaStream*> streams_;
101 MediaContainerName container_name_;
102 scoped_ptr<uint8_t[]> buffer_;
103 scoped_ptr<KeySource> key_source_;
106 DISALLOW_COPY_AND_ASSIGN(
Demuxer);
112 #endif // MEDIA_BASE_DEMUXER_H_