Changeset 77690 in webkit


Ignore:
Timestamp:
Feb 4, 2011 3:48:25 PM (13 years ago)
Author:
jer.noble@apple.com
Message:

2011-02-04 Jer Noble <jer.noble@apple.com>

Reviewed by Eric Carlson.

Frame accurate seeking isn't always accurate
https://bugs.webkit.org/show_bug.cgi?id=52697

New pixel test that seeks to specific currentTimes and records the rendered frame.

  • media/content/test-25fps.mp4: Added.
  • media/content/test-25fps.ogv: Added.
  • media/video-frame-accurate-seek-expected.txt: Added.
  • media/video-frame-accurate-seek.html: Added.
  • platform/mac/media/video-frame-accurate-seek-expected.checksum: Added.
  • platform/mac/media/video-frame-accurate-seek-expected.png: Added.

2011-02-04 Jer Noble <jer.noble@apple.com>

Reviewed by Eric Carlson.

Frame accurate seeking isn't always accurate
https://bugs.webkit.org/show_bug.cgi?id=52697

Test: media/video-frame-accurate-seek.html

Make seeking slightly more accurate by rounding instead of truncating
when converting from seconds-in-float to time/timeScale.

  • platform/graphics/mac/MediaPlayerPrivateQTKit.mm: (WebCore::MediaPlayerPrivateQTKit::createQTTime):
  • platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: (WebCore::MediaPlayerPrivateQuickTimeVisualContext::mediaTimeForTimeValue):
  • platform/graphics/win/QTMovie.cpp: (QTMovie::setCurrentTime):
Location:
trunk
Files:
6 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r77689 r77690  
     12011-02-04  Jer Noble  <jer.noble@apple.com>
     2
     3        Reviewed by Eric Carlson.
     4
     5        Frame accurate seeking isn't always accurate
     6        https://bugs.webkit.org/show_bug.cgi?id=52697
     7
     8        New pixel test that seeks to specific currentTimes and records the rendered frame.
     9
     10        * media/content/test-25fps.mp4: Added.
     11        * media/content/test-25fps.ogv: Added.
     12        * media/video-frame-accurate-seek-expected.txt: Added.
     13        * media/video-frame-accurate-seek.html: Added.
     14        * platform/mac/media/video-frame-accurate-seek-expected.checksum: Added.
     15        * platform/mac/media/video-frame-accurate-seek-expected.png: Added.
     16
    1172011-02-04  Jeremy Orlow  <jorlow@chromium.org>
    218
  • trunk/Source/WebCore/ChangeLog

    r77689 r77690  
     12011-02-04  Jer Noble  <jer.noble@apple.com>
     2
     3        Reviewed by Eric Carlson.
     4
     5        Frame accurate seeking isn't always accurate
     6        https://bugs.webkit.org/show_bug.cgi?id=52697
     7
     8        Test: media/video-frame-accurate-seek.html
     9
     10        Make seeking slightly more accurate by rounding instead of truncating
     11        when converting from seconds-in-float to time/timeScale.
     12
     13        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
     14        (WebCore::MediaPlayerPrivateQTKit::createQTTime):
     15        * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
     16        (WebCore::MediaPlayerPrivateQuickTimeVisualContext::mediaTimeForTimeValue):
     17        * platform/graphics/win/QTMovie.cpp:
     18        (QTMovie::setCurrentTime):
     19
    1202011-02-04  Jeremy Orlow  <jorlow@chromium.org>
    221
  • trunk/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm

    r74065 r77690  
    617617        return QTMakeTime(0, 600);
    618618    long timeScale = [[m_qtMovie.get() attributeForKey:QTMovieTimeScaleAttribute] longValue];
    619     return QTMakeTime(time * timeScale, timeScale);
     619    return QTMakeTime(lroundf(time * timeScale), timeScale);
    620620}
    621621
  • trunk/Source/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp

    r75262 r77690  
    10601060        return timeValue;
    10611061
    1062     long mediaTimeValue = static_cast<long>(timeValue * timeScale);
     1062    long mediaTimeValue = lroundf(timeValue * timeScale);
    10631063    return static_cast<float>(mediaTimeValue) / timeScale;
    10641064}
  • trunk/Source/WebCore/platform/graphics/win/QTMovie.cpp

    r76621 r77690  
    3636#include <WebKitSystemInterface/WebKitSystemInterface.h>
    3737#include <wtf/Assertions.h>
     38#include <wtf/MathExtras.h>
    3839#include <wtf/Noncopyable.h>
    3940#include <wtf/Vector.h>
     
    376377    TimeScale scale = GetMovieTimeScale(m_private->m_movie);
    377378    if (m_private->m_movieController) {
    378         QTRestartAtTimeRecord restart = { time * scale , 0 };
     379        QTRestartAtTimeRecord restart = { lroundf(time * scale) , 0 };
    379380        MCDoAction(m_private->m_movieController, mcActionRestartAtTime, (void *)&restart);
    380381    } else
    381         SetMovieTimeValue(m_private->m_movie, TimeValue(time * scale));
     382        SetMovieTimeValue(m_private->m_movie, TimeValue(lroundf(time * scale)));
    382383    QTMovieTask::sharedTask()->updateTaskTimer();
    383384}
Note: See TracChangeset for help on using the changeset viewer.