From 6fa9a5a495d73a347c84b004a99f6f1102860d3d Mon Sep 17 00:00:00 2001 From: martii Date: Sat, 5 Apr 2014 13:24:39 +0200 Subject: [PATCH] libeplayer: remove inject_raw_pcm (unused) --- libeplayer3/container/container_ffmpeg.c | 36 ++++++------------------ libeplayer3/include/manager.h | 9 ------ 2 files changed, 8 insertions(+), 37 deletions(-) diff --git a/libeplayer3/container/container_ffmpeg.c b/libeplayer3/container/container_ffmpeg.c index 2cdf789..09d8bd6 100644 --- a/libeplayer3/container/container_ffmpeg.c +++ b/libeplayer3/container/container_ffmpeg.c @@ -386,36 +386,16 @@ static void FFMPEGThread(Context_t * context) currentAudioPts = /* CHECK audioTrack->pts = */pts = calcPts(avContext, audioTrack->stream, packet.pts); ffmpeg_printf(200, "AudioTrack index = %d\n", pid); - if (audioTrack->inject_raw_pcm == 1) { - ffmpeg_printf(200, "write audio raw pcm\n"); + avOut.data = packet_data; + avOut.len = packet_size; + avOut.pts = pts; + avOut.packet = &packet; + avOut.type = "audio"; + avOut.stream = audioTrack->stream; + avOut.avfc = avContext; - avOut.uNoOfChannels = ((AVStream *) audioTrack->stream)->codec->channels; - avOut.uSampleRate = ((AVStream *) audioTrack->stream)->codec->sample_rate; - avOut.uBitsPerSample = 16; - avOut.bLittleEndian = 1; - - avOut.data = packet_data; - avOut.len = packet_size; - avOut.pts = pts; - avOut.packet = &packet; - avOut.type = "audio"; - avOut.stream = audioTrack->stream; - avOut.avfc = avContext; - - if (context->output->audio->Write(context, &avOut) < 0) - ffmpeg_err("(raw pcm) writing data to audio device failed\n"); - } else { - avOut.data = packet_data; - avOut.len = packet_size; - avOut.pts = pts; - avOut.packet = &packet; - avOut.type = "audio"; - avOut.stream = audioTrack->stream; - avOut.avfc = avContext; - - if (context->output->audio->Write(context, &avOut) < 0) + if (context->output->audio->Write(context, &avOut) < 0) ffmpeg_err("writing data to audio device failed\n"); - } } } else if (subtitleTrack && (subtitleTrack->Id == pid)) { float duration = 3.0; diff --git a/libeplayer3/include/manager.h b/libeplayer3/include/manager.h index afe5d63..b558db5 100644 --- a/libeplayer3/include/manager.h +++ b/libeplayer3/include/manager.h @@ -45,15 +45,6 @@ typedef struct Track_s { AVFormatContext *avfc; /* stream from ffmpeg */ AVStream *stream; - /* codec extra data (header or some other stuff) */ -// int uNoOfChannels; -// int uSampleRate; -// int uBitsPerSample; -// int bLittleEndian; - - /* If player2 or the elf do not support decoding of audio codec set this. - * AVCodec is than used for softdecoding and stream will be injected as PCM */ - int inject_raw_pcm; int pending; int is_static;