OMX_ERRORTYPE graph::httpclntops::add_decoder_to_component_list ( omx_comp_name_lst_t &comp_list, omx_comp_role_lst_t &role_list) { OMX_ERRORTYPE rc = OMX_ErrorNone; switch (encoding_) { case OMX_AUDIO_CodingMP3: { comp_list.push_back ("OMX.Aratelia.audio_decoder.mp3"); role_list.push_back ("audio_decoder.mp3"); } break; case OMX_AUDIO_CodingAAC: { comp_list.push_back ("OMX.Aratelia.audio_decoder.aac"); role_list.push_back ("audio_decoder.aac"); } break; case OMX_AUDIO_CodingVORBIS: { comp_list.push_back ("OMX.Aratelia.audio_decoder.vorbis"); role_list.push_back ("audio_decoder.vorbis"); } break; default: { if (OMX_AUDIO_CodingOPUS == encoding_) { comp_list.push_back ("OMX.Aratelia.audio_decoder.opusfile.opus"); role_list.push_back ("audio_decoder.opus"); } else if (OMX_AUDIO_CodingFLAC == encoding_) { comp_list.push_back ("OMX.Aratelia.audio_decoder.flac"); role_list.push_back ("audio_decoder.flac"); } else { TIZ_LOG (TIZ_PRIORITY_ERROR, "[OMX_ErrorFormatNotDetected] : Unhandled encoding type [%d]...", encoding_); rc = OMX_ErrorFormatNotDetected; } } break; }; return rc; }
OMX_ERRORTYPE graph::youtubeops::add_demuxer_to_component_list ( omx_comp_name_lst_t &comp_list, omx_comp_role_lst_t &role_list) { OMX_ERRORTYPE rc = OMX_ErrorFormatNotDetected; if (OMX_AUDIO_CodingWEBM == container_) { comp_list.push_back ("OMX.Aratelia.container_demuxer.webm"); role_list.push_back ("container_demuxer.filter.webm"); rc = OMX_ErrorNone; } else if (OMX_AUDIO_CodingMP4 == container_) { // TODO TIZ_LOG (TIZ_PRIORITY_ERROR, "[OMX_ErrorFormatNotDetected] : Unhandled container format " "[OMX_AUDIO_CodingMP4]."); } else if (OMX_AUDIO_CodingOGA == container_) { // TODO TIZ_LOG (TIZ_PRIORITY_ERROR, "[OMX_ErrorFormatNotDetected] : Unhandled container format " "[OMX_AUDIO_CodingOGA]."); } else { TIZ_LOG ( TIZ_PRIORITY_ERROR, "[OMX_ErrorFormatNotDetected] : Unhandled container format [%d]...", container_); } return rc; }
OMX_ERRORTYPE graph::youtubeops::add_decoder_to_component_list ( omx_comp_name_lst_t &comp_list, omx_comp_role_lst_t &role_list) { OMX_ERRORTYPE rc = OMX_ErrorNone; switch (encoding_) { case OMX_AUDIO_CodingMP3: { comp_list.push_back ("OMX.Aratelia.audio_decoder.mp3"); role_list.push_back ("audio_decoder.mp3"); } break; case OMX_AUDIO_CodingAAC: { comp_list.push_back ("OMX.Aratelia.audio_decoder.aac"); role_list.push_back ("audio_decoder.aac"); } break; case OMX_AUDIO_CodingVORBIS: { comp_list.push_back ("OMX.Aratelia.audio_decoder.vorbis"); role_list.push_back ("audio_decoder.vorbis"); } break; default: { if (OMX_AUDIO_CodingOPUS == encoding_) { comp_list.push_back ("OMX.Aratelia.audio_decoder.opus"); role_list.push_back ("audio_decoder.opus"); } else if (OMX_AUDIO_CodingFLAC == encoding_) { comp_list.push_back ("OMX.Aratelia.audio_decoder.flac"); role_list.push_back ("audio_decoder.flac"); } else { TIZ_LOG ( TIZ_PRIORITY_ERROR, "[OMX_ErrorFormatNotDetected] : Unhandled encoding type [%d]...", encoding_); rc = OMX_ErrorFormatNotDetected; // OK, this requires an explanation. At this point, we have not been // able to find a decoder for this stream, so load anything just for // the sake of completing the graph and then let's recover by tearing // down everything and starting from scratch (like during the // 'skipping' sequence). comp_list.push_back ("OMX.Aratelia.audio_decoder.mp3"); role_list.push_back ("audio_decoder.mp3"); } } break; }; return rc; }