(Auto)update libjingle 62364298-> 62368661
git-svn-id: http://webrtc.googlecode.com/svn/trunk@5629 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
10adbeff78
commit
31413dc635
@ -1,3 +1,4 @@
|
|||||||
|
set noparent
|
||||||
hellner@google.com
|
hellner@google.com
|
||||||
juberti@google.com
|
juberti@google.com
|
||||||
mallinath@google.com
|
mallinath@google.com
|
||||||
|
@ -45,9 +45,6 @@
|
|||||||
#include "talk/examples/call/console.h"
|
#include "talk/examples/call/console.h"
|
||||||
#include "talk/examples/call/mediaenginefactory.h"
|
#include "talk/examples/call/mediaenginefactory.h"
|
||||||
#include "talk/p2p/base/constants.h"
|
#include "talk/p2p/base/constants.h"
|
||||||
#ifdef ANDROID
|
|
||||||
#include "talk/media/other/androidmediaengine.h"
|
|
||||||
#endif
|
|
||||||
#include "talk/session/media/mediasessionclient.h"
|
#include "talk/session/media/mediasessionclient.h"
|
||||||
#include "talk/session/media/srtpfilter.h"
|
#include "talk/session/media/srtpfilter.h"
|
||||||
#include "talk/xmpp/xmppauth.h"
|
#include "talk/xmpp/xmppauth.h"
|
||||||
@ -185,7 +182,7 @@ static const int DEFAULT_PORT = 5222;
|
|||||||
static std::vector<cricket::AudioCodec> codecs;
|
static std::vector<cricket::AudioCodec> codecs;
|
||||||
static const cricket::AudioCodec ISAC(103, "ISAC", 40000, 16000, 1, 0);
|
static const cricket::AudioCodec ISAC(103, "ISAC", 40000, 16000, 1, 0);
|
||||||
|
|
||||||
cricket::MediaEngine *AndroidMediaEngineFactory() {
|
cricket::MediaEngineInterface *CreateAndroidMediaEngine() {
|
||||||
cricket::FakeMediaEngine *engine = new cricket::FakeMediaEngine();
|
cricket::FakeMediaEngine *engine = new cricket::FakeMediaEngine();
|
||||||
|
|
||||||
codecs.push_back(ISAC);
|
codecs.push_back(ISAC);
|
||||||
@ -438,7 +435,7 @@ int main(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
InitAndroidMediaEngineFactory(AndroidMediaEngineFactory);
|
MediaEngineFactory::SetCreateFunction(&CreateAndroidMediaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if WIN32
|
#if WIN32
|
||||||
|
@ -42,6 +42,13 @@ const int MediaEngineInterface::kDefaultAudioDelayOffset = 0;
|
|||||||
#if defined(HAVE_WEBRTC_VIDEO)
|
#if defined(HAVE_WEBRTC_VIDEO)
|
||||||
#include "talk/media/webrtc/webrtcvideoengine.h"
|
#include "talk/media/webrtc/webrtcvideoengine.h"
|
||||||
#endif // HAVE_WEBRTC_VIDEO
|
#endif // HAVE_WEBRTC_VIDEO
|
||||||
|
#if defined(HAVE_LMI)
|
||||||
|
#include "talk/media/base/hybridvideoengine.h"
|
||||||
|
#include "talk/media/lmi/lmimediaengine.h"
|
||||||
|
#endif // HAVE_LMI
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif // HAVE_CONFIG
|
||||||
|
|
||||||
namespace cricket {
|
namespace cricket {
|
||||||
#if defined(HAVE_WEBRTC_VOICE)
|
#if defined(HAVE_WEBRTC_VOICE)
|
||||||
@ -51,15 +58,51 @@ namespace cricket {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HAVE_WEBRTC_VIDEO)
|
#if defined(HAVE_WEBRTC_VIDEO)
|
||||||
|
#if !defined(HAVE_LMI)
|
||||||
template<>
|
template<>
|
||||||
CompositeMediaEngine<WebRtcVoiceEngine, WebRtcVideoEngine>::
|
CompositeMediaEngine<WebRtcVoiceEngine, WebRtcVideoEngine>::
|
||||||
CompositeMediaEngine() {
|
CompositeMediaEngine() {
|
||||||
video_.SetVoiceEngine(&voice_);
|
video_.SetVoiceEngine(&voice_);
|
||||||
}
|
}
|
||||||
#define VIDEO_ENG_NAME WebRtcVideoEngine
|
#define VIDEO_ENG_NAME WebRtcVideoEngine
|
||||||
|
#else
|
||||||
|
// If we have both WebRtcVideoEngine and LmiVideoEngine, enable dual-stack.
|
||||||
|
// This small class here allows us to hook the WebRtcVideoChannel up to
|
||||||
|
// the capturer owned by the LMI engine, without infecting the rest of the
|
||||||
|
// HybridVideoEngine classes with this abstraction violation.
|
||||||
|
class WebRtcLmiHybridVideoEngine
|
||||||
|
: public HybridVideoEngine<WebRtcVideoEngine, LmiVideoEngine> {
|
||||||
|
public:
|
||||||
|
void SetVoiceEngine(WebRtcVoiceEngine* engine) {
|
||||||
|
video1_.SetVoiceEngine(engine);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
template<>
|
||||||
|
CompositeMediaEngine<WebRtcVoiceEngine, WebRtcLmiHybridVideoEngine>::
|
||||||
|
CompositeMediaEngine() {
|
||||||
|
video_.SetVoiceEngine(&voice_);
|
||||||
|
}
|
||||||
|
#define VIDEO_ENG_NAME WebRtcLmiHybridVideoEngine
|
||||||
|
#endif
|
||||||
|
#elif defined(HAVE_LMI)
|
||||||
|
#define VIDEO_ENG_NAME LmiVideoEngine
|
||||||
|
#else
|
||||||
|
#define VIDEO_ENG_NAME NullVideoEngine
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
MediaEngineFactory::MediaEngineCreateFunction
|
||||||
|
MediaEngineFactory::create_function_ = NULL;
|
||||||
|
MediaEngineFactory::MediaEngineCreateFunction
|
||||||
|
MediaEngineFactory::SetCreateFunction(MediaEngineCreateFunction function) {
|
||||||
|
MediaEngineCreateFunction old_function = create_function_;
|
||||||
|
create_function_ = function;
|
||||||
|
return old_function;
|
||||||
|
};
|
||||||
|
|
||||||
MediaEngineInterface* MediaEngineFactory::Create() {
|
MediaEngineInterface* MediaEngineFactory::Create() {
|
||||||
|
if (create_function_) {
|
||||||
|
return create_function_();
|
||||||
|
} else {
|
||||||
#if defined(HAVE_LINPHONE)
|
#if defined(HAVE_LINPHONE)
|
||||||
return new LinphoneMediaEngine("", "");
|
return new LinphoneMediaEngine("", "");
|
||||||
#elif defined(AUDIO_ENG_NAME) && defined(VIDEO_ENG_NAME)
|
#elif defined(AUDIO_ENG_NAME) && defined(VIDEO_ENG_NAME)
|
||||||
@ -67,6 +110,7 @@ MediaEngineInterface* MediaEngineFactory::Create() {
|
|||||||
#else
|
#else
|
||||||
return new NullMediaEngine();
|
return new NullMediaEngine();
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}; // namespace cricket
|
}; // namespace cricket
|
||||||
|
@ -157,7 +157,18 @@ class MediaEngineInterface {
|
|||||||
#if !defined(DISABLE_MEDIA_ENGINE_FACTORY)
|
#if !defined(DISABLE_MEDIA_ENGINE_FACTORY)
|
||||||
class MediaEngineFactory {
|
class MediaEngineFactory {
|
||||||
public:
|
public:
|
||||||
|
typedef cricket::MediaEngineInterface* (*MediaEngineCreateFunction)();
|
||||||
|
// Creates a media engine, using either the compiled system default or the
|
||||||
|
// creation function specified in SetCreateFunction, if specified.
|
||||||
static MediaEngineInterface* Create();
|
static MediaEngineInterface* Create();
|
||||||
|
// Sets the function used when calling Create. If unset, the compiled system
|
||||||
|
// default will be used. Returns the old create function, or NULL if one
|
||||||
|
// wasn't set. Likewise, NULL can be used as the |function| parameter to
|
||||||
|
// reset to the default behavior.
|
||||||
|
static MediaEngineCreateFunction SetCreateFunction(
|
||||||
|
MediaEngineCreateFunction function);
|
||||||
|
private:
|
||||||
|
static MediaEngineCreateFunction create_function_;
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
0
talk/media/other/androidmediaengine.cc
Normal file
0
talk/media/other/androidmediaengine.cc
Normal file
0
talk/media/other/androidmediaengine.h
Normal file
0
talk/media/other/androidmediaengine.h
Normal file
Loading…
x
Reference in New Issue
Block a user