| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 88 |
| 89 // the movie size has changed | 89 // the movie size has changed |
| 90 virtual void mediaPlayerSizeChanged() = 0; | 90 virtual void mediaPlayerSizeChanged() = 0; |
| 91 | 91 |
| 92 virtual void mediaPlayerSetWebLayer(blink::WebLayer*) = 0; | 92 virtual void mediaPlayerSetWebLayer(blink::WebLayer*) = 0; |
| 93 | 93 |
| 94 virtual void mediaPlayerDidAddTextTrack(blink::WebInbandTextTrack*) = 0; | 94 virtual void mediaPlayerDidAddTextTrack(blink::WebInbandTextTrack*) = 0; |
| 95 virtual void mediaPlayerDidRemoveTextTrack(blink::WebInbandTextTrack*) = 0; | 95 virtual void mediaPlayerDidRemoveTextTrack(blink::WebInbandTextTrack*) = 0; |
| 96 | 96 |
| 97 virtual void mediaPlayerMediaSourceOpened(blink::WebMediaSource*) = 0; | 97 virtual void mediaPlayerMediaSourceOpened(blink::WebMediaSource*) = 0; |
| 98 |
| 98 }; | 99 }; |
| 99 | 100 |
| 100 typedef PassOwnPtr<MediaPlayer> (*CreateMediaEnginePlayer)(MediaPlayerClient*); | 101 typedef PassOwnPtr<MediaPlayer> (*CreateMediaEnginePlayer)(MediaPlayerClient*); |
| 101 | 102 |
| 102 class PLATFORM_EXPORT MediaPlayer { | 103 class PLATFORM_EXPORT MediaPlayer { |
| 103 WTF_MAKE_NONCOPYABLE(MediaPlayer); | 104 WTF_MAKE_NONCOPYABLE(MediaPlayer); |
| 104 public: | 105 public: |
| 105 static PassOwnPtr<MediaPlayer> create(MediaPlayerClient*); | 106 static PassOwnPtr<MediaPlayer> create(MediaPlayerClient*); |
| 106 static void setMediaEngineCreateFunction(CreateMediaEnginePlayer); | 107 static void setMediaEngineCreateFunction(CreateMediaEnginePlayer); |
| 107 | 108 |
| 108 static double invalidTime() { return -1.0; } | 109 static double invalidTime() { return -1.0; } |
| 109 | 110 |
| 110 MediaPlayer() { } | 111 MediaPlayer() { } |
| 111 virtual ~MediaPlayer() { } | 112 virtual ~MediaPlayer() { } |
| 112 | 113 |
| 114 virtual void detach() = 0; |
| 115 |
| 113 virtual void load(blink::WebMediaPlayer::LoadType, const String& url, blink:
:WebMediaPlayer::CORSMode) = 0; | 116 virtual void load(blink::WebMediaPlayer::LoadType, const String& url, blink:
:WebMediaPlayer::CORSMode) = 0; |
| 114 | 117 |
| 115 virtual void play() = 0; | 118 virtual void play() = 0; |
| 116 virtual void pause() = 0; | 119 virtual void pause() = 0; |
| 117 | 120 |
| 118 virtual bool supportsSave() const = 0; | 121 virtual bool supportsSave() const = 0; |
| 119 | 122 |
| 120 virtual double duration() const = 0; | 123 virtual double duration() const = 0; |
| 121 | 124 |
| 122 virtual double currentTime() const = 0; | 125 virtual double currentTime() const = 0; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 virtual bool hasSingleSecurityOrigin() const = 0; | 159 virtual bool hasSingleSecurityOrigin() const = 0; |
| 157 | 160 |
| 158 // Time value in the movie's time scale. It is only necessary to override th
is if the media | 161 // Time value in the movie's time scale. It is only necessary to override th
is if the media |
| 159 // engine uses rational numbers to represent media time. | 162 // engine uses rational numbers to represent media time. |
| 160 virtual double mediaTimeForTimeValue(double timeValue) const = 0; | 163 virtual double mediaTimeForTimeValue(double timeValue) const = 0; |
| 161 | 164 |
| 162 #if ENABLE(WEB_AUDIO) | 165 #if ENABLE(WEB_AUDIO) |
| 163 virtual AudioSourceProvider* audioSourceProvider() = 0; | 166 virtual AudioSourceProvider* audioSourceProvider() = 0; |
| 164 #endif | 167 #endif |
| 165 virtual blink::WebMediaPlayer* webMediaPlayer() const = 0; | 168 virtual blink::WebMediaPlayer* webMediaPlayer() const = 0; |
| 169 |
| 166 }; | 170 }; |
| 167 | 171 |
| 168 } | 172 } |
| 169 | 173 |
| 170 #endif // MediaPlayer_h | 174 #endif // MediaPlayer_h |
| OLD | NEW |