libeplayer3: implement Writer class

Origin commit data
------------------
Branch: master
Commit: 889d68740c
Author: martii <m4rtii@gmx.de>
Date: 2014-04-06 (Sun, 06 Apr 2014)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
martii
2014-04-06 11:35:17 +02:00
parent f9b3095ba6
commit e9b361f9f8
27 changed files with 850 additions and 2377 deletions

View File

@@ -1,44 +1,18 @@
#ifndef misc_123
#define misc_123
#include <dirent.h>
/* some useful things needed by many files ... */
/* ***************************** */
/* Types */
/* ***************************** */
#define INVALID_PTS_VALUE 0x200000000ll
typedef struct BitPacker_s {
unsigned char *Ptr; /* write pointer */
unsigned int BitBuffer; /* bitreader shifter */
int Remaining; /* number of remaining in the shifter */
} BitPacker_t;
/* ***************************** */
/* Makros/Constants */
/* ***************************** */
#define INVALID_PTS_VALUE 0x200000000ull
/* ***************************** */
/* Prototypes */
/* ***************************** */
struct BitPacker_t
{
unsigned char *Ptr; /* write pointer */
unsigned int BitBuffer; /* bitreader shifter */
int Remaining; /* number of remaining in the shifter */
};
void PutBits(BitPacker_t * ld, unsigned int code, unsigned int length);
void FlushBits(BitPacker_t * ld);
/* ***************************** */
/* MISC Functions */
/* ***************************** */
static inline char *getExtension(char *name)
{
if (name) {
char *ext = strrchr(name, '.');
if (ext)
return ext + 1;
}
return NULL;
}
#endif