From: Alex Henrie alexhenrie24@gmail.com
--- dlls/evr/evr_private.h | 21 --------------------- dlls/evr/presenter.c | 10 +++++----- dlls/evr/sample.c | 27 +++------------------------ 3 files changed, 8 insertions(+), 50 deletions(-)
diff --git a/dlls/evr/evr_private.h b/dlls/evr/evr_private.h index 225e60348b4..c24dd01a745 100644 --- a/dlls/evr/evr_private.h +++ b/dlls/evr/evr_private.h @@ -24,27 +24,6 @@ #include "wine/strmbase.h" #include "wine/debug.h"
-static inline const char *debugstr_time(LONGLONG time) -{ - ULONGLONG abstime = time >= 0 ? time : -time; - unsigned int i = 0, j = 0; - char buffer[23], rev[23]; - - while (abstime || i <= 8) - { - buffer[i++] = '0' + (abstime % 10); - abstime /= 10; - if (i == 7) buffer[i++] = '.'; - } - if (time < 0) buffer[i++] = '-'; - - while (i--) rev[j++] = buffer[i]; - while (rev[j-1] == '0' && rev[j-2] != '.') --j; - rev[j] = 0; - - return wine_dbg_sprintf("%s", rev); -} - static inline const char *debugstr_normalized_rect(const MFVideoNormalizedRect *rect) { if (!rect) return "(null)"; diff --git a/dlls/evr/presenter.c b/dlls/evr/presenter.c index 552e24b4b97..f4c7fe1178d 100644 --- a/dlls/evr/presenter.c +++ b/dlls/evr/presenter.c @@ -918,7 +918,7 @@ static HRESULT WINAPI video_presenter_OnClockStart(IMFVideoPresenter *iface, MFT { struct video_presenter *presenter = impl_from_IMFVideoPresenter(iface);
- TRACE("%p, %s, %s.\n", iface, debugstr_time(systime), wine_dbgstr_longlong(offset)); + TRACE("%p, %s, %s.\n", iface, debugstr_reftime(systime), wine_dbgstr_longlong(offset));
EnterCriticalSection(&presenter->cs); presenter->state = PRESENTER_STATE_STARTED; @@ -931,7 +931,7 @@ static HRESULT WINAPI video_presenter_OnClockStop(IMFVideoPresenter *iface, MFTI { struct video_presenter *presenter = impl_from_IMFVideoPresenter(iface);
- TRACE("%p, %s.\n", iface, debugstr_time(systime)); + TRACE("%p, %s.\n", iface, debugstr_reftime(systime));
EnterCriticalSection(&presenter->cs); presenter->state = PRESENTER_STATE_STOPPED; @@ -945,7 +945,7 @@ static HRESULT WINAPI video_presenter_OnClockPause(IMFVideoPresenter *iface, MFT { struct video_presenter *presenter = impl_from_IMFVideoPresenter(iface);
- TRACE("%p, %s.\n", iface, debugstr_time(systime)); + TRACE("%p, %s.\n", iface, debugstr_reftime(systime));
EnterCriticalSection(&presenter->cs); presenter->state = PRESENTER_STATE_PAUSED; @@ -958,7 +958,7 @@ static HRESULT WINAPI video_presenter_OnClockRestart(IMFVideoPresenter *iface, M { struct video_presenter *presenter = impl_from_IMFVideoPresenter(iface);
- TRACE("%p, %s.\n", iface, debugstr_time(systime)); + TRACE("%p, %s.\n", iface, debugstr_reftime(systime));
EnterCriticalSection(&presenter->cs); presenter->state = PRESENTER_STATE_STARTED; @@ -969,7 +969,7 @@ static HRESULT WINAPI video_presenter_OnClockRestart(IMFVideoPresenter *iface, M
static HRESULT WINAPI video_presenter_OnClockSetRate(IMFVideoPresenter *iface, MFTIME systime, float rate) { - FIXME("%p, %s, %f.\n", iface, debugstr_time(systime), rate); + FIXME("%p, %s, %f.\n", iface, debugstr_reftime(systime), rate);
return E_NOTIMPL; } diff --git a/dlls/evr/sample.c b/dlls/evr/sample.c index aa3f120b115..3f168538c62 100644 --- a/dlls/evr/sample.c +++ b/dlls/evr/sample.c @@ -29,27 +29,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(evr);
-static const char *debugstr_time(LONGLONG time) -{ - ULONGLONG abstime = time >= 0 ? time : -time; - unsigned int i = 0, j = 0; - char buffer[23], rev[23]; - - while (abstime || i <= 8) - { - buffer[i++] = '0' + (abstime % 10); - abstime /= 10; - if (i == 7) buffer[i++] = '.'; - } - if (time < 0) buffer[i++] = '-'; - - while (i--) rev[j++] = buffer[i]; - while (rev[j-1] == '0' && rev[j-2] != '.') --j; - rev[j] = 0; - - return wine_dbg_sprintf("%s", rev); -} - struct surface_buffer { IMFMediaBuffer IMFMediaBuffer_iface; @@ -1282,7 +1261,7 @@ static HRESULT WINAPI video_sample_SetSampleTime(IMFSample *iface, LONGLONG time { struct video_sample *sample = impl_from_IMFSample(iface);
- TRACE("%p, %s.\n", iface, debugstr_time(timestamp)); + TRACE("%p, %s.\n", iface, debugstr_reftime(timestamp));
EnterCriticalSection(&sample->cs); sample->timestamp = timestamp; @@ -1313,7 +1292,7 @@ static HRESULT WINAPI video_sample_SetSampleDuration(IMFSample *iface, LONGLONG { struct video_sample *sample = impl_from_IMFSample(iface);
- TRACE("%p, %s.\n", iface, debugstr_time(duration)); + TRACE("%p, %s.\n", iface, debugstr_reftime(duration));
EnterCriticalSection(&sample->cs); sample->duration = duration; @@ -1545,7 +1524,7 @@ static void WINAPI desired_video_sample_SetDesiredSampleTimeAndDuration(IMFDesir { struct video_sample *sample = impl_from_IMFDesiredSample(iface);
- TRACE("%p, %s, %s.\n", iface, debugstr_time(sample_time), debugstr_time(sample_duration)); + TRACE("%p, %s, %s.\n", iface, debugstr_reftime(sample_time), debugstr_reftime(sample_duration));
EnterCriticalSection(&sample->cs); sample->flags |= SAMPLE_PROP_HAS_DESIRED_PROPS;