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

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Mon Jun 20 07:13:34 CDT 2011


branch "media" has been updated
       via  5e177a61b866349ea29b0f1549b40bf6213d6239 (commit)
       via  378fa308664b6e6d4a2c6d8b453de7499a4b8e6f (commit)
       via  3f3d7679dc6090d221c6dd9ff9afc54f2396a67e (commit)
      from  63fdf41d91413e8dff8cc87432abde609e30af89 (commit)

Summary of changes:
 src/RTPSink.cpp         |    8 ++++----
 src/RTPSource.cpp       |    4 ++--
 test/TestRTPpjmedia.cpp |   12 ++++++------
 3 files changed, 12 insertions(+), 12 deletions(-)


- Log -----------------------------------------------------------------
commit 5e177a61b866349ea29b0f1549b40bf6213d6239
Author: Joshua Colp <jcolp at digium.com>
Date:   Mon Jun 20 09:13:24 2011 -0300

    Update test code to latest slice changes.

diff --git a/test/TestRTPpjmedia.cpp b/test/TestRTPpjmedia.cpp
index 4b665f1..da92d63 100644
--- a/test/TestRTPpjmedia.cpp
+++ b/test/TestRTPpjmedia.cpp
@@ -644,7 +644,7 @@ BOOST_AUTO_TEST_CASE(TransmitFrametoEmptySink)
         format->frameSize = 20;
 
         AudioFramePtr frame = new AudioFrame();
-        frame->mediaformat = format;
+        frame->mediaFormat = format;
 
         /* Populate the payload with some useless data, but enough to confirm the payload passes unaltered. */
         frame->payload.push_back('a');
@@ -868,7 +868,7 @@ BOOST_AUTO_TEST_CASE(TransmitandReceiveFrame)
         format->frameSize = 20;
 
         AudioFramePtr frame = new AudioFrame();
-        frame->mediaformat = format;
+        frame->mediaFormat = format;
 
         /* Populate the payload with some useless data, but enough to confirm the payload passes unaltered. */
         frame->payload.push_back('a');
