| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 static void getSupportedTypes(HashSet<String>&); | 70 static void getSupportedTypes(HashSet<String>&); |
| 71 static bool isAvailable(); | 71 static bool isAvailable(); |
| 72 | 72 |
| 73 IntSize naturalSize(); | 73 IntSize naturalSize(); |
| 74 bool hasVideo(); | 74 bool hasVideo(); |
| 75 | 75 |
| 76 void setFrameView(FrameView* frameView) { m_frameView = frameView; } | 76 void setFrameView(FrameView* frameView) { m_frameView = frameView; } |
| 77 FrameView* frameView() { return m_frameView; } | 77 FrameView* frameView() { return m_frameView; } |
| 78 bool inMediaDocument(); | 78 bool inMediaDocument(); |
| 79 | 79 |
| 80 // FIXME: it would be better to just have a getter and setter for size. | 80 IntSize size() const { return m_size; } |
| 81 // This is currently an absolute rect, which is not appropriate for | 81 void setSize(const IntSize& size); |
| 82 // content with transforms | |
| 83 IntRect rect() const { return m_rect; } | |
| 84 void setRect(const IntRect& r); | |
| 85 | 82 |
| 86 void load(const String& url, const ContentType& contentType); | 83 void load(const String& url, const ContentType& contentType); |
| 87 void cancelLoad(); | 84 void cancelLoad(); |
| 88 | 85 |
| 89 bool visible() const; | 86 bool visible() const; |
| 90 void setVisible(bool); | 87 void setVisible(bool); |
| 91 | 88 |
| 92 void play(); | 89 void play(); |
| 93 void pause(); | 90 void pause(); |
| 94 | 91 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 void setMediaPlayerProxy(WebMediaPlayerProxy* proxy); | 136 void setMediaPlayerProxy(WebMediaPlayerProxy* proxy); |
| 140 #endif | 137 #endif |
| 141 | 138 |
| 142 private: | 139 private: |
| 143 static void initializeMediaEngines(); | 140 static void initializeMediaEngines(); |
| 144 | 141 |
| 145 MediaPlayerClient* m_mediaPlayerClient; | 142 MediaPlayerClient* m_mediaPlayerClient; |
| 146 OwnPtr<MediaPlayerPrivateInterface*> m_private; | 143 OwnPtr<MediaPlayerPrivateInterface*> m_private; |
| 147 void* m_currentMediaEngine; | 144 void* m_currentMediaEngine; |
| 148 FrameView* m_frameView; | 145 FrameView* m_frameView; |
| 149 IntRect m_rect; | 146 IntSize m_size; |
| 150 bool m_visible; | 147 bool m_visible; |
| 151 float m_rate; | 148 float m_rate; |
| 152 float m_volume; | 149 float m_volume; |
| 153 #if ENABLE(PLUGIN_PROXY_FOR_VIDEO) | 150 #if ENABLE(PLUGIN_PROXY_FOR_VIDEO) |
| 154 WebMediaPlayerProxy* m_playerProxy; // not owned or used, passed to m_pri
vate | 151 WebMediaPlayerProxy* m_playerProxy; // not owned or used, passed to m_pri
vate |
| 155 #endif | 152 #endif |
| 156 }; | 153 }; |
| 157 | 154 |
| 158 typedef MediaPlayerPrivateInterface* (*CreateMediaEnginePlayer)(MediaPlayer*); | 155 typedef MediaPlayerPrivateInterface* (*CreateMediaEnginePlayer)(MediaPlayer*); |
| 159 typedef void (*MediaEngineSupportedTypes)(HashSet<String>& types); | 156 typedef void (*MediaEngineSupportedTypes)(HashSet<String>& types); |
| 160 typedef MediaPlayer::SupportsType (*MediaEngineSupportsType)(const String& type,
const String& codecs); | 157 typedef MediaPlayer::SupportsType (*MediaEngineSupportsType)(const String& type,
const String& codecs); |
| 161 | 158 |
| 162 typedef void (*MediaEngineRegistrar)(CreateMediaEnginePlayer, MediaEngineSupport
edTypes, MediaEngineSupportsType); | 159 typedef void (*MediaEngineRegistrar)(CreateMediaEnginePlayer, MediaEngineSupport
edTypes, MediaEngineSupportsType); |
| 163 | 160 |
| 164 | 161 |
| 165 } | 162 } |
| 166 | 163 |
| 167 #endif // ENABLE(VIDEO) | 164 #endif // ENABLE(VIDEO) |
| 168 | 165 |
| 169 #endif | 166 #endif |
| OLD | NEW |