[hydra-commits] hydra/media_rtp_pjmedia.git branch "master" updated.

Commits to the Hydra project code repositories hydra-commits at lists.digium.com
Sun Aug 15 19:06:48 CDT 2010


branch "master" has been updated
       via  9d160adc44a5e9ec90d90ce62053816eba05e382 (commit)
       via  c2378025d70509845f5362f7a1b4998d3210efd9 (commit)
       via  03da12fe3ce2f1d370750f874ab290401e2a3479 (commit)
      from  dc10937f3410d7d3bd0506523ad0904c48b04a5a (commit)

Summary of changes:
 pjproject.cmake    |   30 ++++++++++++++++++++++++++++++
 src/CMakeLists.txt |    1 +
 src/RTPSink.cpp    |    2 +-
 3 files changed, 32 insertions(+), 1 deletions(-)


- Log -----------------------------------------------------------------
commit 9d160adc44a5e9ec90d90ce62053816eba05e382
Author: Joshua Colp <jcolp at digium.com>
Date:   Sun Aug 15 21:03:31 2010 -0300

    Add cmake logic for including and linking against the required stuff for pjmedia on Windows in MSVC++.

diff --git a/pjproject.cmake b/pjproject.cmake
index e7cf1e0..30bf512 100644
--- a/pjproject.cmake
+++ b/pjproject.cmake
@@ -19,6 +19,10 @@ function(pjproject_build PJPROJECT_COMPONENT)
       include_external_msproject(pjsip_simple "${CMAKE_SOURCE_DIR}/pjproject/pjsip/build/pjsip_simple.vcproj")
       include_external_msproject(pjsip_ua "${CMAKE_SOURCE_DIR}/pjproject/pjsip/build/pjsip_ua.vcproj")
       include_external_msproject(pjsua_lib "${CMAKE_SOURCE_DIR}/pjproject/pjsip/build/pjsua_lib.vcproj")
+    elseif (${PJPROJECT_COMPONENT} STREQUAL "pjmedia")
+      include_external_msproject(pjmedia "${CMAKE_SOURCE_DIR}/pjproject/pjmedia/build/pjmedia.vcproj")
+      include_external_msproject(pjmedia_audiodev "${CMAKE_SOURCE_DIR}/pjproject/pjmedia/build/pjmedia_audiodev.vcproj")
+      include_external_msproject(srtp "${CMAKE_SOURCE_DIR}/pjproject/third_party/build/srtp/libsrtp.vcproj")
     else()
       include_external_msproject(${PJPROJECT_COMPONENT} "${CMAKE_SOURCE_DIR}/pjproject/${PJPROJECT_COMPONENT}/build/${PJPROJECT_COMPONENT}.vcproj")
     endif()
@@ -54,5 +58,31 @@ function(pjproject_link COMPONENT PJPROJECT_COMPONENT)
       target_link_libraries(${COMPONENT} "${PJPROJECT_COMPONENT}-asteriskscf")
     endif()
   elseif (MSVC80 OR MSVC90)
+	if (${PJPROJECT_COMPONENT} STREQUAL "pjsip")
+	elseif (${PJPROJECT_COMPONENT} STREQUAL "pjlib-util")
+		if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86")
+			target_link_libraries(${COMPONENT} debug "pjlib-util-i386-Win32-vc8-Debug") 
+			target_link_libraries(${COMPONENT} optimized "pjlib-util-i386-Win32-vc8-Release")
+		endif()
+	elseif (${PJPROJECT_COMPONENT} STREQUAL "pjmedia")
+		if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86")
+			target_link_libraries(${COMPONENT} debug "pjmedia-i386-Win32-vc8-Debug") 
+			target_link_libraries(${COMPONENT} optimized "pjmedia-i386-Win32-vc8-Release")
+			target_link_libraries(${COMPONENT} debug "pjmedia-audiodev-i386-Win32-vc8-Debug") 
+			target_link_libraries(${COMPONENT} optimized "pjmedia-audiodev-i386-Win32-vc8-Release")
+			target_link_libraries(${COMPONENT} debug "libsrtp-i386-Win32-vc8-Debug") 
+			target_link_libraries(${COMPONENT} optimized "libsrtp-i386-Win32-vc8-Release")
+		endif()
+	else()
+		if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86")
+			if (${PJPROJECT_COMPONENT} STREQUAL "pjlib")
+				# pjlib has the additional requirement of winsock2
+				target_link_libraries(${COMPONENT} "ws2_32")
+			endif()
+			target_link_libraries(${COMPONENT} debug "${PJPROJECT_COMPONENT}-i386-Win32-vc8-Debug") 
+			target_link_libraries(${COMPONENT} optimized "${PJPROJECT_COMPONENT}-i386-Win32-vc8-Release")
+		endif()
+	endif()
   endif()
 endfunction()
+

commit c2378025d70509845f5362f7a1b4998d3210efd9
Author: Joshua Colp <jcolp at digium.com>
Date:   Sun Aug 15 20:17:14 2010 -0300

    MSVC++ can't handle using the payload size and header size, so create a maximum size packet of 1500.

diff --git a/src/RTPSink.cpp b/src/RTPSink.cpp
index 4ffec57..3992027 100644
--- a/src/RTPSink.cpp
+++ b/src/RTPSink.cpp
@@ -107,7 +107,7 @@ void StreamSinkRTPImpl::write(const Hydra::Media::V1::FrameSeq& frames, const Ic
 		}
 
 		/* Now we have to construct the entire packet containing RTP header and the payload from the frame */
-		char packet[(*frame)->payload.size() + header_len];
+		char packet[1500];
 
 		/* Copy the header itself that we produced in */
 		pj_memcpy(packet, (const pjmedia_rtp_hdr*)header, header_len);

commit 03da12fe3ce2f1d370750f874ab290401e2a3479
Author: Joshua Colp <jcolp at digium.com>
Date:   Sun Aug 15 20:16:34 2010 -0300

    Ensure we can use the boost libraries we need. Found while building on Windows.

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e2de69e..a346a70 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -6,6 +6,7 @@ hydra_component_add_file(media_rtp_pjmedia MediaRTPpjmedia.cpp)
 hydra_component_add_file(media_rtp_pjmedia RTPSession.cpp)
 hydra_component_add_file(media_rtp_pjmedia RTPSource.cpp)
 hydra_component_add_file(media_rtp_pjmedia RTPSink.cpp)
+hydra_component_add_boost_libraries(media_rtp_pjmedia core thread)
 hydra_component_build_standalone(media_rtp_pjmedia)
 pjproject_link(media_rtp_pjmedia pjlib)
 pjproject_link(media_rtp_pjmedia pjlib-util)

-----------------------------------------------------------------------


-- 
hydra/media_rtp_pjmedia.git




More information about the asterisk-scf-commits mailing list