OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 static PassOwnPtr<MediaPlayer> create(MediaPlayerClient*); | 105 static PassOwnPtr<MediaPlayer> create(MediaPlayerClient*); |
106 static void setMediaEngineCreateFunction(CreateMediaEnginePlayer); | 106 static void setMediaEngineCreateFunction(CreateMediaEnginePlayer); |
107 | 107 |
108 static double invalidTime() { return -1.0; } | 108 static double invalidTime() { return -1.0; } |
109 | 109 |
110 MediaPlayer() { } | 110 MediaPlayer() { } |
111 virtual ~MediaPlayer() { } | 111 virtual ~MediaPlayer() { } |
112 | 112 |
113 virtual void load(blink::WebMediaPlayer::LoadType, const String& url, blink:
:WebMediaPlayer::CORSMode) = 0; | 113 virtual void load(blink::WebMediaPlayer::LoadType, const String& url, blink:
:WebMediaPlayer::CORSMode) = 0; |
114 | 114 |
115 virtual double duration() const = 0; | |
116 | |
117 virtual double currentTime() const = 0; | |
118 | |
119 virtual void seek(double) = 0; | |
120 | |
121 virtual bool seeking() const = 0; | |
122 | |
123 virtual void setPoster(const KURL&) = 0; | |
124 | |
125 enum NetworkState { Empty, Idle, Loading, Loaded, FormatError, NetworkError,
DecodeError }; | 115 enum NetworkState { Empty, Idle, Loading, Loaded, FormatError, NetworkError,
DecodeError }; |
126 virtual NetworkState networkState() const = 0; | 116 virtual NetworkState networkState() const = 0; |
127 | 117 |
128 virtual void paint(GraphicsContext*, const IntRect&) = 0; | 118 virtual void paint(GraphicsContext*, const IntRect&) = 0; |
129 virtual bool copyVideoTextureToPlatformTexture(blink::WebGraphicsContext3D*,
Platform3DObject, GC3Dint, GC3Denum, GC3Denum, bool, bool) = 0; | 119 virtual bool copyVideoTextureToPlatformTexture(blink::WebGraphicsContext3D*,
Platform3DObject, GC3Dint, GC3Denum, GC3Denum, bool, bool) = 0; |
130 | 120 |
131 enum Preload { None, MetaData, Auto }; | 121 enum Preload { None, MetaData, Auto }; |
132 virtual void setPreload(Preload) = 0; | 122 virtual void setPreload(Preload) = 0; |
133 | 123 |
134 #if ENABLE(WEB_AUDIO) | 124 #if ENABLE(WEB_AUDIO) |
135 virtual AudioSourceProvider* audioSourceProvider() = 0; | 125 virtual AudioSourceProvider* audioSourceProvider() = 0; |
136 #endif | 126 #endif |
137 virtual blink::WebMediaPlayer* webMediaPlayer() const = 0; | 127 virtual blink::WebMediaPlayer* webMediaPlayer() const = 0; |
138 }; | 128 }; |
139 | 129 |
140 } | 130 } |
141 | 131 |
142 #endif // MediaPlayer_h | 132 #endif // MediaPlayer_h |
OLD | NEW |