include: Add debugstr_time to wine/strmbase.h.
This commit is contained in:
parent
d0eea21735
commit
2e9a57a0b8
6 changed files with 22 additions and 105 deletions
|
@ -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)";
|
||||
|
|
|
@ -27,27 +27,6 @@
|
|||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(quartz);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
struct buffer
|
||||
{
|
||||
INSSBuffer INSSBuffer_iface;
|
||||
|
|
|
@ -44,27 +44,6 @@
|
|||
0, 0, { (DWORD_PTR)(__FILE__ ": " # cs) }}; \
|
||||
static CRITICAL_SECTION cs = { &cs##_debug, -1, 0, 0, 0, 0 };
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
/* see IAsyncReader::Request on MSDN for the explanation of this */
|
||||
#define MEDIATIME_FROM_BYTES(x) ((LONGLONG)(x) * 10000000)
|
||||
#define BYTES_FROM_MEDIATIME(time) ((time) / 10000000)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
*/
|
||||
|
||||
#include "dshow.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
HRESULT WINAPI CopyMediaType(AM_MEDIA_TYPE * pDest, const AM_MEDIA_TYPE *pSrc);
|
||||
void WINAPI FreeMediaType(AM_MEDIA_TYPE * pMediaType);
|
||||
|
@ -28,6 +29,27 @@ void WINAPI DeleteMediaType(AM_MEDIA_TYPE * pMediaType);
|
|||
|
||||
void strmbase_dump_media_type(const AM_MEDIA_TYPE *mt);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
/* Pin functions */
|
||||
|
||||
struct strmbase_pin
|
||||
|
|
|
@ -30,25 +30,4 @@
|
|||
#include "wine/list.h"
|
||||
#include "wine/strmbase.h"
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
#endif /* __WINE_STRMBASE_PRIVATE_H */
|
||||
|
|
Loading…
Add table
Reference in a new issue