Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(369)

Side by Side Diff: sky/engine/platform/graphics/media/MediaPlayer.h

Issue 689373003: Remove most of the media stack. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 /*
2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26 #ifndef MediaPlayer_h
27 #define MediaPlayer_h
28
29 #include "platform/PlatformExport.h"
30 #include "public/platform/WebMediaPlayer.h"
31 #include "wtf/Forward.h"
32 #include "wtf/Noncopyable.h"
33
34 namespace blink {
35
36 class KURL;
37 class MediaPlayer;
38 class WebLayer;
39 class WebMediaSource;
40
41 class MediaPlayerClient {
42 public:
43 virtual ~MediaPlayerClient() { }
44
45 // the network state has changed
46 virtual void mediaPlayerNetworkStateChanged() = 0;
47
48 // the ready state has changed
49 virtual void mediaPlayerReadyStateChanged() = 0;
50
51 // time has jumped, eg. not as a result of normal playback
52 virtual void mediaPlayerTimeChanged() = 0;
53
54 // the media file duration has changed, or is now known
55 virtual void mediaPlayerDurationChanged() = 0;
56
57 // the play/pause status changed
58 virtual void mediaPlayerPlaybackStateChanged() = 0;
59
60 virtual void mediaPlayerRequestFullscreen() = 0;
61
62 virtual void mediaPlayerRequestSeek(double) = 0;
63
64 // The URL for video poster image.
65 // FIXME: Remove this when WebMediaPlayerClientImpl::loadInternal does not d epend on it.
66 virtual KURL mediaPlayerPosterURL() = 0;
67
68 // Presentation-related methods
69 // a new frame of video is available
70 virtual void mediaPlayerRepaint() = 0;
71
72 // the movie size has changed
73 virtual void mediaPlayerSizeChanged() = 0;
74
75 virtual void mediaPlayerSetWebLayer(WebLayer*) = 0;
76
77 virtual void mediaPlayerMediaSourceOpened(WebMediaSource*) = 0;
78 };
79
80 typedef PassOwnPtr<MediaPlayer> (*CreateMediaEnginePlayer)(MediaPlayerClient*);
81
82 class PLATFORM_EXPORT MediaPlayer {
83 WTF_MAKE_NONCOPYABLE(MediaPlayer);
84 public:
85 static PassOwnPtr<MediaPlayer> create(MediaPlayerClient*);
86 static void setMediaEngineCreateFunction(CreateMediaEnginePlayer);
87
88 static double invalidTime() { return -1.0; }
89
90 MediaPlayer() { }
91 virtual ~MediaPlayer() { }
92
93 virtual void load(WebMediaPlayer::LoadType, const String& url, WebMediaPlaye r::CORSMode) = 0;
94
95 enum Preload { None, MetaData, Auto };
96 virtual void setPreload(Preload) = 0;
97
98 virtual WebMediaPlayer* webMediaPlayer() const = 0;
99 };
100
101 } // namespace blink
102
103 #endif // MediaPlayer_h
OLDNEW
« no previous file with comments | « sky/engine/platform/exported/WebMediaDeviceInfo.cpp ('k') | sky/engine/platform/graphics/media/MediaPlayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698