libeplayer3: cleanup

This commit is contained in:
martii
2013-06-08 12:05:36 +02:00
committed by Stefan Seyfried
parent 546eb23e0e
commit f5091bcd35
28 changed files with 62 additions and 468 deletions

View File

@@ -37,9 +37,7 @@
#include <asm/types.h>
#include <pthread.h>
#include <errno.h>
#ifdef MARTII
#include <sys/uio.h>
#endif
#include "common.h"
#include "output.h"

View File

@@ -101,19 +101,8 @@ static int reset()
static int writeData(void* _call)
{
#ifndef MARTII
unsigned char r;
unsigned char g;
unsigned char b;
#endif
unsigned char a;
#ifndef MARTII
int x,y;
#endif
int res = 0;
#ifndef MARTII
unsigned char* dst;
#endif
WriterFBCallData_t* call = (WriterFBCallData_t*) _call;
@@ -163,7 +152,7 @@ static int writeData(void* _call)
{
k = ((unsigned)src[x]) * opacity / 255;
ck = 255 - k;
#ifdef MARTII // or __sh__, or !HAVE_TRIPLEDRAGON
#if HAVE_SPARK_HARDWARE
*dst++ = 0;
t = *dst;
*dst++ = (k*r + ck*t) / 255;
@@ -187,9 +176,7 @@ static int writeData(void* _call)
}
} else
{
#ifdef MARTII
int y;
#endif
for (y = 0; y < call->Height; y++)
memset(call->destination + ((call->y + y) * call->destStride) + call->x * 4, 0, call->Width * 4);
}

View File

@@ -89,9 +89,7 @@ static const unsigned char clpcm_pes[18] = { 0x00, 0x00, 0x01, 0xBD, //start c
0x1E, 0x60, 0x0A, //first pes only, 0xFF after
0xFF
};
#ifdef MARTII
// reference: search for TypeLpcmDVDAudio in player/frame_parser/frame_parser_audio_lpcm.cpp
#endif
static const unsigned char clpcm_prv[14] = { 0xA0, //sub_stream_id
0, 0, //resvd and UPC_EAN_ISRC stuff, unused
0x0A, //private header length

View File

@@ -93,11 +93,7 @@ int InsertPesHeader (unsigned char *data, int size, unsigned char stream_id, uns
#if 0
/* does not seem to hurt, at least with h264 data...? */
if (size > MAX_PES_PACKET_SIZE)
#ifdef MARTII
size = 0; // unbounded
#else
printf("%s: Packet bigger than 63.9K eeeekkkkk\n",__FUNCTION__);
#endif
size = 0; // unbounded
PutBits(&ld2,0x0 ,8);
PutBits(&ld2,0x0 ,8);

View File

@@ -261,7 +261,7 @@ static int writeData(void* _call)
iov[1].iov_base = call->data + Position;
iov[1].iov_len = PacketLength;
size_t l = writev(call->fd, iov, 2);
ssize_t l = writev(call->fd, iov, 2);
if (l < 0) {
len = l;
break;