Skip to content

Commit f90dd2f

Browse files
committed
Modification based on comments
1 parent d31e23b commit f90dd2f

File tree

9 files changed

+295
-282
lines changed

9 files changed

+295
-282
lines changed

pjmedia/include/pjmedia/conference.h

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ typedef enum pjmedia_conf_op_type
117117
/**
118118
* The disconnect ports (stop transmit) operation.
119119
*/
120-
PJMEDIA_CONF_OP_DISCONNECT_PORTS,
120+
PJMEDIA_CONF_OP_DISCONNECT_PORTS
121+
121122
} pjmedia_conf_op_type;
122123

123124
/**
@@ -129,31 +130,37 @@ typedef union pjmedia_conf_op_param
129130
* The information for adding port operation.
130131
*/
131132
struct {
132-
unsigned port;
133+
unsigned port; /**< The port id. */
133134
} add_port;
134135

135136
/**
136137
* The information for removing port operation.
137138
*/
138139
struct {
139-
unsigned port;
140+
unsigned port; /**< The port id. */
140141
} remove_port;
141142

142143
/**
143144
* The information for connecting port operation.
144145
*/
145146
struct {
146-
unsigned src;
147-
unsigned sink;
148-
int adj_level;
147+
unsigned src; /**< The source port id. For multiple port
148+
operation, this will be set to -1. */
149+
unsigned sink; /**< The destination port id. For multiple
150+
port operation, this will be set
151+
to -1. */
152+
int adj_level; /**< The adjustment level. */
149153
} connect_ports;
150154

151155
/**
152156
* The information for disconnecting port operation.
153157
*/
154158
struct {
155-
unsigned src;
156-
unsigned sink;
159+
unsigned src; /**< The source port id. For multiple port
160+
operation, this will be set to -1. */
161+
unsigned sink; /**< The destination port id. For multiple
162+
port operation, this will be set
163+
to -1. */
157164
} disconnect_ports;
158165

159166
} pjmedia_conf_op_param;
@@ -168,10 +175,16 @@ typedef struct pjmedia_conf_op_info
168175
*/
169176
pjmedia_conf_op_type op_type;
170177

178+
/**
179+
* The operation return status.
180+
*/
181+
pj_status_t status;
182+
171183
/**
172184
* The operation data.
173185
*/
174186
pjmedia_conf_op_param op_param;
187+
175188
} pjmedia_conf_op_info;
176189

177190
/**
@@ -278,9 +291,9 @@ PJ_DECL(pj_status_t) pjmedia_conf_destroy( pjmedia_conf *conf );
278291
* completed.
279292
*
280293
* The callback will most likely be called from media threads,
281-
* thus application must not perform heavy processing in this callback.
294+
* thus application must not perform long/blocking processing in this callback.
282295
*
283-
* @param vid_conf The video conference.
296+
* @param conf The conference bridge.
284297
* @param cb Callback to be called.
285298
*
286299
* @return PJ_SUCCESS on success.

pjmedia/include/pjmedia/vid_conf.h

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ typedef enum pjmedia_vid_conf_op_type
7878
* The update port operation.
7979
*/
8080
PJMEDIA_VID_CONF_OP_UPDATE_PORT
81+
8182
} pjmedia_vid_conf_op_type;
8283

8384
/**
@@ -89,37 +90,43 @@ typedef union pjmedia_vid_conf_op_param
8990
* The information for adding port operation.
9091
*/
9192
struct {
92-
unsigned port;
93+
unsigned port; /**< The port id. */
9394
} add_port;
9495

9596
/**
9697
* The information for removing port operation.
9798
*/
9899
struct {
99-
unsigned port;
100+
unsigned port; /**< The port id. */
100101
} remove_port;
101102

102103
/**
103104
* The information for connecting port operation.
104105
*/
105106
struct {
106-
unsigned src;
107-
unsigned sink;
107+
unsigned src; /**< The source port id. For multiple port
108+
operation, this will be set to -1. */
109+
unsigned sink; /**< The destination port id. For multiple
110+
port operation, this will be set
111+
to -1. */
108112
} connect_ports;
109113

110114
/**
111115
* The information for disconnecting port operation.
112116
*/
113117
struct {
114-
unsigned src;
115-
unsigned sink;
118+
unsigned src; /**< The source port id. For multiple port
119+
operation, this will be set to -1. */
120+
unsigned sink; /**< The destination port id. For multiple
121+
port operation, this will be set
122+
to -1. */
116123
} disconnect_ports;
117124

118125
/**
119126
* The information for updating port operation.
120127
*/
121128
struct {
122-
unsigned port;
129+
unsigned port; /**< The port id. */
123130
} update_port;
124131

125132
} pjmedia_vid_conf_op_param;
@@ -134,10 +141,16 @@ typedef struct pjmedia_vid_conf_op_info
134141
*/
135142
pjmedia_vid_conf_op_type op_type;
136143

144+
/**
145+
* The operation return status.
146+
*/
147+
pj_status_t status;
148+
137149
/**
138150
* The operation data.
139151
*/
140152
pjmedia_vid_conf_op_param op_param;
153+
141154
} pjmedia_vid_conf_op_info;
142155

143156
/**
@@ -277,7 +290,7 @@ PJ_DECL(pj_status_t) pjmedia_vid_conf_destroy(pjmedia_vid_conf *vid_conf);
277290
* succesfully completed.
278291
*
279292
* The callback will most likely be called from media threads,
280-
* thus application must not perform heavy processing in this callback.
293+
* thus application must not perform long/blocking processing in this callback.
281294
*
282295
* @param vid_conf The video conference.
283296
* @param cb Callback to be called.

0 commit comments

Comments
 (0)