mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-26 23:12:44 +02:00
improve subtitle handling
Origin commit data
------------------
Branch: master
Commit: 9150713e46
Author: martii <m4rtii@gmx.de>
Date: 2012-11-06 (Tue, 06 Nov 2012)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -397,6 +397,8 @@ static void ASSThread(Context_t *context) {
|
||||
// subtitel zeitpunkt zu bestimmen und solange zu schlafen.
|
||||
#ifdef MARTII
|
||||
usleep(10000);
|
||||
if(!context->playback->mayWriteToFramebuffer)
|
||||
continue;
|
||||
getMutex(__LINE__);
|
||||
checkRegions();
|
||||
#else
|
||||
@@ -560,7 +562,7 @@ static void ASSThread(Context_t *context) {
|
||||
|
||||
ass_printf(10, "terminating\n");
|
||||
#ifdef MARTII
|
||||
pthread_exit(NULL);
|
||||
pthread_exit(NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef MARTII
|
||||
typedef enum {PLAYBACK_OPEN, PLAYBACK_CLOSE, PLAYBACK_PLAY, PLAYBACK_STOP, PLAYBACK_PAUSE, PLAYBACK_CONTINUE, PLAYBACK_FLUSH, PLAYBACK_TERM, PLAYBACK_FASTFORWARD, PLAYBACK_SEEK, PLAYBACK_SEEK_ABS, PLAYBACK_PTS, PLAYBACK_LENGTH, PLAYBACK_SWITCH_AUDIO, PLAYBACK_SWITCH_SUBTITLE, PLAYBACK_INFO, PLAYBACK_SLOWMOTION, PLAYBACK_FASTBACKWARD, PLAYBACK_GET_FRAME_COUNT, PLAYBACK_SWITCH_TELETEXT, PLAYBACK_SWITCH_DVBSUBTITLE} PlaybackCmd_t;
|
||||
typedef enum {PLAYBACK_OPEN, PLAYBACK_CLOSE, PLAYBACK_PLAY, PLAYBACK_STOP, PLAYBACK_PAUSE, PLAYBACK_CONTINUE, PLAYBACK_FLUSH, PLAYBACK_TERM, PLAYBACK_FASTFORWARD, PLAYBACK_SEEK, PLAYBACK_SEEK_ABS, PLAYBACK_PTS, PLAYBACK_LENGTH, PLAYBACK_SWITCH_AUDIO, PLAYBACK_SWITCH_SUBTITLE, PLAYBACK_INFO, PLAYBACK_SLOWMOTION, PLAYBACK_FASTBACKWARD, PLAYBACK_GET_FRAME_COUNT, PLAYBACK_SWITCH_TELETEXT, PLAYBACK_SWITCH_DVBSUBTITLE, PLAYBACK_FRAMEBUFFER_LOCK, PLAYBACK_FRAMEBUFFER_UNLOCK} PlaybackCmd_t;
|
||||
#else
|
||||
typedef enum {PLAYBACK_OPEN, PLAYBACK_CLOSE, PLAYBACK_PLAY, PLAYBACK_STOP, PLAYBACK_PAUSE, PLAYBACK_CONTINUE, PLAYBACK_FLUSH, PLAYBACK_TERM, PLAYBACK_FASTFORWARD, PLAYBACK_SEEK, PLAYBACK_PTS, PLAYBACK_LENGTH, PLAYBACK_SWITCH_AUDIO, PLAYBACK_SWITCH_SUBTITLE, PLAYBACK_INFO, PLAYBACK_SLOWMOTION, PLAYBACK_FASTBACKWARD, PLAYBACK_GET_FRAME_COUNT} PlaybackCmd_t;
|
||||
#endif
|
||||
@@ -34,6 +34,7 @@ typedef struct PlaybackHandler_s {
|
||||
#ifdef MARTII
|
||||
unsigned char isDvbSubtitle;
|
||||
unsigned char isTeletext;
|
||||
unsigned char mayWriteToFramebuffer;
|
||||
#endif
|
||||
|
||||
int (* Command) (/*Context_t*/void *, PlaybackCmd_t, void *);
|
||||
|
@@ -529,7 +529,7 @@ static int Write(void* _context, void *data) {
|
||||
int DataLength;
|
||||
unsigned long long int Pts;
|
||||
float Duration;
|
||||
|
||||
|
||||
subtitle_printf(10, "\n");
|
||||
|
||||
if (data == NULL)
|
||||
|
@@ -1119,6 +1119,16 @@ 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;
|
||||
}
|
||||
#endif
|
||||
default:
|
||||
playback_err("PlaybackCmd %d not supported!\n", command);
|
||||
@@ -1153,6 +1163,7 @@ PlaybackHandler_t PlaybackHandler = {
|
||||
#ifdef MARTII
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
#endif
|
||||
&Command,
|
||||
"",
|
||||
|
Reference in New Issue
Block a user