Update to the peerconnection sample app.

* Fixes bug where remote video wasn't renderered.


* Update the Conductor class in accordance to the latest changes in the API.
  We now process the stream add/remove callbacks asynchronously.

* When a remote peer connects to us, we now call AddStream for our local streams
  to share with the peer if we haven't already done so.  To do that, we maintain
  a set of streams we have already shared.

BUG=11
Review URL: http://webrtc-codereview.appspot.com/131011

git-svn-id: http://webrtc.googlecode.com/svn/trunk@506 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
tommi@webrtc.org
2011-09-01 08:37:05 +00:00
parent 84519ec0a2
commit c6e54a97a7
5 changed files with 165 additions and 130 deletions

View File

@@ -35,6 +35,8 @@ class MainWndCallback {
// Pure virtual interface for the main window.
class MainWindow {
public:
virtual ~MainWindow() {}
enum UI {
CONNECT_TO_SERVER,
LIST_PEERS,
@@ -85,13 +87,8 @@ class MainWnd : public MainWindow {
bool is_error);
virtual UI current_ui() { return ui_; }
virtual cricket::VideoRenderer* local_renderer() {
return local_video_.get();
}
virtual cricket::VideoRenderer* remote_renderer() {
return remote_video_.get();
}
virtual cricket::VideoRenderer* local_renderer();
virtual cricket::VideoRenderer* remote_renderer();
virtual void QueueUIThreadCallback(int msg_id, void* data);
@@ -135,7 +132,7 @@ class MainWnd : public MainWindow {
template <typename T>
class AutoLock {
public:
AutoLock(T* obj) : obj_(obj) { obj_->Lock(); }
explicit AutoLock(T* obj) : obj_(obj) { obj_->Lock(); }
~AutoLock() { obj_->Unlock(); }
protected:
T* obj_;