mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-27 07:22:44 +02:00
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:
@@ -195,7 +195,7 @@ GstBusSyncReply Gst_bus_call(GstBus * bus, GstMessage *msg, gpointer user_data)
|
|||||||
int ret = write(fd, Info.data, Info.size);
|
int ret = write(fd, Info.data, Info.size);
|
||||||
close(fd);
|
close(fd);
|
||||||
gst_buffer_unmap(buf_image, &Info);
|
gst_buffer_unmap(buf_image, &Info);
|
||||||
lt_info_c( "%s:%s - GST_MESSAGE_INFO: cPlayback::state /tmp/.id3coverart %d bytes written\n", FILENAME, __FUNCTION__ , ret);
|
lt_info_c( "%s:%s - GST_MESSAGE_INFO: cPlayback::state /tmp/.id3coverart %d bytes written\n", FILENAME, __FUNCTION__, ret);
|
||||||
}
|
}
|
||||||
//FIXME: how shall playback handle this event???
|
//FIXME: how shall playback handle this event???
|
||||||
}
|
}
|
||||||
@@ -259,7 +259,8 @@ GstBusSyncReply Gst_bus_call(GstBus * bus, GstMessage *msg, gpointer user_data)
|
|||||||
}
|
}
|
||||||
gst_iterator_free(children);
|
gst_iterator_free(children);
|
||||||
|
|
||||||
} break;
|
}
|
||||||
|
break;
|
||||||
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
|
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
|
||||||
{
|
{
|
||||||
} break;
|
} break;
|
||||||
@@ -278,7 +279,8 @@ GstBusSyncReply Gst_bus_call(GstBus * bus, GstMessage *msg, gpointer user_data)
|
|||||||
gst_object_unref(GST_OBJECT(videoSink));
|
gst_object_unref(GST_OBJECT(videoSink));
|
||||||
videoSink = NULL;
|
videoSink = NULL;
|
||||||
}
|
}
|
||||||
} break;
|
}
|
||||||
|
break;
|
||||||
case GST_STATE_CHANGE_READY_TO_NULL:
|
case GST_STATE_CHANGE_READY_TO_NULL:
|
||||||
{
|
{
|
||||||
} break;
|
} break;
|
||||||
@@ -529,7 +531,7 @@ bool cPlayback::Stop(void)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cPlayback::SetAPid(int pid , bool /*ac3*/)
|
bool cPlayback::SetAPid(int pid, bool /*ac3*/)
|
||||||
{
|
{
|
||||||
lt_info("%s: pid %i\n", __func__, pid);
|
lt_info("%s: pid %i\n", __func__, pid);
|
||||||
|
|
||||||
@@ -693,12 +695,15 @@ bool cPlayback::SetPosition(int position, bool absolute)
|
|||||||
|
|
||||||
if(m_gst_playbin)
|
if(m_gst_playbin)
|
||||||
{
|
{
|
||||||
if (!absolute) {
|
if (!absolute)
|
||||||
|
{
|
||||||
gst_element_query_position(m_gst_playbin, fmt, &pos);
|
gst_element_query_position(m_gst_playbin, fmt, &pos);
|
||||||
time_nanoseconds = pos + (position * 1000000.0);
|
time_nanoseconds = pos + (position * 1000000.0);
|
||||||
if(time_nanoseconds < 0)
|
if(time_nanoseconds < 0)
|
||||||
time_nanoseconds = 0;
|
time_nanoseconds = 0;
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
time_nanoseconds = position * 1000000.0;
|
time_nanoseconds = position * 1000000.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -26,7 +26,8 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum
|
||||||
|
{
|
||||||
STATE_STOP,
|
STATE_STOP,
|
||||||
STATE_PLAY,
|
STATE_PLAY,
|
||||||
STATE_PAUSE,
|
STATE_PAUSE,
|
||||||
@@ -35,7 +36,8 @@ typedef enum {
|
|||||||
STATE_SLOW
|
STATE_SLOW
|
||||||
} playstate_t;
|
} playstate_t;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum
|
||||||
|
{
|
||||||
PLAYMODE_TS = 0,
|
PLAYMODE_TS = 0,
|
||||||
PLAYMODE_FILE,
|
PLAYMODE_FILE,
|
||||||
} playmode_t;
|
} playmode_t;
|
||||||
@@ -44,13 +46,13 @@ struct AVFormatContext;
|
|||||||
|
|
||||||
class cPlayback
|
class cPlayback
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
bool playing;
|
bool playing;
|
||||||
|
|
||||||
int mSpeed;
|
int mSpeed;
|
||||||
int mAudioStream;
|
int mAudioStream;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
playstate_t playstate;
|
playstate_t playstate;
|
||||||
|
|
||||||
cPlayback(int);
|
cPlayback(int);
|
||||||
|
Reference in New Issue
Block a user