r3584 - in trunk/libminisip/source: subsystem_media subsystem_signaling/sip
guillem at minisip.org
guillem at minisip.org
Tue Jun 24 20:43:59 CEST 2008
Author: guillem
Date: 2008-06-24 20:43:59 +0200 (Tue, 24 Jun 2008)
New Revision: 3584
Modified:
trunk/libminisip/source/subsystem_media/MediaStream.cxx
trunk/libminisip/source/subsystem_signaling/sip/SipSoftPhoneConfiguration.cxx
Log:
* Bug fix: CODEC payload type negotiation was broken. The payload number was converted to a
character that was then converted to zero. In this revision video works.
Modified: trunk/libminisip/source/subsystem_media/MediaStream.cxx
===================================================================
--- trunk/libminisip/source/subsystem_media/MediaStream.cxx 2008-06-24 15:37:47 UTC (rev 3583)
+++ trunk/libminisip/source/subsystem_media/MediaStream.cxx 2008-06-24 18:43:59 UTC (rev 3584)
@@ -112,7 +112,7 @@
for( iC = codecs.begin(); iC != codecs.end(); iC ++ ){
string codecRtpMap;
- uint8_t codecPayloadType;
+ int codecPayloadType;
codecRtpMap = (*iC)->getSdpMediaAttributes();
codecPayloadType = (*iC)->getSdpMediaType();
@@ -131,7 +131,7 @@
bool sdpRtpMapEqual = !strCaseCmp( codecName.c_str(), sdpName.c_str() ) && codecRate == sdpRate && codecParam == sdpParam;
if ( sdpRtpMapEqual ) {
- localPayloadType = codecPayloadType;
+ localPayloadType = itoa(codecPayloadType);
return true;
}
else {
@@ -141,7 +141,7 @@
}
else{
if( sdpPayloadType == itoa(codecPayloadType) ){
- localPayloadType = codecPayloadType;
+ localPayloadType = itoa(codecPayloadType);
return true;
}else{
}
@@ -474,7 +474,7 @@
seqNo = (uint16_t)rand();
ssrc = rand();
lastTs = rand();
- payloadType = 255;
+ payloadType = "255";
setMuted( true );
muteCounter = 0;
if( senderSocket ){
@@ -586,7 +586,7 @@
}
packet = new SRtpPacket( data, length, seqNo++, lastTs, ssrc );
-
+
if( dtmf ){
packet->getHeader().setPayloadType( 101 );
}
@@ -700,10 +700,12 @@
bool RealtimeMediaStreamSender::matches( MRef<SdpHeaderM *> m, uint32_t formatIndex ){
bool result = RealtimeMediaStream::matches( m, formatIndex );
+
if( result && !selectedCodec ){
selectedCodec = realtimeMedia->createCodecInstance(
atoi( localPayloadType.c_str() ) );
- payloadType = (uint8_t)atoi(m->getFormat( formatIndex ).c_str());
+ payloadType = itoa( (uint8_t)atoi(m->getFormat( formatIndex ).c_str()) ) ;
+ result=true;
}
return result;
Modified: trunk/libminisip/source/subsystem_signaling/sip/SipSoftPhoneConfiguration.cxx
===================================================================
--- trunk/libminisip/source/subsystem_signaling/sip/SipSoftPhoneConfiguration.cxx 2008-06-24 15:37:47 UTC (rev 3583)
+++ trunk/libminisip/source/subsystem_signaling/sip/SipSoftPhoneConfiguration.cxx 2008-06-24 18:43:59 UTC (rev 3584)
@@ -376,9 +376,7 @@
backend->save( cmdActionsPath + "params", params );
}
-#ifdef VIDEO_SUPPORT
backend->save( "video_device", videoDevice );
-#endif
backend->save( "frame_width", frameWidth );
backend->save( "frame_height", frameHeight );
@@ -845,9 +843,7 @@
ii++;
}while( true );
-#ifdef VIDEO_SUPPORT
videoDevice = backend->loadString( "video_device", "" );
-#endif
//Even if we can't send video, we might be able to display it.
//Therefore this is not within the VIDEO_SUPPORT ifdef
frameWidth = backend->loadInt( "frame_width", 176 );
More information about the Minisip-devel
mailing list