This commit is contained in:
martii
2014-03-21 23:27:37 +01:00
parent 351defa567
commit c3278d9c3e
10 changed files with 14 additions and 71 deletions

View File

@@ -45,7 +45,6 @@ class cPlayback
void GetChapters(std::vector<int> &positions, std::vector<std::string> &titles);
void GetMetadata(std::vector<std::string> &keys, std::vector<std::string> &values);
//
cPlayback(int num = 0);
~cPlayback();
};

View File

@@ -26,31 +26,30 @@ static inline int aac_get_sample_rate_index(uint32_t sample_rate)
{
if (96000 <= sample_rate)
return 0;
else if (88200 <= sample_rate)
if (88200 <= sample_rate)
return 1;
else if (64000 <= sample_rate)
if (64000 <= sample_rate)
return 2;
else if (48000 <= sample_rate)
if (48000 <= sample_rate)
return 3;
else if (44100 <= sample_rate)
if (44100 <= sample_rate)
return 4;
else if (32000 <= sample_rate)
if (32000 <= sample_rate)
return 5;
else if (24000 <= sample_rate)
if (24000 <= sample_rate)
return 6;
else if (22050 <= sample_rate)
if (22050 <= sample_rate)
return 7;
else if (16000 <= sample_rate)
if (16000 <= sample_rate)
return 8;
else if (12000 <= sample_rate)
if (12000 <= sample_rate)
return 9;
else if (11025 <= sample_rate)
if (11025 <= sample_rate)
return 10;
else if (8000 <= sample_rate)
if (8000 <= sample_rate)
return 11;
else if (7350 <= sample_rate)
if (7350 <= sample_rate)
return 12;
else
return 13;
}

View File

@@ -21,10 +21,6 @@ typedef struct BitPacker_s {
#define INVALID_PTS_VALUE 0x200000000ull
/* subtitle hacks ->for file subtitles */
#define TEXTSRTOFFSET 100
#define TEXTSSAOFFSET 200
/* ***************************** */
/* Prototypes */
/* ***************************** */

View File

@@ -25,11 +25,6 @@ typedef enum {
OUTPUT_REVERSE,
OUTPUT_DISCONTINUITY_REVERSE,
OUTPUT_GET_FRAME_COUNT,
/* fixme: e2 */
OUTPUT_SUBTITLE_REGISTER_FUNCTION = 222,
OUTPUT_SUBTITLE_REGISTER_BUFFER = 223,
OUTPUT_GET_SUBTITLE_OUTPUT,
OUTPUT_SET_SUBTITLE_OUTPUT
} OutputCmd_t;
typedef struct {

View File

@@ -8,9 +8,7 @@ typedef enum { PLAYBACK_OPEN, PLAYBACK_CLOSE, PLAYBACK_PLAY, PLAYBACK_STOP,
PLAYBACK_PTS, PLAYBACK_LENGTH, PLAYBACK_SWITCH_AUDIO,
PLAYBACK_SWITCH_SUBTITLE, PLAYBACK_INFO, PLAYBACK_METADATA, PLAYBACK_SLOWMOTION,
PLAYBACK_FASTBACKWARD, PLAYBACK_GET_FRAME_COUNT,
PLAYBACK_SWITCH_TELETEXT, PLAYBACK_SWITCH_DVBSUBTITLE,
PLAYBACK_FRAMEBUFFER_LOCK,
PLAYBACK_FRAMEBUFFER_UNLOCK
PLAYBACK_SWITCH_TELETEXT
} PlaybackCmd_t;
typedef struct PlaybackHandler_s {
@@ -37,7 +35,6 @@ typedef struct PlaybackHandler_s {
unsigned char isSubtitle;
unsigned char isDvbSubtitle;
unsigned char isTeletext;
unsigned char mayWriteToFramebuffer;
unsigned char abortRequested;
unsigned char abortPlayback;

View File

@@ -58,12 +58,10 @@ extern Writer_t WriterVideoH263;
extern Writer_t WriterVideoFLV;
extern Writer_t WriterVideoVC1;
extern Writer_t WriterPipe;
extern Writer_t WriterDVBSubtitle;
Writer_t *getWriter(char *encoding);
Writer_t *getDefaultVideoWriter();
Writer_t *getDefaultAudioWriter();
Writer_t *getDefaultFramebufferWriter();
#endif

View File

@@ -144,22 +144,3 @@ Writer_t *getDefaultAudioWriter()
return NULL;
}
Writer_t *getDefaultFramebufferWriter()
{
int i;
for (i = 0; AvailableWriter[i] != NULL; i++) {
writer_printf(10, "%s\n", AvailableWriter[i]->caps->textEncoding);
if (strcmp(AvailableWriter[i]->caps->textEncoding, "framebuffer")
== 0) {
writer_printf(50, "%s: found writer \"%s\"\n", __func__,
AvailableWriter[i]->caps->name);
return AvailableWriter[i];
}
}
writer_printf(1, "%s: no writer found\n", __func__);
return NULL;
}

View File

@@ -864,16 +864,6 @@ static int Command(void *_context, PlaybackCmd_t command, void *argument)
ret = PlaybackSwitchTeletext(context, (int *) argument);
break;
}
case PLAYBACK_FRAMEBUFFER_LOCK:{
context->playback->mayWriteToFramebuffer = 0;
ret = cERR_PLAYBACK_NO_ERROR;
break;
}
case PLAYBACK_FRAMEBUFFER_UNLOCK:{
context->playback->mayWriteToFramebuffer = 1;
ret = cERR_PLAYBACK_NO_ERROR;
break;
}
default:
playback_err("PlaybackCmd %d not supported!\n", command);
ret = cERR_PLAYBACK_ERROR;
@@ -905,7 +895,6 @@ PlaybackHandler_t PlaybackHandler = {
0,
0,
0,
1,
0,
0,
&Command,

View File

@@ -688,16 +688,6 @@ cPlayback::~cPlayback()
printf("%s:%s\n", FILENAME, __FUNCTION__);
}
void cPlayback::SuspendSubtitle(bool b)
{
if (player && player->playback) {
if (b)
player->playback->Command(player, PLAYBACK_FRAMEBUFFER_LOCK, 0);
else
player->playback->Command(player, PLAYBACK_FRAMEBUFFER_UNLOCK, 0);
}
}
void cPlayback::RequestAbort() {
if (player && player->playback) {
player->playback->abortRequested = 1;

View File

@@ -33,7 +33,6 @@ class cPlayback
int GetAPid(void) { return mAudioStream; }
int GetSubtitlePid(void) { return mSubtitleStream; }
int GetTeletextPid(void);
void SuspendSubtitle(bool);
bool SetSpeed(int speed);
bool GetSpeed(int &speed) const;
bool GetPosition(int &position, int &duration);