mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-31 09:20:58 +02:00
libeplayer3-arm: insert original blank lines from exteplayer3.git, for better merge
Origin commit data
------------------
Branch: master
Commit: 65de063d1e
Author: max_10 <max_10@gmx.de>
Date: 2018-04-10 (Tue, 10 Apr 2018)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -84,6 +84,7 @@ static void (* updatedTrackInfoFnc)(void) = NULL;
|
||||
static int ManagerAdd(Context_t *context, Track_t track)
|
||||
{
|
||||
video_mgr_printf(10, "%s::%s\n", __FILE__, __FUNCTION__);
|
||||
|
||||
if (Tracks == NULL)
|
||||
{
|
||||
Tracks = malloc(sizeof(Track_t) * TRACKWRAP);
|
||||
@@ -93,11 +94,13 @@ static int ManagerAdd(Context_t *context, Track_t track)
|
||||
Tracks[i].Id = -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (Tracks == NULL)
|
||||
{
|
||||
video_mgr_err("%s:%s malloc failed\n", __FILE__, __FUNCTION__);
|
||||
return cERR_VIDEO_MGR_ERROR;
|
||||
}
|
||||
|
||||
int i;
|
||||
for (i = 0; i < TRACKWRAP; i++)
|
||||
{
|
||||
@@ -107,6 +110,7 @@ static int ManagerAdd(Context_t *context, Track_t track)
|
||||
return cERR_VIDEO_MGR_NO_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
if (TrackCount < TRACKWRAP)
|
||||
{
|
||||
copyTrack(&Tracks[TrackCount], &track);
|
||||
@@ -117,10 +121,12 @@ static int ManagerAdd(Context_t *context, Track_t track)
|
||||
video_mgr_err("%s:%s TrackCount out if range %d - %d\n", __FILE__, __FUNCTION__, TrackCount, TRACKWRAP);
|
||||
return cERR_VIDEO_MGR_ERROR;
|
||||
}
|
||||
|
||||
if (TrackCount > 0)
|
||||
{
|
||||
context->playback->isVideo = 1;
|
||||
}
|
||||
|
||||
video_mgr_printf(10, "%s::%s\n", __FILE__, __FUNCTION__);
|
||||
return cERR_VIDEO_MGR_NO_ERROR;
|
||||
}
|
||||
@@ -129,15 +135,19 @@ static char **ManagerList(Context_t *context __attribute__((unused)))
|
||||
{
|
||||
int i = 0, j = 0;
|
||||
char **tracklist = NULL;
|
||||
|
||||
video_mgr_printf(10, "%s::%s\n", __FILE__, __FUNCTION__);
|
||||
|
||||
if (Tracks != NULL)
|
||||
{
|
||||
tracklist = malloc(sizeof(char *) * ((TrackCount * 2) + 1));
|
||||
|
||||
if (tracklist == NULL)
|
||||
{
|
||||
video_mgr_err("%s:%s malloc failed\n", __FILE__, __FUNCTION__);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (i = 0, j = 0; i < TrackCount; i++, j += 2)
|
||||
{
|
||||
if (Tracks[i].pending)
|
||||
@@ -152,6 +162,7 @@ static char **ManagerList(Context_t *context __attribute__((unused)))
|
||||
}
|
||||
tracklist[j] = NULL;
|
||||
}
|
||||
|
||||
video_mgr_printf(10, "%s::%s return %p (%d - %d)\n", __FILE__, __FUNCTION__, tracklist, j, TrackCount);
|
||||
return tracklist;
|
||||
}
|
||||
@@ -159,7 +170,9 @@ static char **ManagerList(Context_t *context __attribute__((unused)))
|
||||
static int ManagerDel(Context_t *context)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
video_mgr_printf(10, "%s::%s\n", __FILE__, __FUNCTION__);
|
||||
|
||||
if (Tracks != NULL)
|
||||
{
|
||||
for (i = 0; i < TrackCount; i++)
|
||||
@@ -174,9 +187,11 @@ static int ManagerDel(Context_t *context)
|
||||
video_mgr_err("%s::%s nothing to delete!\n", __FILE__, __FUNCTION__);
|
||||
return cERR_VIDEO_MGR_ERROR;
|
||||
}
|
||||
|
||||
TrackCount = 0;
|
||||
CurrentTrack = 0;
|
||||
context->playback->isVideo = 0;
|
||||
|
||||
video_mgr_printf(10, "%s::%s return no error\n", __FILE__, __FUNCTION__);
|
||||
return cERR_VIDEO_MGR_NO_ERROR;
|
||||
}
|
||||
@@ -184,7 +199,9 @@ static int ManagerDel(Context_t *context)
|
||||
static int Command(Context_t *context, ManagerCmd_t command, void *argument)
|
||||
{
|
||||
int ret = cERR_VIDEO_MGR_NO_ERROR;
|
||||
|
||||
video_mgr_printf(10, "%s::%s\n", __FILE__, __FUNCTION__);
|
||||
|
||||
switch (command)
|
||||
{
|
||||
case MANAGER_ADD:
|
||||
@@ -240,9 +257,10 @@ static int Command(Context_t *context, ManagerCmd_t command, void *argument)
|
||||
case MANAGER_GET_TRACK:
|
||||
{
|
||||
video_mgr_printf(20, "%s::%s MANAGER_GET_TRACK\n", __FILE__, __FUNCTION__);
|
||||
|
||||
if ((TrackCount > 0) && (CurrentTrack >= 0))
|
||||
{
|
||||
*((Track_t **)argument) = (Track_t *) & Tracks[CurrentTrack];
|
||||
*((Track_t **)argument) = (Track_t *) &Tracks[CurrentTrack];
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -285,6 +303,7 @@ static int Command(Context_t *context, ManagerCmd_t command, void *argument)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (i == TrackCount)
|
||||
{
|
||||
video_mgr_err("%s::%s track id %d unknown\n", __FILE__, __FUNCTION__, *((int *)argument));
|
||||
@@ -322,10 +341,12 @@ static int Command(Context_t *context, ManagerCmd_t command, void *argument)
|
||||
ret = cERR_VIDEO_MGR_ERROR;
|
||||
break;
|
||||
}
|
||||
|
||||
video_mgr_printf(10, "%s:%s: returning %d\n", __FILE__, __FUNCTION__, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
struct Manager_s VideoManager =
|
||||
{
|
||||
"Video",
|
||||
|
Reference in New Issue
Block a user