DVBCore  1.0
Open source DVB engine
platform/inc/stbhwdmx.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
00003  * Copyright © 2004 Ocean Blue Software Ltd
00004  *
00005  * This file is part of a DTVKit Software Component
00006  * You are permitted to copy, modify or distribute this file subject to the terms
00007  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
00008  * 
00009  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
00010  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
00011  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
00012  * 
00013  * If you or your organisation is not a member of DTVKit then you have access
00014  * to this source code outside of the terms of the licence agreement
00015  * and you are expected to delete this and any associated files immediately.
00016  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
00017  *******************************************************************************/
00024 // pre-processor mechanism so multiple inclusions don't cause compilation error
00025 
00026 #ifndef _STBHWDMX_H
00027 
00028 #define _STBHWDMX_H
00029 
00030 //---Constant and macro definitions for public use-----------------------------
00031 #define MAX_HW_SECT_FILT_LEN 8
00032 
00033 #define STB_DMX_PID_FILTER_INVALID       0xffff
00034 #define STB_DMX_SECT_FILTER_INVALID      0xffff
00035 
00036 #define STB_TPID_CBUFF_PRIORITY          10
00037 
00038 //---Enumerations for public use-----------------------------------------------
00039 
00040 // definitions for the descrambler
00041 typedef enum
00042 {
00043    DESC_TRACK_AUDIO,
00044    DESC_TRACK_VIDEO,
00045    DESC_TRACK_TEXT,
00046    DESC_NUM_TRACKS
00047 } E_STB_DMX_DESC_TRACK;
00048 
00049 typedef enum
00050 {
00051    KEY_PARITY_EVEN,
00052    KEY_PARITY_ODD
00053 } E_STB_DMX_DESC_KEY_PARITY;
00054 
00055 typedef enum
00056 {
00057    DESC_TYPE_DVB,
00058    DESC_TYPE_AES,
00059    DESC_TYPE_AES_SCTE_52,
00060    DESC_TYPE_DES,
00061    DESC_TYPE_TDES
00062 } E_STB_DMX_DESC_TYPE;
00063 
00064 typedef enum
00065 {
00066    KEY_USAGE_PES,
00067    KEY_USAGE_TRANSPORT,
00068    KEY_USAGE_ALL
00069 } E_STB_DMX_KEY_USAGE;
00070 
00071 typedef enum
00072 {
00073    DMX_TUNER,
00074    DMX_1394,
00075    DMX_MEMORY
00076 } E_STB_DMX_DEMUX_SOURCE;
00077 
00078 typedef enum
00079 {
00080    DMX_CAPS_LIVE = 0x0001,
00081    DMX_CAPS_PIP = 0x0002,
00082    DMX_CAPS_RECORDING = 0x0004,
00083    DMX_CAPS_PLAYBACK = 0x0008
00084 } E_STB_DMX_CAPS;
00085 
00086 //---Global type defs for public use-------------------------------------------
00087 
00088 typedef void (*FILTER_CALLBACK)( U8BIT path, U16BIT bytes, U16BIT pfilt_id );
00089 
00090 //---Global Function prototypes for public use---------------------------------
00091 
00097 void STB_DMXInitialise(U8BIT paths, BOOLEAN inc_pes_collection);
00098 
00104 U16BIT STB_DMXGetCapabilities(U8BIT path);
00105 
00110 U8BIT STB_DMXGetMaxSectionFilters(void);
00111 
00118 void STB_DMXSetDemuxSource(U8BIT path, E_STB_DMX_DEMUX_SOURCE source, U8BIT param);
00119 
00126 void STB_DMXGetDemuxSource(U8BIT path, E_STB_DMX_DEMUX_SOURCE *source, U8BIT *param);
00127 
00134 void STB_DMXReadTextPES(U8BIT path, U8BIT **buffer, U32BIT *num_bytes);
00135 
00145 void STB_DMXChangeDecodePIDs(U8BIT path, U16BIT pcr_pid, U16BIT video_pid, U16BIT audio_pid,
00146    U16BIT text_pid, U16BIT data_pid, U16BIT ad_pid);
00147 
00153 void STB_DMXChangeTextPID(U8BIT path, U16BIT text_pid);
00154 
00163 U16BIT STB_DMXGrabPIDFilter(U8BIT path, U16BIT pid, FILTER_CALLBACK func);
00164 
00174 BOOLEAN STB_DMXCopyPIDFilterSect(U8BIT path, U8BIT *buffer, U16BIT size, U16BIT pfilt_id);
00175 
00181 void STB_DMXSkipPIDFilterSect(U8BIT path, U16BIT pfilt_id);
00182 
00189 U16BIT STB_DMXGrabSectFilter(U8BIT path, U16BIT pfilt_id);
00190 
00200 void STB_DMXSetupSectFilter(U8BIT path, U16BIT sfilt_id, U8BIT *match_ptr, U8BIT *mask_ptr,
00201    U8BIT not_equal_byte_index, BOOLEAN crc);
00202 
00208 void STB_DMXStartPIDFilter(U8BIT path, U16BIT pfilt_id);
00209 
00215 void STB_DMXStopPIDFilter(U8BIT path, U16BIT pfilt_id);
00216 
00222 void STB_DMXReleasePIDFilter(U8BIT path, U16BIT pfilt_id);
00223 
00229 void STB_DMXReleaseSectFilter(U8BIT path, U16BIT sfilt_id);
00230 
00237 BOOLEAN STB_DMXGetDescramblerKey(U8BIT path, E_STB_DMX_DESC_TRACK track);
00238 
00245 BOOLEAN STB_DMXFreeDescramblerKey(U8BIT path, E_STB_DMX_DESC_TRACK track);
00246 
00256 BOOLEAN STB_DMXSetDescramblerKeyData(U8BIT path, E_STB_DMX_DESC_TRACK track, E_STB_DMX_DESC_KEY_PARITY parity, U8BIT *data);
00257 
00267 BOOLEAN STB_DMXGetKeyUsage(U8BIT path, E_STB_DMX_DESC_TRACK track, E_STB_DMX_KEY_USAGE *key_usage);
00268 
00277 BOOLEAN STB_DMXSetKeyUsage(U8BIT path, E_STB_DMX_DESC_TRACK track, E_STB_DMX_KEY_USAGE key_usage);
00278 
00286 BOOLEAN STB_DMXGetDescramblerType(U8BIT path, E_STB_DMX_DESC_TRACK track, E_STB_DMX_DESC_TYPE *type);
00287 
00294 BOOLEAN STB_DMXSetDescramblerType(U8BIT path, E_STB_DMX_DESC_TRACK track, E_STB_DMX_DESC_TYPE type);
00295 
00296 #endif //  _STBHWDMX_H
00297 
 All Data Structures Files Functions Typedefs Defines