blob: 68e1783472618875cdf39e6ecdc9a2cb04d9745d (
plain)
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
|
// Copyright 2013 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.
#ifndef MEDIA_BLINK_WEBMEDIASOURCE_IMPL_H_
#define MEDIA_BLINK_WEBMEDIASOURCE_IMPL_H_
#include <string>
#include <vector>
#include "base/macros.h"
#include "media/base/media_log.h"
#include "media/blink/media_blink_export.h"
#include "third_party/WebKit/public/platform/WebMediaSource.h"
namespace media {
class ChunkDemuxer;
class MEDIA_BLINK_EXPORT WebMediaSourceImpl
: NON_EXPORTED_BASE(public blink::WebMediaSource) {
public:
WebMediaSourceImpl(ChunkDemuxer* demuxer,
const scoped_refptr<MediaLog>& media_log);
~WebMediaSourceImpl() override;
// blink::WebMediaSource implementation.
AddStatus addSourceBuffer(
const blink::WebString& type,
const blink::WebString& codecs,
blink::WebSourceBuffer** source_buffer) override;
double duration() override;
void setDuration(double duration) override;
void markEndOfStream(EndOfStreamStatus status) override;
void unmarkEndOfStream() override;
private:
ChunkDemuxer* demuxer_; // Owned by WebMediaPlayerImpl.
scoped_refptr<MediaLog> media_log_;
DISALLOW_COPY_AND_ASSIGN(WebMediaSourceImpl);
};
} // namespace media
#endif // MEDIA_BLINK_WEBMEDIASOURCE_IMPL_H_
|