If this gives you problems, delete the third_party/libjingle directory and sync again
Review URL: http://webrtc-codereview.appspot.com/22023 git-svn-id: http://webrtc.googlecode.com/svn/trunk@57 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
2
DEPS
2
DEPS
@@ -67,7 +67,7 @@ hooks = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pattern": ".",
|
"pattern": ".",
|
||||||
"action": ["svn", "export", Var("webrtc_trunk") + "/third_party_mods/libjingle@29", "third_party/libjingle", "--force"],
|
"action": ["svn", "export", Var("webrtc_trunk") + "/third_party_mods/libjingle", "third_party/libjingle", "--force"],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pattern": ".",
|
"pattern": ".",
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
|
|
||||||
#include "peerconnection/samples/client/defaults.h"
|
#include "peerconnection/samples/client/defaults.h"
|
||||||
#include "talk/base/logging.h"
|
#include "talk/base/logging.h"
|
||||||
|
#include "talk/session/phone/videorendererfactory.h"
|
||||||
|
|
||||||
Conductor::Conductor(PeerConnectionClient* client, MainWnd* main_wnd)
|
Conductor::Conductor(PeerConnectionClient* client, MainWnd* main_wnd)
|
||||||
: handshake_(NONE),
|
: handshake_(NONE),
|
||||||
@@ -70,6 +71,8 @@ bool Conductor::InitializePeerConnection() {
|
|||||||
|
|
||||||
void Conductor::DeletePeerConnection() {
|
void Conductor::DeletePeerConnection() {
|
||||||
peer_connection_.reset();
|
peer_connection_.reset();
|
||||||
|
local_renderer_.reset();
|
||||||
|
remote_renderer_.reset();
|
||||||
handshake_ = NONE;
|
handshake_ = NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -79,8 +82,14 @@ void Conductor::StartCaptureDevice() {
|
|||||||
main_wnd_->SwitchToStreamingUI();
|
main_wnd_->SwitchToStreamingUI();
|
||||||
|
|
||||||
if (peer_connection_->SetVideoCapture("")) {
|
if (peer_connection_->SetVideoCapture("")) {
|
||||||
peer_connection_->SetVideoRenderer(-1, main_wnd_->handle(), 0,
|
if (!local_renderer_.get()) {
|
||||||
0.7f, 0.7f, 0.95f, 0.95f);
|
// The window will be resized according to the stream properties
|
||||||
|
// when streaming starts.
|
||||||
|
local_renderer_.reset(
|
||||||
|
cricket::VideoRendererFactory::CreateGuiVideoRenderer(100, 100));
|
||||||
|
}
|
||||||
|
if (local_renderer_.get())
|
||||||
|
peer_connection_->SetLocalVideoRenderer(local_renderer_.get());
|
||||||
} else {
|
} else {
|
||||||
ASSERT(false);
|
ASSERT(false);
|
||||||
}
|
}
|
||||||
@@ -130,8 +139,13 @@ void Conductor::OnAddStream(const std::string& stream_id, int channel_id,
|
|||||||
video_channel_ = channel_id;
|
video_channel_ = channel_id;
|
||||||
waiting_for_video_ = false;
|
waiting_for_video_ = false;
|
||||||
LOG(INFO) << "Setting video renderer for channel: " << channel_id;
|
LOG(INFO) << "Setting video renderer for channel: " << channel_id;
|
||||||
bool ok = peer_connection_->SetVideoRenderer(channel_id,
|
if (!remote_renderer_.get()) {
|
||||||
main_wnd_->handle(), 1, 0.0f, 0.0f, 1.0f, 1.0f);
|
// The window size will be automatically corrected.
|
||||||
|
remote_renderer_.reset(
|
||||||
|
cricket::VideoRendererFactory::CreateGuiVideoRenderer(100, 100));
|
||||||
|
}
|
||||||
|
bool ok = peer_connection_->SetVideoRenderer(stream_id,
|
||||||
|
remote_renderer_.get());
|
||||||
ASSERT(ok);
|
ASSERT(ok);
|
||||||
} else {
|
} else {
|
||||||
ASSERT(audio_channel_ == -1);
|
ASSERT(audio_channel_ == -1);
|
||||||
|
|||||||
@@ -19,6 +19,9 @@
|
|||||||
#include "talk/app/peerconnection.h"
|
#include "talk/app/peerconnection.h"
|
||||||
#include "talk/base/scoped_ptr.h"
|
#include "talk/base/scoped_ptr.h"
|
||||||
|
|
||||||
|
namespace cricket {
|
||||||
|
class VideoRenderer;
|
||||||
|
} // namespace cricket
|
||||||
|
|
||||||
class Conductor
|
class Conductor
|
||||||
: public webrtc::PeerConnectionObserver,
|
: public webrtc::PeerConnectionObserver,
|
||||||
@@ -112,6 +115,8 @@ class Conductor
|
|||||||
MainWnd* main_wnd_;
|
MainWnd* main_wnd_;
|
||||||
int video_channel_;
|
int video_channel_;
|
||||||
int audio_channel_;
|
int audio_channel_;
|
||||||
|
talk_base::scoped_ptr<cricket::VideoRenderer> local_renderer_;
|
||||||
|
talk_base::scoped_ptr<cricket::VideoRenderer> remote_renderer_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // PEERCONNECTION_SAMPLES_CLIENT_CONDUCTOR_H_
|
#endif // PEERCONNECTION_SAMPLES_CLIENT_CONDUCTOR_H_
|
||||||
|
|||||||
Reference in New Issue
Block a user