Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
mediastreamer2
Commits
92847f56
Commit
92847f56
authored
Sep 07, 2012
by
Ghislain MARY
Browse files
Move time spec definition from ms2 to oRTP.
parent
0e62557b
Changes
3
Hide whitespace changes
Inline
Side-by-side
configure.ac
View file @
92847f56
...
...
@@ -254,8 +254,6 @@ PKG_PROG_PKG_CONFIG()
AC_SUBST(MSPLUGINS_CFLAGS)
AC_SUBST(MSPLUGINS_LIBS)
AC_CHECK_LIB(rt,clock_gettime,[LIBS="$LIBS -lrt"])
dnl *********************************
dnl various checks for soundcard apis
dnl *********************************
...
...
include/mediastreamer2/mscommon.h
View file @
92847f56
...
...
@@ -96,10 +96,9 @@ static inline void ms_debug(const char *fmt,...)
#define ms_thread_create ortp_thread_create
#define ms_thread_join ortp_thread_join
typedef
struct
MSTimeSpec
{
int64_t
tv_sec
;
int64_t
tv_nsec
;
}
MSTimeSpec
;
typedef
ortpTimeSpec
MSTimeSpec
;
#define ms_get_cur_time ortp_get_cur_time
struct
_MSList
{
struct
_MSList
*
next
;
...
...
@@ -120,7 +119,6 @@ extern "C"{
#endif
void
ms_thread_exit
(
void
*
ret_val
);
MS2_PUBLIC
void
ms_get_cur_time
(
MSTimeSpec
*
ret
);
MS2_PUBLIC
MSList
*
ms_list_append
(
MSList
*
elem
,
void
*
data
);
MS2_PUBLIC
MSList
*
ms_list_prepend
(
MSList
*
elem
,
void
*
data
);
MS2_PUBLIC
MSList
*
ms_list_free
(
MSList
*
elem
);
...
...
src/mscommon.c
View file @
92847f56
...
...
@@ -741,42 +741,6 @@ void ms_thread_exit(void* ref_val) {
}
#ifdef __MACH__
#include <sys/types.h>
#include <sys/timeb.h>
#endif
void
ms_get_cur_time
(
MSTimeSpec
*
ret
){
#if defined(_WIN32_WCE) || defined(WIN32)
DWORD
timemillis
;
# if defined(_WIN32_WCE)
timemillis
=
GetTickCount
();
# else
timemillis
=
timeGetTime
();
# endif
ret
->
tv_sec
=
timemillis
/
1000
;
ret
->
tv_nsec
=
(
timemillis
%
1000
)
*
1000000LL
;
#elif defined(__MACH__) && defined(__GNUC__) && (__GNUC__ >= 3)
struct
timeval
tv
;
gettimeofday
(
&
tv
,
NULL
);
ret
->
tv_sec
=
tv
.
tv_sec
;
ret
->
tv_nsec
=
tv
.
tv_usec
*
1000LL
;
#elif defined(__MACH__)
struct
timeb
time_val
;
ftime
(
&
time_val
);
ret
->
tv_sec
=
time_val
.
time
;
ret
->
tv_nsec
=
time_val
.
millitm
*
1000000LL
;
#else
struct
timespec
ts
;
if
(
clock_gettime
(
CLOCK_MONOTONIC
,
&
ts
)
<
0
){
ms_fatal
(
"clock_gettime() doesn't work: %s"
,
strerror
(
errno
));
}
ret
->
tv_sec
=
ts
.
tv_sec
;
ret
->
tv_nsec
=
ts
.
tv_nsec
;
#endif
}
struct
_MSConcealerContext
{
int64_t
sample_time
;
int64_t
plc_start_time
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment