Objective Systems, Inc.  

ooCapability.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2004-2009 by Objective Systems, Inc.
00003  *
00004  * This software is furnished under an open source license and may be
00005  * used and copied only in accordance with the terms of this license.
00006  * The text of the license may generally be found in the root
00007  * directory of this installation in the COPYING file.  It
00008  * can also be viewed online at the following URL:
00009  *
00010  *   http://www.obj-sys.com/open/license.html
00011  *
00012  * Any redistributions of this file including modified versions must
00013  * maintain this copyright notice.
00014  *
00015  *****************************************************************************/
00020 #ifndef OO_CAPABILITY_H_
00021 #define OO_CAPABILITY_H_
00022 #include "ootypes.h"
00023 #include "ooasn1.h"
00024 
00025 
00026 #define OO_GSMFRAMESIZE 33 /* standard frame size for gsm is 33 bytes */
00027 
00028 #define OORX      (1<<0)
00029 #define OOTX      (1<<1)
00030 #define OORXANDTX (1<<2)
00031 #define OORXTX    (1<<3) /* For symmetric capabilities */
00032 /* Various types of caps. Note that not all
00033    supported */
00034 typedef enum OOCapabilities{
00035    OO_CAP_AUDIO_BASE      = 0,
00036    OO_G711ALAW64K         = 2,
00037    OO_G711ALAW56K         = 3,
00038    OO_G711ULAW64K         = 4,
00039    OO_G711ULAW56K         = 5,
00040    OO_G722_64k            = 6,
00041    OO_G722_56k            = 7,
00042    OO_G722_48k            = 8,
00043    OO_G7231               = 9,
00044    OO_G728                = 10,
00045    OO_G729                = 11,
00046    OO_G729A               = 12,
00047    OO_IS11172_AUDIO       = 13,
00048    OO_IS13818_AUDIO       = 14,
00049    OO_G729B               = 15,
00050    OO_G729AB              = 16,
00051    OO_G7231C              = 17,
00052    OO_GSMFULLRATE         = 18,
00053    OO_GSMHALFRATE         = 19,
00054    OO_GSMENHANCEDFULLRATE = 20,
00055    OO_GENERICAUDIO        = 21,
00056    OO_G729EXT             = 22,
00057    OO_AUDIO_VBD           = 23,
00058    OO_AUDIOTELEPHONYEVENT = 24,
00059    OO_AUDIO_TONE          = 25,
00060    OO_EXTELEM1            = 26,
00061    OO_CAP_VIDEO_BASE      = 27,
00062    OO_NONSTDVIDEO         = 28,
00063    OO_H261VIDEO           = 29,
00064    OO_H262VIDEO           = 30,
00065    OO_H263VIDEO           = 31,
00066    OO_IS11172VIDEO        = 32,  /* mpeg */
00067    OO_GENERICVIDEO        = 33,
00068    OO_EXTELEMVIDEO        = 34
00069 } OOCapabilities;
00070 
00071 
00072 /*DTMF capabilities*/
00073 #define OO_CAP_DTMF_RFC2833              (1<<0)
00074 #define OO_CAP_DTMF_Q931                 (1<<1)
00075 #define OO_CAP_DTMF_H245_alphanumeric    (1<<2)
00076 #define OO_CAP_DTMF_H245_signal          (1<<3)
00077 
00082 typedef struct OOCapPrefs {
00083   int order[20];
00084   int index;
00085 }OOCapPrefs;
00086 
00087 typedef struct OOCapParams {
00088    int txframes;  
00089    int rxframes;  
00090    OOBOOL silenceSuppression;
00091 } OOCapParams;
00092 
00093 typedef struct OOGSMCapParams {
00094    unsigned txframes;
00095    unsigned rxframes;
00096    OOBOOL scrambled;
00097    OOBOOL comfortNoise;
00098 } OOGSMCapParams;
00099 
00100 typedef enum OOPictureFormat{
00101    OO_PICFORMAT_SQCIF,
00102    OO_PICFORMAT_QCIF,
00103    OO_PICFORMAT_CIF,
00104    OO_PICFORMAT_CIF4,
00105    OO_PICFORMAT_CIF16
00106 }OOPictureFormat;
00107 
00108 typedef struct OOH263CapParams {
00109    enum OOPictureFormat picFormat; /* !< One of sqcif, qcif, cif, cif4, cif16*/
00110    unsigned MPI; /* !< Minimum Picture Interval */
00111   unsigned maxBitRate; /* !< Maximum bit rate for transmission/reception in units of 100 bits/sec */
00112 } OOH263CapParams;
00113 
00114 struct OOH323CallData;
00115 struct OOLogicalChannel;
00116 
00117 #ifdef __cplusplus
00118 extern "C" {
00119 #endif
00120 
00130 typedef int (*cb_StartReceiveChannel)
00131      (struct OOH323CallData *call, struct OOLogicalChannel *pChannel);
00132 
00133 
00143 typedef int (*cb_StartTransmitChannel)
00144      (struct OOH323CallData *call, struct OOLogicalChannel *pChannel);
00145 
00155 typedef int (*cb_StopReceiveChannel)
00156      (struct OOH323CallData *call, struct OOLogicalChannel *pChannel);
00157 
00167 typedef int (*cb_StopTransmitChannel)
00168      (struct OOH323CallData *call, struct OOLogicalChannel *pChannel);
00169 
00170 typedef enum OOCapType {
00171    OO_CAP_TYPE_AUDIO,
00172    OO_CAP_TYPE_VIDEO,
00173    OO_CAP_TYPE_DATA
00174 } OOCapType;
00175 
00180 typedef struct ooH323EpCapability {
00181    int dir;
00182    int cap;
00183    OOCapType capType;
00184    void *params;
00185    cb_StartReceiveChannel startReceiveChannel;
00186    cb_StartTransmitChannel startTransmitChannel;
00187    cb_StopReceiveChannel stopReceiveChannel;
00188    cb_StopTransmitChannel stopTransmitChannel;
00189    struct ooH323EpCapability *next;
00190 } ooH323EpCapability;
00191 
00192 
00193 
00194 
00195 #ifndef EXTERN
00196 #if defined (MAKE_DLL)
00197 #define EXTERN __declspec(dllexport)
00198 #else
00199 #define EXTERN
00200 #endif /* MAKE_DLL */
00201 #endif /* EXTERN */
00202 
00215 EXTERN int ooCapabilityEnableDTMFRFC2833
00216    (struct OOH323CallData *call, int dynamicRTPPayloadType);
00217 
00224 EXTERN int ooCapabilityDisableDTMFRFC2833(struct OOH323CallData *call);
00225 
00226 
00234 EXTERN int ooCapabilityEnableDTMFH245Alphanumeric(struct OOH323CallData *call);
00235 
00243 EXTERN int ooCapabilityDisableDTMFH245Alphanumeric
00244                                              (struct OOH323CallData *call);
00245 
00253 EXTERN int ooCapabilityEnableDTMFH245Signal(struct OOH323CallData *call);
00254 
00262 EXTERN int ooCapabilityDisableDTMFH245Signal(struct OOH323CallData *call);
00263 
00270 EXTERN int ooCapabilityEnableDTMFQ931Keypad(struct OOH323CallData *call);
00271 
00278 EXTERN int ooCapabilityDisableDTMFQ931Keypad(struct OOH323CallData *call);
00279 
00302 EXTERN int ooCapabilityAddSimpleCapability
00303    (struct OOH323CallData *call, int cap, int txframes, int rxframes,
00304     OOBOOL silenceSuppression, int dir,
00305     cb_StartReceiveChannel startReceiveChannel,
00306     cb_StartTransmitChannel startTransmitChannel,
00307     cb_StopReceiveChannel stopReceiveChannel,
00308     cb_StopTransmitChannel stopTransmitChannel,
00309     OOBOOL remote);
00310 
00311 
00333 int ooCapabilityAddGSMCapability(struct OOH323CallData *call, int cap,
00334                                 unsigned framesPerPkt, OOBOOL comfortNoise,
00335                                 OOBOOL scrambled, int dir,
00336                                 cb_StartReceiveChannel startReceiveChannel,
00337                                 cb_StartTransmitChannel startTransmitChannel,
00338                                 cb_StopReceiveChannel stopReceiveChannel,
00339                                 cb_StopTransmitChannel stopTransmitChannel,
00340                                 OOBOOL remote);
00341 
00342 
00373 EXTERN int ooCapabilityAddH263VideoCapability(struct OOH323CallData *call,
00374                                unsigned sqcifMPI, unsigned qcifMPI,
00375                                unsigned cifMPI, unsigned cif4MPI,
00376                                unsigned cif16MPI, unsigned maxBitRate, int dir,
00377                                cb_StartReceiveChannel startReceiveChannel,
00378                                cb_StartTransmitChannel startTransmitChannel,
00379                                cb_StopReceiveChannel stopReceiveChannel,
00380                                cb_StopTransmitChannel stopTransmitChannel,
00381                                OOBOOL remote);
00382 
00383 
00412 int ooCapabilityAddH263VideoCapability_helper(struct OOH323CallData *call,
00413                               unsigned sqcifMPI, unsigned qcifMPI,
00414                               unsigned cifMPI, unsigned cif4MPI,
00415                               unsigned cif16MPI, unsigned maxBitRate, int dir,
00416                               cb_StartReceiveChannel startReceiveChannel,
00417                               cb_StartTransmitChannel startTransmitChannel,
00418                               cb_StopReceiveChannel stopReceiveChannel,
00419                               cb_StopTransmitChannel stopTransmitChannel,
00420                               OOBOOL remote);
00421 
00432 int ooAddRemoteAudioCapability(struct OOH323CallData *call,
00433                                H245AudioCapability *audioCap, int dir);
00434 
00435 
00444 int ooAddRemoteCapability(struct OOH323CallData *call, H245Capability *cap);
00445 
00456 EXTERN int ooCapabilityUpdateJointCapabilities
00457    (struct OOH323CallData* call, H245Capability *cap);
00458 
00459 
00472 EXTERN int ooCapabilityUpdateJointCapabilitiesVideo
00473    (struct OOH323CallData *call, H245VideoCapability *videoCap, int dir);
00474 
00475 
00488 EXTERN int ooCapabilityUpdateJointCapabilitiesVideoH263
00489    (struct OOH323CallData *call, H245H263VideoCapability *pH263Cap, int dir);
00490 
00491 
00505 ASN1BOOL ooCapabilityCheckCompatibility(struct OOH323CallData *call,
00506                                         ooH323EpCapability *epCap,
00507                                         H245DataType *dataType, int dir);
00508 
00509 
00522 struct H245AudioCapability* ooCapabilityCreateAudioCapability
00523 (ooH323EpCapability* epCap, OOCTXT *pctxt, int dir);
00524 
00537 struct H245VideoCapability* ooCapabilityCreateVideoCapability
00538    (ooH323EpCapability *epCap, OOCTXT *pctxt, int dir);
00539 
00540 
00551 void * ooCapabilityCreateDTMFCapability(int cap, OOCTXT *pctxt);
00552 
00553 
00564 struct H245AudioCapability* ooCapabilityCreateGSMFullRateCapability
00565    (ooH323EpCapability *epCap, OOCTXT* pctxt, int dir);
00566 
00580 struct H245AudioCapability* ooCapabilityCreateSimpleCapability
00581    (ooH323EpCapability *epCap, OOCTXT* pctxt, int dir);
00582 
00583 
00596 struct H245VideoCapability* ooCapabilityCreateH263VideoCapability
00597 (ooH323EpCapability *epCap, OOCTXT* pctxt, int dir);
00598 
00599 
00610 ooH323EpCapability* ooIsAudioDataTypeSupported
00611 (struct OOH323CallData *call, H245AudioCapability* audioCap, int dir);
00612 
00623 ooH323EpCapability* ooIsVideoDataTypeSupported
00624    (struct OOH323CallData *call, H245VideoCapability* pVideoCap, int dir);
00625 
00637 ooH323EpCapability* ooIsVideoDataTypeH263Supported
00638    (struct OOH323CallData *call, H245H263VideoCapability* pH263Cap, int dir,
00639     OOPictureFormat picFormat);
00640 
00651 ooH323EpCapability* ooIsDataTypeSupported
00652 (struct OOH323CallData *call, H245DataType *data, int dir);
00653 
00661 EXTERN  int ooResetCapPrefs(struct OOH323CallData *call);
00662 
00672 EXTERN  int ooRemoveCapFromCapPrefs(struct OOH323CallData *call, int cap);
00673 
00683 EXTERN int ooAppendCapToCapPrefs(struct OOH323CallData *call, int cap);
00684 
00695 EXTERN int ooChangeCapPrefOrder(struct OOH323CallData *call, int cap, int pos);
00696 
00706 EXTERN int ooPreppendCapToCapPrefs(struct OOH323CallData *call, int cap);
00707 
00714 EXTERN const char* ooGetCapTypeText (OOCapabilities cap);
00715 
00716 
00720 #ifdef __cplusplus
00721 }
00722 #endif
00723 
00724 #endif
00725 
00726 

This file was last modified on 28 May 2010.
Objective Open H.323 Stack, 0.9.1