summaryrefslogtreecommitdiff
path: root/libavformat/os_support.c
diff options
context:
space:
mode:
authorGildas Bazin <gbazi@altern.org>2006-01-22 18:34:17 +0000
committerDiego Biurrun <diego@biurrun.de>2006-01-22 18:34:17 +0000
commitac44871c7773fb9a6b18d362cec9a4630055fc50 (patch)
treed887ca20cd31f65cf427b50793cf03ca20f5374b /libavformat/os_support.c
parent0e6c947df3a834484c04c3e9a646004ab7ccda65 (diff)
downloadffmpeg-ac44871c7773fb9a6b18d362cec9a4630055fc50.tar.gz
WinCE cross-compilation support
patch by Gildas Bazin < gbazin **@** altern **.** org > Originally committed as revision 4881 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/os_support.c')
-rw-r--r--libavformat/os_support.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libavformat/os_support.c b/libavformat/os_support.c
index 1e1a38f471..a99a6a50db 100644
--- a/libavformat/os_support.c
+++ b/libavformat/os_support.c
@@ -18,7 +18,7 @@
*/
#include "config.h"
#include "avformat.h"
-#ifdef CONFIG_WIN32
+#if defined(CONFIG_WIN32) && !defined(CONFIG_WINCE)
#include <sys/types.h>
#include <sys/timeb.h>
#elif defined(CONFIG_OS2)
@@ -36,7 +36,9 @@
*/
int64_t av_gettime(void)
{
-#ifdef CONFIG_WIN32
+#if defined(CONFIG_WINCE)
+ return timeGetTime() * int64_t_C(1000);
+#elif defined(CONFIG_WIN32)
struct timeb tb;
_ftime(&tb);
return ((int64_t)tb.time * int64_t_C(1000) + (int64_t)tb.millitm) * int64_t_C(1000);
@@ -47,6 +49,7 @@ int64_t av_gettime(void)
#endif
}
+#if !defined(CONFIG_WINCE)
#if !defined(HAVE_LOCALTIME_R)
struct tm *localtime_r(const time_t *t, struct tm *tp)
{
@@ -59,3 +62,4 @@ struct tm *localtime_r(const time_t *t, struct tm *tp)
return tp;
}
#endif /* !defined(HAVE_LOCALTIME_R) */
+#endif /* !defined(CONFIG_WINCE) */