Rollback of r5629 "(Auto)update libjingle 62364298-> 62368661".
BUG=N/A R=wu@webrtc.org Review URL: https://webrtc-codereview.appspot.com/9329004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5631 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
0117d1c48c
commit
1bbfb57d71
@ -1,4 +1,3 @@
|
|||||||
set noparent
|
|
||||||
hellner@google.com
|
hellner@google.com
|
||||||
juberti@google.com
|
juberti@google.com
|
||||||
mallinath@google.com
|
mallinath@google.com
|
||||||
|
@ -45,6 +45,9 @@
|
|||||||
#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"
|
||||||
@ -182,7 +185,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::MediaEngineInterface *CreateAndroidMediaEngine() {
|
cricket::MediaEngine *AndroidMediaEngineFactory() {
|
||||||
cricket::FakeMediaEngine *engine = new cricket::FakeMediaEngine();
|
cricket::FakeMediaEngine *engine = new cricket::FakeMediaEngine();
|
||||||
|
|
||||||
codecs.push_back(ISAC);
|
codecs.push_back(ISAC);
|
||||||
@ -435,7 +438,7 @@ int main(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
MediaEngineFactory::SetCreateFunction(&CreateAndroidMediaEngine);
|
InitAndroidMediaEngineFactory(AndroidMediaEngineFactory);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if WIN32
|
#if WIN32
|
||||||
|
@ -42,13 +42,6 @@ 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)
|
||||||
@ -58,59 +51,22 @@ 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
|
#endif
|
||||||
#elif defined(HAVE_LMI)
|
|
||||||
#define VIDEO_ENG_NAME LmiVideoEngine
|
|
||||||
#else
|
|
||||||
#define VIDEO_ENG_NAME NullVideoEngine
|
|
||||||
#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)
|
||||||
return new CompositeMediaEngine<AUDIO_ENG_NAME, VIDEO_ENG_NAME>();
|
return new CompositeMediaEngine<AUDIO_ENG_NAME, VIDEO_ENG_NAME>();
|
||||||
#else
|
#else
|
||||||
return new NullMediaEngine();
|
return new NullMediaEngine();
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}; // namespace cricket
|
}; // namespace cricket
|
||||||
|
@ -157,18 +157,7 @@ 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
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user