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 // ----------------------------------------------------------------------
19 //
20 // This Software is an original work of authorship of PacketVideo Corporation.
21 // Portions of the Software were developed in collaboration with NTT DoCoMo,
22 // Inc. or were derived from the public domain or materials licensed from
23 // third parties. Title and ownership, including all intellectual property
24 // rights in and to the Software shall remain with PacketVideo Corporation
25 // and NTT DoCoMo, Inc.
26 //
27 // -----------------------------------------------------------------------
28
29 #include "tscmain.h"
30 #include "tsc_sub.h" /* Sub Routine Information Header */
31 #include "tsc_component.h"
32
33 #define MAX_VENDOR_ID_OID_LEN 512 /* Max len of object identifier sequence */
34 /*****************************************************************************/
35 /* function name : Tsc_IdcVi */
36 /* function outline : VendorIdentification procedure */
37 /* function discription : Tsc_IdcVi( void ) */
38 /* input data : None */
39 /* output data : None */
40 /* draw time : '96.11.29 */
41 /*---------------------------------------------------------------------------*/
42 /* amendent career : */
43 /* */
44 /* Copyright (C) 1996 NTT DoCoMo */
45 /*****************************************************************************/
Tsc_IdcVi(void)46 void TSC_324m::Tsc_IdcVi(void)
47 {
48 S_ControlMsgHeader infHeader;
49 PS_VendorIdentification pVendorIdentification;
50
51 if (iVendor == NULL)
52 {
53 PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_STACK_TRACE,
54 (0, "TSC_324m:Tsc_IdcVi - Not sending vendor id\n"));
55 return;
56 }
57 /* Buffer Allocate */
58 pVendorIdentification = (PS_VendorIdentification)OSCL_DEFAULT_MALLOC(sizeof(S_VendorIdentification));
59 oscl_memset(pVendorIdentification, 0, sizeof(S_VendorIdentification));
60 if (iVendor->GetVendorType() == EObjectIdentifier)
61 {
62 PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_STACK_TRACE,
63 (0, "TSC_324m:Tsc_IdcVi - EObjectIdentifier\n"));
64 pVendorIdentification->vendor.index = 0; /* object */
65 pVendorIdentification->vendor.object = (PS_OBJECTIDENT) OSCL_DEFAULT_MALLOC(sizeof(S_OBJECTIDENT));
66 uint16 sz = 0;
67 uint8* data = ((TPVH245VendorObjectIdentifier*)iVendor)->GetVendor(&sz);
68 pVendorIdentification->vendor.object->size = sz;
69 pVendorIdentification->vendor.object->data = (uint8*)OSCL_DEFAULT_MALLOC(sz);
70 oscl_memcpy(pVendorIdentification->vendor.object->data, data, sz);
71 }
72 else if (iVendor->GetVendorType() == EH221NonStandard)
73 {
74 PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_STACK_TRACE,
75 (0, "TSC_324m:Tsc_IdcVi - EH221NonStandard\n"));
76 pVendorIdentification->vendor.index = 1; /* H221Nonstandard */
77 pVendorIdentification->vendor.h221NonStandard =
78 (struct _H221NonStandard *)OSCL_DEFAULT_MALLOC(sizeof(struct _H221NonStandard));
79 pVendorIdentification->vendor.h221NonStandard->manufacturerCode =
80 (uint16)((TPVVendorH221NonStandard*)iVendor)->GetManufacturerCode();
81 pVendorIdentification->vendor.h221NonStandard->t35CountryCode =
82 ((TPVVendorH221NonStandard*)iVendor)->GetT35CountryCode();
83 pVendorIdentification->vendor.h221NonStandard->t35Extension =
84 ((TPVVendorH221NonStandard*)iVendor)->GetT35Extension();
85 }
86 else
87 {
88 PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_STACK_TRACE,
89 (0, "TSC_324m:Tsc_IdcVi - ERROR - Invalid vendor type\n"));
90 OSCL_DEFAULT_FREE(pVendorIdentification);
91 return;
92 }
93 pVendorIdentification->option_of_productNumber = false;
94 if (iProductNumberLen)
95 {
96 pVendorIdentification->option_of_productNumber = true;
97 pVendorIdentification->productNumber.size =
98 (uint16)iProductNumberLen;
99 pVendorIdentification->productNumber.data =
100 (uint8*)OSCL_DEFAULT_MALLOC(iProductNumberLen);
101 oscl_memcpy(pVendorIdentification->productNumber.data,
102 iProductNumber, iProductNumberLen);
103 }
104 pVendorIdentification->option_of_versionNumber = false;
105 if (iVersionNumberLen)
106 {
107 pVendorIdentification->option_of_versionNumber = true;
108 pVendorIdentification->versionNumber.size =
109 (uint16)iVersionNumberLen;
110 pVendorIdentification->versionNumber.data =
111 (uint8*)OSCL_DEFAULT_MALLOC(iVersionNumberLen);
112 oscl_memcpy(pVendorIdentification->versionNumber.data,
113 iVersionNumber, iVersionNumberLen);
114 }
115
116 Tsc_SendDataSet(&infHeader, H245_PRIMITIVE, E_PtvId_Idc_Vi, 0, 0,
117 (uint8*)pVendorIdentification, sizeof(S_VendorIdentification));
118 /* Primitive Send */
119 iH245->DispatchControlMessage(&infHeader);
120 Delete_VendorIdentification(pVendorIdentification);
121 OSCL_DEFAULT_FREE(pVendorIdentification);
122 return;
123 }
124
VendorIdRecv(PS_ControlMsgHeader pReceiveInf)125 uint32 TSC_324m::VendorIdRecv(PS_ControlMsgHeader pReceiveInf)
126 {
127 PS_VendorIdentification pVendorIdentification =
128 (PS_VendorIdentification)pReceiveInf->pParameter;
129
130 PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_STACK_TRACE,
131 (0, "TSC_324m: Vendor Id Received - vendor index(%d), opn(%d), ovn(%d)\n",
132 pVendorIdentification->vendor.index,
133 pVendorIdentification->option_of_productNumber,
134 pVendorIdentification->option_of_versionNumber));
135 if (iVendorR)
136 {
137 OSCL_DELETE(iVendorR);
138 iVendorR = NULL;
139 }
140
141 if (iProductNumberR)
142 {
143 OSCL_DEFAULT_FREE(iProductNumberR);
144 iProductNumberR = NULL;
145 iProductNumberLenR = 0;
146 }
147 if (iVersionNumberR)
148 {
149 OSCL_DEFAULT_FREE(iVersionNumberR);
150 iVersionNumberR = NULL;
151 iVersionNumberLenR = 0;
152 }
153
154 if (pVendorIdentification->vendor.index == 0) // object identifier
155 {
156 if (pVendorIdentification->vendor.object->size &&
157 (pVendorIdentification->vendor.object->size < MAX_VENDOR_ID_OID_LEN))
158 {
159 if (pVendorIdentification->vendor.object->data[pVendorIdentification->vendor.object->size - 1] == '\0')
160 {
161 PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_STACK_TRACE,
162 (0, "TSC_324m: Vendor Id - %s\n",
163 pVendorIdentification->vendor.object->data));
164 }
165 iVendorR = new TPVH245VendorObjectIdentifier((uint8*)pVendorIdentification->vendor.object->data,
166 pVendorIdentification->vendor.object->size);
167 }
168 else
169 {
170 PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_STACK_TRACE,
171 (0, "TSC_324m:VendorIdRecv - Error - invalid length(%d)\n",
172 pVendorIdentification->vendor.object->size));
173 return iTerminalStatus;
174 }
175 }
176 else if (pVendorIdentification->vendor.index == 1) // H221NonStandard
177 {
178 iVendorR = new TPVVendorH221NonStandard(pVendorIdentification->vendor.h221NonStandard->t35CountryCode,
179 pVendorIdentification->vendor.h221NonStandard->t35Extension,
180 pVendorIdentification->vendor.h221NonStandard->manufacturerCode);
181 }
182 else
183 {
184 PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_STACK_TRACE,
185 (0, "TSC_324m:VendorIdRecv - Error - invalid index(%d)\n",
186 pVendorIdentification->vendor.index));
187 return iTerminalStatus;
188 }
189 if (pVendorIdentification->option_of_productNumber)
190 {
191 iProductNumberLenR = pVendorIdentification->productNumber.size;
192 }
193 if (iProductNumberLenR)
194 {
195 if (pVendorIdentification->productNumber.data[iProductNumberLenR-1] == '\0')
196 {
197 PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_STACK_TRACE,
198 (0, "TSC_324m: Product Number - %s\n",
199 pVendorIdentification->productNumber.data));
200 }
201 iProductNumberR = (uint8*)OSCL_DEFAULT_MALLOC(iProductNumberLenR);
202 oscl_memcpy(iProductNumberR, pVendorIdentification->productNumber.data,
203 iProductNumberLenR);
204 }
205 if (pVendorIdentification->option_of_versionNumber)
206 {
207 iVersionNumberLenR = pVendorIdentification->versionNumber.size;
208 }
209 if (iVersionNumberLenR)
210 {
211 if (pVendorIdentification->versionNumber.data[iVersionNumberLenR-1] == '\0')
212 {
213 PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_STACK_TRACE,
214 (0, "TSC_324m: Version Number - %s\n",
215 pVendorIdentification->versionNumber.data));
216 }
217 iVersionNumberR = (uint8*)OSCL_DEFAULT_MALLOC(iVersionNumberLenR);
218 oscl_memcpy(iVersionNumberR, pVendorIdentification->versionNumber.data, iVersionNumberLenR);
219 }
220 if (iTSC_324mObserver)
221 {
222 iTSC_324mObserver->IncomingVendorId(iVendorR, iProductNumberR,
223 (uint16)iProductNumberLenR, iVersionNumberR, (uint16)iVersionNumberLenR);
224 }
225 return iTerminalStatus;
226 }
227
228
229 //-----------------------------------------------------------------------------
230 // Tsc_UII_DTMF() (RAN-UII)
231 //
232 // This routine sends a DTMF signal via H.245 UserInputIndication message.
233 // It takes two input values:
234 //
235 // uint8 dtmf_value (ascii value of a character in [0123456789#*ABCD!])
236 // uint16 dtmf_duration (duration of pulse in mSec; 0 means no duration)
237 //-----------------------------------------------------------------------------
Tsc_UII_DTMF(uint8 dtmf_value,uint16 dtmf_duration)238 void TSC_324m::Tsc_UII_DTMF(uint8 dtmf_value, uint16 dtmf_duration)
239 {
240 S_ControlMsgHeader infHeader;
241 PS_UserInputIndication pUserInputIndication;
242
243 // Allocate the UII structure
244 pUserInputIndication = (PS_UserInputIndication)OSCL_DEFAULT_MALLOC(sizeof(S_UserInputIndication));
245
246 // Fill in the 'signal'
247 pUserInputIndication->index = 3; /* signal */
248 pUserInputIndication->signal = (PS_Signal) OSCL_DEFAULT_MALLOC(sizeof(S_Signal));
249
250 pUserInputIndication->signal->option_of_signalRtp = 0;
251 pUserInputIndication->signal->signalType.size = 1;
252 pUserInputIndication->signal->signalType.data = (uint8*) OSCL_DEFAULT_MALLOC(1 * sizeof(uint8));
253 pUserInputIndication->signal->signalType.data[0] = dtmf_value;
254
255 if (dtmf_duration == 0)
256 {
257 pUserInputIndication->signal->option_of_duration = 0;
258 }
259 else
260 {
261 pUserInputIndication->signal->option_of_duration = 1;
262 pUserInputIndication->signal->duration = dtmf_duration;
263 }
264
265 // Send the message
266 Tsc_SendDataSet(&infHeader, H245_PRIMITIVE, E_PtvId_Idc_Ui, 0, 0, (uint8*)pUserInputIndication,
267 sizeof(S_UserInputIndication));
268 iH245->DispatchControlMessage(&infHeader);
269 Delete_UserInputIndication(pUserInputIndication);
270 OSCL_DEFAULT_FREE(pUserInputIndication);
271 return;
272 }
273
Tsc_UII_Alphanumeric(const uint8 * str,uint16 str_len)274 void TSC_324m::Tsc_UII_Alphanumeric(const uint8* str, uint16 str_len)
275 {
276 S_ControlMsgHeader infHeader;
277 PS_UserInputIndication pUserInputIndication;
278 PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_STACK_TRACE,
279 (0, "TSC_324m:Tsc_UII_Alphanumeric - len(%d)", str_len));
280
281 // Allocate the UII structure
282 pUserInputIndication = (PS_UserInputIndication)OSCL_DEFAULT_MALLOC(sizeof(S_UserInputIndication));
283
284 // Fill in the 'signal'
285 pUserInputIndication->index = 1; /* alphanumeric */
286 pUserInputIndication->alphanumeric = (PS_int8STRING) OSCL_DEFAULT_MALLOC(sizeof(S_int8STRING));
287 pUserInputIndication->alphanumeric->size = str_len;
288 pUserInputIndication->alphanumeric->data = (uint8*) OSCL_DEFAULT_MALLOC(str_len * sizeof(uint8));
289 oscl_memcpy(pUserInputIndication->alphanumeric->data, str, str_len);
290
291 // Send the message
292 Tsc_SendDataSet(&infHeader, H245_PRIMITIVE, E_PtvId_Idc_Ui, 0, 0, (uint8*)pUserInputIndication,
293 sizeof(S_UserInputIndication));
294 iH245->DispatchControlMessage(&infHeader);
295 Delete_UserInputIndication(pUserInputIndication);
296 OSCL_DEFAULT_FREE(pUserInputIndication);
297 return;
298 }
299
UserInputIndicationRecv(PS_ControlMsgHeader pReceiveInf)300 uint32 TSC_324m::UserInputIndicationRecv(PS_ControlMsgHeader pReceiveInf)
301 {
302 PS_UserInputIndication pUserInputIndication = (PS_UserInputIndication)pReceiveInf->pParameter;
303 CPVUserInput* uii = NULL;
304 uint16 duration = 0;
305
306 PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_STACK_TRACE,
307 (0, "TSC_324m: User Input Indication Received - index(%d)\n", pUserInputIndication->index));
308 switch (pUserInputIndication->index)
309 {
310 case 1: /* alphanumeric */
311 PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_STACK_TRACE,
312 (0, "TSC_324m: User Input Indication Received - alphanumeric size(%d)",
313 pUserInputIndication->alphanumeric->size));
314 uii = OSCL_NEW(CPVUserInputAlphanumeric, (pUserInputIndication->alphanumeric->data,
315 pUserInputIndication->alphanumeric->size));
316 break;
317 case 3: /* signal */
318 PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_STACK_TRACE,
319 (0, "TSC_324m: User Input Indication Received - signal option_of_duration(%d), option_of_signalRtp(%d), signalType(%d)", pUserInputIndication->signal->option_of_duration, pUserInputIndication->signal->option_of_signalRtp, pUserInputIndication->signal->signalType.size));
320 if (pUserInputIndication->signal->option_of_duration)
321 {
322 duration = pUserInputIndication->signal->duration;
323 }
324 uii = OSCL_NEW(CPVUserInputDtmf, (*pUserInputIndication->signal->signalType.data,
325 false, duration));
326 break;
327 default:
328 PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_STACK_TRACE,
329 (0, "TSC_324m: User Input Indication Received - unrecognized type\n"));
330 }
331 if (uii)
332 {
333 if (iTSC_324mObserver)
334 iTSC_324mObserver->UserInputReceived(uii);
335 OSCL_DELETE(uii);
336 }
337
338 return iTerminalStatus;
339 }
340
IndicationMisc(TIndicationMisc type,TPVChannelId channelId,uint32 param,OsclAny * param1)341 void TSC_324m::IndicationMisc(TIndicationMisc type,
342 TPVChannelId channelId,
343 uint32 param,
344 OsclAny* param1)
345 {
346 OSCL_UNUSED_ARG(param1);
347 PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_STACK_TRACE,
348 (0, "TSC_324m::IndicationMisc type(%d), channelId(%d), param(%d), param1(%x)",
349 type, channelId, param, param1));
350
351 S_ControlMsgHeader infHeader;
352 S_MiscellaneousIndication miscellaneousIndication;
353 oscl_memset(&miscellaneousIndication, 0, sizeof(S_MiscellaneousIndication));
354
355 switch (type)
356 {
357 case EVideoTemporalSpatialTradeOffIdc:
358 miscellaneousIndication.logicalChannelNumber = (uint16)channelId;
359 miscellaneousIndication.miType.index = 9;
360 miscellaneousIndication.miType.videoTemporalSpatialTradeOff = (uint8)param;
361 break;
362 default:
363 return;
364 }
365
366 Tsc_SendDataSet(&infHeader, H245_PRIMITIVE, E_PtvId_Idc_Mscl, 0, 0,
367 (uint8*)&miscellaneousIndication, sizeof(S_MiscellaneousIndication));
368 iH245->DispatchControlMessage(&infHeader);
369 }
370
Tsc_IdcSkew(TPVChannelId lcn1,TPVChannelId lcn2,uint16 skew)371 void TSC_324m::Tsc_IdcSkew(TPVChannelId lcn1, TPVChannelId lcn2, uint16 skew)
372 {
373 PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_STACK_TRACE,
374 (0, "TSC_324m::Tsc_IdcSkew lcn1(%d), lcn2(%d), skew(%d)",
375 lcn1, lcn2, skew));
376 S_ControlMsgHeader infHeader;
377 S_H223SkewIndication skewIndication;
378 oscl_memset(&skewIndication, 0, sizeof(S_H223SkewIndication));
379 skewIndication.logicalChannelNumber1 = (uint16)lcn1;
380 skewIndication.logicalChannelNumber2 = (uint16)lcn2;
381 skewIndication.skew = skew;
382
383 Tsc_SendDataSet(&infHeader, H245_PRIMITIVE, E_PtvId_Idc_H223skw, 0, 0,
384 (uint8*)&skewIndication, sizeof(S_H223SkewIndication));
385 iH245->DispatchControlMessage(&infHeader);
386 }
387
MiscIndicationRecv(PS_ControlMsgHeader pReceiveInf)388 uint32 TSC_324m::MiscIndicationRecv(PS_ControlMsgHeader pReceiveInf)
389 {
390 PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_STACK_TRACE,
391 (0, "TSC_324m::MiscIndicationRecv"));
392 PS_MiscellaneousIndication indication = (PS_MiscellaneousIndication)pReceiveInf->pParameter;
393 PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_STACK_TRACE,
394 (0, "TSC_324m::MiscIndicationRecv lcn(%d),index(%d)",
395 indication->logicalChannelNumber, indication->miType.index));
396 switch (indication->miType.index)
397 {
398 case 9:
399 PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_STACK_TRACE,
400 (0, "TSC_324m::MiscIndicationRecv videoSpatialTemporalTradeoff(%d)",
401 indication->miType.videoTemporalSpatialTradeOff));
402 if (iTSC_324mObserver)
403 {
404 iTSC_324mObserver->VideoSpatialTemporalTradeoffIndicationReceived(indication->logicalChannelNumber,
405 indication->miType.videoTemporalSpatialTradeOff);
406 }
407 break;
408 default:
409 PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_STACK_TRACE,
410 (0, "TSC_324m::MiscIndicationRecv Indication not handled"));
411 break;
412 }
413 return iTerminalStatus;
414 }
415
SkewIndicationRecv(PS_ControlMsgHeader pReceiveInf)416 uint32 TSC_324m::SkewIndicationRecv(PS_ControlMsgHeader pReceiveInf)
417 {
418 PS_H223SkewIndication indication = (PS_H223SkewIndication)pReceiveInf->pParameter;
419 PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_STACK_TRACE,
420 (0, "TSC_324m::SkewIndicationRecv lcn1(%d), lcn2(%d), skew(%d)",
421 indication->logicalChannelNumber1,
422 indication->logicalChannelNumber2,
423 indication->skew));
424 uint16 skew = indication->skew;
425 if (skew > PV_2WAY_MAX_SKEW_MS)
426 {
427 PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_STACK_TRACE,
428 (0, "TSC_324m::SkewIndicationRecv skew(%d) > max skew(%d)",
429 indication->skew, PV_2WAY_MAX_SKEW_MS));
430 skew = PV_2WAY_MAX_SKEW_MS;
431 }
432
433 /* Validate the skew indication */
434 OlcParam* olcparam = iTSCcomponent->FindOlc(INCOMING, PV_AUDIO, OLC_ESTABLISHED);
435 if (!olcparam)
436 {
437 PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_WARNING,
438 (0, "TSC_324m::SkewIndicationRecv Established incoming audio lcn not found"));
439 return iTerminalStatus ;
440 }
441 if (indication->logicalChannelNumber2 != olcparam->GetChannelId())
442 {
443 PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_WARNING,
444 (0, "TSC_324m::SkewIndicationRecv indication->logicalChannelNumber2=%d != audio lcn id=%d",
445 indication->logicalChannelNumber2, olcparam->GetChannelId()));
446 //return iTerminalStatus ;
447 }
448
449 olcparam = iTSCcomponent->FindOlc(INCOMING, PV_VIDEO, OLC_ESTABLISHED);
450 if (!olcparam)
451 {
452 PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_WARNING,
453 (0, "TSC_324m::SkewIndicationRecv Established incoming video lcn not found"));
454 return iTerminalStatus ;
455 }
456 if (indication->logicalChannelNumber1 != olcparam->GetChannelId())
457 {
458 PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_WARNING,
459 (0, "TSC_324m::SkewIndicationRecv indication->logicalChannelNumber1=%d != video lcn id=%d",
460 indication->logicalChannelNumber1, olcparam->GetChannelId()));
461 //return iTerminalStatus ;
462 }
463
464 if (iTSC_324mObserver)
465 {
466 iTSC_324mObserver->SkewIndicationReceived(indication->logicalChannelNumber1,
467 indication->logicalChannelNumber2, skew);
468 }
469 //Obtain logical channel #1, and transmit the skew duration
470 OsclSharedPtr<H223IncomingChannel> channel;
471 PVMFStatus retVal = iH223->GetIncomingChannel(indication->logicalChannelNumber1, channel);
472
473 if (retVal != PVMFSuccess)
474 {
475 PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_WARNING, (0, "TSC_324m::SkewIndicationRecv Error - Failed to lookup logical channel %d", indication->logicalChannelNumber1));
476 return iTerminalStatus;
477 }
478
479 channel->SetTimestampOffset(skew);
480
481 return iTerminalStatus;
482 }
483
SendFunctionNotSupportedIndication(uint16 cause,uint8 * function,uint16 len)484 void TSC_324m::SendFunctionNotSupportedIndication(uint16 cause,
485 uint8* function,
486 uint16 len)
487 {
488 PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_STACK_TRACE,
489 (0, "TSC_324m::SendFunctionNotSupportedIndication"));
490 S_ControlMsgHeader infHeader;
491 S_FunctionNotSupported fnsIndication;
492 oscl_memset(&fnsIndication, 0, sizeof(S_FunctionNotSupported));
493 fnsIndication.fnsCause.index = cause;
494 if (function && len)
495 {
496 fnsIndication.option_of_returnedFunction = 1;
497 fnsIndication.returnedFunction.size = len;
498 fnsIndication.returnedFunction.data = function;
499 }
500 Tsc_SendDataSet(&infHeader, H245_PRIMITIVE, E_PtvId_Idc_Fns, 0, 0,
501 (uint8*)&fnsIndication, sizeof(S_FunctionNotSupported));
502 iH245->DispatchControlMessage(&infHeader);
503 return;
504 }
505
FunctionNotSupportedIndicationReceived(PS_ControlMsgHeader pReceiveInf)506 uint32 TSC_324m::FunctionNotSupportedIndicationReceived(PS_ControlMsgHeader pReceiveInf)
507 {
508 OSCL_UNUSED_ARG(pReceiveInf);
509 PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_STACK_TRACE,
510 (0, "TSC_324m::FunctionNotSupportedIndicationReceived"));
511 return iTerminalStatus;
512 }
513
FlowControlIndicationReceived(PS_ControlMsgHeader pReceiveInf)514 uint32 TSC_324m::FlowControlIndicationReceived(PS_ControlMsgHeader pReceiveInf)
515 {
516 OSCL_UNUSED_ARG(pReceiveInf);
517 PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_STACK_TRACE,
518 (0, "TSC_324m::FlowControlIndicationReceived"));
519 return iTerminalStatus;
520 }
521
522