libeplayer: remove inject_raw_pcm (unused)

This commit is contained in:
martii
2014-04-05 13:24:39 +02:00
parent 21a7d427fd
commit 6fa9a5a495
2 changed files with 8 additions and 37 deletions

View File

@@ -386,36 +386,16 @@ static void FFMPEGThread(Context_t * context)
currentAudioPts = /* CHECK audioTrack->pts = */pts = calcPts(avContext, audioTrack->stream, packet.pts); currentAudioPts = /* CHECK audioTrack->pts = */pts = calcPts(avContext, audioTrack->stream, packet.pts);
ffmpeg_printf(200, "AudioTrack index = %d\n", pid); ffmpeg_printf(200, "AudioTrack index = %d\n", pid);
if (audioTrack->inject_raw_pcm == 1) { avOut.data = packet_data;
ffmpeg_printf(200, "write audio raw pcm\n"); 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; if (context->output->audio->Write(context, &avOut) < 0)
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)
ffmpeg_err("writing data to audio device failed\n"); ffmpeg_err("writing data to audio device failed\n");
}
} }
} else if (subtitleTrack && (subtitleTrack->Id == pid)) { } else if (subtitleTrack && (subtitleTrack->Id == pid)) {
float duration = 3.0; float duration = 3.0;

View File

@@ -45,15 +45,6 @@ typedef struct Track_s {
AVFormatContext *avfc; AVFormatContext *avfc;
/* stream from ffmpeg */ /* stream from ffmpeg */
AVStream *stream; 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 pending;
int is_static; int is_static;