ekiga r7127 - in trunk: . src/endpoints
- From: dsandras svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r7127 - in trunk: . src/endpoints
- Date: Mon, 29 Sep 2008 18:55:01 +0000 (UTC)
Author: dsandras
Date: Mon Sep 29 18:55:01 2008
New Revision: 7127
URL: http://svn.gnome.org/viewvc/ekiga?rev=7127&view=rev
Log:
Fixed OPAL API breakage and raised requirements accordingly.
Modified:
trunk/ChangeLog
trunk/configure.ac
trunk/src/endpoints/manager.cpp
trunk/src/endpoints/opal-call.cpp
trunk/src/endpoints/opal-codec-description.cpp
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Mon Sep 29 18:55:01 2008
@@ -20,8 +20,8 @@
SCHEMA_AGE=62
-PTLIB_REC_VERSION="2.4.1"
-OPAL_REC_VERSION="3.4.1"
+PTLIB_REC_VERSION="2.4.2"
+OPAL_REC_VERSION="3.4.2"
AC_DEFINE_UNQUOTED(MAJOR_VERSION, $MAJOR_VERSION,[fix])
AC_DEFINE_UNQUOTED(MINOR_VERSION, $MINOR_VERSION,[fix])
Modified: trunk/src/endpoints/manager.cpp
==============================================================================
--- trunk/src/endpoints/manager.cpp (original)
+++ trunk/src/endpoints/manager.cpp Mon Sep 29 18:55:01 2008
@@ -246,13 +246,15 @@
PSafePtr<OpalRTPConnection> connection = PSafePtrCast<OpalConnection, OpalRTPConnection> (call->GetConnection (i));
if (connection) {
- RTP_Session *session =
- connection->GetSession (OpalMediaFormat::DefaultAudioSessionID);
+ OpalMediaStreamPtr stream = connection->GetMediaStream (OpalMediaType::Audio (), false);
+ if (stream != NULL) {
- if (session != NULL) {
+ RTP_Session *session = connection->GetSession (stream->GetSessionID ());
+ if (session != NULL) {
- unsigned units = session->GetJitterTimeUnits ();
- session->SetJitterBufferSize (20 * units, max_val * units, units);
+ unsigned units = session->GetJitterTimeUnits ();
+ session->SetJitterBufferSize (20 * units, max_val * units, units);
+ }
}
}
}
@@ -516,7 +518,7 @@
for (int i = 0 ; i < media_formats_list.GetSize () ; i++) {
OpalMediaFormat media_format = media_formats_list [i];
- if (media_format.GetDefaultSessionID () == OpalMediaFormat::DefaultVideoSessionID) {
+ if (media_format.GetMediaType() == OpalMediaType::Video ()) {
media_format.SetOptionInteger (OpalVideoFormat::FrameWidthOption (),
Ekiga::VideoSizes [options.size].width);
@@ -571,12 +573,10 @@
i < 2;
i++) {
- PSafePtr<OpalConnection> connection = call->GetConnection (i);
+ PSafePtr<OpalRTPConnection> connection = PSafePtrCast<OpalConnection, OpalRTPConnection> (call->GetConnection (i));
if (connection) {
- OpalMediaStream *stream =
- connection->GetMediaStream (OpalMediaFormat::DefaultVideoSessionID, false);
-
+ OpalMediaStreamPtr stream = connection->GetMediaStream (OpalMediaType::Video (), false);
if (stream != NULL) {
OpalMediaFormat mediaFormat = stream->GetMediaFormat ();
@@ -601,7 +601,7 @@
for (int i = 0 ; i < media_formats_list.GetSize () ; i++) {
OpalMediaFormat media_format = media_formats_list [i];
- if (media_format.GetDefaultSessionID () == OpalMediaFormat::DefaultVideoSessionID) {
+ if (media_format.GetMediaType () == OpalMediaType::Video ()) {
int j = 0;
for (j = 0; j < NB_VIDEO_SIZES; j++) {
Modified: trunk/src/endpoints/opal-call.cpp
==============================================================================
--- trunk/src/endpoints/opal-call.cpp (original)
+++ trunk/src/endpoints/opal-call.cpp Mon Sep 29 18:55:01 2008
@@ -163,7 +163,7 @@
if (connection != NULL) {
- stream = connection->GetMediaStream ((type == Audio)?OpalMediaFormat::DefaultAudioSessionID:OpalMediaFormat::DefaultVideoSessionID, false);
+ stream = connection->GetMediaStream ((type == Audio) ? OpalMediaType::Audio () : OpalMediaType::Video (), false);
if (stream != NULL) {
stream_name = std::string ((const char *) stream->GetMediaFormat ().GetEncodingName ());
@@ -334,6 +334,9 @@
PBoolean
Opal::Call::OnEstablished (OpalConnection & connection)
{
+ RTP_Session *session = NULL;
+ OpalMediaStreamPtr stream;
+
NoAnswerTimer.Stop (false);
if (!PIsDescendant(&connection, OpalPCSSConnection)) {
@@ -344,19 +347,28 @@
if (PIsDescendant(&connection, OpalRTPConnection)) {
- RTP_Session *audio_session = PDownCast (OpalRTPConnection, &connection)->GetSession (OpalMediaFormat::DefaultAudioSessionID);
- RTP_Session *video_session = PDownCast (OpalRTPConnection, &connection)->GetSession (OpalMediaFormat::DefaultVideoSessionID);
+ stream = connection.GetMediaStream (OpalMediaType::Audio (), false);
+ if (stream != NULL) {
- if (audio_session) {
- audio_session->SetIgnorePayloadTypeChanges (TRUE);
- audio_session->SetRxStatisticsInterval(50);
- audio_session->SetTxStatisticsInterval(50);
+ session = PDownCast (OpalRTPConnection, &connection)->GetSession (stream->GetSessionID ());
+ if (session) {
+
+ session->SetIgnorePayloadTypeChanges (TRUE);
+ session->SetRxStatisticsInterval(50);
+ session->SetTxStatisticsInterval(50);
+ }
}
- if (video_session) {
- video_session->SetIgnorePayloadTypeChanges (TRUE);
- video_session->SetRxStatisticsInterval(50);
- video_session->SetTxStatisticsInterval(50);
+ stream = connection.GetMediaStream (OpalMediaType::Video (), false);
+ if (stream != NULL) {
+
+ session = PDownCast (OpalRTPConnection, &connection)->GetSession (stream->GetSessionID ());
+ if (session) {
+
+ session->SetIgnorePayloadTypeChanges (TRUE);
+ session->SetRxStatisticsInterval(50);
+ session->SetTxStatisticsInterval(50);
+ }
}
}
@@ -527,7 +539,7 @@
void
Opal::Call::OnOpenMediaStream (OpalMediaStream & stream)
{
- StreamType type = (stream.GetSessionID () == OpalMediaFormat::DefaultAudioSessionID) ? Audio : Video;
+ StreamType type = (stream.GetMediaFormat().GetMediaType() == OpalMediaType::Audio ()) ? Audio : Video;
bool is_transmitting = false;
std::string stream_name;
@@ -542,7 +554,7 @@
void
Opal::Call::OnClosedMediaStream (OpalMediaStream & stream)
{
- StreamType type = (stream.GetSessionID () == OpalMediaFormat::DefaultAudioSessionID) ? Audio : Video;
+ StreamType type = (stream.GetMediaFormat().GetMediaType() == OpalMediaType::Audio ()) ? Audio : Video;
bool is_transmitting = false;
std::string stream_name;
@@ -560,7 +572,8 @@
{
PWaitAndSignal m(stats_mutex); // The stats are computed from two different threads
- if (session.GetSessionID () == OpalMediaFormat::DefaultAudioSessionID) {
+ if (session.IsAudio ()) {
+
PTimeInterval t = PTime () - last_a_tick;
if (t.GetMilliSeconds () < 500)
return;
Modified: trunk/src/endpoints/opal-codec-description.cpp
==============================================================================
--- trunk/src/endpoints/opal-codec-description.cpp (original)
+++ trunk/src/endpoints/opal-codec-description.cpp Mon Sep 29 18:55:01 2008
@@ -54,7 +54,7 @@
{
name = (const char *) format.GetEncodingName ();
rate = format.GetClockRate ();
- audio = (format.GetDefaultSessionID () == OpalMediaFormat::DefaultAudioSessionID);
+ audio = (format.GetMediaType () == OpalMediaType::Audio ());
if (format.IsValidForProtocol ("SIP"))
protocols.push_back ("SIP");
if (format.IsValidForProtocol ("H.323"))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]