static OMX_ERRORTYPE httpr_mp3port_GetParameter (const void *ap_obj, OMX_HANDLETYPE ap_hdl, OMX_INDEXTYPE a_index, OMX_PTR ap_struct) { const httpr_mp3port_t *p_obj = ap_obj; OMX_ERRORTYPE rc = OMX_ErrorNone; TIZ_TRACE (ap_hdl, "[%s]...", tiz_idx_to_str (a_index)); assert (NULL != p_obj); if (OMX_TizoniaIndexParamIcecastMountpoint == a_index) { memcpy (ap_struct, &(p_obj->mountpoint_), sizeof(OMX_TIZONIA_ICECASTMOUNTPOINTTYPE)); } else { /* Delegate to the base port */ rc = super_GetParameter (typeOf (ap_obj, "httprmp3port"), ap_obj, ap_hdl, a_index, ap_struct); } return rc; }
static OMX_ERRORTYPE cc_youtube_cfgport_GetParameter (const void * ap_obj, OMX_HANDLETYPE ap_hdl, OMX_INDEXTYPE a_index, OMX_PTR ap_struct) { const cc_youtube_cfgport_t * p_obj = ap_obj; OMX_ERRORTYPE rc = OMX_ErrorNone; assert (p_obj); TIZ_TRACE (ap_hdl, "PORT [%d] GetParameter [%s]...", tiz_port_index (ap_obj), tiz_idx_to_str (a_index)); if (OMX_TizoniaIndexParamAudioYoutubeSession == a_index) { memcpy (ap_struct, &(p_obj->session_), sizeof (OMX_TIZONIA_AUDIO_PARAM_YOUTUBESESSIONTYPE)); } else if (OMX_TizoniaIndexParamAudioYoutubePlaylist == a_index) { memcpy (ap_struct, &(p_obj->playlist_), sizeof (OMX_TIZONIA_AUDIO_PARAM_YOUTUBEPLAYLISTTYPE)); } else { /* Delegate to the base port */ rc = super_GetParameter (typeOf (ap_obj, "cc_youtubecfgport"), ap_obj, ap_hdl, a_index, ap_struct); } return rc; }
static OMX_ERRORTYPE httpsrc_port_GetParameter (const void *ap_obj, OMX_HANDLETYPE ap_hdl, OMX_INDEXTYPE a_index, OMX_PTR ap_struct) { const httpsrc_port_t *p_obj = ap_obj; OMX_ERRORTYPE rc = OMX_ErrorNone; assert (p_obj); TIZ_TRACE (ap_hdl, "PORT [%d] GetParameter [%s]...", tiz_port_index (ap_obj), tiz_idx_to_str (a_index)); switch (a_index) { case OMX_IndexParamAudioMp3: { OMX_AUDIO_PARAM_MP3TYPE *p_mp3mode = (OMX_AUDIO_PARAM_MP3TYPE *) ap_struct; *p_mp3mode = p_obj->mp3type_; } break; case OMX_IndexParamAudioAac: { OMX_AUDIO_PARAM_AACPROFILETYPE *p_aacmode = (OMX_AUDIO_PARAM_AACPROFILETYPE *) ap_struct; *p_aacmode = p_obj->aactype_; } break; default: { if (OMX_TizoniaIndexParamAudioOpus == a_index) { OMX_TIZONIA_AUDIO_PARAM_OPUSTYPE *p_opusmode = (OMX_TIZONIA_AUDIO_PARAM_OPUSTYPE *) ap_struct; *p_opusmode = p_obj->opustype_; } else { /* Try the parent's indexes */ rc = super_GetParameter (typeOf (ap_obj, "httpsrcport"), ap_obj, ap_hdl, a_index, ap_struct); } } break; }; return rc; }
static OMX_ERRORTYPE binaryport_GetParameter (const void * ap_obj, OMX_HANDLETYPE ap_hdl, OMX_INDEXTYPE a_index, OMX_PTR ap_struct) { const tiz_binaryport_t * p_obj = ap_obj; OMX_ERRORTYPE rc = OMX_ErrorNone; TIZ_TRACE (ap_hdl, "PORT [%d] GetParameter [%s]...", tiz_port_index (ap_obj), tiz_idx_to_str (a_index)); assert (p_obj); switch (a_index) { case OMX_IndexParamAudioPortFormat: case OMX_IndexParamVideoPortFormat: case OMX_IndexParamImagePortFormat: case OMX_IndexParamOtherPortFormat: { /* Delegate to the domain-specific port */ if (OMX_ErrorUnsupportedIndex != (rc = tiz_api_GetParameter (p_obj->p_port_, ap_hdl, a_index, ap_struct))) { return rc; } } /* NOTE: Fall through if GetParameter returned * OMX_ErrorUnsupportedIndex. So that we delegate to the parent */ /*@fallthrough@*/ default: { /* Delegate to the base port */ rc = super_GetParameter (typeOf (ap_obj, "tizbinaryport"), ap_obj, ap_hdl, a_index, ap_struct); } }; return rc; }