Changeset 181863 in webkit
- Timestamp:
- Mar 23, 2015, 1:31:56 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp (modified) (1 diff)
-
platform/graphics/win/MediaPlayerPrivateMediaFoundation.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r181862 r181863 1 2015-03-23 Alex Christensen <achristensen@webkit.org> 2 3 [MediaFoundation] Implement seek. 4 https://bugs.webkit.org/show_bug.cgi?id=142594 5 6 Reviewed by Darin Adler. 7 8 * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp: 9 (WebCore::MediaPlayerPrivateMediaFoundation::seeking): 10 (WebCore::MediaPlayerPrivateMediaFoundation::seekDouble): 11 (WebCore::MediaPlayerPrivateMediaFoundation::durationDouble): 12 * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h: 13 1 14 2015-03-23 Dan Bernstein <mitz@apple.com> 2 15 -
trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp
r181805 r181863 167 167 bool MediaPlayerPrivateMediaFoundation::seeking() const 168 168 { 169 notImplemented();169 // We assume seeking is immediately complete. 170 170 return false; 171 } 172 173 void MediaPlayerPrivateMediaFoundation::seekDouble(double time) 174 { 175 const double tenMegahertz = 10000000; 176 PROPVARIANT propVariant; 177 PropVariantInit(&propVariant); 178 propVariant.vt = VT_I8; 179 propVariant.hVal.QuadPart = static_cast<__int64>(time * tenMegahertz); 180 181 HRESULT hr = m_mediaSession->Start(&GUID_NULL, &propVariant); 182 ASSERT(SUCCEEDED(hr)); 183 PropVariantClear(&propVariant); 184 } 185 186 double MediaPlayerPrivateMediaFoundation::durationDouble() const 187 { 188 const double tenMegahertz = 10000000; 189 if (!m_mediaSource) 190 return 0; 191 192 IMFPresentationDescriptor* descriptor; 193 if (!SUCCEEDED(m_mediaSource->CreatePresentationDescriptor(&descriptor))) 194 return 0; 195 196 UINT64 duration; 197 if (!SUCCEEDED(descriptor->GetUINT64(MF_PD_DURATION, &duration))) 198 duration = 0; 199 descriptor->Release(); 200 201 return static_cast<double>(duration) / tenMegahertz; 171 202 } 172 203 -
trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateMediaFoundation.h
r181805 r181863 60 60 61 61 virtual bool seeking() const; 62 virtual void seekDouble(double) override; 63 virtual double durationDouble() const override; 62 64 63 65 virtual bool paused() const;
Note:
See TracChangeset
for help on using the changeset viewer.