2
* Copyright (C) 2016 Canonical, Ltd.
4
* This program is free software: you can redistribute it and/or modify it
5
* under the terms of the GNU General Public License version 3, as published
6
* by the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful, but
9
* WITHOUT ANY WARRANTY; without even the implied warranties of
10
* MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
11
* PURPOSE. See the GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License along
14
* with this program. If not, see <http://www.gnu.org/licenses/>.
18
#ifndef MCS_STREAMING_RTPSENDER_H_
19
#define MCS_STREAMING_RTPSENDER_H_
27
#include <condition_variable>
29
#include "mcs/scoped_gobject.h"
31
#include "mcs/video/buffer.h"
32
#include "mcs/video/bufferqueue.h"
34
#include "mcs/streaming/transportsender.h"
39
class RTPSender : public std::enable_shared_from_this<RTPSender>,
40
public TransportSender {
42
static TransportSender::Ptr Create(const std::string &address, int port);
46
bool Queue(const mcs::video::Buffer::Ptr &packets) override;
48
int32_t LocalPort() const override;
53
RTPSender::Ptr FinalizerConstruction(const std::string &address, int port);
60
uint32_t rtp_sequence_number_;
61
std::thread worker_thread_;
62
mcs::video::BufferQueue::Ptr queue_;
67
} // namespace streaming