View | Details | Raw Unified | Return to bug 29079
Collapse All | Expand All

(-)a/cmake/modules/FindMediastreamer.cmake (-3 / +8 lines)
Lines 22-30 IF (MEDIASTREAMER_FOUND) Link Here
22
  IF (NOT MEDIASTREAMER_FIND_QUIETLY)
22
  IF (NOT MEDIASTREAMER_FIND_QUIETLY)
23
      MESSAGE(STATUS "Found Mediastreamer: ${MEDIASTREAMER_LIBRARIES} (version: ${MEDIASTREAMER_VERSION})")
23
      MESSAGE(STATUS "Found Mediastreamer: ${MEDIASTREAMER_LIBRARIES} (version: ${MEDIASTREAMER_VERSION})")
24
      IF (MEDIASTREAMER_VERSION VERSION_LESS 2.9)
24
      IF (MEDIASTREAMER_VERSION VERSION_LESS 2.9)
25
          SET(MEDIASTREAMER_OLD TRUE)
25
          SET(MEDIASTREAMER_LESS_2_9 TRUE)
26
          SET(MEDIASTREAMER_LESS_2_11 TRUE)
27
      ELSEIF (MEDIASTREAMER_VERSION VERSION_LESS 2.11)
28
          SET(MEDIASTREAMER_LESS_2_9 FALSE)
29
          SET(MEDIASTREAMER_LESS_2_11 TRUE)
26
      ELSE (MEDIASTREAMER_VERSION VERSION_LESS 2.9)
30
      ELSE (MEDIASTREAMER_VERSION VERSION_LESS 2.9)
27
          SET(MEDIASTREAMER_OLD FALSE)
31
          SET(MEDIASTREAMER_LESS_2_9 FALSE)
32
          SET(MEDIASTREAMER_LESS_2_11 FALSE)
28
      ENDIF (MEDIASTREAMER_VERSION VERSION_LESS 2.9)
33
      ENDIF (MEDIASTREAMER_VERSION VERSION_LESS 2.9)
29
  ENDIF (NOT MEDIASTREAMER_FIND_QUIETLY)
34
  ENDIF (NOT MEDIASTREAMER_FIND_QUIETLY)
30
ELSE (MEDIASTREAMER_FOUND)
35
ELSE (MEDIASTREAMER_FOUND)
Lines 33-36 ELSE (MEDIASTREAMER_FOUND) Link Here
33
  ENDIF (MEDIASTREAMER_FIND_REQUIRED)
38
  ENDIF (MEDIASTREAMER_FIND_REQUIRED)
34
ENDIF (MEDIASTREAMER_FOUND)
39
ENDIF (MEDIASTREAMER_FOUND)
35
40
36
MARK_AS_ADVANCED(MEDIASTREAMER_INCLUDE_DIR MEDIASTREAMER_LIBRARIES MEDIASTREAMER_OLD)
41
MARK_AS_ADVANCED(MEDIASTREAMER_INCLUDE_DIR MEDIASTREAMER_LIBRARIES MEDIASTREAMER_LESS_2_9 MEDIASTREAMER_LESS_2_11)
(-)a/protocols/jabber/libjingle/CMakeLists.txt (-3 / +7 lines)
Lines 28-36 if ( NOT WIN32 ) Link Here
28
	endif ( NOT APPLE )
28
	endif ( NOT APPLE )
29
endif ( NOT WIN32 )
29
endif ( NOT WIN32 )
30
30
31
if ( MEDIASTREAMER_OLD )
31
if ( MEDIASTREAMER_LESS_2_9 )
32
	add_definitions ( -DMEDIASTREAMER_OLD )
32
	add_definitions ( -DMEDIASTREAMER_LESS_2_9 )
33
endif ( MEDIASTREAMER_OLD )
33
endif ( MEDIASTREAMER_LESS_2_9 )
34
35
if ( MEDIASTREAMER_LESS_2_11 )
36
	add_definitions ( -DMEDIASTREAMER_LESS_2_11 )
37
endif ( MEDIASTREAMER_LESS_2_11 )
34
38
35
if ( CMAKE_BUILD_TYPE STREQUAL "Debug" )
39
if ( CMAKE_BUILD_TYPE STREQUAL "Debug" )
36
	add_definitions ( -D_DEBUG )
40
	add_definitions ( -D_DEBUG )
(-)a/protocols/jabber/libjingle/patches/08_mediastreamer_2_11.patch (+47 lines)
Line 0 Link Here
1
diff --git a/protocols/jabber/libjingle/talk/session/phone/linphonemediaengine.cc b/protocols/jabber/libjingle/talk/session/phone/linphonemediaengine.cc
2
index 6da35e0..e337dd4 100644
3
--- a/protocols/jabber/libjingle/talk/session/phone/linphonemediaengine.cc
4
+++ b/protocols/jabber/libjingle/talk/session/phone/linphonemediaengine.cc
5
@@ -171,6 +171,16 @@ bool LinphoneVoiceChannel::SetPlayout(bool playout) {
6
   return true;
7
 }
8
 
