////////////////////////////////////////////////////////////////////////////
///
/// Fill in the configuration parameters used by the super-class and reset everything.
///
/// \todo This uses default values for SizeOfTransformCapabilityStructure and
/// TransformCapabilityStructurePointer. This is wrong (but harmless).
///
Codec_MmeAudioSilence_c::Codec_MmeAudioSilence_c(void)
{
	CodecStatus_t Status;
	int i;
	Configuration.CodecName = "Silence generator";
	Configuration.StreamParameterContextCount = 1;
	Configuration.StreamParameterContextDescriptor = &SilentAudioCodecStreamParameterContextDescriptor;
	Configuration.DecodeContextCount = 4;
	Configuration.DecodeContextDescriptor = &SilentAudioCodecDecodeContextDescriptor;
	for (i = 0; i < CODEC_MAX_TRANSFORMERS; i++)
		Configuration.TransformName[i] = "SILENCE_GENERATOR";
	Configuration.AvailableTransformers = CODEC_MAX_TRANSFORMERS;
	Configuration.AddressingMode = CachedAddress;
//
	CurrentTranscodeBufferIndex = 0;
	TranscodedFramePool = NULL;
	TranscodedFrameMemory[CachedAddress] = NULL;
	TranscodedFrameMemory[UnCachedAddress] = NULL;
	TranscodedFrameMemory[PhysicalAddress] = NULL;
	Reset();
	ProtectTransformName = true;
	Status = GloballyVerifyMMECapabilities();
	if (CodecNoError != Status)
	{
		CODEC_ERROR("Silence generator not found (module not installed?)\n");
		InitializationStatus = PlayerNotSupported;
		return;
	}
}
////////////////////////////////////////////////////////////////////////////
///
/// Fill in the configuration parameters used by the super-class and reset everything.
///
Codec_MmeAudioDtshd_c::Codec_MmeAudioDtshd_c( bool isLbrStream) : IsLbrStream(isLbrStream)
{
    CodecStatus_t Status;

    if (isLbrStream)
        Configuration.CodecName                     = "DTS-HD LBR audio";
    else
        Configuration.CodecName                     = "DTS(-HD) audio";

    Configuration.StreamParameterContextCount           = 1;
    Configuration.StreamParameterContextDescriptor      = &DtshdAudioCodecStreamParameterContextDescriptor;

    Configuration.DecodeContextCount                    = 4;
    Configuration.DecodeContextDescriptor               = &DtshdAudioCodecDecodeContextDescriptor;

//

    AudioDecoderTransformCapabilityMask.DecoderCapabilityFlags = (1 << (isLbrStream?ACC_DTS_LBR:ACC_DTS));

    DecoderId                                                  = ACC_DTS_ID;

    CurrentTranscodeBufferIndex = 0;

    TranscodedFramePool = NULL;

    TranscodedFrameMemory[CachedAddress]      = NULL;
    TranscodedFrameMemory[UnCachedAddress]    = NULL;
    TranscodedFrameMemory[PhysicalAddress]    = NULL;

    Reset();

//

#ifdef CONFIG_CPU_SUBTYPE_STX7200
    // This is a pretty gross hack to allow the pre-startup checks to work (the ones that would have
    // us fall back the silence generator. The basic problem is that AUDIO_DECODER may refer to
    // either #3 or #4 (and may changed based on the victor of boot time races) and that, for some BD-ROM
    // deployments, #4 doesn't support DTS. This results in the eroneous adoption of the silence generator.
    // Our solution is to temporarily change the transformer names to allow the codec to initialize. We then
    // switch them back again in order to prevent the system breaking during a later call to
    // SetModuleParameters(CodecSpecifyTransformerPostFix...).
    strcat(TransformName[1],"3");
    strcat(TransformName[2],"4");
#endif
    Status = GloballyVerifyMMECapabilities();
    if( CodecNoError != Status )
    {
        InitializationStatus = PlayerNotSupported;
        return;
    }
#ifdef CONFIG_CPU_SUBTYPE_STX7200
    strcpy(TransformName[1], AUDIO_DECODER_TRANSFORMER_NAME);
    strcpy(TransformName[2], AUDIO_DECODER_TRANSFORMER_NAME);
#endif
}