Commit f5b615cb authored by Ghislain MARY's avatar Ghislain MARY

Fix build on Windows.

parent a50779a2
......@@ -68,10 +68,6 @@ if(WIN32)
endif()
endif()
add_definitions(
-DORTP_EXPORTS
)
if(WIN32)
add_definitions(-DWINDOWS_NATIVE)
if(NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
......@@ -88,6 +84,7 @@ apply_compile_flags(ORTP_SOURCE_FILES_CXX "CPP" "CXX")
if(ENABLE_STATIC)
add_library(ortp-static STATIC ${ORTP_HEADER_FILES} ${ORTP_SOURCE_FILES_C} ${ORTP_SOURCE_FILES_CXX})
set_target_properties(ortp-static PROPERTIES OUTPUT_NAME ortp)
target_compile_definitions(ortp-static PRIVATE "ORTP_EXPORTS")
target_link_libraries(ortp-static ${LIBS})
install(TARGETS ortp-static EXPORT ${EXPORT_TARGETS_NAME}Targets
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
......@@ -102,6 +99,7 @@ if(ENABLE_SHARED)
# Do not version shared library on Android
set_target_properties(ortp PROPERTIES SOVERSION ${ORTP_SO_VERSION})
endif()
target_compile_definitions(ortp PRIVATE "ORTP_EXPORTS")
target_link_libraries(ortp ${LIBS})
if(MSVC)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
......
......@@ -893,8 +893,7 @@ mblk_t * rtp_session_create_packet_in_place(RtpSession *session,uint8_t *buffer,
}
int
__rtp_session_sendm_with_ts (RtpSession * session, mblk_t *mp, uint32_t packet_ts, uint32_t send_ts)
ORTP_PUBLIC int __rtp_session_sendm_with_ts (RtpSession * session, mblk_t *mp, uint32_t packet_ts, uint32_t send_ts)
{
rtp_header_t *rtp;
uint32_t packet_time;
......
......@@ -45,8 +45,8 @@ struct _RtpTimer
typedef struct _RtpTimer RtpTimer;
void rtp_timer_set_interval(RtpTimer *timer, struct timeval *interval);
ORTP_PUBLIC void rtp_timer_set_interval(RtpTimer *timer, struct timeval *interval);
extern RtpTimer posix_timer;
ORTP_VAR_PUBLIC RtpTimer posix_timer;
#endif
......@@ -109,13 +109,8 @@ int main(int argc, char *argv[])
}
/*this will simulate a burst of late packets */
if (jitter && (user_ts%(8000)==0)) {
struct timespec pausetime, remtime;
ortp_message("Simulating late packets now (%i milliseconds)",jitter);
pausetime.tv_sec=jitter/1000;
pausetime.tv_nsec=(jitter%1000)*1000000;
while(nanosleep(&pausetime,&remtime)==-1 && errno==EINTR){
pausetime=remtime;
}
ortp_sleep_ms(jitter);
}
}
......
......@@ -27,7 +27,7 @@
#include <stdio.h>
#endif
/*defined in library, but not declared in public headers (this method is only useful for tests)*/
extern int __rtp_session_sendm_with_ts(RtpSession *session, mblk_t *packet, uint32_t packet_ts, uint32_t send_ts);
ORTP_PUBLIC extern int __rtp_session_sendm_with_ts(RtpSession *session, mblk_t *packet, uint32_t packet_ts, uint32_t send_ts);
int runcond=1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment