| Index: webkit/media/android/webmediaplayer_tv.h
|
| diff --git a/webkit/media/android/webmediaplayer_tv.h b/webkit/media/android/webmediaplayer_tv.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..91a3c44f5e786147bcfc3b93ebbe66bfc1d87ccc
|
| --- /dev/null
|
| +++ b/webkit/media/android/webmediaplayer_tv.h
|
| @@ -0,0 +1,92 @@
|
| +// Copyright (c) 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 WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_TV_H_
|
| +#define WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_TV_H_
|
| +
|
| +#include "base/basictypes.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| +#include "media/base/demuxer_stream.h"
|
| +#include "webkit/media/android/webmediaplayer_android.h"
|
| +
|
| +namespace media {
|
| +class Demuxer;
|
| +class MediaLog;
|
| +}
|
| +
|
| +namespace WebKit {
|
| +class WebFrame;
|
| +class WebMediaSource;
|
| +}
|
| +
|
| +namespace webkit_media {
|
| +
|
| +class MediaSourceDelegate;
|
| +class MediaStreamAudioRenderer;
|
| +class MediaStreamClient;
|
| +class StreamTextureFactory;
|
| +class WebMediaPlayerManagerAndroid;
|
| +class WebMediaPlayerProxyAndroid;
|
| +
|
| +// This class adds TV functionality such as MSE and H/W backed media stream
|
| +// to WebMediaPlayerAndroid.
|
| +class WebMediaPlayerTv : public WebMediaPlayerAndroid {
|
| + public:
|
| + // Construct a WebMediaPlayerTv object.
|
| + WebMediaPlayerTv(WebKit::WebFrame* frame,
|
| + WebKit::WebMediaPlayerClient* client,
|
| + WebMediaPlayerManagerAndroid* manager,
|
| + WebMediaPlayerProxyAndroid* proxy,
|
| + StreamTextureFactory* factory,
|
| + media::MediaLog* media_log,
|
| + MediaStreamClient* media_stream_client,
|
| + media::Demuxer* remote_stream_demuxer);
|
| + virtual ~WebMediaPlayerTv();
|
| +
|
| + // Methods inherited from WebMediaPlayerAndroid.
|
| + virtual void load(const WebKit::WebURL& url,
|
| + WebKit::WebMediaSource* media_source,
|
| + CORSMode cors_mode) OVERRIDE;
|
| + virtual void play() OVERRIDE;
|
| + virtual void pause() OVERRIDE;
|
| + virtual void seek(double seconds) OVERRIDE;
|
| + virtual const WebKit::WebTimeRanges& buffered() OVERRIDE;
|
| + virtual unsigned decodedFrameCount() const OVERRIDE;
|
| + virtual unsigned droppedFrameCount() const OVERRIDE;
|
| + virtual unsigned audioDecodedByteCount() const OVERRIDE;
|
| + virtual unsigned videoDecodedByteCount() const OVERRIDE;
|
| + virtual void OnVideoSizeChanged(int width, int height) OVERRIDE;
|
| +
|
| + virtual MediaKeyException generateKeyRequest(
|
| + const WebKit::WebString& key_system,
|
| + const unsigned char* init_data,
|
| + unsigned init_data_length) OVERRIDE;
|
| + virtual MediaKeyException addKey(
|
| + const WebKit::WebString& key_system,
|
| + const unsigned char* key,
|
| + unsigned key_length,
|
| + const unsigned char* init_data,
|
| + unsigned init_data_length,
|
| + const WebKit::WebString& session_id) OVERRIDE;
|
| + virtual MediaKeyException cancelKeyRequest(
|
| + const WebKit::WebString& key_system,
|
| + const WebKit::WebString& session_id) OVERRIDE;
|
| +
|
| + // Called when DemuxerStreamPlayer needs to read data from
|
| + // MediaSourceDelegate.
|
| + void OnReadFromDemuxer(media::DemuxerStream::Type type, bool seek_done);
|
| +
|
| + private:
|
| + media::MediaLog* media_log_;
|
| + scoped_ptr<MediaSourceDelegate> media_source_delegate_;
|
| + MediaStreamClient* media_stream_client_;
|
| + media::Demuxer* demuxer_;
|
| + scoped_refptr<MediaStreamAudioRenderer> audio_renderer_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerTv);
|
| +};
|
| +
|
| +} // namespace webkit_media
|
| +
|
| +#endif // WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_TV_H_
|
|
|