Mercurial > pt1
diff recpt1/tssplitter_lite.h @ 99:3a3f15b063e1
now recpt1 accepts single sid for terrestrial channels.
technical summary:
- mark pid to record instead of pid to drop
- split after decoding for now
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Fri, 12 Feb 2010 21:40:21 +0900 |
parents | 3fd15032fd3a |
children | aeba1988234f |
line wrap: on
line diff
--- a/recpt1/tssplitter_lite.h Wed Feb 10 15:02:25 2010 +0900 +++ b/recpt1/tssplitter_lite.h Fri Feb 12 21:40:21 2010 +0900 @@ -17,18 +17,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef _TS_SPLITTER_LITE_H_ #define _TS_SPLITTER_LITE_H_ -#if defined(WIN32) - #include <io.h> - #include <windows.h> - #include <crtdbg.h> - #pragma warning(disable: 4996) -#else - #define __STDC_FORMAT_MACROS - #include <inttypes.h> - #include <unistd.h> -// #include "portable.h" -#endif +#define __STDC_FORMAT_MACROS +#include <inttypes.h> +#include <unistd.h> #define LENGTH_PACKET (188) #define MAX_PID (8192) @@ -52,21 +44,20 @@ unsigned char* pat; char** sid_list; unsigned char pat_count; - int pmt_drop; + int pmt_remain; int pmt_counter; } splitter; -char** AnalyzeSid(char* sid); +/* b25 decoder would hoard up large chank */ +typedef struct _splitbuf_t +{ + int size; + u_char buffer[1024*1024]; +} splitbuf_t; + splitter* split_startup(char *sid); int split_select(splitter *sp, ARIB_STD_B25_BUFFER *sbuf); -void split_shutdown( splitter* sp); -int ReadTs( unsigned char** pat, unsigned char* pids, char** sid_list, unsigned char* pmt_pids, ARIB_STD_B25_BUFFER *sbuf, int* pmt_drop, int* pmt_counter); -//int split_ts( unsigned char** pat, unsigned char* pids, ARIB_STD_B25_BUFFER *sbuf, BUFSZ *dbuf); -int split_ts( splitter *splitter, ARIB_STD_B25_BUFFER *sbuf, BUFSZ *dbuf); -int AnalyzePat(unsigned char* buf, unsigned char** pat, unsigned char* pids, char** sid_list, unsigned char* pmt_pids, int* pmt_drop); -int RecreatePat(unsigned char* buf, unsigned char** pat, unsigned char* pids, int *pos); -int AnalyzePmt(unsigned char* buf, unsigned char* pids); +void split_shutdown(splitter *sp); +int split_ts(splitter *splitter, ARIB_STD_B25_BUFFER *sbuf, splitbuf_t *dbuf); -int GetCrc32(unsigned char* data, int len); -int GetPid(unsigned char* data); #endif