Add Diva streaming for resource PLCI
This commit is contained in:
parent
6fda685af2
commit
fa4d1ef6ac
|
@ -331,6 +331,18 @@ struct capi_pvt *capi_mkresourceif(struct ast_channel *c, unsigned long long con
|
||||||
data_ifc->MessageNumber = get_capi_MessageNumber();
|
data_ifc->MessageNumber = get_capi_MessageNumber();
|
||||||
|
|
||||||
cc_mutex_lock(&data_ifc->lock);
|
cc_mutex_lock(&data_ifc->lock);
|
||||||
|
|
||||||
|
#ifdef DIVA_STREAMING
|
||||||
|
data_ifc->diva_stream_entry = 0;
|
||||||
|
if (data_plci_ifc == 0) {
|
||||||
|
capi_DivaStreamingStreamNotUsed(data_ifc, 1, data_ifc->MessageNumber);
|
||||||
|
} else {
|
||||||
|
if (pbx_capi_streaming_supported (data_ifc) != 0) {
|
||||||
|
capi_DivaStreamingOn(data_ifc, 1, data_ifc->MessageNumber);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
capi_sendf(data_ifc,
|
capi_sendf(data_ifc,
|
||||||
1,
|
1,
|
||||||
CAPI_MANUFACTURER_REQ,
|
CAPI_MANUFACTURER_REQ,
|
||||||
|
|
|
@ -247,12 +247,29 @@ void capi_DivaStreamingRemoveInfo(struct capi_pvt *i)
|
||||||
"dws", _DI_MANU_ID, _DI_STREAM_CTRL, description);
|
"dws", _DI_MANU_ID, _DI_STREAM_CTRL, description);
|
||||||
}
|
}
|
||||||
|
|
||||||
void capi_DivaStreamingStreamNotUsed (struct capi_pvt *i)
|
/*!
|
||||||
|
* \brief Send empty stream to inform no Diva streaming is used for this PLCI
|
||||||
|
*/
|
||||||
|
void capi_DivaStreamingStreamNotUsed(struct capi_pvt *i, byte streamCommand, _cword messageNumber)
|
||||||
{
|
{
|
||||||
byte description[] = { 0x04, 0x00, 0x02, 0x00, 0x00 };
|
byte description[] = { 0x04, 0x00, 0x02, 0x00, 0x00 };
|
||||||
|
unsigned int effectivePLCI;
|
||||||
MESSAGE_EXCHANGE_ERROR error;
|
MESSAGE_EXCHANGE_ERROR error;
|
||||||
|
|
||||||
error = capi_sendf (NULL, 0, CAPI_MANUFACTURER_REQ, i->PLCI, get_capi_MessageNumber(),
|
description[1] = streamCommand;
|
||||||
|
|
||||||
|
if (streamCommand == 0) {
|
||||||
|
messageNumber = get_capi_MessageNumber();
|
||||||
|
effectivePLCI = i->PLCI;
|
||||||
|
} else {
|
||||||
|
/*
|
||||||
|
PLCI still not assigned. Send to controller and tag with message number
|
||||||
|
where command receives effective
|
||||||
|
*/
|
||||||
|
effectivePLCI = i->controller;
|
||||||
|
}
|
||||||
|
|
||||||
|
error = capi_sendf (NULL, 0, CAPI_MANUFACTURER_REQ, effectivePLCI, messageNumber,
|
||||||
"dws", _DI_MANU_ID, _DI_STREAM_CTRL, description);
|
"dws", _DI_MANU_ID, _DI_STREAM_CTRL, description);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
extern int capi_DivaStreamingSupported(unsigned controller);
|
extern int capi_DivaStreamingSupported(unsigned controller);
|
||||||
extern void capi_DivaStreamingOn(struct capi_pvt *i, unsigned char streamCommand, _cword messageNumber);
|
extern void capi_DivaStreamingOn(struct capi_pvt *i, unsigned char streamCommand, _cword messageNumber);
|
||||||
extern void capi_DivaStreamingStreamNotUsed (struct capi_pvt *i);
|
extern void capi_DivaStreamingStreamNotUsed(struct capi_pvt *i, byte streamCommand, _cword messageNumber);
|
||||||
extern void capi_DivaStreamingRemoveInfo(struct capi_pvt *i);
|
extern void capi_DivaStreamingRemoveInfo(struct capi_pvt *i);
|
||||||
extern void capi_DivaStreamingRemove(struct capi_pvt *i);
|
extern void capi_DivaStreamingRemove(struct capi_pvt *i);
|
||||||
extern void divaStreamingWakeup(void);
|
extern void divaStreamingWakeup(void);
|
||||||
|
|
Loading…
Reference in New Issue