SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
rtptransmitter.h
Go to the documentation of this file.
1 /*
2 
3  This file is a part of JRTPLIB
4  Copyright (c) 1999-2017 Jori Liesenborgs
5 
6  Contact: jori.liesenborgs@gmail.com
7 
8  This library was developed at the Expertise Centre for Digital Media
9  (http://www.edm.uhasselt.be), a research center of the Hasselt University
10  (http://www.uhasselt.be). The library is based upon work done for
11  my thesis at the School for Knowledge Technology (Belgium/The Netherlands).
12 
13  Permission is hereby granted, free of charge, to any person obtaining a
14  copy of this software and associated documentation files (the "Software"),
15  to deal in the Software without restriction, including without limitation
16  the rights to use, copy, modify, merge, publish, distribute, sublicense,
17  and/or sell copies of the Software, and to permit persons to whom the
18  Software is furnished to do so, subject to the following conditions:
19 
20  The above copyright notice and this permission notice shall be included
21  in all copies or substantial portions of the Software.
22 
23  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
29  IN THE SOFTWARE.
30 
31  */
32 
37 #ifndef RTPTRANSMITTER_H
38 
39 #define RTPTRANSMITTER_H
40 
41 #include "rtpconfig.h"
42 #include "rtptypes.h"
43 #include "rtptimeutilities.h"
44 #include <cstddef>
45 
46 namespace qrtplib
47 {
48 
49 class RTPRawPacket;
50 class RTPAddress;
51 class RTPTransmissionParams;
52 class RTPTime;
53 class RTPTransmissionInfo;
54 
63 {
64 public:
71  {
77  };
78 
81  {
85  };
86 protected:
89  {
90  timeinit.Dummy();
91  }
92 public:
93  virtual ~RTPTransmitter()
94  {
95  }
96 
98  virtual int Init() = 0;
99 
108  virtual int Create(std::size_t maxpacksize, const RTPTransmissionParams *transparams) = 0;
109 
111  virtual int BindSockets() = 0;
112 
116  virtual void Destroy() = 0;
117 
126 
130  virtual void DeleteTransmissionInfo(RTPTransmissionInfo *inf) = 0;
131 
133  virtual bool ComesFromThisTransmitter(const RTPAddress& addr) = 0;
134 
137  virtual std::size_t GetHeaderOverhead() = 0;
138 
140  virtual int SendRTPData(const void *data, std::size_t len) = 0;
141 
143  virtual int SendRTCPData(const void *data, std::size_t len) = 0;
144 
146  virtual int AddDestination(const RTPAddress &addr) = 0;
147 
149  virtual int DeleteDestination(const RTPAddress &addr) = 0;
150 
152  virtual void ClearDestinations() = 0;
153 
155  virtual bool SupportsMulticasting() = 0;
156 
158  virtual int JoinMulticastGroup(const RTPAddress &addr) = 0;
159 
161  virtual int LeaveMulticastGroup(const RTPAddress &addr) = 0;
162 
168  virtual int SetReceiveMode(RTPTransmitter::ReceiveMode m) = 0;
169 
171  virtual int AddToIgnoreList(const RTPAddress &addr) = 0;
172 
174  virtual int DeleteFromIgnoreList(const RTPAddress &addr)= 0;
175 
177  virtual void ClearIgnoreList() = 0;
178 
180  virtual int AddToAcceptList(const RTPAddress &addr) = 0;
181 
183  virtual int DeleteFromAcceptList(const RTPAddress &addr) = 0;
184 
186  virtual void ClearAcceptList() = 0;
187 
189  virtual int SetMaximumPacketSize(std::size_t s) = 0;
190 
193  virtual RTPRawPacket *GetNextPacket() = 0;
194 };
195 
203 {
204 protected:
206  {
207  protocol = p;
208  }
209 public:
211  {
212  }
213 
216  {
217  return protocol;
218  }
219 private:
221 };
222 
230 {
231 protected:
233  {
234  protocol = p;
235  }
236 public:
238  {
239  }
242  {
243  return protocol;
244  }
245 private:
247 };
248 
249 } // end namespace
250 
251 #endif // RTPTRANSMITTER_H
252 
virtual int SendRTPData(const void *data, std::size_t len)=0
RTPTimeInitializerObject timeinit
virtual RTPRawPacket * GetNextPacket()=0
virtual int SendRTCPData(const void *data, std::size_t len)=0
virtual void DeleteTransmissionInfo(RTPTransmissionInfo *inf)=0
virtual int DeleteDestination(const RTPAddress &addr)=0
virtual int BindSockets()=0
virtual int DeleteFromAcceptList(const RTPAddress &addr)=0
virtual int AddToIgnoreList(const RTPAddress &addr)=0
RTPTransmitter::TransmissionProtocol GetTransmissionProtocol() const
virtual int DeleteFromIgnoreList(const RTPAddress &addr)=0
virtual bool ComesFromThisTransmitter(const RTPAddress &addr)=0
virtual void ClearAcceptList()=0
RTPTransmitter::TransmissionProtocol protocol
virtual int SetMaximumPacketSize(std::size_t s)=0
RTPTransmissionInfo(RTPTransmitter::TransmissionProtocol p)
virtual int JoinMulticastGroup(const RTPAddress &addr)=0
virtual int LeaveMulticastGroup(const RTPAddress &addr)=0
virtual int SetReceiveMode(RTPTransmitter::ReceiveMode m)=0
RTPTransmitter::TransmissionProtocol protocol
virtual bool SupportsMulticasting()=0
virtual void ClearIgnoreList()=0
virtual std::size_t GetHeaderOverhead()=0
virtual void ClearDestinations()=0
virtual int AddToAcceptList(const RTPAddress &addr)=0
virtual void Destroy()=0
RTPTransmitter::TransmissionProtocol GetTransmissionProtocol() const
virtual int Create(std::size_t maxpacksize, const RTPTransmissionParams *transparams)=0
RTPTransmissionParams(RTPTransmitter::TransmissionProtocol p)
virtual int AddDestination(const RTPAddress &addr)=0
virtual RTPTransmissionInfo * GetTransmissionInfo()=0
virtual int Init()=0