9
+#ifdef MEDIASTREAMER_LESS_2_11
10
+static inline RtpSession * audio_stream_get_rtp_session(const AudioStream *stream) {
11
+#ifdef MEDIASTREAMER_LESS_2_9
12
+  return stream->session;
13
+#else
14
+  return stream->ms.session;
15
+#endif
16
+}
17
+#endif
18
+
19
 bool LinphoneVoiceChannel::SetSendCodecs(const std::vector<AudioCodec>& codecs) {
20
 
21
   bool first = true;
22
@@ -200,11 +210,7 @@ bool LinphoneVoiceChannel::SetSendCodecs(const std::vector<AudioCodec>& codecs)
23
       LOG(LS_INFO) << "Using " << i->name << "/" << i->clockrate;
24
       pt_ = i->id;
25
       audio_stream_ = audio_stream_start(&av_profile, -1, "localhost", port1, i->id, 250, 0); /* -1 means that function will choose some free port */
26
-#ifdef MEDIASTREAMER_OLD
27
-      port2 = rtp_session_get_local_port(audio_stream_->session);
28
-#else
29
-      port2 = rtp_session_get_local_port(audio_stream_->ms.session);
30
-#endif
31
+      port2 = rtp_session_get_local_port(audio_stream_get_rtp_session(audio_stream_));
32
       first = false;
33
     }
34
   }
35
@@ -215,11 +221,7 @@ bool LinphoneVoiceChannel::SetSendCodecs(const std::vector<AudioCodec>& codecs)
36
     // working with a buggy client; let's try PCMU.
37
     LOG(LS_WARNING) << "Received empty list of codces; using PCMU/8000";
38
     audio_stream_ = audio_stream_start(&av_profile, -1, "localhost", port1, 0, 250, 0); /* -1 means that function will choose some free port */
39
-#ifdef MEDIASTREAMER_OLD
40
-    port2 = rtp_session_get_local_port(audio_stream_->session);
41
-#else
42
-    port2 = rtp_session_get_local_port(audio_stream_->ms.session);
43
-#endif
44
+    port2 = rtp_session_get_local_port(audio_stream_get_rtp_session(audio_stream_));
45
   }
46
 
47
   return true;
(-)a/protocols/jabber/libjingle/talk/session/phone/linphonemediaengine.cc (-10 / +12 lines)
Lines 171-176 bool LinphoneVoiceChannel::SetPlayout(bool playout) { Link Here
171
  return true;
171
  return true;
172
}
172
}
173
173
174
#ifdef MEDIASTREAMER_LESS_2_11
175
static inline RtpSession * audio_stream_get_rtp_session(const AudioStream *stream) {
176
#ifdef MEDIASTREAMER_LESS_2_9
177
  return stream->session;
178
#else
179
  return stream->ms.session;
180
#endif
181
}
182
#endif
183
174
bool LinphoneVoiceChannel::SetSendCodecs(const std::vector<AudioCodec>& codecs) {
184
bool LinphoneVoiceChannel::SetSendCodecs(const std::vector<AudioCodec>& codecs) {
175
185
176
  bool first = true;
186
  bool first = true;
Lines 200-210 bool LinphoneVoiceChannel::SetSendCodecs(const std::vector<AudioCodec>& codecs) Link Here
200
      LOG(LS_INFO) << "Using " << i->name << "/" << i->clockrate;
210
      LOG(LS_INFO) << "Using " << i->name << "/" << i->clockrate;
201
      pt_ = i->id;
211
      pt_ = i->id;
202
      audio_stream_ = audio_stream_start(&av_profile, -1, "localhost", port1, i->id, 250, 0); /* -1 means that function will choose some free port */
212
      audio_stream_ = audio_stream_start(&av_profile, -1, "localhost", port1, i->id, 250, 0); /* -1 means that function will choose some free port */
203
#ifdef MEDIASTREAMER_OLD
213
      port2 = rtp_session_get_local_port(audio_stream_get_rtp_session(audio_stream_));
204
      port2 = rtp_session_get_local_port(audio_stream_->session);
205
#else
206
      port2 = rtp_session_get_local_port(audio_stream_->ms.session);
207
#endif
208
      first = false;
214
      first = false;
209
    }
215
    }
210
  }
216
  }
Lines 215-225 bool LinphoneVoiceChannel::SetSendCodecs(const std::vector<AudioCodec>& codecs) Link Here
215
    // working with a buggy client; let's try PCMU.
221
    // working with a buggy client; let's try PCMU.
216
    LOG(LS_WARNING) << "Received empty list of codces; using PCMU/8000";
222
    LOG(LS_WARNING) << "Received empty list of codces; using PCMU/8000";
217
    audio_stream_ = audio_stream_start(&av_profile, -1, "localhost", port1, 0, 250, 0); /* -1 means that function will choose some free port */
223
    audio_stream_ = audio_stream_start(&av_profile, -1, "localhost", port1, 0, 250, 0); /* -1 means that function will choose some free port */
218
#ifdef MEDIASTREAMER_OLD
224
    port2 = rtp_session_get_local_port(audio_stream_get_rtp_session(audio_stream_));
219
    port2 = rtp_session_get_local_port(audio_stream_->session);
220
#else
221
    port2 = rtp_session_get_local_port(audio_stream_->ms.session);
222
#endif
223
  }
225
  }
224
226
225
  return true;
227
  return true;

Return to bug 29079