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 PV_2WAY_ENGINE_H_INCLUDED 19 #define PV_2WAY_ENGINE_H_INCLUDED 20 21 #ifndef OSCL_BASE_H_INCLUDED 22 #include "oscl_base.h" 23 #endif 24 25 #ifndef OSCL_SCHEDULER_AO_H_INCLUDED 26 #include "oscl_scheduler_ao.h" 27 #endif 28 29 #ifndef OSCL_TIMER_H_INCLUDED 30 #include "oscl_timer.h" 31 #endif 32 33 #ifndef PVMF_MEDIA_CLOCK_H_INCLUDED 34 #include "pvmf_media_clock.h" 35 #endif 36 37 #ifndef OSCL_BYTE_ORDER_H_INCLUDED 38 #include "oscl_byte_order.h" 39 #endif 40 41 #ifndef PV_2WAY_INTERFACE_H_INCLUDED 42 #include "pv_2way_interface.h" 43 #endif 44 45 #ifndef PV_2WAY_BASIC_INTERFACES_H_INCLUDE 46 #include "pv_2way_basic_interfaces.h" 47 #endif 48 49 #ifndef PVMF_NODE_INTERFACE_H_INCLUDED 50 #include "pvmf_node_interface.h" 51 #endif 52 53 #ifndef PVLOGGER_H_INCLUDED 54 #include "pvlogger.h" 55 #endif 56 57 #ifndef PV_MP4_H263_ENC_EXTENSION_H_INCLUDED 58 #include "pvmp4h263encextension.h" 59 #endif 60 61 // COMM and Stack related 62 #ifndef NO_2WAY_324 63 #ifndef TSCMAIN_H_INCLUDED // Gkl 64 #include "tscmain.h" 65 #endif 66 #endif 67 68 #define MAX_TX_AUDIO_CODECS_SUPPORTED 2 69 #define MAX_RX_AUDIO_CODECS_SUPPORTED 2 70 #define MAX_TX_VIDEO_CODECS_SUPPORTED 3 71 #define MAX_RX_VIDEO_CODECS_SUPPORTED 3 72 73 #define MAX_LOGICAL_CHANNEL_PARAMS 3 74 #define MAX_PENDING_2WAY_COMMANDS 20 75 #define MAX_PENDING_2WAY_EVENTS 20 // Gkl 76 #define MAX_PENDING_2WAY_ERRORS 20 // Gkl 77 #define MAX_PENDING_2WAY_NODE_COMMANDS 20 78 #define MAX_2WAY_SOURCESINK 2 79 #define MAX_SESSION_CHANNELS 4 80 #define MAX_SESSION_MEDIA_CAPS MAX_SESSION_CHANNELS*2 81 82 83 #if defined (__WINS__) 84 #define AUDIO_INPUT_FILENAME _STRLIT("c:\\audio_in.if2") 85 #define AUDIO_OUTPUT_FILENAME _STRLIT("c:\\audio_out.if2") 86 #else 87 #define AUDIO_INPUT_FILENAME _STRLIT("e:\\audio_in.if2") 88 #define AUDIO_OUTPUT_FILENAME _STRLIT("e:\\audio_out.if2") 89 #endif 90 91 #define MAX_AMR_BITRATE 12200 92 #define MIN_AMR_BITRATE 12200 93 #define MAX_AUDIO_BITRATE 12200 94 95 #define DEFAULT_MIN_IFRAME_REQ_INT 1 96 #define IFRAME_REQ_TIMERID 1 97 98 99 #define END_SESSION_TIMER_ID 2 100 #define END_SESSION_TIMER "end_session_timer" 101 #define END_SESSION_TIMER_FREQUENCY 5 102 #define END_SESSION_TIMER_VALUE 3 103 /* End session interval = END_SESSION_TIMER_VALUE * 1000/END_SESSION_TIMER_FREQUENCY */ 104 105 #define REMOTE_DISCONNECT_TIMER_ID 3 106 #define REMOTE_DISCONNECT_TIMER "remote_disconnect_timer" 107 #define REMOTE_DISCONNECT_TIMER_FREQUENCY 5 108 #define REMOTE_DISCONNECT_TIMER_VALUE 3 109 110 111 112 #define MAX_VIDEO_BITRATE 40000 113 114 #define VIDEO_ENCODER_WIDTH 176 115 #define VIDEO_ENCODER_HEIGHT 144 116 #if defined (__WINS__) 117 #define VIDEO_ENCODER_FRAME_RATE 2 118 #else 119 #define VIDEO_ENCODER_FRAME_RATE 7.5 120 #endif 121 // TBD ARI: This should be removed when capability exchange between video encoder and video source is implemented 122 #define VIDEO_INPUT_FRAME_RATE VIDEO_ENCODER_FRAME_RATE 123 #define VIDEO_ENCODER_BITRATE 42000 124 #define VIDEO_ENCODER_RVLC 0 125 #define VIDEO_ENCODER_DATA_PARTITIONING 1 126 #define VIDEO_ENCODER_I_FRAME_INTERVAL 5 127 #define VIDEO_ENCODER_RATE_CONTROL PVMFVEN_RATE_CONTROL_CBR 128 #define VIDEO_ENCODER_INPUT_FORMAT PVMFVEN_INPUT_YUV420 129 #define VIDEO_ENCODER_SEGMENT_SIZE 256 130 131 //Play defaults 132 #define DEFAULT_PLAY_FROM_FILE_TYPE PVMF_MIME_MPEG4FF 133 #define DEFAULT_PLAY_FROM_FILE_AUDIO PVMF_MIME_AMR_IETF 134 #define DEFAULT_PLAY_FROM_FILE_VIDEO PVMF_MIME_YUV420 135 136 //Gkl 137 #if defined(PV_RECORD_TO_FILE_SUPPORT) 138 #define RECORDED_FILESIZE_NOTIFICATION_TIMERID 2 139 #define MIN_RECORDED_FILESIZE_NOTIFICATION_INTERVAL 500 140 #endif 141 142 #if defined(PV_PLAY_FROM_FILE_SUPPORT) 143 //Play defaults 144 #define DEFAULT_PLAY_FROM_FILE_TYPE PVMF_MIME_MPEG4FF 145 #define DEFAULT_PLAY_FROM_FILE_AUDIO PVMF_MIME_AMR_IETF 146 #define DEFAULT_PLAY_FROM_FILE_VIDEO PVMF_MIME_YUV420 147 #endif 148 149 150 class PvmfNodesSyncControlInterface; 151 typedef enum 152 { 153 EPV2WayAudio = 0, 154 EPV2WayVideo, 155 EPV2WayMuxData 156 } TPV2WayMediaType; 157 158 typedef enum 159 { 160 EPV2WayAudioIn = 0, 161 EPV2WayAudioOut, 162 EPV2WayVideoIn, 163 EPV2WayVideoOut 164 } TPV2WayPortTagType; 165 166 /** 167 * TPV2WayCommandType enum 168 * 169 * Enumeration of types of commands that can be issued to the pv2way(Used internall by engine). 170 * The comments for each command type specify the possible error codes that can be 171 * returned with the completion of each command. For details on each command, pls refer the 172 * interface definition 173 * 174 **/ 175 176 enum TPV2WayCommandType 177 { 178 /** 179 * Indicates completion of the initialization process. If successful, the terminal 180 * should be in the ESetup state. If failed, the pv2way remains in the 181 * Eidle state. The derived class contains information about which 182 * components failed to initialize. 183 * 184 * The application must wait for this callback after the terminal is instantiated 185 * before calling any of the terminal APIs. 186 * 187 * If it fails, a system-wide error code is returned. 188 * 189 **/ 190 PVT_COMMAND_INIT, 191 /** 192 * Indicates completion of a GetSDKInfoL call. If successful, the reference to the 193 * TPVSDKInfo struct passed in will be populated with version information pertaining 194 * to the pv2way SDK 195 * If it fails, a system-wide error code is returned. 196 * 197 **/ 198 PVT_COMMAND_GET_SDK_INFO, 199 /** 200 * Indicates completion of a GetSDKModuleInfoL call. If successful, the reference to the 201 * TPVSDKModuleInfo struct passed in will be populated with version information pertaining 202 * to the currently loaded modules 203 * If it fails, a system-wide error code is returned. 204 * 205 **/ 206 PVT_COMMAND_GET_SDK_MODULE_INFO, 207 /** 208 * Indicates completion of a GetPV2WayStateL call. If successful, the reference to the 209 * TPV2WayState struct passed in will be populated with current state information. 210 * If it fails, a system-wide error code is returned. 211 * 212 **/ 213 PVT_COMMAND_GET_PV2WAY_STATE, 214 /** 215 * Indicates that the terminal has released all resources and is in the EIdle 216 * state. It is now ok to de-allocate the terminal. 217 * If it fails, a system-wide error code is returned. 218 **/ 219 PVT_COMMAND_RESET, 220 /** 221 * This indicates the completion status of a previously issued 222 * AddDataSourceL command. 223 * 224 * If successful, the engine will start the source and either start demuxing (COMM source) 225 * or, sending media data from the source (mic, camera etc). 226 * 227 * On failure, a system-wide error code is returned. 228 * The application may either re-try AddDataSourceL, or disconnect 229 * the call. The application does not have to call RemoveDataSourceL. 230 * 231 * Information about the track - codec, bitrate etc. are provided via the derived 232 * class 233 **/ 234 PVT_COMMAND_ADD_DATA_SOURCE, 235 /** 236 * This indicates the completion status of a previously issued RemoveMediaSource command. 237 * 238 * If successful, the track is closed and all resources associated with the track 239 * have been released. 240 * 241 * Once this callback is invoked for a track, the pointer to CPVTrackInfo 242 * for the track will be invalid. 243 * 244 * If it fails, a system-wide error code is returned. 245 * 246 **/ 247 PVT_COMMAND_REMOVE_DATA_SOURCE, 248 /** 249 * This indicates the completion status of a previously issued 250 * AddDataSinkL command. It also provides track information. 251 * 252 * If successful, the engine will start sending media data to the sink. 253 * 254 * If it fails, a system-wide error code is returned. 255 * The application may either re-try AddDataSinkL, or disconnect 256 * the call. The application does not have to call RemoveMediaSink. 257 * 258 * Information about the track - codec, bitrate etc. are provided via the derived 259 * class 260 **/ 261 PVT_COMMAND_ADD_DATA_SINK, 262 /** 263 * Similar to RemoveMediaSource 264 **/ 265 PVT_COMMAND_REMOVE_DATA_SINK, 266 /** 267 * Indicates completion of a pending Connect command. If successful, 268 * the application can open the media tracks using the AddMediaSource API. 269 * 270 * If Connnect fails, a system-wide error code is returned. 271 * The application can either re-try Connect or de-allocate the terminal. 272 * The Phone application does not have to call Disconnect if ConnectComplete is 273 * called with a status that indicates failure. 274 * 275 **/ 276 PVT_COMMAND_CONNECT, 277 /** 278 * Indicates completion of a pending Disconnect command. The terminal 279 * transitions from EDisconnecting back to the ESetup state. The Phone 280 * application may now call Connect again or reset and de-allocate the terminal. 281 * If it fails, a system-wide error code is returned. 282 * 283 **/ 284 PVT_COMMAND_DISCONNECT, 285 286 /** 287 * Indicates completion of a pending Pause command. 288 * 289 **/ 290 PVT_COMMAND_PAUSE, 291 /** 292 * Indicates completion of a pending Resume command. 293 * 294 **/ 295 PVT_COMMAND_RESUME, 296 /** 297 * Indicates completion of a pending SetLogAppenderL command. 298 * 299 **/ 300 PVT_COMMAND_SET_LOG_APPENDER, 301 /** 302 * Indicates completion of a pending RemoveLogAppenderL command. 303 * 304 **/ 305 PVT_COMMAND_REMOVE_LOG_APPENDER, 306 /** 307 * Indicates completion of a pending SetLogLevel command. 308 * 309 **/ 310 PVT_COMMAND_SET_LOG_LEVEL, 311 /** 312 * Indicates completion of a pending GetLogLevel command. 313 * 314 **/ 315 PVT_COMMAND_GET_LOG_LEVEL, 316 /** 317 * Indicates completion of QueryUUIDL command 318 * 319 **/ 320 PVT_COMMAND_QUERY_UUID, 321 /** 322 * Indicates completion of QueryInterfaceL command 323 * 324 **/ 325 PVT_COMMAND_QUERY_INTERFACE, 326 /** 327 * Indicates pending Init or Connect commands were cancelled 328 * 329 **/ 330 PVT_COMMAND_CANCEL_ALL_COMMANDS, 331 332 PVT_LAST_COMMAND 333 }; 334 335 // This function returns a priority index for each format type. 336 uint32 GetPriorityIndexForPVMFFormatType(PVMFFormatType aFormatType); 337 338 //Priority to MP4 over H.263 339 template<class Alloc> struct PV2WayRegFormatTypeCompare 340 { operatorPV2WayRegFormatTypeCompare341 bool operator()(const PVMFFormatType& x, const PVMFFormatType& y) const 342 { 343 uint32 x_val = GetPriorityIndexForPVMFFormatType(x); 344 uint32 y_val = GetPriorityIndexForPVMFFormatType(y); 345 346 return (x_val < y_val) ? true : false; 347 } 348 }; 349 350 class TPV2WayNotificationInfo 351 { 352 public: 353 enum TPV2WayNotificationInfoType 354 { 355 EPV2WayCommandType, 356 EPV2WayEventType 357 }; 358 TPV2WayNotificationInfo(TPV2WayNotificationInfoType aType)359 TPV2WayNotificationInfo(TPV2WayNotificationInfoType aType) : notificationType(aType) {}; ~TPV2WayNotificationInfo()360 virtual ~TPV2WayNotificationInfo() {}; 361 362 TPV2WayNotificationInfoType notificationType; 363 }; 364 365 class TPV2WayCmdInfo : public TPV2WayNotificationInfo 366 { 367 public: TPV2WayCmdInfo()368 TPV2WayCmdInfo() : TPV2WayNotificationInfo(EPV2WayCommandType), 369 type(PVT_COMMAND_INIT), 370 id(0), 371 contextData(NULL), 372 status(PVMFSuccess), 373 responseData(NULL), 374 responseDataSize(0), 375 iPvtCmdData(0) 376 {}; 377 ~TPV2WayCmdInfo()378 ~TPV2WayCmdInfo() {}; 379 Clear()380 void Clear() 381 { 382 type = PVT_COMMAND_INIT; 383 id = 0; 384 contextData = NULL; 385 status = PVMFSuccess; 386 responseData = NULL; 387 responseDataSize = 0; 388 iPvtCmdData = 0; 389 } 390 391 TPV2WayCommandType type; 392 PVCommandId id; 393 void *contextData; 394 TPVCmnCommandStatus status; 395 void* responseData; 396 int32 responseDataSize; 397 uint32 iPvtCmdData; 398 }; 399 400 class TPV2WayEventInfo : public TPV2WayNotificationInfo 401 { 402 public: TPV2WayEventInfo()403 TPV2WayEventInfo() : TPV2WayNotificationInfo(EPV2WayEventType), 404 type(PVT_INDICATION_INCOMING_TRACK), 405 exclusivePtr(NULL), 406 localBufferSize(0) 407 408 { 409 oscl_memset(localBuffer, 0, PV_COMMON_ASYNC_EVENT_LOCAL_BUF_SIZE); 410 }; 411 ~TPV2WayEventInfo()412 ~TPV2WayEventInfo() {}; 413 Clear()414 void Clear() 415 { 416 type = PVT_INDICATION_INCOMING_TRACK; 417 exclusivePtr = NULL; 418 localBufferSize = 0; 419 oscl_memset(localBuffer, 0, PV_COMMON_ASYNC_EVENT_LOCAL_BUF_SIZE); 420 } 421 422 TPVTIndicationType type; 423 TPVCmnExclusivePtr exclusivePtr; 424 uint32 localBufferSize; 425 uint8 localBuffer[PV_COMMON_ASYNC_EVENT_LOCAL_BUF_SIZE]; 426 }; 427 428 /** 429 * TPV2WayPortStatus Class 430 * 431 * An enumeration of port status 432 **/ 433 typedef enum 434 { 435 ENoPort = 0, 436 ERequestPort, 437 EHasPort, 438 EReleasePort 439 } TPV2WayPortStatus; 440 441 class CPV2WayPort 442 { 443 public: CPV2WayPort()444 CPV2WayPort() : iPort(NULL), 445 iPortStatus(ENoPort), 446 iPortCmdId(0) 447 {}; 448 ~CPV2WayPort()449 ~CPV2WayPort() {}; 450 GetPort()451 PVMFPortInterface *GetPort() 452 { 453 return iPort; 454 } GetStatus()455 TPV2WayPortStatus GetStatus() 456 { 457 return iPortStatus; 458 } GetCmdId()459 PVCommandId GetCmdId() 460 { 461 return iPortCmdId; 462 } 463 SetPort(PVMFPortInterface * aPort)464 void SetPort(PVMFPortInterface *aPort) 465 { 466 if (aPort) 467 { 468 iPortStatus = EHasPort; 469 } 470 else 471 { 472 iPortStatus = ENoPort; 473 } 474 iPort = aPort; 475 } SetStatus(TPV2WayPortStatus aStatus)476 void SetStatus(TPV2WayPortStatus aStatus) 477 { 478 iPortStatus = aStatus; 479 } SetCmdId(PVCommandId aId)480 void SetCmdId(PVCommandId aId) 481 { 482 iPortCmdId = aId; 483 } 484 485 private: 486 PVMFPortInterface *iPort; 487 TPV2WayPortStatus iPortStatus; 488 PVCommandId iPortCmdId; 489 }; 490 491 492 typedef enum 493 { 494 PV2WAY_NODE_CMD_QUERY_INTERFACE, 495 PV2WAY_NODE_CMD_INIT, 496 PV2WAY_NODE_CMD_REQUESTPORT, 497 PV2WAY_NODE_CMD_PREPARE, 498 PV2WAY_NODE_CMD_START, 499 PV2WAY_NODE_CMD_PAUSE, 500 PV2WAY_NODE_CMD_STOP, 501 PV2WAY_NODE_CMD_RELEASEPORT, 502 PV2WAY_NODE_CMD_RESET, 503 PV2WAY_NODE_CMD_CANCELCMD, 504 PV2WAY_NODE_CMD_CANCELALL, 505 PV2WAY_NODE_CMD_INVALID, 506 PV2WAY_NODE_CMD_QUERY_UUID, 507 PV2WAY_NODE_CMD_SKIP_MEDIA_DATA 508 } PV2WayNodeCmdType; 509 510 class TPV2WayNodeQueryInterfaceParams 511 { 512 public: 513 PVUuid *iUuid; 514 PVInterface **iInterfacePtr; 515 }; 516 517 class TPV2WayNodeQueryUuidParams 518 { 519 public: 520 Oscl_Vector<PVUuid, OsclMemAllocator> *iUuids; 521 OSCL_HeapString<OsclMemAllocator> mimetype; 522 }; 523 524 525 526 class PV2WayNodeInterface 527 { 528 public: 529 typedef enum 530 { 531 NoInterface, 532 QueryInterface, 533 HasInterface 534 } InterfaceState; 535 PV2WayNodeInterface()536 PV2WayNodeInterface() : iState(NoInterface), 537 iInterface(NULL), 538 iId(0) 539 {}; 540 ~PV2WayNodeInterface()541 ~PV2WayNodeInterface() {}; 542 Reset()543 void Reset() 544 { 545 iState = NoInterface; 546 iInterface = NULL; 547 iId = 0; 548 } 549 550 InterfaceState iState; 551 PVInterface *iInterface; 552 PVMFCommandId iId; 553 }; 554 555 class CPV2WayNodeCommandObserver 556 { 557 public: 558 virtual void CommandHandler(PV2WayNodeCmdType aType, const PVMFCmdResp& aResponse) = 0; 559 560 }; 561 562 class CPV2WayNodeContextData 563 { 564 public: CPV2WayNodeContextData()565 CPV2WayNodeContextData() : iObserver(NULL), 566 iNode(NULL), 567 iContextData(NULL) 568 {}; 569 Clear()570 void Clear() 571 { 572 iObserver = NULL; 573 iNode = NULL; 574 iContextData = NULL; 575 } 576 577 CPV2WayNodeCommandObserver *iObserver; 578 PVMFNodeInterface *iNode; 579 void *iContextData; 580 }; 581 582 class TPV2WayNodeCmdInfo 583 { 584 public: TPV2WayNodeCmdInfo()585 TPV2WayNodeCmdInfo() : type(PV2WAY_NODE_CMD_INIT), 586 id(0), 587 engineCmdInfo(NULL) 588 {}; 589 ~TPV2WayNodeCmdInfo()590 ~TPV2WayNodeCmdInfo() {}; 591 Clear()592 void Clear() 593 { 594 type = PV2WAY_NODE_CMD_INIT; 595 id = 0; 596 context.Clear(); 597 engineCmdInfo = NULL; 598 } 599 600 PV2WayNodeCmdType type; 601 PVMFCommandId id; 602 CPV2WayNodeContextData context; 603 TPV2WayCmdInfo *engineCmdInfo; 604 }; 605 606 class TPV2WayNodeRequestPortParams 607 { 608 public: TPV2WayNodeRequestPortParams()609 TPV2WayNodeRequestPortParams() : portTag(-1), 610 format(PVMF_MIME_FORMAT_UNKNOWN) 611 {}; 612 613 int32 portTag; 614 PVMFFormatType format; 615 }; 616 617 class TPV2WayNode 618 { 619 public: TPV2WayNode()620 TPV2WayNode() : iNode(NULL), 621 iSessionId(0) 622 {}; 623 TPV2WayNode(PVMFNodeInterface * aNode)624 TPV2WayNode(PVMFNodeInterface *aNode) : iNode(aNode), iSessionId(0) 625 {}; 626 627 TPV2WayNode(const TPV2WayNode & aNode)628 TPV2WayNode(const TPV2WayNode &aNode) : iNode(aNode.iNode), 629 iSessionId(aNode.iSessionId) 630 {}; 631 632 TPV2WayNode& operator=(const TPV2WayNode& a) 633 { 634 iNode = a.iNode; 635 iSessionId = a.iSessionId; 636 return *this; 637 } 638 Clear()639 void Clear() 640 { 641 iNode = NULL; 642 iSessionId = 0; 643 } 644 645 operator PVMFNodeInterface *() 646 { 647 return iNode; 648 } 649 GetSessionId()650 PVMFSessionId GetSessionId() 651 { 652 return iSessionId; 653 } 654 655 PVMFNodeInterface *iNode; 656 PVMFSessionId iSessionId; 657 }; 658 659 class SinkNodeIFList 660 { 661 public: 662 SinkNodeIFList()663 SinkNodeIFList() : iSinkNode(NULL) 664 , iNodeInterface() 665 666 {}; 667 ~SinkNodeIFList()668 ~SinkNodeIFList() 669 {}; 670 SinkNodeIFList(const SinkNodeIFList & aList)671 SinkNodeIFList(const SinkNodeIFList& aList) 672 { 673 iSinkNode = aList.iSinkNode; 674 iNodeInterface = aList.iNodeInterface; 675 }; 676 Clear()677 void Clear() 678 { 679 iSinkNode = NULL; 680 iNodeInterface.Reset(); 681 } 682 683 TPV2WayNode* iSinkNode; 684 PV2WayNodeInterface iNodeInterface; 685 }; 686 687 class PlayFromFileNode; 688 class CPVDatapathNode; 689 class CPV2WayDecDataChannelDatapath; 690 class CPV2WayEncDataChannelDatapath; 691 class CPV2WayMuxDatapath; 692 class CPV2WayPreviewDatapath; 693 class CPV2WayRecDatapath; 694 class CPV2WayInitDatapath; 695 class PVCommandStatusObserver; 696 class PVInformationalEventObserver; 697 class PVErrorEventObserver; 698 699 class CPV2WayNodeConfigurationObserver 700 { 701 public: 702 virtual PVMFStatus ConfigureNode(CPVDatapathNode *aNode) = 0; 703 }; 704 705 class CPV324m2Way : OsclActiveObject, 706 public CPV2WayInterface, 707 public PVMFNodeCmdStatusObserver, 708 public PVMFNodeInfoEventObserver, 709 public PVMFNodeErrorEventObserver, 710 public CPV2WayNodeCommandObserver, 711 public CPV2WayNodeConfigurationObserver, 712 #ifndef NO_2WAY_324 713 public TSCObserver, 714 #endif 715 public OsclTimerObserver 716 { 717 public: 718 OSCL_IMPORT_REF static CPV324m2Way *NewL(PVMFNodeInterface* aTsc, 719 TPVTerminalType aTerminalType, 720 PVCommandStatusObserver* aCmdStatusObserver, 721 PVInformationalEventObserver *aInfoEventObserver, 722 PVErrorEventObserver *aErrorEventObserver); 723 724 OSCL_EXPORT_REF static void Delete(CPV324m2Way *aTerminal); 725 726 PVCommandId GetSDKInfo(PVSDKInfo &aSDKInfo, OsclAny* aContextData = NULL); 727 PVCommandId GetSDKModuleInfo(PVSDKModuleInfo &aSDKModuleInfo, OsclAny* aContextData = NULL); 728 PVCommandId Init(PV2WayInitInfo& aInitInfo, OsclAny* aContextData = NULL); 729 PVCommandId Reset(OsclAny* aContextData = NULL); 730 PVCommandId AddDataSource(PVTrackId aChannelId, PVMFNodeInterface& aDataSource, OsclAny* aContextData = NULL); 731 PVCommandId RemoveDataSource(PVMFNodeInterface& aDataSource, OsclAny* aContextData = NULL); 732 PVCommandId AddDataSink(PVTrackId aChannelId, PVMFNodeInterface& aDataSink, OsclAny* aContextData = NULL); 733 PVCommandId RemoveDataSink(PVMFNodeInterface& aDataSink, OsclAny* aContextData = NULL); 734 PVCommandId Connect(const PV2WayConnectOptions& aOptions, PVMFNodeInterface* aCommServer = NULL, OsclAny* aContextData = NULL); 735 PVCommandId Disconnect(OsclAny* aContextData = NULL); 736 PVCommandId GetState(PV2WayState& aState, OsclAny* aContextData = NULL); 737 PVCommandId SetLatencyQualityTradeoff(PVMFNodeInterface& aTrack, int32 aTradeoff, OsclAny* aContextData = NULL); 738 PVCommandId Pause(PV2WayDirection aDirection, PVTrackId aTrackId, OsclAny* aContextData = NULL); 739 PVCommandId Resume(PV2WayDirection aDirection, PVTrackId aTrackId, OsclAny* aContextData = NULL); 740 PVCommandId SetLogAppender(const char* aTag, OsclSharedPtr<PVLoggerAppender>& aAppender, OsclAny* aContextData = NULL); 741 PVCommandId RemoveLogAppender(const char* aTag, OsclSharedPtr<PVLoggerAppender>& aAppender, OsclAny* aContextData = NULL); 742 PVCommandId SetLogLevel(const char* aTag, int32 aLevel, bool aSetSubtree = false, OsclAny* aContextData = NULL); 743 PVCommandId GetLogLevel(const char* aTag, int32& aLogInfo, OsclAny* aContextData = NULL); 744 //PVCommandId SendUserInput(CPVUserInput& user_input, OsclAny* aContextData = NULL); 745 //PVCommandId GetCallStatistics(CPVCmn2WayStatistics& aStats, OsclAny* aContextData = NULL); 746 PVCommandId QueryInterface(const PVUuid& aUuid, PVInterface*& aInterfacePtr, OsclAny* aContext = NULL); 747 PVCommandId QueryUUID(const PvmfMimeString& aMimeType, Oscl_Vector<PVUuid, BasicAlloc>& aUuids, 748 bool aExactUuidsOnly = false, OsclAny* aContextData = NULL); 749 PVCommandId CancelAllCommands(OsclAny* aContextData = NULL); 750 751 // from PVMFNodeCmdEventObserver 752 void NodeCommandCompleted(const PVMFCmdResp& aResponse); 753 754 // from PVMFNodeInfoEventObserver 755 void HandleNodeInformationalEvent(const PVMFAsyncEvent& aEvent); 756 757 // from PVMFNodeErrorEventObserver 758 void HandleNodeErrorEvent(const PVMFAsyncEvent& aEvent); 759 760 // from CPV2WayNodeCommandObserver 761 void CommandHandler(PV2WayNodeCmdType aType, const PVMFCmdResp& aResponse); 762 763 // from CPV2WayNodeConfigurationObserver 764 PVMFStatus ConfigureNode(CPVDatapathNode *aNode); 765 766 //TSC Observer Virtuals 767 /* Responses to commands */ 768 void OutgoingChannelEstablished(TPVChannelId id, PVCodecType_t codec, uint8* fsi, uint32 fsi_len); 769 /* Unsolicited indications */ 770 void ConnectComplete(PVMFStatus status); 771 void InternalError(); 772 /* Requests engine to stop av codecs. TSC will clean up logical channels by itself */ 773 void DisconnectRequestReceived(); 774 TPVStatusCode IncomingChannel(TPVChannelId aId, 775 PVCodecType_t aCodec, 776 uint8* aFormatSpecificInfo = NULL, uint32 aFormatSpecificInfoLen = 0); 777 void ChannelClosed(TPVDirection direction, TPVChannelId id, PVCodecType_t codec, PVMFStatus status = PVMFSuccess); 778 void RequestFrameUpdate(PVMFPortInterface *port); 779 780 // OsclTimerObserver virtuals 781 void TimeoutOccurred(int32 timerID, int32 timeoutInfo); 782 783 #ifndef NO_2WAY_324 784 bool AllChannelsOpened(); 785 #endif 786 bool Supports(PVMFNodeCapability &capability, PVMFFormatType aFormat, bool isInput = true); 787 #ifdef MEM_TRACK 788 void MemStats(); 789 #endif 790 private: 791 CPV324m2Way(); 792 ~CPV324m2Way(); 793 void ClearVideoEncNode(); 794 void ConstructL(PVMFNodeInterface* aTsc, 795 TPVTerminalType aType, 796 PVCommandStatusObserver* aCmdStatusObserver, 797 PVInformationalEventObserver *aInfoEventObserver, 798 PVErrorEventObserver *aErrorEventObserver); 799 void SetDefaults(); 800 801 void PreInit(); 802 // OsclActiveObject virtuals 803 void DoCancel(); 804 void Run(); 805 void Dispatch(TPV2WayCmdInfo* aCmdInfo); 806 void Dispatch(TPV2WayEventInfo* aEventInfo); SetState(PV2WayState aState)807 void SetState(PV2WayState aState) 808 { 809 iLastState = iState; 810 iState = aState; 811 } 812 813 void InitiateDisconnect(); 814 void InitiateReset(); 815 void CheckState(); 816 void CheckInit(); 817 void CheckConnect(); 818 void CheckDisconnect(); 819 void CheckReset(); 820 821 void RemoveAudioDecPath(); 822 void RemoveAudioEncPath(); 823 void RemoveVideoDecPath(); 824 void RemoveVideoEncPath(); 825 826 void HandleCommNodeCmd(PV2WayNodeCmdType aType, const PVMFCmdResp& aResponse); 827 void HandleTscNodeCmd(PV2WayNodeCmdType aType, const PVMFCmdResp& aResponse); 828 void HandleVideoDecNodeCmd(PV2WayNodeCmdType aType, const PVMFCmdResp& aResponse); 829 void HandleVideoEncNodeCmd(PV2WayNodeCmdType aType, const PVMFCmdResp& aResponse); 830 void HandleAudioEncNodeCmd(PV2WayNodeCmdType aType, const PVMFCmdResp& aResponse); 831 void HandleSinkNodeCmd(PV2WayNodeCmdType aType, const PVMFCmdResp& aResponse, TPV2WayNode* aNode); 832 void GenerateIFrame(PVMFPortInterface *aPort); 833 void RequestRemoteIFrame(PVMFPortInterface *aPort); 834 835 TPV2WayCmdInfo *GetCmdInfoL(); 836 void FreeCmdInfo(TPV2WayCmdInfo *info); 837 838 TPV2WayEventInfo *GetEventInfoL(); 839 void FreeEventInfo(TPV2WayEventInfo *info); 840 841 PVMFCommandId SendNodeCmdL(PV2WayNodeCmdType aCmd, TPV2WayNode *aNode, 842 CPV2WayNodeCommandObserver *aObserver, 843 void *aParam = NULL, TPV2WayCmdInfo *a2WayCmdInfo = NULL); 844 845 TPV2WayNodeCmdInfo *FindPendingNodeCmd(PVMFNodeInterface *aNode, PVMFCommandId aId); 846 void RemovePendingNodeCmd(PVMFNodeInterface *aNode, PVMFCommandId aId, bool aAllCmds = false); 847 848 void FillSDKInfo(PVSDKInfo &aSDKInfo); 849 850 851 852 int32 GetStackNodePortTag(TPV2WayPortTagType portType); 853 854 bool CheckMandatoryCodecs(const PVMFFormatType *aMandatoryList, uint32 aMandatorySize, Oscl_Vector<PVMFFormatType, OsclMemAllocator> &aCodecList); 855 856 void InitiateSession(TPV2WayNode& aNode); 857 858 void SetPreferredCodecs(PV2WayInitInfo& aInitInfo); 859 860 void SetPreferredCodecs(TPVDirection aDir, 861 Oscl_Vector<const char*, OsclMemAllocator>& aAudioFormats, 862 Oscl_Vector<const char*, OsclMemAllocator>& aVideoFormats); 863 864 const char* FindFormatType(PVMFFormatType aFormatType, 865 Oscl_Vector<const char*, OsclMemAllocator>& aAudioFormats, 866 Oscl_Vector<const char*, OsclMemAllocator>& aVideoFormats); 867 868 bool IsSupported(const PVMFFormatType& aInputFmtType, const PVMFFormatType& aOutputFmtType); 869 870 const char* CanConvertFormat(TPVDirection aDir, const PVMFFormatType& aThisFmtType, Oscl_Vector<const char*, OsclMemAllocator>& aThatFormatList); 871 872 void DoSelectFormat(TPVDirection aDir, PVMFFormatType aFormatType, const char* aFormatStr, TPVPriority aPriority, PVMFFormatType aFormatApp = PVMF_MIME_FORMAT_UNKNOWN); 873 874 void DoAddDataSource(TPV2WayNode& aNode, const PVMFCmdResp& aResponse); 875 876 void DoAddDataSink(TPV2WayNode& aNode, const PVMFCmdResp& aResponse); 877 878 PVCommandId DoRemoveDataSourceSink(PVMFNodeInterface& aEndPt, OsclAny* aContextData); 879 880 bool IsNodeInList(Oscl_Vector<TPV2WayNode*, OsclMemAllocator>& aList, PVMFNodeInterface* aNode); 881 882 bool IsSourceNode(PVMFNodeInterface* aNode); 883 884 bool IsSinkNode(PVMFNodeInterface* aNode); 885 886 887 TPV2WayNode* GetTPV2WayNode(Oscl_Vector<TPV2WayNode*, OsclMemAllocator>& aList, PVMFNodeInterface* aNode); 888 889 TPV2WayNode* RemoveTPV2WayNode(Oscl_Vector<TPV2WayNode*, OsclMemAllocator>& aList, PVMFNodeInterface* aNode); 890 891 bool IsNodeReset(PVMFNodeInterface& aNode); 892 893 void SupportedSinkNodeInterfaces(TPV2WayNode* aNode); 894 typedef PV2WayRegFormatTypeCompare<OsclMemAllocator> pvmf_format_type_key_compare_class; 895 896 897 void ConvertMapToVector(Oscl_Map<PVMFFormatType, FormatCapabilityInfo, OsclMemAllocator, pvmf_format_type_key_compare_class>& aCodecs, Oscl_Vector<FormatCapabilityInfo, OsclMemAllocator>& aFormatCapability); 898 899 void AddVideoEncoderNode(); 900 void AddAudioEncoderNode(); 901 void AddVideoDecoderNode(uint8* aFormatSpecificInfo, uint32 aFormatSpecificInfoLen); 902 void AddAudioDecoderNode(); 903 void RegisterMioLatency(const char* aMimeStr, bool aAudio, PVMFFormatType aFmtType); 904 uint32 LookupMioLatency(PVMFFormatType aFmtType, bool aAudio); 905 906 907 bool GetEventInfo(TPV2WayEventInfo*& event); 908 static int32 Construct(CPV324m2Way* aRet, 909 PVMFNodeInterface* aTsc, 910 TPVTerminalType aTerminalType, 911 PVCommandStatusObserver* aCmdStatusObserver, 912 PVInformationalEventObserver *aInfoEventObserver, 913 PVErrorEventObserver *aErrorEventObserver); 914 915 void GetStackSupportedFormats(); 916 PVMFStatus EstablishChannel(TPVDirection aDir, 917 TPVChannelId aId, 918 PVCodecType_t aCodec, 919 uint8* fsi, uint32 fsi_len); 920 #ifdef PV_USE_DSP_AMR_CODECS 921 void InitializeDsp(); 922 void ReleaseDsp(); 923 CPVDsp* iDsp; // owned. 924 #endif // PV_USE_DSP_AMR_CODECS 925 926 // Loopback mode 927 TPVLoopbackMode iLoopbackMode; 928 929 // Current state 930 PV2WayState iState; 931 PV2WayState iLastState; 932 933 // Command status observer 934 PVCommandStatusObserver* iCmdStatusObserver; 935 936 // Observer for informational messages 937 PVInformationalEventObserver *iInfoEventObserver; 938 939 // Observer for errors 940 PVErrorEventObserver *iErrorEventObserver; 941 942 /* For milestone 2, we will not use the proxy framework. This will be replaced for Milestone 3 */ 943 Oscl_Vector<TPV2WayNotificationInfo*, BasicAlloc> iPendingNotifications; 944 945 PVCommandId iCommandId; 946 947 PVUuid iCapConfigPVUuid; 948 949 Oscl_Vector<PVUuid, OsclMemAllocator> iSipMgrNodeUuidVec; 950 951 // Video data path 952 CPV2WayEncDataChannelDatapath *iVideoEncDatapath; 953 CPV2WayDecDataChannelDatapath *iVideoDecDatapath; 954 955 // Audio data path 956 CPV2WayEncDataChannelDatapath *iAudioEncDatapath; 957 CPV2WayDecDataChannelDatapath *iAudioDecDatapath; 958 959 // COMM Datapath 960 bool iIsStackConnected; 961 CPV2WayMuxDatapath *iMuxDatapath; 962 TPV2WayNode iTscNode; 963 TSC* iTscNodePtr; 964 TPV2WayNode iCommNode; 965 966 TPV2WayNode iAudioSinkNode; 967 TPV2WayNode iAudioSrcNode; 968 969 #if defined(PV_PLAY_FROM_FILE_SUPPORT) 970 TPV2WayNode iAudioSrcSplitterNode; 971 TPV2WayNode iVideoSrcSplitterNode; 972 #endif 973 974 TPV2WayNode iVideoEncNode; 975 PV2WayNodeInterface iVideoEncNodeInterface; 976 977 TPV2WayNode iVideoDecNode; 978 TPV2WayNode iVideoParserNode; 979 980 #if defined(PV_RECORD_TO_FILE_SUPPORT) 981 TPV2WayNode iVideoDecSplitterNode; 982 #endif 983 984 TPV2WayNode iAudioEncNode; 985 TPV2WayNode iAudioDecNode; 986 PV2WayNodeInterface iAudioEncNodeInterface; 987 988 PV2WayNodeInterface iClockSyncInterface; 989 990 Oscl_Vector<SinkNodeIFList, OsclMemAllocator> iSinkNodeList; 991 992 Oscl_Vector<TPV2WayNode*, OsclMemAllocator> iSourceNodes; 993 Oscl_Vector<TPV2WayNode*, OsclMemAllocator> iSinkNodes; 994 995 PVUuid iSyncControlPVUuid; 996 997 Oscl_Vector<TPV2WayCmdInfo *, BasicAlloc> iFreeCmdInfo; 998 TPV2WayCmdInfo iCmdInfo[MAX_PENDING_2WAY_COMMANDS]; 999 1000 Oscl_Vector<TPV2WayEventInfo *, BasicAlloc> iFreeEventInfo; 1001 TPV2WayEventInfo iEventInfo[MAX_PENDING_2WAY_EVENTS]; 1002 1003 Oscl_Vector<TPV2WayNodeCmdInfo *, BasicAlloc> iFreeNodeCmdInfo; 1004 Oscl_Vector<TPV2WayNodeCmdInfo *, BasicAlloc> iPendingNodeCmdInfo; 1005 TPV2WayNodeCmdInfo iNodeCmdInfo[MAX_PENDING_2WAY_NODE_COMMANDS]; 1006 1007 // pending Init info 1008 TPV2WayCmdInfo *iInitInfo; 1009 1010 // pending Connect info 1011 TPV2WayCmdInfo *iConnectInfo; 1012 1013 // Is a disconnect pending ? 1014 TPV2WayCmdInfo *iDisconnectInfo; 1015 1016 // Is a reset pending ? 1017 TPV2WayCmdInfo *iResetInfo; 1018 1019 // Is a cancel pending ? 1020 TPV2WayCmdInfo *iCancelInfo; 1021 1022 // Is a get session params call pending ? 1023 TPV2WayCmdInfo *iSessionParamsInfo; 1024 1025 PVLogger *iLogger; 1026 1027 1028 //Minimum time between making successive I frame requests (sec). 1029 uint32 iMinIFrameRequestInterval; 1030 OsclTimer<OsclMemAllocator> iIFrameReqTimer; 1031 OsclTimer<OsclMemAllocator>* iEndSessionTimer; 1032 OsclTimer<OsclMemAllocator>* iRemoteDisconnectTimer; 1033 bool isIFrameReqTimerActive; 1034 1035 #ifndef NO_2WAY_324 1036 Oscl_Vector<H324ChannelParameters, PVMFTscAlloc> iIncomingChannelParams; 1037 Oscl_Map<PVMFFormatType, FormatCapabilityInfo, OsclMemAllocator, pvmf_format_type_key_compare_class> iIncomingAudioCodecs; 1038 Oscl_Map<PVMFFormatType, FormatCapabilityInfo, OsclMemAllocator, pvmf_format_type_key_compare_class> iIncomingVideoCodecs; 1039 Oscl_Map<PVMFFormatType, FormatCapabilityInfo, OsclMemAllocator, pvmf_format_type_key_compare_class> iOutgoingAudioCodecs; 1040 Oscl_Map<PVMFFormatType, FormatCapabilityInfo, OsclMemAllocator, pvmf_format_type_key_compare_class> iOutgoingVideoCodecs; 1041 1042 Oscl_Map<char*, uint32, OsclMemAllocator> iAudioLatency; 1043 Oscl_Map<char*, uint32, OsclMemAllocator> iVideoLatency; 1044 1045 Oscl_Vector<FormatCapabilityInfo, OsclMemAllocator> iFormatCapability; 1046 1047 /* A list of formats supported by the stack in a certain order of priority. This list should ideally come from the stack but 1048 for now we can generate it internally in the engine and later we will have an API for the stack to return it. 1049 For the current version, the list would look like this: 1050 {AMR, Mpeg-4, H.263} 1051 */ 1052 Oscl_Map<PVMFFormatType, CPvtMediaCapability*, OsclMemAllocator, pvmf_format_type_key_compare_class> iStackSupportedFormats; 1053 /* App Format is the format of the Node/MIO that the application needs to pass in for an incoming/outgoing datapath. 1054 These maps track which application formats are expected by the engine for formats(codecs) supported by the engine 1055 for the current call. 1056 */ 1057 Oscl_Map<PVMFFormatType, PVMFFormatType, OsclMemAllocator, pvmf_format_type_key_compare_class> iAppFormatForEngineFormatIncoming; 1058 Oscl_Map<PVMFFormatType, PVMFFormatType, OsclMemAllocator, pvmf_format_type_key_compare_class> iAppFormatForEngineFormatOutgoing; 1059 1060 Oscl_Vector<FormatCapabilityInfo, OsclMemAllocator> iIncomingUserInputFormats; 1061 Oscl_Vector<H324ChannelParameters, PVMFTscAlloc> iOutgoingChannelParams; 1062 int32 iIncomingAudioTrackTag; 1063 int32 iIncomingVideoTrackTag; 1064 int32 iOutgoingAudioTrackTag; 1065 int32 iOutgoingVideoTrackTag; 1066 #endif 1067 PVUuid iVideoEncPVUuid; 1068 PVUuid iAudioEncPVUuid; 1069 PVMFCommandId iVideoEncQueryIntCmdId; 1070 1071 typedef enum 1072 { 1073 File2WayIdle, 1074 File2WayInitializing, 1075 File2WayInitialized, 1076 File2WayResetting 1077 } File2WayState; 1078 1079 1080 #if defined(PV_RECORD_TO_FILE_SUPPORT) 1081 void HandleFFComposerNodeCmd(PV2WayNodeCmdType aType, const PVMFCmdResp& aResponse); 1082 void RemoveAudioRecPath(); 1083 void RemoveVideoRecPath(); 1084 void CheckRecordFileState(); 1085 void CheckRecordFileInit(); 1086 void CheckRecordFileReset(); 1087 void InitiateResetRecordFile(); 1088 1089 OSCL_wHeapString<OsclMemAllocator> iRecFilename; 1090 File2WayState iRecordFileState; 1091 1092 // Is a init record file pending ? 1093 TPV2WayCmdInfo *iInitRecFileInfo; 1094 1095 // Is a reset record file pending ? 1096 TPV2WayCmdInfo *iResetRecFileInfo; 1097 1098 TPV2WayNode iFFComposerNode; 1099 PV2WayNodeInterface iFFClipConfig; 1100 PV2WayNodeInterface iFFTrackConfig; 1101 PV2WayNodeInterface iFFSizeAndDuration; 1102 1103 PVUuid iFFClipConfigPVUuid; 1104 PVUuid iFFTrackConfigPVUuid; 1105 PVUuid iFFSizeAndDurationPVUuid; 1106 CPV2WayRecDatapath *iAudioRecDatapath; 1107 CPV2WayRecDatapath *iVideoRecDatapath; 1108 1109 uint32 iRecFileSizeNotificationInterval; //Interval in msec 1110 OsclTimer<OsclMemAllocator> iRecFileSizeNotificationTimer; 1111 bool isRecFileSizeNotificationTimerActive; 1112 #endif 1113 1114 #if defined(PV_PLAY_FROM_FILE_SUPPORT) 1115 void RemoveAudioPreviewPath(); 1116 void RemoveVideoPreviewPath(); 1117 1118 CPV2WayPreviewDatapath *iAudioPreviewDatapath; 1119 CPV2WayPreviewDatapath *iVideoPreviewDatapath; 1120 1121 void HandlePFFNodeCmd(PV2WayNodeCmdType aType, const PVMFCmdResp& aResponse); 1122 void CheckPlayFileState(); 1123 void CheckPlayFileInit(); 1124 void CheckPlayFileReset(); 1125 void InitiateResetPlayFile(); 1126 void CheckAudioSourceMixingPort(); 1127 void HandleAudioSrcNodeCmd(PV2WayNodeCmdType aType, const PVMFCmdResp& aResponse); 1128 1129 OSCL_wHeapString<OsclMemAllocator> iPlayFilename; 1130 File2WayState iPlayFileState; 1131 bool iUsePlayFileAsSource; 1132 1133 // Is a init play file pending ? 1134 TPV2WayCmdInfo *iInitPlayFileInfo; 1135 1136 // Is a reset play file pending ? 1137 TPV2WayCmdInfo *iResetPlayFileInfo; 1138 1139 // Play file cmd ? 1140 TPV2WayCmdInfo *iPlayFileCmdInfo; 1141 1142 PlayFromFileNode *iPlayFromFileNode; 1143 CPV2WayPort iAudioPlayPort; 1144 CPV2WayPort iVideoPlayPort; 1145 #endif 1146 1147 /* Common clock to be shared with nodes that support the PvmfNodesSyncControlInterface interface */ 1148 PVMFMediaClock iClock; 1149 PVMFTimebase_Tickcount iTickCountTimeBase; 1150 1151 friend class CPV2WayCmdControlDatapath; 1152 friend class CPV2WayDatapath; 1153 friend class CPV2WayDataChannelDatapath; 1154 friend class CPV2WayDecDataChannelDatapath; 1155 friend class CPV2WayEncDataChannelDatapath; 1156 friend class CPV2WayMuxDatapath; 1157 1158 #if defined(PV_PLAY_FROM_FILE_SUPPORT) 1159 friend class CPV2WayPreviewDatapath; 1160 #endif 1161 1162 #if defined(PV_RECORD_TO_FILE_SUPPORT) 1163 friend class CPV2WayRecDatapath; 1164 #endif 1165 1166 TSC *iTSCInterface; 1167 TSC_324m *iTSC324mInterface; 1168 1169 TPVTerminalType iTerminalType; 1170 1171 int32 iPendingTscReset; 1172 int32 iPendingAudioEncReset; 1173 int32 iPendingVideoEncReset; 1174 int32 iAudioDatapathLatency; 1175 int32 iVideoDatapathLatency; 1176 1177 /* The AddDataSource command for video will be pending untill the extension interface for the encoder is queried and the 1178 encoder is configured */ 1179 TPV2WayCmdInfo *iAddDataSourceVideoCmd; 1180 }; 1181 1182 #endif 1183 1184