armbox: gst-playback reformat code

Origin commit data
------------------
Branch: master
Commit: fec61c7e1c
Author: TangoCash <eric@loxat.de>
Date: 2017-10-15 (Sun, 15 Oct 2017)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
TangoCash
2017-10-15 16:06:48 +02:00
parent f0ea38c2f9
commit 7bdd73dc9c
2 changed files with 323 additions and 316 deletions

View File

@@ -259,7 +259,8 @@ GstBusSyncReply Gst_bus_call(GstBus * bus, GstMessage *msg, gpointer user_data)
}
gst_iterator_free(children);
} break;
}
break;
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
{
} break;
@@ -278,7 +279,8 @@ GstBusSyncReply Gst_bus_call(GstBus * bus, GstMessage *msg, gpointer user_data)
gst_object_unref(GST_OBJECT(videoSink));
videoSink = NULL;
}
} break;
}
break;
case GST_STATE_CHANGE_READY_TO_NULL:
{
} break;
@@ -693,12 +695,15 @@ bool cPlayback::SetPosition(int position, bool absolute)
if(m_gst_playbin)
{
if (!absolute) {
if (!absolute)
{
gst_element_query_position(m_gst_playbin, fmt, &pos);
time_nanoseconds = pos + (position * 1000000.0);
if(time_nanoseconds < 0)
time_nanoseconds = 0;
} else {
}
else
{
time_nanoseconds = position * 1000000.0;
}

View File

@@ -26,7 +26,8 @@
#include <config.h>
typedef enum {
typedef enum
{
STATE_STOP,
STATE_PLAY,
STATE_PAUSE,
@@ -35,7 +36,8 @@ typedef enum {
STATE_SLOW
} playstate_t;
typedef enum {
typedef enum
{
PLAYMODE_TS = 0,
PLAYMODE_FILE,
} playmode_t;