static void send_port_auto_detect_events (dirble_prc_t * ap_prc) { assert (ap_prc); if (ap_prc->audio_coding_type_ != OMX_AUDIO_CodingUnused && ap_prc->audio_coding_type_ != OMX_AUDIO_CodingAutoDetect) { TIZ_DEBUG (handleOf (ap_prc), "Issuing OMX_EventPortFormatDetected"); tiz_srv_issue_event ((OMX_PTR) ap_prc, OMX_EventPortFormatDetected, 0, 0, NULL); TIZ_DEBUG (handleOf (ap_prc), "Issuing OMX_EventPortSettingsChanged"); tiz_srv_issue_event ((OMX_PTR) ap_prc, OMX_EventPortSettingsChanged, ARATELIA_HTTP_SOURCE_PORT_INDEX, /* port 0 */ OMX_IndexParamPortDefinition, /* the index of the struct that has been modififed */ NULL); } else { /* Oops... could not detect the stream format */ /* This is to make sure this url will not get processed again... */ ap_prc->remove_current_url_ = true; /* Get ready to auto-detect another stream */ set_auto_detect_on_port (ap_prc); prepare_for_port_auto_detection (ap_prc); /* Finally, signal the client */ TIZ_DEBUG (handleOf (ap_prc), "Issuing OMX_ErrorFormatNotDetected"); tiz_srv_issue_err_event ((OMX_PTR) ap_prc, OMX_ErrorFormatNotDetected); } }
static bool connection_lost (OMX_PTR ap_arg) { dirble_prc_t * p_prc = ap_arg; assert (p_prc); TIZ_PRINTF_DBG_RED ("connection_lost\n"); if (p_prc->auto_detect_on_) { /* Oops... unable to connect to the station */ /* Make sure this url will not get processed again... */ p_prc->remove_current_url_ = true; /* Get ready to auto-detect another stream */ set_auto_detect_on_port (p_prc); prepare_for_port_auto_detection (p_prc); /* Signal the client */ tiz_srv_issue_err_event ((OMX_PTR) p_prc, OMX_ErrorFormatNotDetected); } /* Return false to indicate that there is no need to start the automatic reconnection procedure */ return false; }
static void send_port_auto_detect_events (scloud_prc_t * ap_prc) { assert (ap_prc); if (ap_prc->audio_coding_type_ != OMX_AUDIO_CodingUnused || ap_prc->audio_coding_type_ != OMX_AUDIO_CodingAutoDetect) { TIZ_DEBUG (handleOf (ap_prc), "Issuing OMX_EventPortFormatDetected"); tiz_srv_issue_event ((OMX_PTR) ap_prc, OMX_EventPortFormatDetected, 0, 0, NULL); TIZ_DEBUG (handleOf (ap_prc), "Issuing OMX_EventPortSettingsChanged"); tiz_srv_issue_event ((OMX_PTR) ap_prc, OMX_EventPortSettingsChanged, ARATELIA_HTTP_SOURCE_PORT_INDEX, /* port 0 */ OMX_IndexParamPortDefinition, /* the index of the struct that has been modififed */ NULL); } else { /* Oops... could not detect the stream format */ tiz_srv_issue_err_event ((OMX_PTR) ap_prc, OMX_ErrorFormatNotDetected); } }