]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/os_support.c
add common codecs uls
[ffmpeg] / libavformat / os_support.c
index 219db98c1c31713e5840572e7dc8051f3f66fa4c..228f78419b601196e0ecd865a8dacfe267b7df0b 100644 (file)
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 #include "config.h"
 #include "avformat.h"
-#ifdef CONFIG_WIN32
+#if defined(CONFIG_WINCE)
+/* Skip includes on WinCE. */
+#elif defined(__MINGW32__)
 #include <sys/types.h>
 #include <sys/timeb.h>
 #elif defined(CONFIG_OS2)
 #endif
 #include <time.h>
 
+/**
+ * gets the current time in micro seconds.
+ */
 int64_t av_gettime(void)
 {
-#ifdef CONFIG_WIN32
-    struct _timeb tb;
+#if defined(CONFIG_WINCE)
+    return timeGetTime() * int64_t_C(1000);
+#elif defined(__MINGW32__)
+    struct timeb tb;
     _ftime(&tb);
     return ((int64_t)tb.time * int64_t_C(1000) + (int64_t)tb.millitm) * int64_t_C(1000);
 #else
@@ -44,11 +51,12 @@ 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)
 {
     struct tm *l;
-    
+
     l = localtime(t);
     if (!l)
         return 0;
@@ -56,3 +64,4 @@ struct tm *localtime_r(const time_t *t, struct tm *tp)
     return tp;
 }
 #endif /* !defined(HAVE_LOCALTIME_R) */
+#endif /* !defined(CONFIG_WINCE) */