mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-29 00:11:16 +02:00
libeplayer3: c++ adjustments
This commit is contained in:
@@ -1040,7 +1040,7 @@ static int reset(Context_t * context)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int Command(Context_t *context, OutputCmd_t command, void *argument)
|
||||
static int Command(Context_t *context, OutputCmd_t command, const char *argument)
|
||||
{
|
||||
int ret = cERR_LINUXDVB_NO_ERROR;
|
||||
|
||||
@@ -1141,7 +1141,7 @@ static int Command(Context_t *context, OutputCmd_t command, void *argument)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static char *LinuxDvbCapabilities[] = { "audio", "video", NULL };
|
||||
static const char *LinuxDvbCapabilities[] = { "audio", "video", NULL };
|
||||
|
||||
struct Output_s LinuxDvbOutput = {
|
||||
"LinuxDvb",
|
||||
|
@@ -127,7 +127,7 @@ static void OutputDel(Context_t * context, char *port)
|
||||
|
||||
}
|
||||
|
||||
static int Command(Context_t *context, OutputCmd_t command, void *argument)
|
||||
static int Command(Context_t *context, OutputCmd_t command, const char *argument)
|
||||
{
|
||||
int ret = cERR_OUTPUT_NO_ERROR;
|
||||
|
||||
@@ -264,9 +264,9 @@ static int Command(Context_t *context, OutputCmd_t command, void *argument)
|
||||
case OUTPUT_PTS:{
|
||||
if (context && context->playback) {
|
||||
if (context->playback->isVideo)
|
||||
return context->output->video->Command(context, OUTPUT_PTS, argument);
|
||||
return context->output->video->Command(context, OUTPUT_PTS, (const char *) argument);
|
||||
if (context->playback->isAudio)
|
||||
return context->output->audio->Command(context, OUTPUT_PTS, argument);
|
||||
return context->output->audio->Command(context, OUTPUT_PTS, (const char *) argument);
|
||||
} else
|
||||
ret = cERR_OUTPUT_INTERNAL_ERROR;
|
||||
break;
|
||||
@@ -296,7 +296,7 @@ static int Command(Context_t *context, OutputCmd_t command, void *argument)
|
||||
case OUTPUT_AUDIOMUTE:{
|
||||
if (context && context->playback) {
|
||||
if (context->playback->isAudio)
|
||||
ret |= context->output->audio->Command(context, OUTPUT_AUDIOMUTE, (char *) argument);
|
||||
ret |= context->output->audio->Command(context, OUTPUT_AUDIOMUTE, (const char *) argument);
|
||||
} else
|
||||
ret = cERR_OUTPUT_INTERNAL_ERROR;
|
||||
break;
|
||||
@@ -304,7 +304,7 @@ static int Command(Context_t *context, OutputCmd_t command, void *argument)
|
||||
case OUTPUT_DISCONTINUITY_REVERSE:{
|
||||
if (context && context->playback) {
|
||||
if (context->playback->isVideo)
|
||||
ret |= context->output->video->Command(context, OUTPUT_DISCONTINUITY_REVERSE, (void *) argument);
|
||||
ret |= context->output->video->Command(context, OUTPUT_DISCONTINUITY_REVERSE, (const char *) argument);
|
||||
} else
|
||||
ret = cERR_OUTPUT_INTERNAL_ERROR;
|
||||
break;
|
||||
@@ -312,9 +312,9 @@ static int Command(Context_t *context, OutputCmd_t command, void *argument)
|
||||
case OUTPUT_GET_FRAME_COUNT:{
|
||||
if (context && context->playback) {
|
||||
if (context->playback->isVideo)
|
||||
return context->output->video->Command(context, OUTPUT_GET_FRAME_COUNT, argument);
|
||||
return context->output->video->Command(context, OUTPUT_GET_FRAME_COUNT, (const char *)argument);
|
||||
if (context->playback->isAudio)
|
||||
return context->output->audio->Command(context, OUTPUT_GET_FRAME_COUNT, argument);
|
||||
return context->output->audio->Command(context, OUTPUT_GET_FRAME_COUNT, (const char *)argument);
|
||||
} else
|
||||
ret = cERR_OUTPUT_INTERNAL_ERROR;
|
||||
break;
|
||||
|
@@ -163,7 +163,7 @@ static int writeData(WriterAVCallData_t *call)
|
||||
/*Hellmaster1024: some packets will only be accepted by the player if we send one byte more than
|
||||
data is available. The content of this byte does not matter. It will be ignored
|
||||
by the player */
|
||||
iov[ic].iov_base = "";
|
||||
iov[ic].iov_base = (char *) "";
|
||||
iov[ic++].iov_len = 1;
|
||||
iov[0].iov_len =
|
||||
InsertPesHeader(PesHeader, PacketLength,
|
||||
|
@@ -243,7 +243,7 @@ static int writeData(WriterAVCallData_t *call)
|
||||
insertSampleHeader = 0;
|
||||
}
|
||||
|
||||
PacketStart = malloc(call->len + HeaderLength);
|
||||
PacketStart = (unsigned char *) malloc(call->len + HeaderLength);
|
||||
memcpy(PacketStart, PesHeader, HeaderLength);
|
||||
memcpy(PacketStart + HeaderLength, call->data + Position,
|
||||
PacketLength);
|
||||
|
Reference in New Issue
Block a user