bool DXVA2Decoder::GetInputOutput(void) { if (!m_service) return false; LOG(VB_PLAYBACK, LOG_INFO, LOC + QString("Looking for support for %1") .arg(toString(m_codec_id))); uint input_count; GUID *input_list; m_format.Format = D3DFMT_UNKNOWN; IDirectXVideoDecoderService_GetDecoderDeviceGuids( m_service, &input_count, &input_list); for (const dxva2_mode* mode = dxva2_modes; !mode->name.isEmpty() && m_format.Format == D3DFMT_UNKNOWN; mode++) { if (mode->codec != m_codec_id) continue; for (uint j = 0; j < input_count; j++) { if (IsEqualGUID(input_list[j], *mode->guid)) { LOG(VB_PLAYBACK, LOG_INFO, LOC + QString("Testing %1") .arg(mode->name)); if (TestTarget(input_list[j])) break; } } } return m_format.Format != D3DFMT_UNKNOWN; }
void Client::GetTargetTypeName(int32_t targetType, csString& targetDesc) const { targetDesc.Clear(); TestTarget(targetDesc, targetType, TARGET_NONE, "the surrounding area"); TestTarget(targetDesc, targetType, TARGET_ITEM, "items"); TestTarget(targetDesc, targetType, TARGET_SELF, "yourself"); TestTarget(targetDesc, targetType, TARGET_FRIEND, "living friends"); TestTarget(targetDesc, targetType, TARGET_FOE, "living enemies"); TestTarget(targetDesc, targetType, TARGET_DEAD, "the dead"); }