| 1 | /*************************************************************************** |
|---|
| 2 | * Copyright (c) 2003-2008, Broadcom Corporation |
|---|
| 3 | * All Rights Reserved |
|---|
| 4 | * Confidential Property of Broadcom Corporation |
|---|
| 5 | * |
|---|
| 6 | * THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE |
|---|
| 7 | * AGREEMENT BETWEEN THE USER AND BROADCOM. YOU HAVE NO RIGHT TO USE OR |
|---|
| 8 | * EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT. |
|---|
| 9 | * |
|---|
| 10 | * $brcm_Workfile: ts_pat.h $ |
|---|
| 11 | * $brcm_Revision: 2 $ |
|---|
| 12 | * $brcm_Date: 1/10/08 12:35p $ |
|---|
| 13 | * |
|---|
| 14 | * [File Description:] |
|---|
| 15 | * |
|---|
| 16 | * Revision History: |
|---|
| 17 | * |
|---|
| 18 | * $brcm_Log: /BSEAV/lib/mpeg2_ts_parse/ts_pat.h $ |
|---|
| 19 | * |
|---|
| 20 | * 2 1/10/08 12:35p jtna |
|---|
| 21 | * PR38353: Fix crash when tuning to QPSK channel. TS_PAT_getNumPrograms() |
|---|
| 22 | * should not be returning signed values. |
|---|
| 23 | * |
|---|
| 24 | * 1 2/7/05 11:30p dlwin |
|---|
| 25 | * Merge down for release 2005_REFSW_MERGETOMAIN: |
|---|
| 26 | * |
|---|
| 27 | * Irvine_BSEAVSW_Devel/3 5/4/04 1:52p erickson |
|---|
| 28 | * PR10938: added bounds checking and PMT and PAT validation in order to |
|---|
| 29 | * prevent segfaults on bad data |
|---|
| 30 | * |
|---|
| 31 | * Irvine_BSEAVSW_Devel/2 9/8/03 10:04a marcusk |
|---|
| 32 | * Added routines to get the number of things. |
|---|
| 33 | * |
|---|
| 34 | * Irvine_BSEAVSW_Devel/1 8/29/03 5:05p marcusk |
|---|
| 35 | * Initial Version. |
|---|
| 36 | * |
|---|
| 37 | ***************************************************************************/ |
|---|
| 38 | #ifndef TS_PAT_H__ |
|---|
| 39 | #define TS_PAT_H__ |
|---|
| 40 | |
|---|
| 41 | #ifdef __cplusplus |
|---|
| 42 | extern "C" { |
|---|
| 43 | #endif |
|---|
| 44 | |
|---|
| 45 | typedef struct |
|---|
| 46 | { |
|---|
| 47 | uint16_t program_number; |
|---|
| 48 | uint16_t PID; |
|---|
| 49 | } TS_PAT_program; |
|---|
| 50 | |
|---|
| 51 | /** |
|---|
| 52 | Returns true if it's a valid PAT. |
|---|
| 53 | The other TS_PAT functions assume you have validated the buffer beforehand. |
|---|
| 54 | **/ |
|---|
| 55 | bool TS_PAT_validate(const uint8_t *buf, unsigned bfrSize); |
|---|
| 56 | |
|---|
| 57 | uint8_t TS_PAT_getNumPrograms( const uint8_t *buf); |
|---|
| 58 | BERR_Code TS_PAT_getProgram( const uint8_t *buf, unsigned bfrSize, int programNum, TS_PAT_program *p_program ); |
|---|
| 59 | |
|---|
| 60 | #ifdef __cplusplus |
|---|
| 61 | } |
|---|
| 62 | #endif |
|---|
| 63 | #endif |
|---|
| 64 | /* End of File */ |
|---|