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

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

Issue 291873002: Eliminate MediaPlayer & MediaPlayerClient abstractions (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: updated as per the review comments 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
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 27 matching lines...) Expand all
38 class WebInbandTextTrack; 38 class WebInbandTextTrack;
39 class WebLayer; 39 class WebLayer;
40 class WebMediaSource; 40 class WebMediaSource;
41 } 41 }
42 42
43 namespace WebCore { 43 namespace WebCore {
44 44
45 class AudioSourceProvider; 45 class AudioSourceProvider;
46 class GraphicsContext; 46 class GraphicsContext;
47 class IntRect; 47 class IntRect;
48 class IntSize;
49 class KURL; 48 class KURL;
50 class MediaPlayer; 49 class MediaPlayer;
51 class TimeRanges; 50 class TimeRanges;
52 51
53 // GL types as defined in OpenGL ES 2.0 header file gl2.h from khronos.org. 52 // GL types as defined in OpenGL ES 2.0 header file gl2.h from khronos.org.
54 // That header cannot be included directly due to a conflict with NPAPI headers. 53 // That header cannot be included directly due to a conflict with NPAPI headers.
55 // See crbug.com/328085. 54 // See crbug.com/328085.
56 typedef unsigned GC3Denum; 55 typedef unsigned GC3Denum;
57 typedef int GC3Dint; 56 typedef int GC3Dint;
58 57
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 109
111 MediaPlayer() { } 110 MediaPlayer() { }
112 virtual ~MediaPlayer() { } 111 virtual ~MediaPlayer() { }
113 112
114 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;
115 114
116 virtual void play() = 0; 115 virtual void play() = 0;
117 virtual void pause() = 0; 116 virtual void pause() = 0;
118 117
119 virtual bool supportsSave() const = 0; 118 virtual bool supportsSave() const = 0;
120 virtual IntSize naturalSize() const = 0;
121
122 virtual bool hasVideo() const = 0;
123 virtual bool hasAudio() const = 0;
124 119
125 virtual double duration() const = 0; 120 virtual double duration() const = 0;
126 121
127 virtual double currentTime() const = 0; 122 virtual double currentTime() const = 0;
128 123
129 virtual void seek(double) = 0; 124 virtual void seek(double) = 0;
130 125
131 virtual bool seeking() const = 0; 126 virtual bool seeking() const = 0;
132 127
133 virtual double rate() const = 0; 128 virtual double rate() const = 0;
(...skipping 19 matching lines...) Expand all
153 148
154 enum Preload { None, MetaData, Auto }; 149 enum Preload { None, MetaData, Auto };
155 virtual void setPreload(Preload) = 0; 150 virtual void setPreload(Preload) = 0;
156 151
157 virtual void showFullscreenOverlay() = 0; 152 virtual void showFullscreenOverlay() = 0;
158 virtual void hideFullscreenOverlay() = 0; 153 virtual void hideFullscreenOverlay() = 0;
159 virtual bool canShowFullscreenOverlay() const = 0; 154 virtual bool canShowFullscreenOverlay() const = 0;
160 155
161 virtual bool hasSingleSecurityOrigin() const = 0; 156 virtual bool hasSingleSecurityOrigin() const = 0;
162 157
163 virtual bool didPassCORSAccessCheck() const = 0;
164
165 // Time value in the movie's time scale. It is only necessary to override th is if the media 158 // Time value in the movie's time scale. It is only necessary to override th is if the media
166 // engine uses rational numbers to represent media time. 159 // engine uses rational numbers to represent media time.
167 virtual double mediaTimeForTimeValue(double timeValue) const = 0; 160 virtual double mediaTimeForTimeValue(double timeValue) const = 0;
168 161
169 virtual unsigned decodedFrameCount() const = 0;
170 virtual unsigned droppedFrameCount() const = 0;
171 virtual unsigned corruptedFrameCount() const = 0;
172 virtual unsigned audioDecodedByteCount() const = 0;
173 virtual unsigned videoDecodedByteCount() const = 0;
174
175 #if ENABLE(WEB_AUDIO) 162 #if ENABLE(WEB_AUDIO)
176 virtual AudioSourceProvider* audioSourceProvider() = 0; 163 virtual AudioSourceProvider* audioSourceProvider() = 0;
177 #endif 164 #endif
178 virtual blink::WebMediaPlayer* webMediaPlayer() const = 0; 165 virtual blink::WebMediaPlayer* webMediaPlayer() const = 0;
179 }; 166 };
180 167
181 } 168 }
182 169
183 #endif // MediaPlayer_h 170 #endif // MediaPlayer_h
OLDNEW
« no previous file with comments | « Source/modules/mediasource/HTMLVideoElementMediaSource.cpp ('k') | Source/web/WebMediaPlayerClientImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698