Debian Codegraph @

addons/ooh323c/src/ooCapability.h

raw symbols SCIP
1 /*
2 * Copyright (C) 2004-2005 by Objective Systems, Inc.
3 *
4 * This software is furnished under an open source license and may be
5 * used and copied only in accordance with the terms of this license.
6 * The text of the license may generally be found in the root
7 * directory of this installation in the COPYING file. It
8 * can also be viewed online at the following URL:
9 *
10 * http://www.obj-sys.com/open/license.html
11 *
12 * Any redistributions of this file including modified versions must
13 * maintain this copyright notice.
14 *
15 *****************************************************************************/
16 /**
17 * @file ooCapability.h
18 * This file contains Capability management functions.
19 */
20 #ifndef OO_CAPABILITY_H_
21 #define OO_CAPABILITY_H_
22 #include "ootypes.h"
23 #include "ooasn1.h"
24
25
26 #define OO_GSMFRAMESIZE 33 /* standard frame size for gsm is 33 bytes */
27
28 #define OORX (1<<0)
29 #define OOTX (1<<1)
30 #define OORXANDTX (1<<2)
31 #define OORXTX (1<<3) /* For symmetric capabilities */
32 /* Various types of caps. Note that not all
33 supported */
34 typedef enum OOCapabilities{
35 OO_CAP_AUDIO_BASE = 0,
36 OO_G726 = 1,
37 OO_G711ALAW64K = 2,
38 OO_G711ALAW56K = 3,
39 OO_G711ULAW64K = 4,
40 OO_G711ULAW56K = 5,
41 OO_G722_64k = 6,
42 OO_G722_56k = 7,
43 OO_G722_48k = 8,
44 OO_G7231 = 9,
45 OO_G728 = 10,
46 OO_G729 = 11,
47 OO_G729A = 12,
48 #if 0
49 OO_IS11172_AUDIO = 13,
50 OO_IS13818_AUDIO = 14,
51 #else
52 OO_AMRNB = 13,
53 OO_G726AAL2 = 14,
54 #endif
55 OO_G729B = 15,
56 OO_G729AB = 16,
57 OO_G7231C = 17,
58 OO_GSMFULLRATE = 18,
59 OO_GSMHALFRATE = 19,
60 OO_GSMENHANCEDFULLRATE = 20,
61 OO_GENERICAUDIO = 21,
62 OO_G729EXT = 22,
63 #if 0
64 OO_AUDIO_VBD = 23,
65 #else
66 OO_SPEEX = 23,
67 #endif
68 OO_AUDIOTELEPHONYEVENT = 24,
69 OO_AUDIO_TONE = 25,
70 OO_EXTELEM1 = 26,
71 OO_CAP_VIDEO_BASE = 27,
72 OO_NONSTDVIDEO = 28,
73 OO_H261VIDEO = 29,
74 OO_H262VIDEO = 30,
75 OO_H263VIDEO = 31,
76 OO_IS11172VIDEO = 32, /* mpeg */
77 OO_GENERICVIDEO = 33,
78 OO_EXTELEMVIDEO = 34,
79 OO_T38 = 35
80 } OOCapabilities;
81
82
83 /*DTMF capabilities*/
84 #define OO_CAP_DTMF_RFC2833 (1<<0)
85 #define OO_CAP_DTMF_Q931 (1<<1)
86 #define OO_CAP_DTMF_H245_alphanumeric (1<<2)
87 #define OO_CAP_DTMF_H245_signal (1<<3)
88 #define OO_CAP_DTMF_CISCO (1<<4)
89
90 /**
91 * This structure defines the preference order for capabilities.
92 *
93 */
94 typedef struct OOCapPrefs {
95 int order[20];
96 int index;
97 }OOCapPrefs;
98
99 typedef struct OOCapParams {
100 int txframes; /*!< Number of frames per packet for transmission */
101 int rxframes; /*!< Number of frames per packet for reception */
102 OOBOOL silenceSuppression;
103 } OOCapParams;
104
105 typedef struct OOGSMCapParams {
106 unsigned txframes;
107 unsigned rxframes;
108 OOBOOL scrambled;
109 OOBOOL comfortNoise;
110 } OOGSMCapParams;
111
112 typedef enum OOPictureFormat{
113 OO_PICFORMAT_SQCIF,
114 OO_PICFORMAT_QCIF,
115 OO_PICFORMAT_CIF,
116 OO_PICFORMAT_CIF4,
117 OO_PICFORMAT_CIF16
118 }OOPictureFormat;
119
120 typedef struct OOH263CapParams {
121 enum OOPictureFormat picFormat; /* !< One of sqcif, qcif, cif, cif4, cif16*/
122 unsigned MPI; /* !< Minimum Picture Interval */
123 unsigned maxBitRate; /* !< Maximum bit rate for transmission/reception in units of 100 bits/sec */
124 } OOH263CapParams;
125
126 struct OOH323CallData;
127 struct OOLogicalChannel;
128
129 #ifdef __cplusplus
130 extern "C" {
131 #endif
132
133 /**
134 * This callback is used for starting media receive channel. This callback
135 * function is triggered when receive media channel has to be started.
136 * @param call Call for which receive media channel has to be started.
137 * @param pChannel Channel details. This structure has important information
138 * such as rtp ip:port and capability describing media type
139 * to be received.
140 * @return OO_OK, on success. OO_FAILED, on failure
141 */
142 typedef int (*cb_StartReceiveChannel)
143 (struct OOH323CallData *call, struct OOLogicalChannel *pChannel);
144
145
146 /**
147 * This callback is used for starting media transmit channel. This callback
148 * function is triggered when transmit media channel has to be started.
149 * @param call Call for which transmit media channel has to be started.
150 * @param pChannel Channel details. This structure has important information
151 * such as rtp ip:port and capability describing media type
152 * to be transmitted.
153 * @return OO_OK, on success. OO_FAILED, on failure
154 */
155 typedef int (*cb_StartTransmitChannel)
156 (struct OOH323CallData *call, struct OOLogicalChannel *pChannel);
157
158 /**
159 * This callback is used for stopping media receive channel. This callback
160 * function is triggered when receive media channel has to be stopped.
161 * @param call Call for which receive media channel has to be stopped.
162 * @param pChannel Channel details. This structure has important information
163 * such as rtp ip:port and capability describing media type
164 * being received.
165 * @return OO_OK, on success. OO_FAILED, on failure
166 */
167 typedef int (*cb_StopReceiveChannel)
168 (struct OOH323CallData *call, struct OOLogicalChannel *pChannel);
169
170 /**
171 * This callback is used for stopping media transmit channel. This callback
172 * function is triggered when transmit media channel has to be stopped.
173 * @param call Call for which transmit media channel has to be stopped.
174 * @param pChannel Channel details. This structure has important information
175 * such as rtp ip:port and capability describing media type
176 * being transmitted.
177 * @return OO_OK, on success. OO_FAILED, on failure
178 */
179 typedef int (*cb_StopTransmitChannel)
180 (struct OOH323CallData *call, struct OOLogicalChannel *pChannel);
181
182 typedef enum OOCapType {
183 OO_CAP_TYPE_AUDIO,
184 OO_CAP_TYPE_VIDEO,
185 OO_CAP_TYPE_DATA
186 } OOCapType;
187
188 /**
189 * Structure to store information related to end point
190 * capability
191 */
192 typedef struct ooH323EpCapability {
193 int dir;
194 int cap;
195 OOCapType capType;
196 void *params;
197 cb_StartReceiveChannel startReceiveChannel;
198 cb_StartTransmitChannel startTransmitChannel;
199 cb_StopReceiveChannel stopReceiveChannel;
200 cb_StopTransmitChannel stopTransmitChannel;
201 struct ooH323EpCapability *next;
202 } ooH323EpCapability;
203
204
205
206
207 #ifndef EXTERN
208 #if defined (MAKE_DLL)
209 #define EXTERN __declspec(dllexport)
210 #else
211 #define EXTERN
212 #endif /* MAKE_DLL */
213 #endif /* EXTERN */
214
215 /**
216 * @defgroup capmgmt Capability Management
217 * @{
218 */
219
220 /**
221 * This function is used to add rfc2833 based dtmf detection capability
222 * @param call Call if enabling for call, else null for
223 * endpoint.
224 * @param dynamicRTPPayloadType dynamicRTPPayloadType to be used.
225 * @return OO_OK, on success. OO_FAILED, on failure.
226 */
227 EXTERN int ooCapabilityEnableDTMFRFC2833
228 (struct OOH323CallData *call, int dynamicRTPPayloadType);
229
230 /**
231 * This function is used to remove rfc2833 dtmf detection capability.
232 * @param call Handle to call, if disabling for the call, else NULL
233 * for end-point.
234 * @return OO_OK, on success. OO_FAILED, on failure.
235 */
236 EXTERN int ooCapabilityDisableDTMFRFC2833(struct OOH323CallData *call);
237
238
239 /**
240 * This function is used to enable support for H.245 based alphanumeric dtmf
241 * capability.
242 * @param call Handle to call, if enabling for the call, else NULL
243 * for end-point.
244 * @return OO_OK, on success. OO_FAILED, on failure.
245 */
246 EXTERN int ooCapabilityEnableDTMFH245Alphanumeric(struct OOH323CallData *call);
247
248 /**
249 * This function is used to disable support for H.245 based alphanumeric dtmf
250 * capability.
251 * @param call Handle to call, if disabling for the call, else NULL
252 * for end-point.
253 * @return OO_OK, on success. OO_FAILED, on failure.
254 */
255 EXTERN int ooCapabilityDisableDTMFH245Alphanumeric
256 (struct OOH323CallData *call);
257
258 /**
259 * This function is used to enable support for H.245 based signal dtmf
260 * capability.
261 * @param call Handle to call, if enabling for the call, else NULL
262 * for end-point.
263 * @return OO_OK, on success. OO_FAILED, on failure.
264 */
265 EXTERN int ooCapabilityEnableDTMFH245Signal(struct OOH323CallData *call);
266
267 /**
268 * This function is used to disable support for H.245 based signal dtmf
269 * capability.
270 * @param call Handle to call, if disabling for the call, else NULL
271 * for end-point.
272 * @return OO_OK, on success. OO_FAILED, on failure.
273 */
274 EXTERN int ooCapabilityDisableDTMFH245Signal(struct OOH323CallData *call);
275
276 /**
277 * This function is used to enable support for dtmf using Q.931 Keypad IE.
278 * @param call Handle to call, if enabling for the call, else NULL
279 * for end-point.
280 * @return OO_OK, on success. OO_FAILED, on failure.
281 */
282 EXTERN int ooCapabilityEnableDTMFQ931Keypad(struct OOH323CallData *call);
283
284 /**
285 * This function is used to disable support for dtmf using Q.931 Keypad IE.
286 * @param call Handle to call, if disabling for the call, else NULL
287 * for end-point.
288 * @return OO_OK, on success. OO_FAILED, on failure.
289 */
290 EXTERN int ooCapabilityDisableDTMFQ931Keypad(struct OOH323CallData *call);
291
292 /**
293 * This function is used to add simple capabilities which have only rxframes
294 * and txframes parameters to the endpoint or call.(ex. G711, G728, G723.1,
295 * G729)
296 * @param call Handle to a call. If this is not Null, then
297 * capability is added to call's remote endpoint
298 * capability list, else it is added to local H323
299 * endpoint list.
300 * @param cap Type of G711 capability to be added.
301 * @param txframes Number of frames per packet for transmission.
302 * @param rxframes Number of frames per packet for reception.
303 * @param silenceSuppression Indicates support for silence suppression.
304 * Used only in case of g7231, otherwise ignored.
305 * @param dir Direction of capability.OORX, OOTX, OORXANDTX
306 * @param startReceiveChannel Callback function to start receive channel.
307 * @param startTransmitChannel Callback function to start transmit channel.
308 * @param stopReceiveChannel Callback function to stop receive channel.
309 * @param stopTransmitChannel Callback function to stop transmit channel.
310 * @param remote TRUE, if adding call's remote capability.
311 *
312 * @return OO_OK, on success. OO_FAILED, on failure.
313 */
314 EXTERN int ooCapabilityAddSimpleCapability
315 (struct OOH323CallData *call, int cap, int txframes, int rxframes,
316 OOBOOL silenceSuppression, int dir,
317 cb_StartReceiveChannel startReceiveChannel,
318 cb_StartTransmitChannel startTransmitChannel,
319 cb_StopReceiveChannel stopReceiveChannel,
320 cb_StopTransmitChannel stopTransmitChannel,
321 OOBOOL remote);
322
323
324 /**
325 * This is an internal helper function which is used to add a GSM capability
326 * to local endpoints capability list or to remote endpoints capability list or
327 * to a call's capability list.
328 * @param call Handle to a call. If this is not Null, then
329 * capability is added to call's remote endpoint
330 * capability list, else it is added to local H323
331 * endpoint list.
332 * @param cap Type of GSM capability to be added.
333 * @param framesPerPkt Number of GSM frames per packet.
334 * @param comfortNoise Comfort noise spec for the capability.
335 * @param scrambled Scrambled enabled/disabled for the capability.
336 * @param dir Direction of capability.OORX, OOTX, OORXANDTX
337 * @param startReceiveChannel Callback function to start receive channel.
338 * @param startTransmitChannel Callback function to start transmit channel.
339 * @param stopReceiveChannel Callback function to stop receive channel.
340 * @param stopTransmitChannel Callback function to stop transmit channel.
341 * @param remote TRUE, if adding call's remote capabilities.
342 *
343 * @return OO_OK, on success. OO_FAILED, on failure.
344 */
345 int ooCapabilityAddGSMCapability(struct OOH323CallData *call, int cap,
346 unsigned framesPerPkt, OOBOOL comfortNoise,
347 OOBOOL scrambled, int dir,
348 cb_StartReceiveChannel startReceiveChannel,
349 cb_StartTransmitChannel startTransmitChannel,
350 cb_StopReceiveChannel stopReceiveChannel,
351 cb_StopTransmitChannel stopTransmitChannel,
352 OOBOOL remote);
353
354
355 /**
356 * This function is used to add H263 video capability to local endpoints
357 * capability list or to remote endpoints capability list or to a call's
358 * capability list.
359 * @param call Handle to a call. If this is not Null, then
360 * capability is added to call's remote endpoint
361 * capability list, else it is added to local H323
362 * endpoint list.
363 * @param sqcifMPI Minimum picture interval for encoding/decoding
364 * of SQCIF pictures.
365 * @param qcifMPI Minimum picture interval for encoding/decoding
366 * of QCIF pictures.
367 * @param cifMPI Minimum picture interval for encoding/decoding
368 * of CIF pictures.
369 * @param cif4MPI Minimum picture interval for encoding/decoding
370 * of CIF4 pictures.
371 * @param cif16MPI Minimum picture interval for encoding/decoding
372 * of CIF16 pictures.
373 * @param maxBitRate Maximum bit rate in units of 100 bits/s at
374 * which a transmitter can transmit video or a
375 * receiver can receive video.
376 * @param dir Direction of capability.OORX, OOTX, OORXANDTX
377 * @param startReceiveChannel Callback function to start receive channel.
378 * @param startTransmitChannel Callback function to start transmit channel.
379 * @param stopReceiveChannel Callback function to stop receive channel.
380 * @param stopTransmitChannel Callback function to stop transmit channel.
381 * @param remote TRUE, if adding call's remote capabilities.
382 *
383 * @return OO_OK, on success. OO_FAILED, on failure.
384 */
385 EXTERN int ooCapabilityAddH263VideoCapability(struct OOH323CallData *call,
386 unsigned sqcifMPI, unsigned qcifMPI,
387 unsigned cifMPI, unsigned cif4MPI,
388 unsigned cif16MPI, unsigned maxBitRate, int dir,
389 cb_StartReceiveChannel startReceiveChannel,
390 cb_StartTransmitChannel startTransmitChannel,
391 cb_StopReceiveChannel stopReceiveChannel,
392 cb_StopTransmitChannel stopTransmitChannel,
393 OOBOOL remote);
394
395
396 /**
397 * This function is an helper function to ooCapabilityAddH263VideoCapability.
398 * @param call Handle to a call. If this is not Null, then
399 * capability is added to call's remote endpoint
400 * capability list, else it is added to local H323
401 * endpoint list.
402 * @param sqcifMPI Minimum picture interval for encoding/decoding
403 * of SQCIF pictures.
404 * @param qcifMPI Minimum picture interval for encoding/decoding
405 * of QCIF pictures.
406 * @param cifMPI Minimum picture interval for encoding/decoding
407 * of CIF pictures.
408 * @param cif4MPI Minimum picture interval for encoding/decoding
409 * of CIF4 pictures.
410 * @param cif16MPI Minimum picture interval for encoding/decoding
411 * of CIF16 pictures.
412 * @param maxBitRate Maximum bit rate in units of 100 bits/s at
413 * which a transmitter can transmit video or a
414 * receiver can receive video.
415 * @param dir Direction of capability.OORX, OOTX, OORXANDTX
416 * @param startReceiveChannel Callback function to start receive channel.
417 * @param startTransmitChannel Callback function to start transmit channel.
418 * @param stopReceiveChannel Callback function to stop receive channel.
419 * @param stopTransmitChannel Callback function to stop transmit channel.
420 * @param remote TRUE, if adding call's remote capabilities.
421 *
422 * @return OO_OK, on success. OO_FAILED, on failure.
423 */
424 int ooCapabilityAddH263VideoCapability_helper(struct OOH323CallData *call,
425 unsigned sqcifMPI, unsigned qcifMPI,
426 unsigned cifMPI, unsigned cif4MPI,
427 unsigned cif16MPI, unsigned maxBitRate, int dir,
428 cb_StartReceiveChannel startReceiveChannel,
429 cb_StartTransmitChannel startTransmitChannel,
430 cb_StopReceiveChannel stopReceiveChannel,
431 cb_StopTransmitChannel stopTransmitChannel,
432 OOBOOL remote);
433
434 /**
435 * This function is used to add a audio capability to calls remote
436 * capability list.
437 * @param call Handle to the call.
438 * @param audioCap Handle to the remote endpoint's audio capability.
439 * @param dir Direction in which capability is supported by
440 * remote endpoint.
441 *
442 * @return OO_OK, on success. OO_FAILED, otherwise.
443 */
444 int ooAddRemoteAudioCapability(struct OOH323CallData *call,
445 H245AudioCapability *audioCap, int dir);
446
447
448 /**
449 * This function is used to add a capability to call's remote capability list.
450 * The capabilities to be added are extracted from received TCS message.
451 * @param call Handle to the call.
452 * @param cap Handle to the remote endpoint's H245 capability.
453 *
454 * @return OO_OK, on success. OO_FAILED, otherwise.
455 */
456 int ooAddRemoteCapability(struct OOH323CallData *call, H245Capability *cap);
457
458 /**
459 * This function is used to update joint capabilities for call. It checks
460 * whether remote capability can be supported by local capabilities for the
461 * call and if supported makes entry into the joint capability list for the
462 * call.
463 * @param call Handle to the call
464 * @param cap Remote cap which will be tested for compatibility.
465 *
466 * @return returns OO_OK, if updated else OO_FAILED;
467 */
468 EXTERN int ooCapabilityUpdateJointCapabilities
469 (struct OOH323CallData* call, H245Capability *cap);
470
471
472 /**
473 * This function is used to update joint video capabilities for call. It checks
474 * whether remote capability can be supported by local capabilities for the
475 * call and if supported makes entry into the joint capability list for the
476 * call.
477 * @param call Handle to the call
478 * @param videoCap Remote video capability which will be tested for
479 * compatibility.
480 * @param dir Direction of the capability
481 *
482 * @return returns OO_OK, if updated else OO_FAILED;
483 */
484 EXTERN int ooCapabilityUpdateJointCapabilitiesVideo
485 (struct OOH323CallData *call, H245VideoCapability *videoCap, int dir);
486
487
488 /**
489 * This function is used to update joint video H263 capabilities for call. It
490 * checks whether remote capability can be supported by local capabilities for
491 * the call and if supported makes entry into the joint capability list for the
492 * call.
493 * @param call Handle to the call
494 * @param pH263Cap Remote H263 video capability which will be tested for
495 * compatibility.
496 * @param dir Direction of the H263 capability
497 *
498 * @return returns OO_OK, if updated else OO_FAILED;
499 */
500 EXTERN int ooCapabilityUpdateJointCapabilitiesVideoH263
501 (struct OOH323CallData *call, H245H263VideoCapability *pH263Cap, int dir);
502
503
504 /**
505 * This function is used to test whether the endpoint capability in the
506 * specified direction can be supported by the audio capability.
507 * @param call Handle to the call.
508 * @param epCap Endpoint capability.
509 * @param dataType Data type with which compatibility has to
510 * be tested.
511 * @param dir Direction indicating whether endpoint capability
512 * will be used for transmission or reception.
513 *
514 * @return TRUE, if compatible. FALSE, otherwise.
515 */
516
517 ASN1BOOL ooCapabilityCheckCompatibility(struct OOH323CallData *call,
518 ooH323EpCapability *epCap,
519 H245DataType *dataType, int dir);
520
521
522 /**
523 * This function is used to create a audio capability structure using the
524 * capability type.
525 * @param epCap Capability.
526 * @param pctxt Handle to OOCTXT which will be used to allocate memory
527 * for new audio capability.
528 * @param dir Direction in which the newly created capability will be
529 * used.
530 *
531 * @return Newly created audio capability on success, NULL on
532 * failure.
533 */
534 struct H245AudioCapability* ooCapabilityCreateAudioCapability
535 (ooH323EpCapability* epCap, OOCTXT *pctxt, int dir);
536
537 /**
538 * This function is used to create a video capability structure using the
539 * capability type.
540 * @param epCap Capability.
541 * @param pctxt Handle to OOCTXT which will be used to allocate memory
542 * for new video capability.
543 * @param dir Direction in which the newly created capability will be
544 * used.
545 *
546 * @return Newly created video capability on success, NULL on
547 * failure.
548 */
549 struct H245VideoCapability* ooCapabilityCreateVideoCapability
550 (ooH323EpCapability *epCap, OOCTXT *pctxt, int dir);
551
552
553 /**
554 * This function is used to create a dtmf capability which can be added to
555 * a TCS message.
556 * @param cap Type of dtmf capability to be created.
557 * @param pctxt Pointer to OOCTXT structure to be used for memory
558 * allocation.
559 *
560 * @return Pointer to the created DTMF capability, NULL in case of
561 * failure.
562 */
563 void * ooCapabilityCreateDTMFCapability(int cap, int dtmfcodec, OOCTXT *pctxt);
564
565
566 /**
567 * This function is used to create a GSM Full Rate capability structure.
568 * @param epCap Handle to the endpoint capability.
569 * @param pctxt Handle to OOCTXT which will be used to allocate memory
570 * for new audio capability.
571 * @param dir Direction for the newly created capability.
572 *
573 * @return Newly created audio capability on success, NULL on
574 * failure.
575 */
576 struct H245AudioCapability* ooCapabilityCreateGSMFullRateCapability
577 (ooH323EpCapability *epCap, OOCTXT* pctxt, int dir);
578
579 /**
580 * This function is used to create a simple(g711, g728, g723.1, g729) audio
581 * capability structure.
582 *
583 * @param epCap Handle to the endpoint capability
584 * @param pctxt Handle to OOCTXT which will be used to allocate memory
585 * for new audio capability.
586 * @param dir Direction in which the newly created capability will be
587 * used.
588 *
589 * @return Newly created audio capability on success, NULL on
590 * failure.
591 */
592 struct H245AudioCapability* ooCapabilityCreateSimpleCapability
593 (ooH323EpCapability *epCap, OOCTXT* pctxt, int dir);
594 struct H245AudioCapability* ooCapabilityCreateNonStandardCapability
595 (ooH323EpCapability *epCap, OOCTXT* pctxt, int dir);
596
597
598 /**
599 * This function is used to create a H263 video capability
600 * structure.
601 * @param epCap Handle to the endpoint capability
602 * @param pctxt Handle to OOCTXT which will be used to allocate memory
603 * for new video capability.
604 * @param dir Direction in which the newly created capability will be
605 * used.
606 *
607 * @return Newly created video capability on success, NULL on
608 * failure.
609 */
610 struct H245VideoCapability* ooCapabilityCreateH263VideoCapability
611 (ooH323EpCapability *epCap, OOCTXT* pctxt, int dir);
612
613
614 /**
615 * This function is used to determine whether a particular capability
616 * can be supported by the endpoint.
617 * @param call Handle to the call.
618 * @param audioCap Handle to the audio capability.
619 * @param dir Direction in which support is desired.
620 *
621 * @return Handle to the copyof capability which supports audioCap,
622 * Null if none found
623 */
624 ooH323EpCapability* ooIsAudioDataTypeSupported
625 (struct OOH323CallData *call, H245AudioCapability* audioCap, int dir);
626
627 /**
628 * This function is used to determine whether a particular video capability
629 * can be supported by the endpoint.
630 * @param call Handle to the call.
631 * @param pVideoCap Handle to the video capability.
632 * @param dir Direction in which support is desired.
633 *
634 * @return Handle to the copy of capability which supports video
635 * capability, Null if none found
636 */
637 ooH323EpCapability* ooIsVideoDataTypeSupported
638 (struct OOH323CallData *call, H245VideoCapability* pVideoCap, int dir);
639
640 /**
641 * This function is used to determine whether a particular H263 capability
642 * can be supported by the endpoint.
643 * @param call Handle to the call.
644 * @param pH263Cap Handle to the H263 video capability.
645 * @param dir Direction in which support is desired.
646 * @param picFormat Picture type(cif, qcif etc.)
647 *
648 * @return Handle to the copy of capability which supports H263
649 * capability, Null if none found
650 */
651 ooH323EpCapability* ooIsVideoDataTypeH263Supported
652 (struct OOH323CallData *call, H245H263VideoCapability* pH263Cap, int dir,
653 OOPictureFormat picFormat);
654
655 /**
656 * This function is used to determine whether a particular capability type
657 * can be supported by the endpoint.
658 * @param call Handle to the call.
659 * @param data Handle to the capability type.
660 * @param dir Direction in which support is desired.
661 *
662 * @return Handle to the copy of capability which supports specified
663 * capability type, Null if none found
664 */
665 ooH323EpCapability* ooIsDataTypeSupported
666 (struct OOH323CallData *call, H245DataType *data, int dir);
667
668 /* fill t.38 application data */
669 H245DataMode_application* ooCreateT38ApplicationData
670 (OOCTXT* pctxt, H245DataMode_application *app);
671
672 H245DataApplicationCapability* ooCapabilityCreateT38Capability
673 (ooH323EpCapability *epCap, OOCTXT* pctxt, int dir);
674
675
676 /**
677 * This function is used to clear the capability preference order.
678 * @param call Handle to call, if capability preference order for call
679 * has to be cleared, NULL for endpoint.
680 *
681 * @return OO_OK, on success. OO_FAILED, on failure
682 */
683 EXTERN int ooResetCapPrefs(struct OOH323CallData *call);
684
685 /**
686 * This function is used to remove a particular capability from preference
687 * list.
688 * @param call Handle to call, if call's preference list has to be modified
689 * else NULL, to modify endpoint's preference list.
690 * @param cap Capability to be removed
691 *
692 * @return OO_OK, on success. OO_FAILED, otherwise.
693 */
694 EXTERN int ooRemoveCapFromCapPrefs(struct OOH323CallData *call, int cap);
695
696 /**
697 * This function is used to append a particular capability to preference
698 * list.
699 * @param call Handle to call, if call's preference list has to be modified
700 * else NULL, to modify endpoint's preference list.
701 * @param cap Capability to be appended.
702 *
703 * @return OO_OK, on success. OO_FAILED, otherwise.
704 */
705 EXTERN int ooAppendCapToCapPrefs(struct OOH323CallData *call, int cap);
706
707 /**
708 * This function is used to change preference order of a particular capability
709 * in the preference list.
710 * @param call Handle to call, if call's preference list has to be modified
711 * else NULL, to modify endpoint's preference list.
712 * @param cap Capability concerned
713 * @param pos New position in the preference order
714 *
715 * @return OO_OK, on success. OO_FAILED, otherwise.
716 */
717 EXTERN int ooChangeCapPrefOrder(struct OOH323CallData *call, int cap, int pos);
718
719 /**
720 * This function is used to prepend a particular capability to preference
721 * list.
722 * @param call Handle to call, if call's preference list has to be modified
723 * else NULL, to modify endpoint's preference list.
724 * @param cap Capability to be prepended.
725 *
726 * @return OO_OK, on success. OO_FAILED, otherwise.
727 */
728 EXTERN int ooPreppendCapToCapPrefs(struct OOH323CallData *call, int cap);
729
730 /**
731 * This function is used to retrieve the text description for a capability
732 * type.
733 * @param cap Capability
734 * @return The text description string.
735 */
736 EXTERN const char* ooGetCapTypeText (OOCapabilities cap);
737
738
739 EXTERN int epCapIsPreferred(struct OOH323CallData *call, ooH323EpCapability *epCap);
740
741 /**/
742 ASN1BOOL ooCapabilityCheckCompatibility_Simple
743 (struct OOH323CallData *call, ooH323EpCapability* epCap,
744 H245AudioCapability* audioCap, int dir);
745 ASN1BOOL ooCapabilityCheckCompatibility_NonStandard
746 (struct OOH323CallData *call, ooH323EpCapability* epCap,
747 H245AudioCapability* audioCap, int dir);
748 OOBOOL ooCapabilityCheckCompatibility_GSM
749 (struct OOH323CallData *call, ooH323EpCapability* epCap,
750 H245AudioCapability* audioCap, int dir);
751 OOBOOL ooCapabilityCheckCompatibility_T38
752 (struct OOH323CallData *call, ooH323EpCapability* epCap,
753 H245DataApplicationCapability* t38Cap, int dir);
754 OOBOOL ooCapabilityCheckCompatibility_H263Video
755 (struct OOH323CallData *call, ooH323EpCapability *epCap,
756 H245VideoCapability *pVideoCap, int dir);
757 OOBOOL ooCapabilityCheckCompatibility_Audio
758 (struct OOH323CallData *call, ooH323EpCapability* epCap,
759 H245AudioCapability* audioCap, int dir);
760 OOBOOL ooCapabilityCheckCompatibility_Video
761 (struct OOH323CallData *call, ooH323EpCapability* epCap,
762 H245VideoCapability* videoCap, int dir);
763 ooH323EpCapability* ooIsAudioDataTypeGSMSupported
764 (struct OOH323CallData *call, H245AudioCapability* audioCap, int dir);
765 ooH323EpCapability* ooIsAudioDataTypeSimpleSupported
766 (struct OOH323CallData *call, H245AudioCapability* audioCap, int dir);
767 ooH323EpCapability* ooIsT38Supported
768 (struct OOH323CallData *call, H245DataApplicationCapability* t38Cap, int dir);
769 ooH323EpCapability* ooIsAudioDataTypeNonStandardSupported
770 (struct OOH323CallData *call, H245AudioCapability* audioCap, int dir);
771 int ooAddRemoteDataApplicationCapability(struct OOH323CallData *call,
772 H245DataApplicationCapability *dataCap,
773 int dir);
774 int ooCapabilityEnableDTMFCISCO
775 (struct OOH323CallData *call, int dynamicRTPPayloadType);
776 int ooCapabilityDisableDTMFCISCO(struct OOH323CallData *call);
777 int ooCapabilityAddT38Capability
778 (struct OOH323CallData *call, int cap, int dir,
779 cb_StartReceiveChannel startReceiveChannel,
780 cb_StartTransmitChannel startTransmitChannel,
781 cb_StopReceiveChannel stopReceiveChannel,
782 cb_StopTransmitChannel stopTransmitChannel,
783 OOBOOL remote);
784
785
786 /**/
787
788
789 /**
790 * @}
791 */
792 #ifdef __cplusplus
793 }
794 #endif
795
796 #endif