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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 }; | 82 }; |
83 | 83 |
84 typedef PassOwnPtr<MediaPlayer> (*CreateMediaEnginePlayer)(MediaPlayerClient*); | 84 typedef PassOwnPtr<MediaPlayer> (*CreateMediaEnginePlayer)(MediaPlayerClient*); |
85 | 85 |
86 class PLATFORM_EXPORT MediaPlayer { | 86 class PLATFORM_EXPORT MediaPlayer { |
87 WTF_MAKE_NONCOPYABLE(MediaPlayer); | 87 WTF_MAKE_NONCOPYABLE(MediaPlayer); |
88 public: | 88 public: |
89 static PassOwnPtr<MediaPlayer> create(MediaPlayerClient*); | 89 static PassOwnPtr<MediaPlayer> create(MediaPlayerClient*); |
90 static void setMediaEngineCreateFunction(CreateMediaEnginePlayer); | 90 static void setMediaEngineCreateFunction(CreateMediaEnginePlayer); |
91 | 91 |
92 static double invalidTime() { return -1.0; } | |
93 | |
94 MediaPlayer() { } | 92 MediaPlayer() { } |
95 virtual ~MediaPlayer() { } | 93 virtual ~MediaPlayer() { } |
96 | 94 |
97 virtual void load(WebMediaPlayer::LoadType, const String& url, WebMediaPlaye
r::CORSMode) = 0; | 95 virtual void load(WebMediaPlayer::LoadType, const String& url, WebMediaPlaye
r::CORSMode) = 0; |
98 | 96 |
99 enum Preload { None, MetaData, Auto }; | 97 enum Preload { None, MetaData, Auto }; |
100 virtual void setPreload(Preload) = 0; | 98 virtual void setPreload(Preload) = 0; |
101 | 99 |
102 #if ENABLE(WEB_AUDIO) | 100 #if ENABLE(WEB_AUDIO) |
103 virtual AudioSourceProvider* audioSourceProvider() = 0; | 101 virtual AudioSourceProvider* audioSourceProvider() = 0; |
104 #endif | 102 #endif |
105 virtual WebMediaPlayer* webMediaPlayer() const = 0; | 103 virtual WebMediaPlayer* webMediaPlayer() const = 0; |
106 }; | 104 }; |
107 | 105 |
108 } // namespace blink | 106 } // namespace blink |
109 | 107 |
110 #endif // MediaPlayer_h | 108 #endif // MediaPlayer_h |
OLD | NEW |