d3dx9: Unify calling parse_mesh helper functions.
[wine.git] / libs / strmbase / strmbase_private.h
blobcf702a279c20af7b58c58d379b4d37253c8c2e77
1 /*
2 * Header file for private strmbase implementations
4 * Copyright 2012 Aric Stewart, CodeWeavers
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef __WINE_STRMBASE_PRIVATE_H
22 #define __WINE_STRMBASE_PRIVATE_H
24 #include <assert.h>
25 #define COBJMACROS
26 #include "dshow.h"
27 #include "uuids.h"
28 #include "wine/debug.h"
29 #include "wine/heap.h"
30 #include "wine/list.h"
31 #include "wine/strmbase.h"
33 static inline const char *debugstr_time(REFERENCE_TIME time)
35 ULONGLONG abstime = time >= 0 ? time : -time;
36 unsigned int i = 0, j = 0;
37 char buffer[23], rev[23];
39 while (abstime || i <= 8)
41 buffer[i++] = '0' + (abstime % 10);
42 abstime /= 10;
43 if (i == 7) buffer[i++] = '.';
45 if (time < 0) buffer[i++] = '-';
47 while (i--) rev[j++] = buffer[i];
48 while (rev[j-1] == '0' && rev[j-2] != '.') --j;
49 rev[j] = 0;
51 return wine_dbg_sprintf("%s", rev);
54 #endif /* __WINE_STRMBASE_PRIVATE_H */