This sets up API to release OutputSurface from LTHClient.
[chromium-blink-merge.git] / media / blink / webmediasource_impl.h
blob7b951c155c73493eec9e33e0307551ef74264d52
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef MEDIA_BLINK_WEBMEDIASOURCE_IMPL_H_
6 #define MEDIA_BLINK_WEBMEDIASOURCE_IMPL_H_
8 #include <string>
9 #include <vector>
11 #include "media/base/media_export.h"
12 #include "media/base/media_log.h"
13 #include "third_party/WebKit/public/platform/WebMediaSource.h"
15 namespace media {
16 class ChunkDemuxer;
18 class MEDIA_EXPORT WebMediaSourceImpl
19 : NON_EXPORTED_BASE(public blink::WebMediaSource) {
20 public:
21 WebMediaSourceImpl(ChunkDemuxer* demuxer,
22 const scoped_refptr<MediaLog>& media_log);
23 virtual ~WebMediaSourceImpl();
25 // blink::WebMediaSource implementation.
26 virtual AddStatus addSourceBuffer(
27 const blink::WebString& type,
28 const blink::WebString& codecs,
29 blink::WebSourceBuffer** source_buffer);
30 virtual double duration();
31 virtual void setDuration(double duration);
32 virtual void markEndOfStream(EndOfStreamStatus status);
33 virtual void unmarkEndOfStream();
35 private:
36 ChunkDemuxer* demuxer_; // Owned by WebMediaPlayerImpl.
37 scoped_refptr<MediaLog> media_log_;
39 DISALLOW_COPY_AND_ASSIGN(WebMediaSourceImpl);
42 } // namespace media
44 #endif // MEDIA_BLINK_WEBMEDIASOURCE_IMPL_H_