Wasabi ExpressPlay SDK for Embedded Systems  1.23.0
Ts2Utils.h
Go to the documentation of this file.
1 /*****************************************************************
2 |
3 | MPEG2 Transport Stream - Utils
4 |
5 | $Id: Ts2Utils.h 296 2014-06-25 11:20:09Z jebaseelir $
6 | Original author: Julien Boeuf
7 |
8 | This software is provided to you pursuant to your agreement
9 | with Intertrust Technologies Corporation ("Intertrust").
10 | This software may be used only in accordance with the terms
11 | of the agreement.
12 |
13 | Copyright (c) 2005-2014 by Intertrust. All rights reserved.
14 |
15 ****************************************************************/
16 
17 #ifndef _TS2_UTILS_H_
18 #define _TS2_UTILS_H_
19 
20 /*----------------------------------------------------------------------
21 | includes
22 +---------------------------------------------------------------------*/
23 #include "Atomix.h"
24 #include "Ts2Config.h"
25 
26 /*----------------------------------------------------------------------
27 | types
28 +---------------------------------------------------------------------*/
35 
36 typedef void (*TS2_MapValueDestructor)(void* value);
37 
38 typedef struct {
39  /* internal: don't manipulate directly */
40  ATX_List* entries;
42 } TS2_Map;
43 
44 
45 /*----------------------------------------------------------------------
46 | TS2_Map methods
47 +---------------------------------------------------------------------*/
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51 
52 ATX_Result
54 
55 void
57 
58 ATX_Result
59 TS2_Map_Put(TS2_Map* self, ATX_UInt16 key, void* value);
60 
61 void*
62 TS2_Map_Get(TS2_Map* self, ATX_UInt16 key);
63 
64 ATX_Result
65 TS2_Map_Remove(TS2_Map* self, ATX_UInt16 key);
66 
67 void
68 TS2_Map_Clear(TS2_Map* self);
69 
70 /*----------------------------------------------------------------------
71 | TS2_RotationPoints methods
72 +---------------------------------------------------------------------*/
80 TS2_EXPORT ATX_Result
81 TS2_RotationPoints_Create(ATX_Size capacity,
82  TS2_RotationPoints** points);
83 
92 TS2_EXPORT ATX_Result
93 TS2_RotationPoints_CreateFromFile(const char* filename,
94  TS2_RotationPoints** points);
95 
103 TS2_EXPORT ATX_Result
105  ATX_UInt32 point);
106 
116 TS2_EXPORT ATX_Result
118  ATX_Ordinal idx,
119  ATX_UInt32* point);
120 
130 TS2_EXPORT ATX_Result
132  ATX_Ordinal idx,
133  ATX_UInt32 point);
134 
141 TS2_EXPORT ATX_Size
143 
152 TS2_EXPORT ATX_Result
154  const char* filename);
155 
161 TS2_EXPORT void
163 
164 #ifdef __cplusplus
165 }
166 #endif
167 
168 #endif /* _TS2_UTILS_H_ */
void(* TS2_MapValueDestructor)(void *value)
Definition: Ts2Utils.h:36
void TS2_Map_Destruct(TS2_Map *self)
TS2_EXPORT ATX_Result TS2_RotationPoints_SetPoint(TS2_RotationPoints *self, ATX_Ordinal idx, ATX_UInt32 point)
Modifies the rotation point at a particular index position in the rotation points list...
TS2_EXPORT ATX_Result TS2_RotationPoints_CreateFromFile(const char *filename, TS2_RotationPoints **points)
Creates a TS2_RotationPoints object containing the rotation points indicated in a specified file...
struct TS2_RotationPoints TS2_RotationPoints
A TS2_RotationPoints object can be used to specify "rotation points" indicating where in the Transpor...
Definition: Ts2Utils.h:34
ATX_Result TS2_Map_Put(TS2_Map *self, ATX_UInt16 key, void *value)
Definition: Ts2Utils.h:38
#define TS2_EXPORT
Definition: Ts2Config.h:67
TS2_MapValueDestructor destroy_value
Definition: Ts2Utils.h:41
ATX_Result TS2_Map_Construct(TS2_Map *self, TS2_MapValueDestructor destructor)
ATX_List * entries
Definition: Ts2Utils.h:40
TS2_EXPORT ATX_Result TS2_RotationPoints_ToFile(const TS2_RotationPoints *self, const char *filename)
Outputs the rotation points list to a file.
TS2_EXPORT ATX_Result TS2_RotationPoints_Create(ATX_Size capacity, TS2_RotationPoints **points)
Creates a TS2_RotationPoints object with a specified capacity.
void TS2_Map_Clear(TS2_Map *self)
void * TS2_Map_Get(TS2_Map *self, ATX_UInt16 key)
ATX_Result TS2_Map_Remove(TS2_Map *self, ATX_UInt16 key)
TS2_EXPORT void TS2_RotationPoints_Destroy(TS2_RotationPoints *self)
Destroys the specified TS2_RotationPoints object.
TS2_EXPORT ATX_Result TS2_RotationPoints_AddPoint(TS2_RotationPoints *self, ATX_UInt32 point)
Adds a specified rotation point to the end of the list of rotation points.
TS2_EXPORT ATX_Size TS2_RotationPoints_GetPointCount(const TS2_RotationPoints *self)
Gets the number of rotation points in the rotation points list.
TS2_EXPORT ATX_Result TS2_RotationPoints_GetPoint(const TS2_RotationPoints *self, ATX_Ordinal idx, ATX_UInt32 *point)
Gets the value of the rotation point at a specified index position.