khronosfws/openmax_al/src/gst_adaptation/xamediarecorderadaptctx.h
changeset 25 6f7ceef7b1d1
parent 19 4a629bc82c5e
child 53 eabc8c503852
--- a/khronosfws/openmax_al/src/gst_adaptation/xamediarecorderadaptctx.h	Fri May 28 19:26:28 2010 -0500
+++ b/khronosfws/openmax_al/src/gst_adaptation/xamediarecorderadaptctx.h	Fri Jun 11 19:59:23 2010 -0500
@@ -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: Media Recoder Adaptation for GST Header
+ *
+ */
 
 #ifndef XAMEDIARECORDERADAPTCTX_H_
 #define XAMEDIARECORDERADAPTCTX_H_
@@ -24,111 +24,114 @@
 /* TYPEDEFS */
 
 typedef struct XASnapshotItfVars_
-{
+    {
 
     /*User variables*/
-    XAuint32        numpics;
-    XAuint32        fps;
-    XAboolean       freeze;
-    gchar*          fnametemplate;
-    XADataSink*     xaSink;
+    XAuint32 numpics;
+    XAuint32 fps;
+    XAboolean freeze;
+    gchar* fnametemplate;
+    XADataSink* xaSink;
 
     /* internal variables */
-    gboolean        waitforbuffer;
-    gboolean        parsenegotiated;
-    XAuint32        numpicstaken;
+    gboolean waitforbuffer;
+    gboolean parsenegotiated;
+    XAuint32 numpicstaken;
 
-    GstBus*         ssbus;
-    GstElement*     sspipeline;
-    GstElement*     ssbuffersrc;
-    GstElement*     ssparser;
-    GstElement*     ssscaler;
-    GstElement*     ssfilter;
-    GstElement*     ssencoder;
-    GstElement*     sstagger;
-    GstElement*     sssink;
-    gulong          sighandler;
+    GstBus* ssbus;
+    GstElement* sspipeline;
+    GstElement* ssbuffersrc;
+    GstElement* ssparser;
+    GstElement* ssscaler;
+    GstElement* ssfilter;
+    GstElement* ssencoder;
+    GstElement* sstagger;
+    GstElement* sssink;
+    gulong sighandler;
 
-    GstBuffer*      snapshotbuffer;
+    GstBuffer* snapshotbuffer;
 
-} XASnapshotItfVars;
+    } XASnapshotItfVars;
 
 /* context to track buffer insufficient event */
-typedef struct recordItfCtx_{
+typedef struct recordItfCtx_
+    {
     XAImplSemHandle bufInsufficientSem;
     XAboolean buffer_insufficient;
-}recodtItfCtx;
+    } recodtItfCtx;
 
 typedef struct XAMediaRecorderAdaptationCtx_ XAMediaRecorderAdaptationCtx;
 
 typedef struct XAMediaRecorderAdaptationCtx_
