From: Alex Henrie alexhenrie24@gmail.com
--- dlls/winegstreamer/gst_private.h | 21 --------------------- dlls/winegstreamer/media_sink.c | 10 +++++----- dlls/winegstreamer/quartz_parser.c | 6 +++--- dlls/winegstreamer/quartz_transform.c | 4 ++-- dlls/winegstreamer/wm_reader.c | 8 ++++---- 5 files changed, 14 insertions(+), 35 deletions(-)
diff --git a/dlls/winegstreamer/gst_private.h b/dlls/winegstreamer/gst_private.h index 26873edb74b..7d5abfd5937 100644 --- a/dlls/winegstreamer/gst_private.h +++ b/dlls/winegstreamer/gst_private.h @@ -41,27 +41,6 @@
bool array_reserve(void **elements, size_t *capacity, size_t count, size_t size);
-static inline const char *debugstr_time(REFERENCE_TIME 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); -} - #define MEDIATIME_FROM_BYTES(x) ((LONGLONG)(x) * 10000000)
struct wg_sample_queue; diff --git a/dlls/winegstreamer/media_sink.c b/dlls/winegstreamer/media_sink.c index 6996d689e83..c1d6cfb3ede 100644 --- a/dlls/winegstreamer/media_sink.c +++ b/dlls/winegstreamer/media_sink.c @@ -987,7 +987,7 @@ static HRESULT WINAPI media_sink_clock_sink_OnClockStart(IMFClockStateSink *ifac struct media_sink *media_sink = impl_from_IMFClockStateSink(iface); HRESULT hr;
- TRACE("iface %p, systime %s, offset %s.\n", iface, debugstr_time(systime), debugstr_time(offset)); + TRACE("iface %p, systime %s, offset %s.\n", iface, debugstr_reftime(systime), debugstr_reftime(offset));
EnterCriticalSection(&media_sink->cs);
@@ -1002,7 +1002,7 @@ static HRESULT WINAPI media_sink_clock_sink_OnClockStop(IMFClockStateSink *iface struct media_sink *media_sink = impl_from_IMFClockStateSink(iface); HRESULT hr;
- TRACE("iface %p, systime %s.\n", iface, debugstr_time(systime)); + TRACE("iface %p, systime %s.\n", iface, debugstr_reftime(systime));
EnterCriticalSection(&media_sink->cs);
@@ -1017,7 +1017,7 @@ static HRESULT WINAPI media_sink_clock_sink_OnClockPause(IMFClockStateSink *ifac struct media_sink *media_sink = impl_from_IMFClockStateSink(iface); HRESULT hr;
- TRACE("iface %p, systime %s.\n", iface, debugstr_time(systime)); + TRACE("iface %p, systime %s.\n", iface, debugstr_reftime(systime));
EnterCriticalSection(&media_sink->cs);
@@ -1032,7 +1032,7 @@ static HRESULT WINAPI media_sink_clock_sink_OnClockRestart(IMFClockStateSink *if struct media_sink *media_sink = impl_from_IMFClockStateSink(iface); HRESULT hr;
- TRACE("iface %p, systime %s.\n", iface, debugstr_time(systime)); + TRACE("iface %p, systime %s.\n", iface, debugstr_reftime(systime));
EnterCriticalSection(&media_sink->cs);
@@ -1044,7 +1044,7 @@ static HRESULT WINAPI media_sink_clock_sink_OnClockRestart(IMFClockStateSink *if
static HRESULT WINAPI media_sink_clock_sink_OnClockSetRate(IMFClockStateSink *iface, MFTIME systime, float rate) { - FIXME("iface %p, systime %s, rate %f stub!\n", iface, debugstr_time(systime), rate); + FIXME("iface %p, systime %s, rate %f stub!\n", iface, debugstr_reftime(systime), rate);
return E_NOTIMPL; } diff --git a/dlls/winegstreamer/quartz_parser.c b/dlls/winegstreamer/quartz_parser.c index 0670fbd5181..c85192381fb 100644 --- a/dlls/winegstreamer/quartz_parser.c +++ b/dlls/winegstreamer/quartz_parser.c @@ -1698,8 +1698,8 @@ static HRESULT WINAPI GST_Seeking_SetPositions(IMediaSeeking *iface, int i;
TRACE("pin %p, current %s, current_flags %#lx, stop %s, stop_flags %#lx.\n", - pin, current ? debugstr_time(*current) : "<null>", current_flags, - stop ? debugstr_time(*stop) : "<null>", stop_flags); + pin, current ? debugstr_reftime(*current) : "<null>", current_flags, + stop ? debugstr_reftime(*stop) : "<null>", stop_flags);
if (pin->pin.pin.filter->state == State_Stopped) { @@ -1832,7 +1832,7 @@ static HRESULT WINAPI GST_QualityControl_Notify(IQualityControl *iface, IBaseFil
TRACE("pin %p, sender %p, type %s, proportion %ld, late %s, timestamp %s.\n", pin, sender, q.Type == Famine ? "Famine" : "Flood", q.Proportion, - debugstr_time(q.Late), debugstr_time(q.TimeStamp)); + debugstr_reftime(q.Late), debugstr_reftime(q.TimeStamp));
/* DirectShow filters sometimes pass negative timestamps (Audiosurf uses the * current time instead of the time of the last buffer). GstClockTime is diff --git a/dlls/winegstreamer/quartz_transform.c b/dlls/winegstreamer/quartz_transform.c index fee275bb1ee..0df50e0e25e 100644 --- a/dlls/winegstreamer/quartz_transform.c +++ b/dlls/winegstreamer/quartz_transform.c @@ -454,7 +454,7 @@ static HRESULT WINAPI sink_quality_control_Notify(IQualityControl *iface, IBaseF struct transform *filter = impl_from_sink_IQualityControl(iface);
TRACE("filter %p, sender %p, type %#x, proportion %ld, late %s, timestamp %s.\n", - filter, sender, q.Type, q.Proportion, debugstr_time(q.Late), debugstr_time(q.TimeStamp)); + filter, sender, q.Type, q.Proportion, debugstr_reftime(q.Late), debugstr_reftime(q.TimeStamp));
return S_OK; } @@ -509,7 +509,7 @@ static HRESULT WINAPI source_quality_control_Notify(IQualityControl *iface, IBas HRESULT hr = VFW_E_NOT_FOUND;
TRACE("filter %p, sender %p, type %#x, proportion %ld, late %s, timestamp %s.\n", - filter, sender, q.Type, q.Proportion, debugstr_time(q.Late), debugstr_time(q.TimeStamp)); + filter, sender, q.Type, q.Proportion, debugstr_reftime(q.Late), debugstr_reftime(q.TimeStamp));
if (filter->qc_sink) return IQualityControl_Notify(filter->qc_sink, &filter->filter.IBaseFilter_iface, q); diff --git a/dlls/winegstreamer/wm_reader.c b/dlls/winegstreamer/wm_reader.c index 882b6df1bbb..faac6e17a8c 100644 --- a/dlls/winegstreamer/wm_reader.c +++ b/dlls/winegstreamer/wm_reader.c @@ -931,7 +931,7 @@ static HRESULT WINAPI profile_CreateNewStreamPrioritization(IWMProfile3 *iface,
static HRESULT WINAPI profile_GetExpectedPacketCount(IWMProfile3 *iface, QWORD duration, QWORD *count) { - FIXME("iface %p, duration %s, count %p, stub!\n", iface, debugstr_time(duration), count); + FIXME("iface %p, duration %s, count %p, stub!\n", iface, debugstr_reftime(duration), count); return E_NOTIMPL; }
@@ -1045,7 +1045,7 @@ static HRESULT WINAPI header_info_GetAttributeByName(IWMHeaderInfo3 *iface, WORD EnterCriticalSection(&reader->cs); duration = wg_parser_stream_get_duration(wg_parser_get_stream(reader->wg_parser, 0)); LeaveCriticalSection(&reader->cs); - TRACE("Returning duration %s.\n", debugstr_time(duration)); + TRACE("Returning duration %s.\n", debugstr_reftime(duration)); memcpy(value, &duration, sizeof(QWORD)); return S_OK; } @@ -1100,7 +1100,7 @@ static HRESULT WINAPI header_info_GetMarker(IWMHeaderInfo3 *iface,
static HRESULT WINAPI header_info_AddMarker(IWMHeaderInfo3 *iface, const WCHAR *name, QWORD time) { - FIXME("iface %p, name %s, time %s, stub!\n", iface, debugstr_w(name), debugstr_time(time)); + FIXME("iface %p, name %s, time %s, stub!\n", iface, debugstr_w(name), debugstr_reftime(time)); return E_NOTIMPL; }
@@ -1128,7 +1128,7 @@ static HRESULT WINAPI header_info_AddScript(IWMHeaderInfo3 *iface, const WCHAR *type, const WCHAR *command, QWORD time) { FIXME("iface %p, type %s, command %s, time %s, stub!\n", - iface, debugstr_w(type), debugstr_w(command), debugstr_time(time)); + iface, debugstr_w(type), debugstr_w(command), debugstr_reftime(time)); return E_NOTIMPL; }