Exemple #1
0
        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;
        }
Exemple #2
0
        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;
        }