libeplayer3: move audio resampling to dedicated ipcm writer

This commit is contained in:
martii
2014-04-05 13:21:58 +02:00
parent abc8d3661e
commit 21a7d427fd
7 changed files with 203 additions and 175 deletions

View File

@@ -6,12 +6,14 @@
#include "manager.h"
#include "playback.h"
#include <pthread.h>
#include <stdint.h>
typedef struct Context_s {
PlaybackHandler_t *playback;
ContainerHandler_t *container;
OutputHandler_t *output;
ManagerHandler_t *manager;
int64_t *currentAudioPtsP;
} Context_t;
int container_ffmpeg_update_tracks(Context_t * context, char *filename);

View File

@@ -38,8 +38,8 @@ typedef struct Track_s {
char *language;
/* length of track */
uint64_t duration;
uint64_t pts;
int64_t duration;
//CHECK int64_t pts;
/* context from ffmpeg */
AVFormatContext *avfc;
@@ -53,7 +53,6 @@ typedef struct Track_s {
/* 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_as_pcm;
int inject_raw_pcm;
int pending;

View File

@@ -42,15 +42,15 @@ typedef struct {
int uSampleRate;
int uBitsPerSample;
int bLittleEndian;
int restart_audio_resampling;
uint64_t pts;
int64_t pts;
char *type;
/* context from ffmpeg */
AVFormatContext *avfc;
/* stream from ffmpeg */
AVStream *stream;
AVPacket *packet;
} AudioVideoOut_t;
struct Context_s;

View File

@@ -12,19 +12,23 @@
typedef enum { eNone, eAudio, eVideo, eGfx } eWriterType_t;
struct Context_s;
typedef struct Context_s Context_t;
typedef struct {
int fd;
uint8_t *data;
unsigned int len;
uint64_t Pts;
int64_t Pts;
int uNoOfChannels;
int uSampleRate;
int uBitsPerSample;
int bLittleEndian;
/* context from ffmpeg */
int restart_audio_resampling;
AVFormatContext *avfc;
/* stream from ffmpeg */
AVStream *stream;
AVPacket *packet;
Context_t *context;
} WriterAVCallData_t;
typedef struct WriterCaps_s {