2
* Copyright (C) 2004-2012 Savoir-Faire Linux Inc.
2
* Copyright (C) 2004-2013 Savoir-Faire Linux Inc.
3
3
* Author: Tristan Matthews <tristan.matthews@savoirfairelinux.com>
4
* Author: Guillaume Roguez <Guillaume.Roguez@savoirfairelinux.com>
5
6
* This program is free software; you can redistribute it and/or modify
6
7
* it under the terms of the GNU General Public License as published by
31
32
#ifndef __VIDEO_RTP_SESSION_H__
32
33
#define __VIDEO_RTP_SESSION_H__
35
#include "video_base.h"
36
#include "video_mixer.h"
37
#include "conference.h"
38
#include "noncopyable.h"
40
46
namespace sfl_video {
42
class VideoSendThread;
43
49
class VideoReceiveThread;
46
52
class VideoRtpSession {
48
VideoRtpSession(const std::string &callID,
49
const std::map<std::string, std::string> &txArgs);
52
void start(int localPort);
54
void updateDestination(const std::string &destination,
56
void updateSDP(const Sdp &sdp);
58
void addReceivingDetails(std::map<std::string, std::string> &details);
61
std::tr1::shared_ptr<SocketPair> socketPair_;
62
std::tr1::shared_ptr<VideoSendThread> sendThread_;
63
std::tr1::shared_ptr<VideoReceiveThread> receiveThread_;
64
std::map<std::string, std::string> txArgs_;
65
std::map<std::string, std::string> rxArgs_;
68
const std::string callID_;
54
VideoRtpSession(const std::string &callID,
55
const std::map<std::string, std::string> &txArgs);
58
void start(int localPort);
60
void updateDestination(const std::string &destination,
62
void updateSDP(const Sdp &sdp);
64
void addReceivingDetails(std::map<std::string, std::string> &details);
65
void bindMixer(VideoMixer* mixer);
67
void setupConferenceVideoPipeline();
68
void enterConference(Conference *conf);
69
void exitConference();
72
NON_COPYABLE(VideoRtpSession);
74
std::shared_ptr<SocketPair> socketPair_;
75
std::shared_ptr<VideoSender> sender_;
76
std::shared_ptr<VideoReceiveThread> receiveThread_;
77
std::map<std::string, std::string> txArgs_;
78
std::map<std::string, std::string> rxArgs_;
81
const std::string callID_;
82
std::shared_ptr<VideoMixer> videoMixerSP_;
83
std::weak_ptr<VideoFrameActiveWriter> videoLocal_;
72
88
#endif // __VIDEO_RTP_SESSION_H__