# h324ModifyOutVideoChannelParam

Closes an existing video logical channel and then re-opens the channel with user-supplied logical channel parameters.

#### Prototype

DWORD h324ModifyOutVideoChannelParam ( MSPHD msphd, MEDIA_UNION* pMediaParam)

Argument | Description
msphd | MSPP handle associated with the MUX endpoint.
pMediaParam | Pointer to MEDIA_UNION structure that specifies the new parameters with which the video logical channel is re-opened. For information about the fields in this structure, see Fields in the MEDIA_UNION structure.

#### Return values

Return value | Description
SUCCESS |
CTAERR_NOT_FOUND | Provided msphd does not map to a current video logical channel. Either h324Start was not called, h324Stop was called, or the wrong handle was passed by the application.
H324ERR_INTERNAL_ERROR | Internal error in the 3G-324M Middleware.
H324ERR_MUTEX_LOCK_FAILED | Internal error trying to lock mutex.
H324ERR_NOT_INITIALIZED | h324Initialize was not called first.

#### Event

Event | Description
H324EVN_CHANNEL_CLOSED | A state transition information event indicating that the video logical channel was closed. Note: Unlike the other events for h324ModifyOutVideoChannelParam, this event does not signal the completion of the modification procedure for the channel parameters.
H324EVN_CHANNEL_CLOSE_FAILED | The bi-directional channel could not be closed. It is still in active state.
H324EVN_LCD | Video channel was properly re-established.
H324EVN_MEDIA_SETUP_FAILED | An issue occurred when attempting to close or re-establish the video channel. The video channel is in inactive state.

#### Example

BYTE h264_dci[] =
{
0x00, 0x00, 0x00, 0x01, 0x27, 0x42, 0xe0, 0x0a,
0x95, 0xa0, 0xb1, 0x3a, 0x01, 0xfd, 0x40, 0x00,
0x00, 0x00, 0x01, 0x28, 0xce, 0x06, 0x6a
};
int h264_dci_len = 23;
BYTE* l_pHdrCfg = h264_dci;
int l_nHdrCfgLen = h264_dci_len;
H324_MEDIA_CAPABILITY* pH264Cap;
pH264Cap = &GwConfig[0].localTermCaps.capTable[1];
pH264Cap->u.h264.capability.bit_mask |= decoder_config_info_present;
pH264Cap->u.h264.capability.decoder_config_info_len = l_nHdrCfgLen;
pH264Cap->u.h264.capability.decoder_config_info = new unsigned char[l_nHdrCfgLen];
memcpy( pH264Cap->u.h264.capability.decoder_config_info, l_pHdrCfg, l_nHdrCfgLen );
if (h324ModifyOutVideoChannelParam( GwConfig[0].MuxEp.hd,
&GwConfig[0].localTermCaps.capTable[1].u ) != SUCCESS)
{
printf("ERROR: h324ModifyOutVideoChannelParam () failed.\n");
}