@@ -900,10 +900,10 @@ BOOST_AUTO_TEST_CASE(TransmitandReceiveFrame)
         AudioFramePtr received_frame;
         if (Testbed.frames.size() == 1 &&
             (received_frame = AudioFramePtr::dynamicCast(Testbed.frames.front())) &&
-            (received_frame->mediaformat->name == format->name))
+            (received_frame->mediaFormat->name == format->name))
         {
             AudioFormatPtr received_format;
-            if ((received_format = AudioFormatPtr::dynamicCast(received_frame->mediaformat)) &&
+            if ((received_format = AudioFormatPtr::dynamicCast(received_frame->mediaFormat)) &&
                 (received_format->frameSize == format->frameSize) &&
                 (received_frame->payload == frame->payload))
             {
@@ -937,7 +937,7 @@ BOOST_AUTO_TEST_CASE(TransmitFrameWithUnsupportedMediaFormat)
         format->frameSize = 20;
 
         AudioFramePtr frame = new AudioFrame();
-        frame->mediaformat = format;
+        frame->mediaFormat = format;
 
         frame->payload.push_back('a');
         frame->payload.push_back('b');
@@ -1014,7 +1014,7 @@ BOOST_AUTO_TEST_CASE(ReceiveUnknownRTPPacket)
         sink->setRemoteDetails(address, port);
 
         AudioFramePtr frame = new AudioFrame();
-        frame->mediaformat = format;
+        frame->mediaFormat = format;
 
         /* Populate the payload with some useless data, but enough to confirm the payload passes unaltered. */
         frame->payload.push_back('a');

commit 378fa308664b6e6d4a2c6d8b453de7499a4b8e6f
Author: Joshua Colp <jcolp at digium.com>
Date:   Mon Jun 20 09:11:44 2011 -0300

    Don't query a second time to get the payload.

diff --git a/src/RTPSink.cpp b/src/RTPSink.cpp
index 6a4a089..0395e6a 100644
--- a/src/RTPSink.cpp
+++ b/src/RTPSink.cpp
@@ -114,8 +114,8 @@ void StreamSinkRTPImpl::write(const AsteriskSCF::Media::V1::FrameSeq& frames, co
 
         /* Using the available information construct an RTP header that we can place at the front of our packet */
         pj_status_t status = pjmedia_rtp_encode_rtp(&mImpl->mOutgoingSession,
-						    mImpl->mSession->getPayload((*frame)->mediaFormat), 0, (int) (*frame)->payload.size(),
-						    (int) (*frame)->payload.size(), &header, &header_len);
+                                                    payload, 0, (int) (*frame)->payload.size(),
+                                                    (int) (*frame)->payload.size(), &header, &header_len);
 
         if (status != PJ_SUCCESS)
         {

commit 3f3d7679dc6090d221c6dd9ff9afc54f2396a67e
Author: Joshua Colp <jcolp at digium.com>
Date:   Mon Jun 20 09:10:57 2011 -0300

    Update to work with latest slice changes.

diff --git a/src/RTPSink.cpp b/src/RTPSink.cpp
index 41e7b18..6a4a089 100644
--- a/src/RTPSink.cpp
+++ b/src/RTPSink.cpp
@@ -97,7 +97,7 @@ void StreamSinkRTPImpl::write(const AsteriskSCF::Media::V1::FrameSeq& frames, co
         AudioFormatPtr audioformat;
 
         /* TODO: Add support for other types of media */
-        if (!(audioformat = AudioFormatPtr::dynamicCast((*frame)->mediaformat)))
+        if (!(audioformat = AudioFormatPtr::dynamicCast((*frame)->mediaFormat)))
         {
             continue;
         }
@@ -107,14 +107,14 @@ void StreamSinkRTPImpl::write(const AsteriskSCF::Media::V1::FrameSeq& frames, co
         int payload;
 
         // Only allow media formats through that we support
-        if ((payload = mImpl->mSession->getPayload((*frame)->mediaformat)) < 0)
+        if ((payload = mImpl->mSession->getPayload((*frame)->mediaFormat)) < 0)
         {
             throw UnsupportedMediaFormatException();
         }
 
         /* Using the available information construct an RTP header that we can place at the front of our packet */
         pj_status_t status = pjmedia_rtp_encode_rtp(&mImpl->mOutgoingSession,
-						    mImpl->mSession->getPayload((*frame)->mediaformat), 0, (int) (*frame)->payload.size(),
+						    mImpl->mSession->getPayload((*frame)->mediaFormat), 0, (int) (*frame)->payload.size(),
 						    (int) (*frame)->payload.size(), &header, &header_len);
 
         if (status != PJ_SUCCESS)
diff --git a/src/RTPSource.cpp b/src/RTPSource.cpp
index 559eace..c19266e 100644
--- a/src/RTPSource.cpp
+++ b/src/RTPSource.cpp
@@ -236,7 +236,7 @@ static void receiveRTP(void *userdata, void *packet, pj_ssize_t size)
     if ((audioformat = AudioFormatPtr::dynamicCast(mediaformat)))
     {
         AudioFramePtr frame = new AudioFrame();
-        frame->mediaformat = mediaformat;
+        frame->mediaFormat = mediaformat;
 
         // Populate the common data
         frame->timestamp = header->ts;
@@ -251,7 +251,7 @@ static void receiveRTP(void *userdata, void *packet, pj_ssize_t size)
     else if ((videoformat = VideoFormatPtr::dynamicCast(mediaformat)))
     {
         VideoFramePtr frame = new VideoFrame();
-        frame->mediaformat = mediaformat;
+        frame->mediaFormat = mediaformat;
         frame->timestamp = header->ts;
         frame->seqno = header->seq;
         copy(payload, payload + payload_size, std::back_inserter(frame->payload));

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


-- 
asterisk-scf/integration/media_rtp_pjmedia.git



More information about the asterisk-scf-commits mailing list