[asterisk-scf-commits] asterisk-scf/integration/media_rtp_pjmedia.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Mon Aug 16 10:44:40 CDT 2010


branch "master" has been updated
       via  3b50b49d0c4b4681fe00922f8a8e8851d171213a (commit)
       via  f0c73033d6310c3f4b555ca11f61a8eaf37d23fd (commit)
      from  262e925cad5c3dc46be9596f52220b9356f717eb (commit)

Summary of changes:
 pjproject.cmake   |   52 +++++++++++++++++++++++++++-------------------------
 src/RTPSource.cpp |   21 ++++++++++++++++++++-
 2 files changed, 47 insertions(+), 26 deletions(-)


- Log -----------------------------------------------------------------
commit 3b50b49d0c4b4681fe00922f8a8e8851d171213a
Author: Joshua Colp <jcolp at digium.com>
Date:   Mon Aug 16 12:56:45 2010 -0300

    Add an implementation of the source. Should now receive packets and write frames.

diff --git a/src/RTPSource.cpp b/src/RTPSource.cpp
index e63201b..e3f4493 100644
--- a/src/RTPSource.cpp
+++ b/src/RTPSource.cpp
@@ -160,7 +160,26 @@ static void receiveRTP(void *userdata, void *packet, pj_ssize_t size)
 		return;
 	}
 
-	/* Here is where we need to construct a frame and write it to the sink */
+	/* TODO: Based on the payload of the packet we need to find the media format, and construct the relevant
+	 * frame based on it. For example video would need a video frame.
+	 */
+	AudioFramePtr frame = new AudioFrame();
+	frame->mediaformat = source->mImpl->mSession->getFormats().front();
+
+	/* Populate the common data */
+	frame->timestamp = header->ts;
+	frame->seqno = header->seq;
+
+	/* Yay! The actual payload! */
+	frame->payload.resize(payload_size);
+
+	/* TODO: Use vectorness to do this instead of memcpy if possible */
+	memcpy(&frame->payload[0], payload, payload_size);
+
+	/* Now out it goes */
+	FrameSeq frames;
+	frames.push_back(frame);
+	source->mImpl->mSink->write(frames);
 
 	/* Now that all is said and done update the internal RTP stack state */
 	pjmedia_rtp_session_update(&source->mImpl->mIncomingSession, header, NULL);

commit f0c73033d6310c3f4b555ca11f61a8eaf37d23fd
Author: Joshua Colp <jcolp at digium.com>
Date:   Mon Aug 16 11:32:15 2010 -0300

    Fix a few dependency bugs with pjproject on Linux. Still not 100%, but better.

diff --git a/pjproject.cmake b/pjproject.cmake
index 30bf512..93a2aa7 100644
--- a/pjproject.cmake
+++ b/pjproject.cmake
@@ -4,13 +4,15 @@ find_package(Threads)
 
 # These are global targets which exist for all pjproject components, they are used for initial running of configure plus cleanup
 add_custom_command(OUTPUT "${CMAKE_SOURCE_DIR}/pjproject/build.mak" COMMAND "./configure" "--disable-sound" "--disable-ssl" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/pjproject" COMMENT "Configuring pjproject")
+add_custom_command(OUTPUT "${CMAKE_SOURCE_DIR}/pjproject/pjlib/include/pj/config_site.h" COMMAND "make" "dep" "TARGET_NAME=asteriskscf" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/pjproject" COMMENT "Dependency generating pjproject" DEPENDS "${CMAKE_SOURCE_DIR}/pjproject/build.mak")
 add_custom_target(pjproject-clean COMMAND "make" "clean" "TARGET_NAME=asteriskscf" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/pjproject" COMMENT "Cleaning pjproject")
 add_custom_target(pjproject-distclean COMMAND "make" "distclean" "TARGET_NAME=asteriskscf" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/pjproject" COMMENT "Deep cleaning pjproject")
 
 # Function which adds build targets for the following supported pjproject components: pjlib, pjlib-util, pjnath, pjmedia, pjsip.
 function(pjproject_build PJPROJECT_COMPONENT)
   if (UNIX)
-    add_custom_target("pjproject-${PJPROJECT_COMPONENT}" COMMAND "make" "TARGET_NAME=asteriskscf" "DIRS=${PJPROJECT_COMPONENT}" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/pjproject" COMMENT "Building pjproject-${PJPROJECT_COMPONENT}" DEPENDS "${CMAKE_SOURCE_DIR}/pjproject/build.mak")
+    add_custom_target("pjproject-${PJPROJECT_COMPONENT}" COMMAND "make" "TARGET_NAME=asteriskscf" "DIRS=${PJPROJECT_COMPONENT}" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/pjproject" COMMENT "Building pjproject-${PJPROJECT_COMPONENT}" DEPENDS "${CMAKE_SOURCE_DIR}/pjproject/pjlib/include/pj/config_site.h")
+    add_dependencies("pjproject-${PJPROJECT_COMPONENT}" "pjproject-pjlib")
   elseif (MSVC80 OR MSVC90)
     if (${PJPROJECT_COMPONENT} STREQUAL "pjlib-util")
       include_external_msproject(pjlib_util "${CMAKE_SOURCE_DIR}/pjproject/pjlib-util/build/pjlib_util.vcproj")
@@ -58,31 +60,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()
+    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()
 

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


-- 
asterisk-scf/integration/media_rtp_pjmedia.git



More information about the asterisk-scf-commits mailing list