comparison Plugins/Input/wma/libffwma/os_support.c @ 218:0bea7509d6ba trunk

[svn] Working WMA support. I never said it would be pretty, neno, I should said it would play.
author chainsaw
date Mon, 21 Nov 2005 14:59:13 -0800
parents 12004b385a96
children f12d7e208b43
comparison
equal deleted inserted replaced
217:ac3fb5691ddc 218:0bea7509d6ba
15 * You should have received a copy of the GNU Lesser General Public 15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software 16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */ 18 */
19 #include "avformat.h" 19 #include "avformat.h"
20 #ifdef CONFIG_WIN32 20
21 #include <sys/types.h>
22 #include <sys/timeb.h>
23 #elif defined(CONFIG_OS2)
24 #include <string.h>
25 #include <sys/time.h>
26 #else
27 #include <unistd.h> 21 #include <unistd.h>
28 #include <fcntl.h> 22 #include <fcntl.h>
29 #include <sys/time.h> 23 #include <sys/time.h>
30 #endif
31 #include <time.h> 24 #include <time.h>
32 25
33 int64_t av_gettime(void) 26 int64_t av_gettime(void)
34 { 27 {
35 #ifdef CONFIG_WIN32
36 struct _timeb tb;
37 _ftime(&tb);
38 return ((int64_t)tb.time * int64_t_C(1000) + (int64_t)tb.millitm) * int64_t_C(1000);
39 #else
40 struct timeval tv; 28 struct timeval tv;
41 gettimeofday(&tv,NULL); 29 gettimeofday(&tv,NULL);
42 return (int64_t)tv.tv_sec * 1000000 + tv.tv_usec; 30 return (int64_t)tv.tv_sec * 1000000 + tv.tv_usec;
43 #endif
44 } 31 }
45 32
46 #if !defined(HAVE_LOCALTIME_R) 33 #if !defined(HAVE_LOCALTIME_R)
47 struct tm *localtime_r(const time_t *t, struct tm *tp) 34 struct tm *localtime_r(const time_t *t, struct tm *tp)
48 { 35 {