Home | History | Annotate | Download | only in include
      1 /* ------------------------------------------------------------------
      2  * Copyright (C) 1998-2009 PacketVideo
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
     13  * express or implied.
     14  * See the License for the specific language governing permissions
     15  * and limitations under the License.
     16  * -------------------------------------------------------------------
     17  */
     18 #ifndef TSC_H324M_CONFIG_INTERFACE_H_INCLUDED
     19 #define TSC_H324M_CONFIG_INTERFACE_H_INCLUDED
     20 
     21 #ifndef OSCL_BASE_H_INCLUDED
     22 #include "oscl_base.h"
     23 #endif
     24 
     25 #ifndef PVT_COMMON_H_INCLUDED
     26 #include "pv_2way_h324m_types.h"
     27 #endif
     28 
     29 #ifndef PV_UUID_H_INCLUDED
     30 #include "pv_uuid.h"
     31 #endif
     32 
     33 #define PVH324MConfigUuid PVUuid(0x2b0b54e2,0x7079,0x46c6,0xb2,0x3e,0x04,0xff,0xd3,0x0e,0x14,0x36)
     34 
     35 
     36 /**
     37  * H324MConfigInterface Class
     38  *
     39  * H324MConfigInterface provides H.324m specific configuration APIs.
     40  **/
     41 class H324MConfigInterface : public PVInterface
     42 {
     43     public:
     44         /**
     45          * This API allows the user to specify separate observers for the 324m interface.  Otherwise, the default
     46          * observers will be used
     47          *
     48          * @param aObserver        the observer for command status and for unsolicited informational events
     49          **/
     50         virtual void SetObservers(PVCommandStatusObserver* aCmdStatusObserver,
     51                                   PVInformationalEventObserver* aInfoEventObserver,
     52                                   PVErrorEventObserver* aErrorEventObserver) = 0;
     53 
     54         /**
     55          * This API allows the user to specify the starting H223 multiplex level
     56          *
     57          * @param aLevel
     58          *          The starting H223 multiplex level.  Note that the final level that is neotiated will depend
     59          *          on the starting level of the peer
     60          *
     61          * @param aContextData
     62          *         Optional opaque data that will be passed back to the user with the command response
     63          * @returns A unique command id for asynchronous completion
     64          **/
     65         virtual PVCommandId SetMultiplexLevel(PVH223Level aLevel,
     66                                               OsclAny* aContextData = NULL) = 0;
     67 
     68         /**
     69          * This API allows the user to specify maximum outgoing sdu sizes for each adaptation layer
     70          *
     71          * @param aLayer
     72          *          The h223 adaptation layer type
     73          * @param aSize
     74          *          The sdu size
     75          *
     76          * @param aContextData
     77          *         Optional opaque data that will be passed back to the user with the command response
     78          * @returns A unique command id for asynchronous completion
     79          **/
     80         virtual PVCommandId SetMaxSduSize(PVH223AdaptationLayer aLayer,
     81                                           int32 aSize,
     82                                           OsclAny* aContextData = NULL) = 0;
     83 
     84         /**
     85          * This API allows the user to specify maximum incoming sdu sizes for each adaptation layer.  This is indicated
     86          * to the peer via the TCS
     87          *
     88          * @param aLayer
     89          *          The h223 adaptation layer type
     90          * @param aSize
     91          *          The sdu size
     92          *
     93          * @param aContextData
     94          *         Optional opaque data that will be passed back to the user with the command response
     95          * @returns A unique command id for asynchronous completion
     96          **/
     97         virtual PVCommandId SetMaxSduSizeR(PVH223AdaptationLayer aLayer,
     98                                            int32 aSize,
     99                                            OsclAny* aContextData = NULL) = 0;
    100 
    101         /**
    102          * This API allows the user to specify the configuration for outgoing AL channels
    103          *
    104          * @param aMediaTypes
    105          *          Media types for which configuration is being specified
    106          * @param aConfig
    107          *          Adaptation Layer configuration
    108          * @param aContextData
    109          *         Optional opaque data that will be passed back to the user with the command response
    110          * @returns A unique command id for asynchronous completion
    111          **/
    112         virtual PVCommandId SetOutgoingChannelConfiguration(int32 aMediaTypes,
    113                 PVH223AlConfig* aConfig,
    114                 OsclAny* aContextData = NULL) = 0;
    115 
    116         /**
    117          * This API allows the user to specify the configuration for incoming channels
    118          *
    119          * @param iAudioAdaptationLayers
    120          *          The allowable adaptation layers for incoming audio channels specified as a bitarray
    121          * @param iVideoAdaptationLayers
    122          *          The allowable adaptation layers for incoming video channels specified as a bitarray
    123          * @param iDataAdaptationLayers
    124          *          The allowable adaptation layers for incoming data channels specified as a bitarray
    125          * @param aContextData
    126          *         Optional opaque data that will be passed back to the user with the command response
    127          * @returns A unique command id for asynchronous completion
    128          **/
    129         virtual PVCommandId SetIncomingChannelConfiguration(uint32 iAudioAdaptationLayers,
    130                 uint32 iVideoAdaptationLayers,
    131                 uint32 iDataAdaptationLayers,
    132                 OsclAny* aContextData = NULL) = 0;
    133 
    134         /**
    135          * This API allows the user to limit the size of the outgoing h223 pdus
    136          *
    137          * @param aMaxPduSize
    138          *          The max pdu size
    139          *
    140          * @param aContextData
    141          *         Optional opaque data that will be passed back to the user with the command response
    142          * @returns A unique command id for asynchronous completion
    143          **/
    144         virtual PVCommandId SetMaxPduSize(int32 aMaxPduSize,
    145                                           OsclAny* aContextData = NULL) = 0;
    146 
    147         /**
    148          * This API allows the user to specify the terminal type that is advertized to the peer.  This can be used to
    149          * force the local terminal to be master/slave when communicating with a peer 324m terminal for testing purposes.
    150          *
    151          * @param aTerminalType The terminal type
    152          * @param aContextData
    153          *         Optional opaque data that will be passed back to the user with the command response
    154          * @returns A unique command id for asynchronous completion
    155          **/
    156         virtual PVCommandId SetTerminalType(uint8 aTerminalType,
    157                                             OsclAny* aContextData = NULL) = 0;
    158 
    159         /**
    160          * This API allows the user to specify whether Request Multiplex Entry is sent to the remote terminal after TCS
    161          *
    162          * @param aSendRme If true, RME is sent to the peer after TCS
    163          * @param aContextData
    164          *         Optional opaque data that will be passed back to the user with the command response
    165          * @returns A unique command id for asynchronous completion
    166          **/
    167         virtual PVCommandId SendRme(OsclAny* aContextData = NULL) = 0;
    168 
    169         /**
    170          * This API causes a maxMuxPduSize request to be sent to the remote terminal if set to a valid value (64 - 255).
    171                This is done after TCS if the remote terminal supports the maxMuxPduCapability
    172          *
    173          * @param aRequestMaxMuxPduSize The max mux pdu size
    174          * @param aContextData
    175          *         Optional opaque data that will be passed back to the user with the command response
    176          * @returns A unique command id for asynchronous completion
    177          **/
    178         virtual PVCommandId SetMaxMuxPduSize(int32 aRequestMaxMuxPduSize,
    179                                              OsclAny* aContextData = NULL) = 0;
    180 
    181         /**
    182          * This API sets the max ccsrl sdu size
    183          *
    184          * @param aMaxCcsrlSduSize The max ccsrl sdu size
    185          * @param aContextData
    186          *         Optional opaque data that will be passed back to the user with the command response
    187          * @returns A unique command id for asynchronous completion
    188          **/
    189         virtual PVCommandId SetMaxMuxCcsrlSduSize(int32 aMaxCcsrlSduSize,
    190                 OsclAny* aContextData = NULL) = 0;
    191 
    192         /**
    193          * This API may be called only after the media source has been successfully added
    194          * to the pv2way engine.  It causes the 2way engine to immediately send out a fast update frame
    195          * specific to the media type identified by the aTrack parameter.
    196          * @param aChannelId
    197          *         The identifier for the track
    198          * @param aContextData
    199          *         Optional opaque data that will be passed back to the user with the command response
    200 
    201          * @returns A unique command id for asynchronous completion
    202         **/
    203         virtual PVCommandId FastUpdate(PVChannelId aChannelId,
    204                                        OsclAny* aContextData = NULL) = 0;
    205 
    206         /**
    207          * Sends a Round Trip Determination message to the peer and indicates the round trip delay to the caller
    208          * on completion of the command.  The round trip delay is stored in 4 bytes in the local buffer of the completion event
    209          * in network byte order.
    210          *
    211          * @param aContextData
    212          *         Optional opaque data that will be passed back to the user with the command response
    213          * @returns A unique command id for asynchronous completion
    214          **/
    215         virtual PVCommandId SendRtd(OsclAny* aContextData = NULL) = 0;
    216 
    217         /**
    218          * Sets the vendor identification data.  This does not cause the stack to issue a vendor identifiation request.
    219          * Set to NULL to disable sending vendor id.  If set to a valid parameter before Connect, it will cause the stack
    220          * to automatically send it along with the TCS message.
    221          * @param cc
    222          *         T35 Country code
    223          * @param ext
    224          *         T35 Extension
    225          * @param mc
    226          *         T35 Manufacturer code
    227          * @param aProduct
    228          *         Product number
    229          * @param aVersion
    230          *         Version number
    231          * @param aContextData
    232          *         Optional opaque data that will be passed back to the user with the command response
    233          * @returns A unique command id for asynchronous completion
    234          **/
    235         virtual PVCommandId SetVendor(uint8 cc, uint8 ext, uint32 mc,
    236                                       const uint8* aProduct, uint16 aProductLen,
    237                                       const uint8* aVersion, uint16 aVersionLen,
    238                                       OsclAny* aContextData = NULL) = 0;
    239 
    240         /**
    241          * Sends an end session command to the peer.  Only to be used for testing purposes.
    242          *
    243          * @param aContextData
    244          *         Optional opaque data that will be passed back to the user with the command response
    245          * @returns A unique command id for asynchronous completion
    246          **/
    247         virtual PVCommandId SendEndSession(OsclAny* aContextData = NULL) = 0;
    248 
    249         /**
    250          * Sets the disconnect timeout interval.
    251          *
    252          * @param aTimeout The timeout value in seconds
    253          * @param aContextData
    254          *         Optional opaque data that will be passed back to the user with the command response
    255          * @returns A unique command id for asynchronous completion
    256          **/
    257         virtual PVCommandId SetEndSessionTimeout(uint32 aTimeout,
    258                 OsclAny* aContextData = NULL) = 0;
    259 
    260         /**
    261          * Sets an H.324 timer/counter value.  This should be called before ConnectL is invoked.
    262          * The  supported timers are:
    263          *      T106    Master Slave Determination (in units of 1s)
    264          *      T101    Capability Exchange (in units of 1s)
    265          *      T103    Uni-directional and Bi-directional Logical Channel Signalling (in units of 1s)
    266          *      T108    Close Logical Channel (in units of 1s)
    267          *      T104    H.223 Multiplex Table (in units of 1s)
    268          *      T109    Mode Request (in units of 1s)
    269          *      T105    Round Trip Delay (in units of 1s)
    270          *      T107    Request Multiplex Entry (in units of 100ms)
    271          *      T401    SRP retransmission (in units of 100ms)
    272          * The supported counters are:
    273          *      N100    H245 (TCS, MSD)
    274          *      N401    SRP retransmission
    275          * @param aTimerCounter
    276          *         Identifies whether a timer or counter is being set.
    277          * @param aSeries
    278          *         Identifies the H.324 timer/counter series.
    279          * @param aSeriesOffset
    280          *         Specifies the offset within a particular series.
    281          *         E.g.
    282          *              aTimerCounter=EH324Timer, aSeries=1, aSeriesOffset=1 indicates T101.
    283          *              aTimerCounter=EH324Timer, aSeries=4, aSeriesOffset=1 indicates T401.
    284          *              aTimerCounter=EH324Counter, aSeries=4, aSeriesOffset=1 indicates T401.
    285          * @param aValue
    286          *         The new value for the H.324 timer/counter
    287          * @param aContextData
    288          *         Optional opaque data that will be passed back to the user with the command response
    289          **/
    290         virtual PVCommandId SetTimerCounter(PVH324TimerCounter aTimerCounter,
    291                                             uint8 aSeries, uint32 aSeriesOffset,
    292                                             uint32 aValue,
    293                                             OsclAny* aContextData = NULL) = 0;
    294 
    295         /**
    296          * This API allows the user to specify the supported resolutions for video for transmit and receive.
    297          *
    298          * @param aDirection
    299          *         The direction (Tx/Rx) for which the capability is specified.
    300          * @param aResolutions
    301          *         An array of resolutions.
    302          * @param aContextData
    303          *         Optional opaque data that will be passed back to the user with the command response
    304          **/
    305         virtual PVCommandId SetVideoResolutions(PVDirection aDirection,
    306                                                 Oscl_Vector<PVMFVideoResolutionRange, OsclMemAllocator>& aResolutions,
    307                                                 OsclAny* aContextData = NULL) = 0;
    308 
    309         /**
    310          * This API allows the user to send the vendor id info to the peer.
    311          * Note:  Calling this API during call-setup negotiations can affect the time for
    312          * call-setup adversely.
    313          *
    314          **/
    315         virtual PVCommandId SendVendorId(OsclAny* aContextData = NULL) = 0;
    316 
    317         /**
    318          * This API allows the user to send a videoTemporalSpatialTradeOff command to the peer.
    319          * It is a request to the remote encoder to adjust its encoding in accordance with the tradeoff value.
    320          * A value of 0 indicates a high spatial resolution and a value of 31 indicates a high frame rate.
    321          * The values from 0 to 31 indicate monotonically a higher frame rate. Actual values do not correspond
    322          * to precise values of spatial resolution or frame rate.
    323          *
    324          **/
    325         virtual PVCommandId SendVideoTemporalSpatialTradeoffCommand(PVChannelId aLogicalChannel,
    326                 uint8 aTradeoff,
    327                 OsclAny* aContextData = NULL) = 0;
    328 
    329         /**
    330          * This API allows the user to send a videoTemporalSpatialTradeOff command to the peer.
    331          * It is an indication to the remote decoder that the local encoder has adjusted its encoding parameters
    332          * according to the tradeoff value.
    333          * A value of 0 indicates a high spatial resolution and a value of 31 indicates a high frame rate.
    334          * The values from 0 to 31 indicate monotonically a higher frame rate. Actual values do not correspond
    335          * to precise values of spatial resolution or frame rate.
    336          *
    337          **/
    338         virtual PVCommandId SendVideoTemporalSpatialTradeoffIndication(PVChannelId aLogicalChannel,
    339                 uint8 aTradeoff,
    340                 OsclAny* aContextData = NULL) = 0;
    341 
    342         /**
    343          * This API allows the user to send a SkewIndication to the peer.
    344          * Skew is measured in milliseconds, and indicates the maximum number of milliseconds that the data on
    345          * logicalChannel2 is delayed from the data on logicalChannel1 as delivered to the network transport.
    346          *
    347          **/
    348         virtual PVCommandId SendSkewIndication(PVChannelId aLogicalChannel1,
    349                                                PVChannelId aLogicalChannel2,
    350                                                uint16 aSkew,
    351                                                OsclAny* aContextData = NULL) = 0;
    352 
    353         /**
    354         * This API allows the user to configure the logical channel buffer sizes for incoming
    355         * and outgoing logical channels.
    356          * @param aDirection
    357          *         The direction (Rx or Tx).
    358          * @param aBufferingMs
    359          *         The amount of buffering in milliseconds.
    360          * @param aContextData
    361          *         Optional opaque data that will be passed back to the user with the command response
    362         **/
    363         virtual PVCommandId SetLogicalChannelBufferingMs(uint32 aInBufferingMs,
    364                 uint32 aOutBufferingMs,
    365                 OsclAny* aContextData = NULL) = 0;
    366 
    367         /**
    368          * Causes the pv2way to send the specified user input to the remote terminal using
    369          * control channel.  The user input can be either DTMF ot Alphanumeric
    370          * @param user_input A pointer to either CPVUserInputDtmf or CPVUserInputAlphanumeric
    371          * @param aContextData
    372          *         Optional opaque data that will be passed back to the user with the command response
    373          *
    374          * @returns A unique command id for asynchronous completion
    375          **/
    376         virtual PVCommandId SendUserInput(CPVUserInput* user_input,
    377                                           OsclAny* aContextData = NULL) = 0;
    378 
    379 };
    380 
    381 /**
    382  * PVH324MIndicationType enum
    383  *
    384  *  Enumeration of unsolicited H324m specific indications from pv2way.
    385  *
    386  **/
    387 enum PVH324MIndicationType
    388 {
    389     /**
    390      * Indicates the receipt of a videoSpatialTemporalTradeoff command from the peer.
    391      * The first 2 bytes of the event local buffer indicate the logical channel (network byte order) and the 3rd
    392      * byte indicates the tradeoff value.
    393      *
    394      **/
    395     PV_INDICATION_VIDEO_SPATIAL_TEMPORAL_TRADEOFF_COMMAND,
    396     /**
    397      * Indicates the receipt of a videoSpatialTemporalTradeoff indication from the peer.
    398      * The first 2 bytes of the event local buffer indicate the logical channel (network byte order) and the 3rd
    399      * byte indicates the tradeoff value.
    400      *
    401      **/
    402     PV_INDICATION_VIDEO_SPATIAL_TEMPORAL_TRADEOFF_INDICATION,
    403     /**
    404      * Indicates a fast update message from the remote terminal.  The first two bytes of the
    405      * local buffer encode the logical channel number in network byte order.
    406      *
    407      **/
    408     PV_INDICATION_FAST_UPDATE,
    409     /**
    410      * Indicates an incoming RTD command.
    411      *
    412      **/
    413     PV_INDICATION_RTD,
    414     /**
    415      * Indicates an incoming request multiplex entry command.
    416      *
    417      **/
    418     PV_INDICATION_RME,
    419     /**
    420      * Indicates an incoming vendor id indication message.
    421      *
    422      **/
    423     PV_INDICATION_VENDOR_ID,
    424     /**
    425      * Indicates the receipt of user input capability from the remote terminal.  The local buffer
    426      * contains the indices of the user input formats supported by the peer.
    427      *
    428      **/
    429     PV_INDICATION_USER_INPUT_CAPABILITY,
    430     /**
    431      * Indicates the receipt of user input from the remote terminal.  The derived class
    432      * contains the actual user input sequences received.
    433      *
    434      **/
    435     PV_INDICATION_USER_INPUT,
    436     /**
    437      * Indicates the receipt of a an h223SkewIndication indication from the peer.
    438      * The first 2 bytes of the event local buffer indicate the first logical channel, the 3rd and
    439      * 4th bytes the second logical channel and the 5th and 6th bytes the value of the skew in milliseconds.
    440      * All values are in network byte order.
    441      *
    442      **/
    443     PV_INDICATION_SKEW
    444 };
    445 
    446 #endif
    447