forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdummy_demuxer.h
64 lines (48 loc) · 1.84 KB
/
dummy_demuxer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Implements the Demuxer interface. DummyDemuxer returns corresponding
// DummyDemuxerStream as signal for media pipeline to construct correct
// playback channels. Used in WebRTC local video capture pipeline, where
// demuxing is not needed.
#ifndef MEDIA_FILTERS_DUMMY_DEMUXER_H_
#define MEDIA_FILTERS_DUMMY_DEMUXER_H_
#include <vector>
#include "media/base/audio_decoder_config.h"
#include "media/base/demuxer.h"
#include "media/base/video_decoder_config.h"
namespace media {
class DummyDemuxerStream : public DemuxerStream {
public:
explicit DummyDemuxerStream(Type type);
// DemuxerStream implementation.
virtual void Read(const ReadCB& read_cb) OVERRIDE;
virtual Type type() OVERRIDE;
virtual const AudioDecoderConfig& audio_decoder_config() OVERRIDE;
virtual const VideoDecoderConfig& video_decoder_config() OVERRIDE;
virtual void EnableBitstreamConverter() OVERRIDE;
protected:
virtual ~DummyDemuxerStream();
private:
Type type_;
AudioDecoderConfig audio_config_;
VideoDecoderConfig video_config_;
DISALLOW_COPY_AND_ASSIGN(DummyDemuxerStream);
};
class MEDIA_EXPORT DummyDemuxer : public Demuxer {
public:
DummyDemuxer(bool has_video, bool has_audio);
// Demuxer implementation.
virtual void Initialize(DemuxerHost* host,
const PipelineStatusCB& status_cb) OVERRIDE;
virtual scoped_refptr<DemuxerStream> GetStream(
DemuxerStream::Type type) OVERRIDE;
virtual base::TimeDelta GetStartTime() const OVERRIDE;
protected:
virtual ~DummyDemuxer();
private:
std::vector< scoped_refptr<DummyDemuxerStream> > streams_;
DISALLOW_COPY_AND_ASSIGN(DummyDemuxer);
};
} // namespace media
#endif // MEDIA_FILTERS_DUMMY_DEMUXER_H_