mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-06 21:34:22 -04:00
added serialisation/transmission of video data
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7452 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
9006c567a1
commit
01c467c4c0
11 changed files with 149 additions and 46 deletions
|
@ -30,24 +30,27 @@ class RsVoipPongResult
|
|||
|
||||
struct RsVoipDataChunk
|
||||
{
|
||||
typedef enum { RS_VOIP_DATA_TYPE_AUDIO, RS_VOIP_DATA_TYPE_VIDEO } RsVoipDataType ;
|
||||
|
||||
void *data ; // create/delete using malloc/free.
|
||||
uint32_t size ;
|
||||
RsVoipDataType type ; // video or audio
|
||||
};
|
||||
|
||||
class RsVoip
|
||||
{
|
||||
public:
|
||||
virtual int sendVoipHangUpCall(const RsPeerId& peer_id) = 0;
|
||||
virtual int sendVoipRinging(const RsPeerId& peer_id) = 0;
|
||||
virtual int sendVoipAcceptCall(const RsPeerId& peer_id) = 0;
|
||||
virtual int sendVoipHangUpCall(const RsPeerId& peer_id) = 0;
|
||||
virtual int sendVoipRinging(const RsPeerId& peer_id) = 0;
|
||||
virtual int sendVoipAcceptCall(const RsPeerId& peer_id) = 0;
|
||||
|
||||
// Sending data. The client keeps the memory ownership and must delete it after calling this.
|
||||
virtual int sendVoipData(const RsPeerId& peer_id,const RsVoipDataChunk& chunk) = 0;
|
||||
virtual int sendVoipData(const RsPeerId& peer_id,const RsVoipDataChunk& chunk) = 0;
|
||||
|
||||
// The server fill in the data and gives up memory ownership. The client must delete the memory
|
||||
// in each chunk once it has been used.
|
||||
//
|
||||
virtual bool getIncomingData(const RsPeerId& peer_id,std::vector<RsVoipDataChunk>& chunks) = 0;
|
||||
virtual bool getIncomingData(const RsPeerId& peer_id,std::vector<RsVoipDataChunk>& chunks) = 0;
|
||||
|
||||
typedef enum { AudioTransmitContinous = 0, AudioTransmitVAD = 1, AudioTransmitPushToTalk = 2 } enumAudioTransmit ;
|
||||
|
||||
|
@ -68,7 +71,7 @@ class RsVoip
|
|||
virtual bool getVoipEchoCancel() const = 0 ;
|
||||
virtual void setVoipEchoCancel(bool) = 0 ;
|
||||
|
||||
virtual uint32_t getPongResults(const RsPeerId& id, int n, std::list<RsVoipPongResult> &results) = 0;
|
||||
virtual uint32_t getPongResults(const RsPeerId& id, int n, std::list<RsVoipPongResult> &results) = 0;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue