mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-27 07:23:11 +02:00
libeplayer3-arm/playback/playback.c: add missing parts for backward play
This commit is contained in:
@@ -95,7 +95,9 @@ static void SupervisorThread(Context_t *context)
|
|||||||
hasThreadStarted = 1;
|
hasThreadStarted = 1;
|
||||||
playback_printf(10, ">\n");
|
playback_printf(10, ">\n");
|
||||||
while (context && context->playback && context->playback->isPlaying && !context->playback->abortRequested)
|
while (context && context->playback && context->playback->isPlaying && !context->playback->abortRequested)
|
||||||
|
{
|
||||||
usleep(100000);
|
usleep(100000);
|
||||||
|
}
|
||||||
playback_printf(10, "<\n");
|
playback_printf(10, "<\n");
|
||||||
hasThreadStarted = 2;
|
hasThreadStarted = 2;
|
||||||
PlaybackTerminate(context);
|
PlaybackTerminate(context);
|
||||||
@@ -310,8 +312,10 @@ static int32_t PlaybackContinue(Context_t *context)
|
|||||||
(context->playback->isPaused || context->playback->isForwarding ||
|
(context->playback->isPaused || context->playback->isForwarding ||
|
||||||
context->playback->BackWard || context->playback->SlowMotion))
|
context->playback->BackWard || context->playback->SlowMotion))
|
||||||
{
|
{
|
||||||
if (context->playback->SlowMotion || context->playback->isForwarding)
|
if (context->playback->SlowMotion || context->playback->isForwarding || context->playback->BackWard)
|
||||||
context->output->Command(context, OUTPUT_CLEAR, NULL);
|
context->output->Command(context, OUTPUT_CLEAR, NULL);
|
||||||
|
if (context->playback->BackWard)
|
||||||
|
context->output->Command(context, OUTPUT_AUDIOMUTE, "0");
|
||||||
context->playback->isPaused = 0;
|
context->playback->isPaused = 0;
|
||||||
//context->playback->isPlaying = 1;
|
//context->playback->isPlaying = 1;
|
||||||
context->playback->isForwarding = 0;
|
context->playback->isForwarding = 0;
|
||||||
@@ -453,15 +457,16 @@ static int PlaybackFastBackward(Context_t *context, int *speed)
|
|||||||
{
|
{
|
||||||
context->playback->BackWard = 0;
|
context->playback->BackWard = 0;
|
||||||
context->playback->Speed = 0; /* reverse end */
|
context->playback->Speed = 0; /* reverse end */
|
||||||
|
context->output->Command(context, OUTPUT_AUDIOMUTE, "0");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
context->playback->isSeeking = 1;
|
context->playback->isSeeking = 1;
|
||||||
context->playback->Speed = *speed;
|
context->playback->Speed = *speed;
|
||||||
context->playback->BackWard = 2 ^ (*speed);
|
context->playback->BackWard = 1;
|
||||||
playback_printf(1, "S %d B %f\n", context->playback->Speed, context->playback->BackWard);
|
|
||||||
}
|
|
||||||
context->output->Command(context, OUTPUT_AUDIOMUTE, "1");
|
context->output->Command(context, OUTPUT_AUDIOMUTE, "1");
|
||||||
|
playback_printf(1, "S %d B %d\n", context->playback->Speed, context->playback->BackWard);
|
||||||
|
}
|
||||||
context->output->Command(context, OUTPUT_CLEAR, NULL);
|
context->output->Command(context, OUTPUT_CLEAR, NULL);
|
||||||
if (context->output->Command(context, OUTPUT_REVERSE, NULL) < 0)
|
if (context->output->Command(context, OUTPUT_REVERSE, NULL) < 0)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user