void voip_cleanup() { //if(appControlInfo.voipInfo.active) { interface_removeEvent(voip_call_event,NULL); //voip_hangup(interfaceInfo.currentMenu, NULL); appControlInfo.voipInfo.active = 0; appControlInfo.voipInfo.connected = 0; voip_loggingIn = 0; //voip_pipe_write("q", 2); if (voip_socket != INVALID_SOCKET) { eprintf("VoIP: Close socket\n"); close(voip_socket); voip_socket = INVALID_SOCKET; } /* int res; do { usleep(1000); res = system( "killall -0 pjsua" ); } while ( WIFEXITED(res) == 1 && WEXITSTATUS(res) == 0 );*/ } }
void rtsp_disableStateCheck(void) { // At the end make focused play controls but not slider interface_playControlSlider(0, 0, 0); interface_playControlSetInputFocus(inputFocusPlayControl); interface_playControlSelect(interfacePlayControlStop); interface_removeEvent(rtsp_checkPlaybackState, NULL); interface_notifyText(NULL, 1); }
static int rtsp_stream_change(interfaceMenu_t *pMenu, void* pArg) { int which = CHANNEL_INFO_GET_SCREEN(pArg); unsigned int streamNumber = CHANNEL_INFO_GET_CHANNEL(pArg); dprintf("%s(%d): in %d\n", __FUNCTION__, which, streamNumber); interface_removeEvent(rtsp_stream_start, pArg); if ( appControlInfo.rtspInfo.active != 0 ) { eprintf("RTSP: stop video at %d\n", which); // force showState to NOT be triggered interfacePlayControl.activeButton = interfacePlayControlStop; rtsp_stopVideo(which); } if (streamNumber != CHANNEL_CUSTOM) { interface_setSelectedItem(_M &rtspStreamMenu, streamNumber); if ( pstream_head == NULL ) { int ret = get_rtsp_streams(ppstream_head); dprintf("%s: Found streams %i\n", __FUNCTION__,ret); if (ret != 0 || pstream_head == NULL) { interface_showMessageBox(_T("ERR_DEFAULT_STREAM"), thumbnail_warning, 0); eprintf("RTSP: Failed to find default stream\n"); return -1; } } streams_struct* stream_ptr = get_stream(streamNumber); if ( !stream_ptr ) { interface_showMessageBox(_T("ERR_STREAM_IN_LIST"), thumbnail_error, 0); eprintf("RTSP: Stream number %d not found in linked list\n", streamNumber); return -1; } //dprintf("%s: stream_ptr->stream %s\n", __FUNCTION__, stream_ptr->stream); stream_info.port = appControlInfo.rtspInfo.RTSPPort; strcpy(stream_info.ip, appControlInfo.rtspInfo.streamIP); strcpy(stream_info.streamname, stream_ptr->stream); appControlInfo.playbackInfo.playlistMode = playlistModeNone; stream_info.custom_url = 0; } if ( rtsp_stream_start(pArg) == 0 ) { interface_showMenu(0, 1); return 0; } return -1; }
int voip_hangup(interfaceMenu_t *pMenu, void *pArg) { if( appControlInfo.voipInfo.status > voipStatus_idle ) { voip_pipe_write( "ha", 3 ); voip_addEntryToList(pMenu, (void*) (appControlInfo.voipInfo.status > voipStatus_incoming ? LIST_ANSWERED : LIST_MISSED) ); interface_removeEvent(voip_call_event,NULL); interfaceInfo.showIncomingCall = 0; appControlInfo.voipInfo.status = voipStatus_idle; voip_fillMenu(interfaceInfo.currentMenu, (void*)0); } return 0; }