From: Alex Henrie alexhenrie24@gmail.com
--- dlls/mf/clock.c | 4 ++-- dlls/mf/copier.c | 2 +- dlls/mf/evr.c | 12 ++++++------ dlls/mf/mf_private.h | 21 --------------------- dlls/mf/samplegrabber.c | 10 +++++----- dlls/mf/sar.c | 12 ++++++------ dlls/mf/topology.c | 2 +- 7 files changed, 21 insertions(+), 42 deletions(-)
diff --git a/dlls/mf/clock.c b/dlls/mf/clock.c index e6be05d2794..fd889655cf8 100644 --- a/dlls/mf/clock.c +++ b/dlls/mf/clock.c @@ -660,7 +660,7 @@ static HRESULT WINAPI present_clock_Start(IMFPresentationClock *iface, LONGLONG struct clock_state_change_param param = {{0}}; HRESULT hr;
- TRACE("%p, %s.\n", iface, debugstr_time(start_offset)); + TRACE("%p, %s.\n", iface, debugstr_reftime(start_offset));
EnterCriticalSection(&clock->cs); clock->start_offset = param.u.offset = start_offset; @@ -888,7 +888,7 @@ static HRESULT WINAPI present_clock_timer_SetTimer(IMFTimer *iface, DWORD flags, struct clock_timer *clock_timer; HRESULT hr;
- TRACE("%p, %#lx, %s, %p, %p, %p.\n", iface, flags, debugstr_time(time), callback, state, cancel_key); + TRACE("%p, %#lx, %s, %p, %p, %p.\n", iface, flags, debugstr_reftime(time), callback, state, cancel_key);
if (!(clock_timer = calloc(1, sizeof(*clock_timer)))) return E_OUTOFMEMORY; diff --git a/dlls/mf/copier.c b/dlls/mf/copier.c index ab995fb98db..29638a2dd98 100644 --- a/dlls/mf/copier.c +++ b/dlls/mf/copier.c @@ -424,7 +424,7 @@ static HRESULT WINAPI sample_copier_transform_GetOutputStatus(IMFTransform *ifac
static HRESULT WINAPI sample_copier_transform_SetOutputBounds(IMFTransform *iface, LONGLONG lower, LONGLONG upper) { - TRACE("%p, %s, %s.\n", iface, debugstr_time(lower), debugstr_time(upper)); + TRACE("%p, %s, %s.\n", iface, debugstr_reftime(lower), debugstr_reftime(upper));
return E_NOTIMPL; } diff --git a/dlls/mf/evr.c b/dlls/mf/evr.c index db7053a1405..12c0a47af14 100644 --- a/dlls/mf/evr.c +++ b/dlls/mf/evr.c @@ -1511,7 +1511,7 @@ static HRESULT WINAPI video_renderer_preroll_NotifyPreroll(IMFMediaSinkPreroll * HRESULT hr = S_OK; size_t i;
- TRACE("%p, %s.\n", iface, debugstr_time(start_time)); + TRACE("%p, %s.\n", iface, debugstr_reftime(start_time));
EnterCriticalSection(&renderer->cs); if (renderer->flags & EVR_SHUT_DOWN) @@ -1909,7 +1909,7 @@ static HRESULT WINAPI video_renderer_clock_sink_OnClockStart(IMFClockStateSink * unsigned int state, request_sample; size_t i;
- TRACE("%p, %s, %s.\n", iface, debugstr_time(systime), debugstr_time(offset)); + TRACE("%p, %s, %s.\n", iface, debugstr_reftime(systime), debugstr_reftime(offset));
EnterCriticalSection(&renderer->cs);
@@ -1952,7 +1952,7 @@ static HRESULT WINAPI video_renderer_clock_sink_OnClockStop(IMFClockStateSink *i struct video_renderer *renderer = impl_from_IMFClockStateSink(iface); size_t i;
- TRACE("%p, %s.\n", iface, debugstr_time(systime)); + TRACE("%p, %s.\n", iface, debugstr_reftime(systime));
EnterCriticalSection(&renderer->cs);
@@ -1989,7 +1989,7 @@ static HRESULT WINAPI video_renderer_clock_sink_OnClockPause(IMFClockStateSink * struct video_renderer *renderer = impl_from_IMFClockStateSink(iface); size_t i;
- TRACE("%p, %s.\n", iface, debugstr_time(systime)); + TRACE("%p, %s.\n", iface, debugstr_reftime(systime));
EnterCriticalSection(&renderer->cs);
@@ -2016,7 +2016,7 @@ static HRESULT WINAPI video_renderer_clock_sink_OnClockRestart(IMFClockStateSink struct video_renderer *renderer = impl_from_IMFClockStateSink(iface); size_t i;
- TRACE("%p, %s.\n", iface, debugstr_time(systime)); + TRACE("%p, %s.\n", iface, debugstr_reftime(systime));
EnterCriticalSection(&renderer->cs);
@@ -2039,7 +2039,7 @@ static HRESULT WINAPI video_renderer_clock_sink_OnClockSetRate(IMFClockStateSink struct video_renderer *renderer = impl_from_IMFClockStateSink(iface); IMFClockStateSink *sink;
- TRACE("%p, %s, %f.\n", iface, debugstr_time(systime), rate); + TRACE("%p, %s, %f.\n", iface, debugstr_reftime(systime), rate);
EnterCriticalSection(&renderer->cs);
diff --git a/dlls/mf/mf_private.h b/dlls/mf/mf_private.h index bbfadaee5d8..c4e2214c993 100644 --- a/dlls/mf/mf_private.h +++ b/dlls/mf/mf_private.h @@ -58,27 +58,6 @@ struct activate_funcs
HRESULT create_activation_object(void *context, const struct activate_funcs *funcs, IMFActivate **ret);
-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_propvar(const PROPVARIANT *v) { if (!v) diff --git a/dlls/mf/samplegrabber.c b/dlls/mf/samplegrabber.c index de599139736..80fded31895 100644 --- a/dlls/mf/samplegrabber.c +++ b/dlls/mf/samplegrabber.c @@ -1250,7 +1250,7 @@ static HRESULT WINAPI sample_grabber_clock_sink_OnClockStart(IMFClockStateSink * { struct sample_grabber *grabber = impl_from_IMFClockStateSink(iface);
- TRACE("%p, %s, %s.\n", iface, debugstr_time(systime), debugstr_time(offset)); + TRACE("%p, %s, %s.\n", iface, debugstr_reftime(systime), debugstr_reftime(offset));
return sample_grabber_set_state(grabber, SINK_STATE_RUNNING, systime, offset); } @@ -1259,7 +1259,7 @@ static HRESULT WINAPI sample_grabber_clock_sink_OnClockStop(IMFClockStateSink *i { struct sample_grabber *grabber = impl_from_IMFClockStateSink(iface);
- TRACE("%p, %s.\n", iface, debugstr_time(systime)); + TRACE("%p, %s.\n", iface, debugstr_reftime(systime));
return sample_grabber_set_state(grabber, SINK_STATE_STOPPED, systime, 0); } @@ -1268,7 +1268,7 @@ static HRESULT WINAPI sample_grabber_clock_sink_OnClockPause(IMFClockStateSink * { struct sample_grabber *grabber = impl_from_IMFClockStateSink(iface);
- TRACE("%p, %s.\n", iface, debugstr_time(systime)); + TRACE("%p, %s.\n", iface, debugstr_reftime(systime));
return sample_grabber_set_state(grabber, SINK_STATE_PAUSED, systime, 0); } @@ -1277,7 +1277,7 @@ static HRESULT WINAPI sample_grabber_clock_sink_OnClockRestart(IMFClockStateSink { struct sample_grabber *grabber = impl_from_IMFClockStateSink(iface);
- TRACE("%p, %s.\n", iface, debugstr_time(systime)); + TRACE("%p, %s.\n", iface, debugstr_reftime(systime));
return sample_grabber_set_state(grabber, SINK_STATE_RUNNING, systime, PRESENTATION_CURRENT_POSITION); } @@ -1287,7 +1287,7 @@ static HRESULT WINAPI sample_grabber_clock_sink_OnClockSetRate(IMFClockStateSink struct sample_grabber *grabber = impl_from_IMFClockStateSink(iface); HRESULT hr = S_OK;
- TRACE("%p, %s, %f.\n", iface, debugstr_time(systime), rate); + TRACE("%p, %s, %f.\n", iface, debugstr_reftime(systime), rate);
EnterCriticalSection(&grabber->cs);
diff --git a/dlls/mf/sar.c b/dlls/mf/sar.c index 84824f954dd..0a38bca0c33 100644 --- a/dlls/mf/sar.c +++ b/dlls/mf/sar.c @@ -523,7 +523,7 @@ static HRESULT WINAPI audio_renderer_preroll_NotifyPreroll(IMFMediaSinkPreroll * { struct audio_renderer *renderer = impl_from_IMFMediaSinkPreroll(iface);
- TRACE("%p, %s.\n", iface, debugstr_time(start_time)); + TRACE("%p, %s.\n", iface, debugstr_reftime(start_time));
if (renderer->flags & SAR_SHUT_DOWN) return MF_E_SHUTDOWN; @@ -631,7 +631,7 @@ static HRESULT WINAPI audio_renderer_clock_sink_OnClockStart(IMFClockStateSink * struct audio_renderer *renderer = impl_from_IMFClockStateSink(iface); HRESULT hr = S_OK;
- TRACE("%p, %s, %s.\n", iface, debugstr_time(systime), debugstr_time(offset)); + TRACE("%p, %s, %s.\n", iface, debugstr_reftime(systime), debugstr_reftime(offset));
EnterCriticalSection(&renderer->cs); if (renderer->audio_client) @@ -659,7 +659,7 @@ static HRESULT WINAPI audio_renderer_clock_sink_OnClockStop(IMFClockStateSink *i struct audio_renderer *renderer = impl_from_IMFClockStateSink(iface); HRESULT hr = S_OK;
- TRACE("%p, %s.\n", iface, debugstr_time(systime)); + TRACE("%p, %s.\n", iface, debugstr_reftime(systime));
EnterCriticalSection(&renderer->cs); if (renderer->audio_client) @@ -691,7 +691,7 @@ static HRESULT WINAPI audio_renderer_clock_sink_OnClockPause(IMFClockStateSink * struct audio_renderer *renderer = impl_from_IMFClockStateSink(iface); HRESULT hr;
- TRACE("%p, %s.\n", iface, debugstr_time(systime)); + TRACE("%p, %s.\n", iface, debugstr_reftime(systime));
EnterCriticalSection(&renderer->cs); if (renderer->state == STREAM_STATE_RUNNING) @@ -720,7 +720,7 @@ static HRESULT WINAPI audio_renderer_clock_sink_OnClockRestart(IMFClockStateSink BOOL preroll = FALSE; HRESULT hr = S_OK;
- TRACE("%p, %s.\n", iface, debugstr_time(systime)); + TRACE("%p, %s.\n", iface, debugstr_reftime(systime));
EnterCriticalSection(&renderer->cs); if (renderer->audio_client) @@ -746,7 +746,7 @@ static HRESULT WINAPI audio_renderer_clock_sink_OnClockRestart(IMFClockStateSink
static HRESULT WINAPI audio_renderer_clock_sink_OnClockSetRate(IMFClockStateSink *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/mf/topology.c b/dlls/mf/topology.c index f09a9c87a46..4f894f2f8f4 100644 --- a/dlls/mf/topology.c +++ b/dlls/mf/topology.c @@ -2288,7 +2288,7 @@ HRESULT WINAPI MFCreateSequencerSegmentOffset(MFSequencerElementId id, MFTIME ti { struct segment_offset *offset;
- TRACE("%#lx, %s, %p.\n", id, debugstr_time(timeoffset), ret); + TRACE("%#lx, %s, %p.\n", id, debugstr_reftime(timeoffset), ret);
if (!ret) return E_POINTER;