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

Side by Side Diff: trunk/Source/platform/graphics/media/MediaPlayer.h

Issue 325513002: Revert 175508 "Eliminate MediaPlayer & MediaPlayerClient abstrac..." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 6 years, 6 months 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 | Annotate | Revision Log
OLDNEW
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
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 void play() = 0;
116 virtual void pause() = 0;
117
118 virtual bool supportsSave() const = 0;
119
115 virtual double duration() const = 0; 120 virtual double duration() const = 0;
116 121
117 virtual double currentTime() const = 0; 122 virtual double currentTime() const = 0;
118 123
119 virtual void seek(double) = 0; 124 virtual void seek(double) = 0;
120 125
121 virtual bool seeking() const = 0; 126 virtual bool seeking() const = 0;
122 127
123 virtual double rate() const = 0; 128 virtual double rate() const = 0;
124 virtual void setRate(double) = 0; 129 virtual void setRate(double) = 0;
125 130
131 virtual bool paused() const = 0;
132
126 virtual void setPoster(const KURL&) = 0; 133 virtual void setPoster(const KURL&) = 0;
127 134
128 enum NetworkState { Empty, Idle, Loading, Loaded, FormatError, NetworkError, DecodeError }; 135 enum NetworkState { Empty, Idle, Loading, Loaded, FormatError, NetworkError, DecodeError };
129 virtual NetworkState networkState() const = 0; 136 virtual NetworkState networkState() const = 0;
130 137
131 enum ReadyState { HaveNothing, HaveMetadata, HaveCurrentData, HaveFutureDat a, HaveEnoughData }; 138 enum ReadyState { HaveNothing, HaveMetadata, HaveCurrentData, HaveFutureDat a, HaveEnoughData };
132 virtual ReadyState readyState() const = 0; 139 virtual ReadyState readyState() const = 0;
133 140
134 virtual double maxTimeSeekable() const = 0; 141 virtual double maxTimeSeekable() const = 0;
135 virtual PassRefPtr<TimeRanges> buffered() const = 0; 142 virtual PassRefPtr<TimeRanges> buffered() const = 0;
136 143
137 virtual bool didLoadingProgress() const = 0; 144 virtual bool didLoadingProgress() const = 0;
138 145
139 virtual void paint(GraphicsContext*, const IntRect&) = 0; 146 virtual void paint(GraphicsContext*, const IntRect&) = 0;
140 virtual bool copyVideoTextureToPlatformTexture(blink::WebGraphicsContext3D*, Platform3DObject, GC3Dint, GC3Denum, GC3Denum, bool, bool) = 0; 147 virtual bool copyVideoTextureToPlatformTexture(blink::WebGraphicsContext3D*, Platform3DObject, GC3Dint, GC3Denum, GC3Denum, bool, bool) = 0;
141 148
142 enum Preload { None, MetaData, Auto }; 149 enum Preload { None, MetaData, Auto };
143 virtual void setPreload(Preload) = 0; 150 virtual void setPreload(Preload) = 0;
144 151
152 virtual bool hasSingleSecurityOrigin() const = 0;
153
154 // Time value in the movie's time scale. It is only necessary to override th is if the media
155 // engine uses rational numbers to represent media time.
156 virtual double mediaTimeForTimeValue(double timeValue) const = 0;
157
145 #if ENABLE(WEB_AUDIO) 158 #if ENABLE(WEB_AUDIO)
146 virtual AudioSourceProvider* audioSourceProvider() = 0; 159 virtual AudioSourceProvider* audioSourceProvider() = 0;
147 #endif 160 #endif
148 virtual blink::WebMediaPlayer* webMediaPlayer() const = 0; 161 virtual blink::WebMediaPlayer* webMediaPlayer() const = 0;
149 }; 162 };
150 163
151 } 164 }
152 165
153 #endif // MediaPlayer_h 166 #endif // MediaPlayer_h
OLDNEW
« no previous file with comments | « trunk/Source/core/html/HTMLMediaElement.cpp ('k') | trunk/Source/web/WebMediaPlayerClientImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698