-{
+    {
     /* Parent*/
     XAAdaptationGstCtx_ baseObj;
 
     /* OMX-AL Variables */
-    XADataSource            *xaAudioSource, *xaVideoSource;
-    XADataSink              *xaSink;
-    XAuint8                 recModes;
+    XADataSource *xaAudioSource, *xaVideoSource;
+    XADataSink *xaSink;
+    XAuint8 recModes;
 
     /* GST elements */
-    GstElement              *datasink;
-    XAboolean               isobjsink;   /*is sink another XA object?*/
-    GstElement              *codecbin;
-    GstElement              *audioppbin;
-    GstElement              *audiofilter;
-    GstElement              *videoppbin;
-    GstElement              *videofilter;
-    GstElement              *videoextract;
-    GstElement              *audiosource;
-    GstElement              *audioqueue;
-    XAboolean               isobjasrc;    /*is audio source another XA object?*/
-    GstElement              *videosource;
-    GstState                vsrcOrigState;
-    GstElement              *videoqueue;
-    XAboolean               isobjvsrc;    /*is video source another XA object?*/
-    XAboolean               encodingchanged;
+    GstElement *datasink;
+    XAboolean isobjsink; /*is sink another XA object?*/
+    GstElement *codecbin;
+    GstElement *audioppbin;
+    GstElement *audiofilter;
+    GstElement *videoppbin;
+    GstElement *videofilter;
+    GstElement *videoextract;
+    GstElement *audiosource;
+    GstElement *audioqueue;
+    XAboolean isobjasrc; /*is audio source another XA object?*/
+    GstElement *videosource;
+    GstState vsrcOrigState;
+    GstElement *videoqueue;
+    XAboolean isobjvsrc; /*is video source another XA object?*/
+    XAboolean encodingchanged;
 
-    XAboolean               mute;
-    XAuint32                imageEffectID;
-    XAboolean               isStereoPosition;
-    XAuint32                xaRecordState;
-    XAmillidegree           curRotation;
-    XAuint32                curMirror;
-    XAboolean               isRecord;
+    XAboolean mute;
+    XAuint32 imageEffectID;
+    XAboolean isStereoPosition;
+    XAuint32 xaRecordState;
+    XAmillidegree curRotation;
+    XAuint32 curMirror;
+    XAboolean isRecord;
 
     /* internals */
-    XAboolean               trackpositionenabled;
-    gboolean                runpositiontimer;
-    GSourceFunc             positionCb;
+    XAboolean trackpositionenabled;
+    gboolean runpositiontimer;
+    GSourceFunc positionCb;
 
-    XAImplThreadHandle      recordingEventThr;
-    recodtItfCtx            recThrCtx;
-
+    XAImplThreadHandle recordingEventThr;
+    recodtItfCtx recThrCtx;
 
     /* Variables for snapshot */
-    XASnapshotItfVars       snapshotVars;
+    XASnapshotItfVars snapshotVars;
 
-    XAMetadataAdaptVars     *metadatavars;
+    XAMetadataAdaptVars *metadatavars;
 
     /* Variables for encoders */
-    XAAudioEncoderSettings  audioEncSettings;
-    XAVideoSettings         videoEncSettings;
-    XAImageSettings         imageEncSettings;
+    XAAudioEncoderSettings audioEncSettings;
+    XAVideoSettings videoEncSettings;
+    XAImageSettings imageEncSettings;
 
     /*buffersink variable*/
-    guint64                 writepos;
+    guint64 writepos;
 
-} XAMediaRecorderAdaptationCtx_;
+    } XAMediaRecorderAdaptationCtx_;
 
 /* FUNCTIONS */
-XAAdaptationBaseCtx* XAMediaRecorderAdapt_Create(  XADataSource* pAudioSrc, XADataSource* pImageVideoSrc, XADataSink* pDataSnk, XAuint8 recModes );
-XAresult XAMediaRecorderAdapt_PostInit( XAAdaptationGstCtx* bCtx );
-void XAMediaRecorderAdapt_Destroy( XAAdaptationGstCtx* bCtx );
+XAAdaptationBaseCtx* XAMediaRecorderAdapt_Create(XADataSource* pAudioSrc,
+        XADataSource* pImageVideoSrc, XADataSink* pDataSnk, XAuint8 recModes);
+XAresult XAMediaRecorderAdapt_PostInit(XAAdaptationGstCtx* bCtx);
+void XAMediaRecorderAdapt_Destroy(XAAdaptationGstCtx* bCtx);
 /*XAresult XAMediaRecorderAdapt_InitContentPipeSink(XAMediaRecorderAdaptationCtx* ctx);*/
-XAresult XAMediaRecorderAdapt_ChangeEncoders( XAMediaRecorderAdaptationCtx_* mCtx );
-XAresult XAMediaRecorderAdapt_CheckCodec( XAMediaRecorderAdaptationCtx_* mCtx, XACapsType encType, XAuint32 encoderId );
+XAresult XAMediaRecorderAdapt_ChangeEncoders(
+        XAMediaRecorderAdaptationCtx_* mCtx);
+XAresult XAMediaRecorderAdapt_CheckCodec(XAMediaRecorderAdaptationCtx_* mCtx,
+        XACapsType encType, XAuint32 encoderId);
 
-void*  XAMediaRecorderAdapt_RecordEventThr(void* ctx);
+void* XAMediaRecorderAdapt_RecordEventThr(void* ctx);
 
 #endif /* XAMEDIARECORDERADAPTCTX_H_ */