public ErrorCode init(AVProperty prop, IMediaInfo input, out IMediaInfo output) { output = null; if (input == null) { return ErrorCode.NullReference; } if (input.stremType() != StreamType.Audio) { return ErrorCode.InvalidStream; } if (input.mediaType() == MediaType.WAVE_LPCM) { lpcm_ = true; } else if (input.mediaType() == MediaType.WAVE_PCM) { lpcm_ = false; } else { return ErrorCode.InvalidStream; } output = new WaveInfo(input.getAudioInfo(), input.getDuration()); return ErrorCode.Success; }
public AVProperty getProperty(Int32 id) { AVProperty prop = new AVProperty(); prop.id = PropertyId.Dummy; return prop; }
public ErrorCode init(AVProperty prop, IMediaInfo input) { if (input == null) { return ErrorCode.NullReference; } StreamType st = input.stremType(); if (st != StreamType.Audio) { return ErrorCode.InvalidStream; } MediaType mt = input.mediaType(); if (mt != MediaType.WAVE_PCM) { return ErrorCode.InvalidStream; } AudioInfo ai = input.getAudioInfo(); wfx_.cbSize = 0; wfx_.nChannels = ai.channels; wfx_.wBitsPerSample = ai.bitsPerSample; wfx_.nBlockAlign = (UInt16)(ai.channels * ai.bitsPerSample / 8); wfx_.wFormatTag = 1; wfx_.nSamplesPerSec = ai.sampleRate; wfx_.nAvgBytesPerSec = wfx_.nBlockAlign * wfx_.nSamplesPerSec; return ErrorCode.Success; }
public ErrorCode init(AVProperty prop, IMediaInfo input, out IMediaInfo output) { output = null; if (input == null) { return ErrorCode.NullReference; } if (input.stremType() != StreamType.Audio) { return ErrorCode.InvalidStream; } if (input.mediaType() != MediaType.MPEG10) { return ErrorCode.InvalidStream; } output = new WaveInfo(input.getAudioInfo(), input.getDuration()); return ErrorCode.Success; }