39 #define FLIP_COUNTERCLOCKWISE 3 /* Rotate counter-clockwise 90 degrees */ |
38 #define FLIP_COUNTERCLOCKWISE 3 /* Rotate counter-clockwise 90 degrees */ |
40 #define FLIP_HORIZONTAL 4 /* Flip image horizontally */ |
39 #define FLIP_HORIZONTAL 4 /* Flip image horizontally */ |
41 #define FLIP_VERTICAL 5 /* Flip image vertically */ |
40 #define FLIP_VERTICAL 5 /* Flip image vertically */ |
42 |
41 |
43 /* TYPEDEFS */ |
42 /* TYPEDEFS */ |
44 //typedef gboolean (*GstBusCb)( GstBus *bus, GstMessage *message, gpointer data ); |
|
45 |
43 |
46 #define CONTENT_PIPE_BUFFER_SIZE 1000 |
44 #define CONTENT_PIPE_BUFFER_SIZE 1000 |
47 #define TEST_VIDEO_WIDTH 640 |
45 #define TEST_VIDEO_WIDTH 640 |
48 #define TEST_VIDEO_HEIGHT 480 |
46 #define TEST_VIDEO_HEIGHT 480 |
49 |
|
50 /* |
|
51 typedef enum |
|
52 { |
|
53 XA_AUDIO_WAVENC = 0, |
|
54 XA_AUDIO_VORBISENC, |
|
55 XA_AUDIO_PCM, |
|
56 XA_NUM_OF_AUDIOENCODERS Do not move this line |
|
57 } XAAudioEnc; |
|
58 |
|
59 typedef enum |
|
60 { |
|
61 XA_VIDEO_JPEGENC = 0, |
|
62 XA_VIDEO_THEORAENC, |
|
63 XA_NUM_OF_VIDEOENCODERS Do not move this line |
|
64 } XAVideoEnc; |
|
65 |
|
66 typedef enum CP_STATE |
|
67 { |
|
68 CPStateNull =0, |
|
69 CPStateInitialized, |
|
70 CPStatePrerolling, |
|
71 CPStateStarted, |
|
72 CPStateRunning, |
|
73 CPStatePaused, |
|
74 CPStateStopped, |
|
75 CPStateWaitForData, |
|
76 CPStateEOS, |
|
77 CPStateError |
|
78 }CP_STATE; |
|
79 */ |
|
80 |
47 |
81 /* Forward declaration of adaptation basecontext */ |
48 /* Forward declaration of adaptation basecontext */ |
82 typedef struct XAAdaptationMMFCtx_ XAAdaptationMMFCtx; |
49 typedef struct XAAdaptationMMFCtx_ XAAdaptationMMFCtx; |
83 |
50 |
84 /* |
51 /* |
85 * Structure that holds all common variables for every |
52 * Structure that holds all common variables for every |
86 * mmf-Adaptation context structures. |
53 * mmf-Adaptation context structures. |
87 */ |
54 */ |
88 typedef struct XAAdaptationMMFCtx_ |
55 typedef struct XAAdaptationMMFCtx_ |
89 { |
56 { |
90 XAAdaptationBaseCtx baseObj; |
57 XAAdaptationBaseCtx baseObj; |
91 |
58 |
92 } XAAdaptationMMFCtx_; |
59 } XAAdaptationMMFCtx_; |
93 |
60 |
94 typedef struct XAEngineAdaptationMMFCtx_ |
61 typedef struct XAEngineAdaptationMMFCtx_ |
95 { |
62 { |
96 /* Parent*/ |
63 /* Parent*/ |
97 XAAdaptationMMFCtx_ baseObj; |
64 XAAdaptationMMFCtx_ baseObj; |
98 |
65 |
99 } XAEngineAdaptationMMFCtx_; |
66 } XAEngineAdaptationMMFCtx_; |
100 |
67 |
101 /* |
68 /* |
102 * Structure for Media Player specific gst-adaptation. |
69 * Structure for Media Player specific gst-adaptation. |
103 */ |
70 */ |
104 typedef struct XAMediaPlayerAdaptationMMFCtx_ |
71 typedef struct XAMediaPlayerAdaptationMMFCtx_ |
105 { |
72 { |
106 /* Parent*/ |
73 /* Parent*/ |
107 XAAdaptationMMFCtx_ baseObj; |
74 XAAdaptationMMFCtx_ baseObj; |
108 |
75 |
109 /* OMX-AL Variables */ |
76 /* OMX-AL Variables */ |
110 XADataSource *xaSource, *xaBankSrc; |
77 XADataSource *xaSource, *xaBankSrc; |
111 XADataSink *xaAudioSink, *xaVideoSink, *xaLEDArray, *xaVibra; |
78 XADataSink *xaAudioSink, *xaVideoSink, *xaLEDArray, *xaVibra; |
112 |
79 |
113 /* MMF elements */ |
80 /* MMF elements */ |
114 XAboolean isobjsrc; /*is source another XA object?*/ |
81 XAboolean isobjsrc; /*is source another XA object?*/ |
115 |
82 |
116 XAboolean isobjasink; /*is audio sink another XA object?*/ |
83 XAboolean isobjasink; /*is audio sink another XA object?*/ |
117 XAboolean isobjvsink; /*is video sink another XA object?*/ |
84 XAboolean isobjvsink; /*is video sink another XA object?*/ |
118 |
85 |
119 XAboolean mute; |
86 XAboolean mute; |
120 XAuint32 premutevol; |
87 XAuint32 premutevol; |
121 XAuint32 imageEffectID; |
88 XAuint32 imageEffectID; |
122 XAboolean isStereoPosition; |
89 XAboolean isStereoPosition; |
123 XAmillidegree curRotation; |
90 XAmillidegree curRotation; |
124 XAuint32 curMirror; |
91 XAuint32 curMirror; |
125 |
92 |
126 XAint32 buffering; |
93 XAint32 buffering; |
127 |
94 |
128 /* internals */ |
95 /* internals */ |
129 XAboolean trackpositionenabled; |
96 XAboolean trackpositionenabled; |
130 |
97 |
|
98 XAboolean loopingenabled; |
131 |
99 |
132 XAboolean loopingenabled; |
100 XAboolean cameraSinkSynced; |
|
101 void* mmfContext; |
|
102 void* mmfMetadataContext; |
|
103 XAboolean isForRadio; |
|
104 /* |
|
105 XAuint32 playerState; |
|
106 */ |
133 |
107 |
134 XAboolean cameraSinkSynced; |
108 } XAMediaPlayerAdaptationMMFCtx_; |
135 void* mmfContext; |
|
136 void* mmfMetadataContext; |
|
137 XAboolean isForRadio; |
|
138 /* |
|
139 XAuint32 playerState; |
|
140 */ |
|
141 |
|
142 } XAMediaPlayerAdaptationMMFCtx_; |
|
143 |
109 |
144 typedef struct XAMetadataAdaptationMMFCtx_ |
110 typedef struct XAMetadataAdaptationMMFCtx_ |
145 { |
111 { |
146 /* Parent*/ |
112 /* Parent*/ |
147 XAAdaptationMMFCtx_ baseObj; |
113 XAAdaptationMMFCtx_ baseObj; |
148 |
114 |
149 /* OMX-AL Variables */ |
115 /* OMX-AL Variables */ |
150 XADataSource *xaSource; |
116 XADataSource *xaSource; |
151 |
117 |
152 void* mmfContext; |
118 void* mmfContext; |
153 } XAMetadataAdaptationMMFCtx_; |
119 } XAMetadataAdaptationMMFCtx_; |
154 |
|
155 |
|
156 |
120 |
157 /* |
121 /* |
158 * Structure for Radio specific variables |
122 * Structure for Radio specific variables |
159 */ |
123 */ |
160 typedef struct XARadioAdaptationCtx_ { |
124 typedef struct XARadioAdaptationCtx_ |
|
125 { |
161 |
126 |
162 /* Parent*/ |
127 /* Parent*/ |
163 XAAdaptationMMFCtx_ baseObj; |
128 XAAdaptationMMFCtx_ baseObj; |
164 XAuint32 frequency; |
129 XAuint32 frequency; |
165 XAuint8 range; |
130 XAuint8 range; |
166 |
131 |
167 pthread_t emulationThread; |
132 pthread_t emulationThread; |
168 pthread_t rdsEmulationThread; |
133 pthread_t rdsEmulationThread; |
169 |
134 |
170 } XARadioAdaptationCtx_; |
135 } XARadioAdaptationCtx_; |
171 /* FUNCTIONS */ |
136 /* FUNCTIONS */ |
172 /* |
137 /* |
173 * gboolean XAAdaptationBase_GstBusCb( GstBus *bus, GstMessage *message, gpointer data ); |
138 * gboolean XAAdaptationBase_GstBusCb( GstBus *bus, GstMessage *message, gpointer data ); |
174 * Default CallBack handler for gst-bus messages. This will be called if object specific callback is |
139 * Default CallBack handler for gst-bus messages. This will be called if object specific callback is |
175 * not implemented. |
140 * not implemented. |
176 */ |
141 */ |
177 |
142 |
178 XAresult XAAdaptationBaseMMF_Init( XAAdaptationMMFCtx* pSelf, XAuint32 ctxId ); |
143 XAresult XAAdaptationBaseMMF_Init(XAAdaptationMMFCtx* pSelf, XAuint32 ctxId); |
179 XAresult XAAdaptationBaseMMF_PostInit( XAAdaptationMMFCtx* ctx ); |
144 XAresult XAAdaptationBaseMMF_PostInit(XAAdaptationMMFCtx* ctx); |
180 void XAAdaptationBaseMMF_Free( XAAdaptationMMFCtx* ctx ); |
145 void XAAdaptationBaseMMF_Free(XAAdaptationMMFCtx* ctx); |
181 |
146 |
182 #endif /* XAADAPTATIONMMF_H_ */ |
147 #endif /* XAADAPTATIONMMF_H_ */ |