Statistics
| Branch: | Revision:

peerstreamer-src / src / janus_instance.h @ 3af4c8d7

History | View | Annotate | Download (2.09 KB)

1
/*******************************************************************
2
* PeerStreamer-ng is a P2P video streaming application exposing a ReST
3
* interface.
4
* Copyright (C) 2017 Luca Baldesi <luca.baldesi@unitn.it>
5
*
6
* This program is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU Affero General Public License as published by
8
* the Free Software Foundation, either version 3 of the License, or
9
* (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
* GNU Affero General Public License for more details.
15
*
16
* You should have received a copy of the GNU Affero General Public License
17
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
*******************************************************************/
19

    
20
#ifndef __JANUS_INSTANCE_H__
21
#define __JANUS_INSTANCE_H__
22

    
23
#include<stdint.h>
24
#include<mongoose.h>
25
#include<task_manager.h>
26
#include<streamer_creation_callback.h>
27

    
28
struct janus_instance;
29
struct streamer_creation_callback;
30

    
31
struct janus_instance * janus_instance_create(struct mg_mgr *mongoose_srv, struct task_manager *tm, const char *config);
32

    
33
void janus_instance_destroy(struct janus_instance ** ji);
34

    
35
/*Returns 0 on success*/
36
int8_t janus_instance_launch(struct janus_instance * ji);
37

    
38
int8_t janus_instance_create_streaming_point(struct janus_instance const * janus, uint64_t *mp_id, uint16_t audio_port, uint16_t video_port, struct streamer_creation_callback *scc);
39

    
40
int8_t janus_instance_destroy_streaming_point(struct janus_instance const * janus, uint64_t mp_id);
41

    
42
int8_t janus_instance_create_videoroom(struct janus_instance const * janus, const char * room_id, struct streamer_creation_callback *scc);
43

    
44
int8_t janus_instance_destroy_videoroom(struct janus_instance const * janus, const char * room_id);
45

    
46
int8_t janus_instance_forward_rtp(struct janus_instance const * janus, const char * room_id, uint64_t participant_id, const char * rtp_ip, uint16_t audio_port, uint16_t video_port);
47

    
48
#endif