forked from lynckia/licode
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathOneToManyProcessor.h
79 lines (73 loc) · 2.11 KB
/
OneToManyProcessor.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#ifndef ONETOMANYPROCESSOR_H
#define ONETOMANYPROCESSOR_H
#include <node.h>
#include <OneToManyProcessor.h>
#include <WebRtcConnection.h>
#include "MediaDefinitions.h"
#include "WebRtcConnection.h"
#include "ExternalInput.h"
#include "ExternalOutput.h"
/*
* Wrapper class of erizo::OneToManyProcessor
*
* Represents a OneToMany connection.
* Receives media from one publisher and retransmits it to every subscriber.
*/
class OneToManyProcessor : public MediaSink {
public:
static void Init(v8::Handle<v8::Object> target);
erizo::OneToManyProcessor* me;
private:
OneToManyProcessor();
~OneToManyProcessor();
/*
* Constructor.
* Constructs a OneToManyProcessor
*/
static v8::Handle<v8::Value> New(const v8::Arguments& args);
/*
* Closes the OneToManyProcessor.
* The object cannot be used after this call
*/
static v8::Handle<v8::Value> close(const v8::Arguments& args);
/*
* Sets the Publisher
* Param: the WebRtcConnection of the Publisher
*/
static v8::Handle<v8::Value> setPublisher(const v8::Arguments& args);
/*
* Adds an ExternalOutput
* Param: The ExternalOutput
*/
static v8::Handle<v8::Value> addExternalOutput(const v8::Arguments& args);
/*
* Sets an External Publisher
* Param: the ExternalInput of the Publisher
*/
static v8::Handle<v8::Value> setExternalPublisher(const v8::Arguments& args);
/*
* Gets the Publisher state
* Param: none
*/
static v8::Handle<v8::Value> getPublisherState(const v8::Arguments& args);
/*
* Returns true if OneToManyProcessor has a publisher
*/
static v8::Handle<v8::Value> hasPublisher(const v8::Arguments& args);
/*
* Sets the subscriber
* Param1: the WebRtcConnection of the subscriber
* Param2: an unique Id for the subscriber
*/
static v8::Handle<v8::Value> addSubscriber(const v8::Arguments& args);
/*
* Removes a subscriber given its peer id
* Param: the peerId
*/
static v8::Handle<v8::Value> removeSubscriber(const v8::Arguments& args);
/*
* Ask the publisher to send a FIR packet
*/
static v8::Handle<v8::Value> sendFIR(const v8::Arguments& args);
};
#endif