mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-26 23:12:44 +02:00
spark: use libeplayer3 for playback
Origin commit data
------------------
Branch: master
Commit: 4e3773c568
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2012-02-15 (Wed, 15 Feb 2012)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -39,7 +39,7 @@ libstb_hal_a_LIBADD += \
|
|||||||
libspark/init.o \
|
libspark/init.o \
|
||||||
libspark/irmp.o \
|
libspark/irmp.o \
|
||||||
libspark/lirmp_input.o \
|
libspark/lirmp_input.o \
|
||||||
libspark/playback.o \
|
libspark/playback_libeplayer3.o \
|
||||||
libspark/pwrmngr.o \
|
libspark/pwrmngr.o \
|
||||||
libspark/record.o \
|
libspark/record.o \
|
||||||
libspark/video.o
|
libspark/video.o
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
#if HAVE_TRIPLEDRAGON
|
#if HAVE_TRIPLEDRAGON
|
||||||
#include "../libtriple/playback_td.h"
|
#include "../libtriple/playback_td.h"
|
||||||
#elif HAVE_SPARK_HARDWARE
|
#elif HAVE_SPARK_HARDWARE
|
||||||
#include "../libspark/playback_lib.h"
|
#include "../libspark/playback_libeplayer3.h"
|
||||||
#else
|
#else
|
||||||
#error neither HAVE_TRIPLEDRAGON nor HAVE_SPARK_HARDWARE defined
|
#error neither HAVE_TRIPLEDRAGON nor HAVE_SPARK_HARDWARE defined
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
INCLUDES = \
|
INCLUDES = \
|
||||||
-I$(top_srcdir)/common
|
-I$(top_srcdir)/common \
|
||||||
|
-I$(top_srcdir)/libeplayer3/include
|
||||||
|
|
||||||
noinst_LIBRARIES = libspark.a
|
noinst_LIBRARIES = libspark.a
|
||||||
|
|
||||||
@@ -14,7 +15,7 @@ libspark_a_SOURCES = \
|
|||||||
video.cpp \
|
video.cpp \
|
||||||
audio.cpp \
|
audio.cpp \
|
||||||
init.cpp \
|
init.cpp \
|
||||||
playback.cpp \
|
playback_libeplayer3.cpp \
|
||||||
pwrmngr.cpp \
|
pwrmngr.cpp \
|
||||||
record.cpp
|
record.cpp
|
||||||
|
|
||||||
|
@@ -30,6 +30,7 @@ typedef enum
|
|||||||
|
|
||||||
class cAudio
|
class cAudio
|
||||||
{
|
{
|
||||||
|
friend class cPlayback;
|
||||||
private:
|
private:
|
||||||
int fd;
|
int fd;
|
||||||
bool Muted;
|
bool Muted;
|
||||||
|
@@ -2,9 +2,23 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "playback_cs.h"
|
#include <audio_lib.h>
|
||||||
|
#include <video_lib.h>
|
||||||
|
|
||||||
static const char * FILENAME = "playback_cs.cpp";
|
#include <common.h>
|
||||||
|
extern OutputHandler_t OutputHandler;
|
||||||
|
extern PlaybackHandler_t PlaybackHandler;
|
||||||
|
extern ContainerHandler_t ContainerHandler;
|
||||||
|
extern ManagerHandler_t ManagerHandler;
|
||||||
|
|
||||||
|
#include "playback_libeplayer3.h"
|
||||||
|
|
||||||
|
static Context_t * player;
|
||||||
|
|
||||||
|
extern cAudio *audioDecoder;
|
||||||
|
extern cVideo *videoDecoder;
|
||||||
|
|
||||||
|
static const char * FILENAME = "playback_libeplayer3.cpp";
|
||||||
|
|
||||||
//
|
//
|
||||||
void cPlayback::Attach(void)
|
void cPlayback::Attach(void)
|
||||||
@@ -42,6 +56,9 @@ bool cPlayback::Open(playmode_t PlayMode)
|
|||||||
"PLAYMODE_FILE"
|
"PLAYMODE_FILE"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
audioDecoder->closeDevice();
|
||||||
|
videoDecoder->closeDevice();
|
||||||
|
|
||||||
printf("%s:%s - PlayMode=%s\n", FILENAME, __FUNCTION__, aPLAYMODE[PlayMode]);
|
printf("%s:%s - PlayMode=%s\n", FILENAME, __FUNCTION__, aPLAYMODE[PlayMode]);
|
||||||
|
|
||||||
player = (Context_t*) malloc(sizeof(Context_t));
|
player = (Context_t*) malloc(sizeof(Context_t));
|
||||||
@@ -72,11 +89,13 @@ void cPlayback::Close(void)
|
|||||||
|
|
||||||
//Dagobert: movieplayer does not call stop, it calls close ;)
|
//Dagobert: movieplayer does not call stop, it calls close ;)
|
||||||
Stop();
|
Stop();
|
||||||
|
audioDecoder->openDevice();
|
||||||
|
videoDecoder->openDevice();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Used by Fileplay
|
//Used by Fileplay
|
||||||
bool cPlayback::Start(char * filename, unsigned short vpid, int vtype, unsigned short apid, bool ac3)
|
bool cPlayback::Start(char *filename, unsigned short vpid, int vtype, unsigned short apid, int ac3, unsigned int)
|
||||||
{
|
{
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
bool isHTTP = false;
|
bool isHTTP = false;
|
||||||
|
@@ -6,23 +6,11 @@
|
|||||||
/* (C) 2008 CoolStream International */
|
/* (C) 2008 CoolStream International */
|
||||||
/* */
|
/* */
|
||||||
/*******************************************************************************/
|
/*******************************************************************************/
|
||||||
#ifndef __PLAYBACK_CS_H
|
#ifndef __HAL_PLAYBACK_H
|
||||||
#define __PLAYBACK_CS_H
|
#define __HAL_PLAYBACK_H
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include <common.h>
|
|
||||||
extern OutputHandler_t OutputHandler;
|
|
||||||
extern PlaybackHandler_t PlaybackHandler;
|
|
||||||
extern ContainerHandler_t ContainerHandler;
|
|
||||||
extern ManagerHandler_t ManagerHandler;
|
|
||||||
|
|
||||||
#ifndef CS_PLAYBACK_PDATA
|
|
||||||
typedef struct {
|
|
||||||
int nothing;
|
|
||||||
} CS_PLAYBACK_PDATA;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
PLAYMODE_TS = 0,
|
PLAYMODE_TS = 0,
|
||||||
PLAYMODE_FILE
|
PLAYMODE_FILE
|
||||||
@@ -34,10 +22,6 @@ class cPlayback
|
|||||||
int timeout;
|
int timeout;
|
||||||
pthread_cond_t read_cond;
|
pthread_cond_t read_cond;
|
||||||
pthread_mutex_t mutex;
|
pthread_mutex_t mutex;
|
||||||
CS_PLAYBACK_PDATA * privateData;
|
|
||||||
#ifdef __sh__
|
|
||||||
Context_t * player;
|
|
||||||
#endif
|
|
||||||
bool enabled;
|
bool enabled;
|
||||||
bool paused;
|
bool paused;
|
||||||
bool playing;
|
bool playing;
|
||||||
@@ -57,7 +41,8 @@ class cPlayback
|
|||||||
void DMNotify(int Event, void *pTsBuf, void *Tag);
|
void DMNotify(int Event, void *pTsBuf, void *Tag);
|
||||||
bool Open(playmode_t PlayMode);
|
bool Open(playmode_t PlayMode);
|
||||||
void Close(void);
|
void Close(void);
|
||||||
bool Start(char * filename, unsigned short vpid, int vtype, unsigned short apid, bool ac3);
|
bool Start(char *filename, unsigned short vpid, int vtype, unsigned short apid,
|
||||||
|
int ac3, unsigned int duration);
|
||||||
bool Stop(void);
|
bool Stop(void);
|
||||||
bool SetAPid(unsigned short pid, bool ac3);
|
bool SetAPid(unsigned short pid, bool ac3);
|
||||||
bool SetSpeed(int speed);
|
bool SetSpeed(int speed);
|
||||||
|
@@ -113,6 +113,7 @@ typedef enum
|
|||||||
class cVideo
|
class cVideo
|
||||||
{
|
{
|
||||||
friend class cDemux;
|
friend class cDemux;
|
||||||
|
friend class cPlayback;
|
||||||
private:
|
private:
|
||||||
/* video device */
|
/* video device */
|
||||||
int fd;
|
int fd;
|
||||||
|
Reference in New Issue
Block a user