khronosfws/openmax_al/src/mmf_adaptation/xaadaptationmmf.h
changeset 31 8dfd592727cb
parent 16 43d09473c595
child 32 94fc26b6e006
--- a/khronosfws/openmax_al/src/mmf_adaptation/xaadaptationmmf.h	Thu May 27 13:20:50 2010 +0300
+++ b/khronosfws/openmax_al/src/mmf_adaptation/xaadaptationmmf.h	Wed Jun 23 18:47:10 2010 +0300
@@ -1,19 +1,19 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *
+ */
 
 #ifndef XAADAPTATIONMMF_H_
 #define XAADAPTATIONMMF_H_
@@ -25,7 +25,6 @@
 #include <unistd.h>
 #include "openmaxalwrapper.h"
 #include "xaglobals.h"
-//#include "OpenMAXAL_ContentPipe.h"
 #include "xaplatform.h"
 #include "xaadptbasectx.h"
 #ifdef XA_IMPL_MEASURE_GST_DELAY
@@ -41,43 +40,11 @@
 #define FLIP_VERTICAL           5 /* Flip image vertically */
 
 /* TYPEDEFS */
-//typedef gboolean (*GstBusCb)( GstBus *bus, GstMessage *message, gpointer data );
 
 #define CONTENT_PIPE_BUFFER_SIZE 1000
 #define TEST_VIDEO_WIDTH     640
 #define TEST_VIDEO_HEIGHT    480
 
-/*
-typedef enum
-{
-    XA_AUDIO_WAVENC = 0,
-    XA_AUDIO_VORBISENC,
-    XA_AUDIO_PCM,
-    XA_NUM_OF_AUDIOENCODERS  Do not move this line 
-} XAAudioEnc;
-
-typedef enum
-{
-    XA_VIDEO_JPEGENC = 0,
-    XA_VIDEO_THEORAENC,
-    XA_NUM_OF_VIDEOENCODERS  Do not move this line 
-} XAVideoEnc;
-
-typedef enum CP_STATE
-{
-	CPStateNull =0,
-	CPStateInitialized,
-	CPStatePrerolling,
-	CPStateStarted,
-	CPStateRunning,
-	CPStatePaused,
-	CPStateStopped,
-	CPStateWaitForData,
-	CPStateEOS,
-	CPStateError
-}CP_STATE;
-*/
-
 /* Forward declaration of adaptation basecontext */
 typedef struct XAAdaptationMMFCtx_ XAAdaptationMMFCtx;
 
@@ -86,68 +53,86 @@
  * mmf-Adaptation context structures.
  */
 typedef struct XAAdaptationMMFCtx_
-{
-XAAdaptationBaseCtx baseObj;
+    {
+    XAAdaptationBaseCtx baseObj;
 
-} XAAdaptationMMFCtx_;
+    } XAAdaptationMMFCtx_;
 
 typedef struct XAEngineAdaptationMMFCtx_
-{
+    {
     /* Parent*/
-    XAAdaptationMMFCtx_    baseObj;
+    XAAdaptationMMFCtx_ baseObj;
 
-} XAEngineAdaptationMMFCtx_;
+    } XAEngineAdaptationMMFCtx_;
 
 /*
  * Structure for Media Player specific gst-adaptation.
  */
 typedef struct XAMediaPlayerAdaptationMMFCtx_
-{
+    {
     /* Parent*/
-    XAAdaptationMMFCtx_    baseObj;
+    XAAdaptationMMFCtx_ baseObj;
 
     /* OMX-AL Variables */
-    XADataSource            *xaSource, *xaBankSrc;
-    XADataSink              *xaAudioSink, *xaVideoSink, *xaLEDArray, *xaVibra;
+    XADataSource *xaSource, *xaBankSrc;
+    XADataSink *xaAudioSink, *xaVideoSink, *xaLEDArray, *xaVibra;
 
     /* MMF elements */
-    XAboolean               isobjsrc;    /*is source another XA object?*/
+    XAboolean isobjsrc; /*is source another XA object?*/
 
-    XAboolean               isobjasink;   /*is audio sink another XA object?*/
-    XAboolean               isobjvsink;   /*is video sink another XA object?*/
+    XAboolean isobjasink; /*is audio sink another XA object?*/
+    XAboolean isobjvsink; /*is video sink another XA object?*/
 
-    XAboolean               mute;
-    XAuint32                premutevol;
-    XAuint32                imageEffectID;
-    XAboolean               isStereoPosition;
-    XAmillidegree           curRotation;
-    XAuint32                curMirror;
-    XAint32                 buffering;
+    XAboolean mute;
+    XAuint32 premutevol;
+    XAuint32 imageEffectID;
+    XAboolean isStereoPosition;
+    XAmillidegree curRotation;
+    XAuint32 curMirror;
+
+    XAint32 buffering;
 
     /* internals */
-    XAboolean               trackpositionenabled;
-    XAboolean               loopingenabled;
-    XAboolean		        cameraSinkSynced;
-    void*                   mmfContext;
-	void* 					mmfMetadataContext;
-/*
-    XAuint32                playerState;
-*/
+    XAboolean trackpositionenabled;
+
+    XAboolean loopingenabled;
 
-} XAMediaPlayerAdaptationMMFCtx_;
+    XAboolean cameraSinkSynced;
+    void* mmfContext;
+    void* mmfMetadataContext;
+    XAboolean isForRadio;
+    /*
+     XAuint32                playerState;
+     */
 
+    } XAMediaPlayerAdaptationMMFCtx_;
 
 typedef struct XAMetadataAdaptationMMFCtx_
-{
+    {
     /* Parent*/
-    XAAdaptationMMFCtx_    baseObj;
+    XAAdaptationMMFCtx_ baseObj;
 
     /* OMX-AL Variables */
-    XADataSource            *xaSource;
+    XADataSource *xaSource;
+
+    void* mmfContext;
+    } XAMetadataAdaptationMMFCtx_;
 
-    void*                   mmfContext;
-} XAMetadataAdaptationMMFCtx_;
+/*
+ * Structure for Radio specific variables
+ */
+typedef struct XARadioAdaptationCtx_
+    {
 
+    /* Parent*/
+    XAAdaptationMMFCtx_ baseObj;
+    XAuint32 frequency;
+    XAuint8 range;
+
+    pthread_t emulationThread;
+    pthread_t rdsEmulationThread;
+
+    } XARadioAdaptationCtx_;
 /* FUNCTIONS */
 /*
  * gboolean XAAdaptationBase_GstBusCb( GstBus *bus, GstMessage *message, gpointer data );
@@ -155,8 +140,8 @@
  * not implemented.
  */
 
-XAresult XAAdaptationBaseMMF_Init( XAAdaptationMMFCtx* pSelf, XAuint32 ctxId );
-XAresult XAAdaptationBaseMMF_PostInit( XAAdaptationMMFCtx* ctx );
-void XAAdaptationBaseMMF_Free( XAAdaptationMMFCtx* ctx );
+XAresult XAAdaptationBaseMMF_Init(XAAdaptationMMFCtx* pSelf, XAuint32 ctxId);
+XAresult XAAdaptationBaseMMF_PostInit(XAAdaptationMMFCtx* ctx);
+void XAAdaptationBaseMMF_Free(XAAdaptationMMFCtx* ctx);
 
 #endif /* XAADAPTATIONMMF_H_ */