~ubuntu-branches/ubuntu/wily/sflphone/wily

« back to all changes in this revision

Viewing changes to daemon/src/video/video_rtp_session.h

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2014-01-28 18:23:36 UTC
  • mfrom: (1.1.11)
  • mto: This revision was merged to the branch mainline in revision 24.
  • Revision ID: package-import@ubuntu.com-20140128182336-3xenud1kbnwmf3mz
* New upstream release 
  - Fixes "New Upstream Release" (Closes: #735846)
  - Fixes "Ringtone does not stop" (Closes: #727164)
  - Fixes "[sflphone-kde] crash on startup" (Closes: #718178)
  - Fixes "sflphone GUI crashes when call is hung up" (Closes: #736583)
* Build-Depends: ensure GnuTLS 2.6
  - libucommon-dev (>= 6.0.7-1.1), libccrtp-dev (>= 2.0.6-3)
  - Fixes "FTBFS Build-Depends libgnutls{26,28}-dev" (Closes: #722040)
* Fix "boost 1.49 is going away" unversioned Build-Depends: (Closes: #736746)
* Add Build-Depends: libsndfile-dev, nepomuk-core-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
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>
4
5
 *
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__
33
34
 
 
35
#include "video_base.h"
 
36
#include "video_mixer.h"
 
37
#include "conference.h"
 
38
#include "noncopyable.h"
 
39
 
34
40
#include <string>
35
41
#include <map>
36
 
#include <tr1/memory>
 
42
#include <memory>
37
43
 
38
44
class Sdp;
39
45
 
40
46
namespace sfl_video {
41
47
 
42
 
class VideoSendThread;
 
48
class VideoSender;
43
49
class VideoReceiveThread;
44
50
class SocketPair;
45
51
 
46
52
class VideoRtpSession {
47
 
    public:
48
 
        VideoRtpSession(const std::string &callID,
49
 
                        const std::map<std::string, std::string> &txArgs);
50
 
        ~VideoRtpSession();
51
 
 
52
 
        void start(int localPort);
53
 
        void stop();
54
 
        void updateDestination(const std::string &destination,
55
 
                               unsigned int port);
56
 
        void updateSDP(const Sdp &sdp);
57
 
        void forceKeyFrame();
58
 
        void addReceivingDetails(std::map<std::string, std::string> &details);
59
 
 
60
 
    private:
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_;
66
 
        bool sending_;
67
 
        bool receiving_;
68
 
        const std::string callID_;
 
53
public:
 
54
    VideoRtpSession(const std::string &callID,
 
55
                    const std::map<std::string, std::string> &txArgs);
 
56
    ~VideoRtpSession();
 
57
 
 
58
    void start(int localPort);
 
59
    void stop();
 
60
    void updateDestination(const std::string &destination,
 
61
                           unsigned int port);
 
62
    void updateSDP(const Sdp &sdp);
 
63
    void forceKeyFrame();
 
64
    void addReceivingDetails(std::map<std::string, std::string> &details);
 
65
    void bindMixer(VideoMixer* mixer);
 
66
    void unbindMixer();
 
67
    void setupConferenceVideoPipeline();
 
68
    void enterConference(Conference *conf);
 
69
    void exitConference();
 
70
 
 
71
private:
 
72
    NON_COPYABLE(VideoRtpSession);
 
73
 
 
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_;
 
79
    bool sending_;
 
80
    bool receiving_;
 
81
    const std::string callID_;
 
82
    std::shared_ptr<VideoMixer> videoMixerSP_;
 
83
    std::weak_ptr<VideoFrameActiveWriter> videoLocal_;
69
84
};
 
85
 
70
86
}
71
87
 
72
88
#endif // __VIDEO_RTP_SESSION_H__