Improve playback of VP9 codec

This commit is contained in:
samsamsam
2019-02-02 18:41:46 +01:00
committed by Thilo Graf
parent 0435571728
commit c298f20a69
18 changed files with 306 additions and 111 deletions

View File

@@ -1,5 +1,5 @@
#ifndef misc_123
#define misc_123
#ifndef _exteplayer3_misc_
#define _exteplayer3_misc_
#include <dirent.h>
#include <sys/types.h>
@@ -20,6 +20,15 @@ typedef struct BitPacker_s
int32_t Remaining; /* number of remaining in the shifter */
} BitPacker_t;
typedef enum
{
STB_UNKNOWN,
STB_DREAMBOX,
STB_VUPLUS,
STB_HISILICON,
STB_OTHER = 999,
} stb_type_t;
/* ***************************** */
/* Makros/Constants */
/* ***************************** */
@@ -33,6 +42,7 @@ typedef struct BitPacker_s
void PutBits(BitPacker_t *ld, uint32_t code, uint32_t length);
void FlushBits(BitPacker_t *ld);
int8_t PlaybackDieNow(int8_t val);
stb_type_t GetSTBType();
/* ***************************** */
/* MISC Functions */
@@ -51,54 +61,6 @@ static inline char *getExtension(char *name)
return NULL;
}
/* the function returns the base name */
static inline char *basename(char *name)
{
int i = 0;
int pos = 0;
while (name[i] != 0)
{
if (name[i] == '/')
pos = i;
i++;
}
if (name[pos] == '/')
pos++;
return name + pos;
}
/* the function returns the directry name */
static inline char *dirname(char *name)
{
static char path[100];
uint32_t i = 0;
int32_t pos = 0;
while ((name[i] != 0) && (i < sizeof(path)))
{
if (name[i] == '/')
{
pos = i;
}
path[i] = name[i];
i++;
}
path[i] = 0;
path[pos] = 0;
return path;
}
static inline int32_t IsDreambox()
{
struct stat buffer;
return (stat("/proc/stb/tpm/0/serial", &buffer) == 0);
}
static inline uint32_t ReadUint32(uint8_t *buffer)
{
uint32_t num = (uint32_t)buffer[0] << 24 |
@@ -115,4 +77,4 @@ static inline uint16_t ReadUInt16(uint8_t *buffer)
return num;
}
#endif
#endif // _exteplayer3_misc_