khronosfws/openmax_al/src/gst_adaptation/xaaudioencoderitfadaptation.c
changeset 25 6f7ceef7b1d1
parent 20 b67dd1fc57c5
child 28 ebf79c79991a
--- a/khronosfws/openmax_al/src/gst_adaptation/xaaudioencoderitfadaptation.c	Fri May 28 19:26:28 2010 -0500
+++ b/khronosfws/openmax_al/src/gst_adaptation/xaaudioencoderitfadaptation.c	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: AudioEnc Intfc Adaptation for GStreamer
+ *
+ */
 
 #include <gst/gst.h>
 #include "xamediarecorderadaptctx.h"
@@ -29,46 +29,48 @@
  * @return XAresult ret - return success value
  * Description: Sets preferred encoder settings for pipeline.
  */
-XAresult XAAudioEncoderItfAdapt_SetEncoderSettings( XAAdaptationBaseCtx *ctx,
-                                                    XAAudioEncoderSettings *pSettings )
-{
+XAresult XAAudioEncoderItfAdapt_SetEncoderSettings(XAAdaptationBaseCtx *ctx,
+        XAAudioEncoderSettings *pSettings)
+    {
     XAresult ret = XA_RESULT_SUCCESS;
     XAMediaRecorderAdaptationCtx* mCtx = NULL;
 
     DEBUG_API("->XAAudioEncoderItfAdapt_SetEncoderSettings");
-    if( !ctx || (ctx->ctxId != XAMediaRecorderAdaptation) || !pSettings )
-    {
+    if (!ctx || (ctx->ctxId != XAMediaRecorderAdaptation) || !pSettings)
+        {
         DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
         DEBUG_API("<-XAAudioEncoderItfImpl_SetEncoderSettings");
         return XA_RESULT_PARAMETER_INVALID;
-    }
+        }
     mCtx = (XAMediaRecorderAdaptationCtx*) ctx;
 
-    ret = XAMediaRecorderAdapt_CheckCodec(mCtx,XACAP_AUDIO,pSettings->encoderId);
-    if(ret==XA_RESULT_SUCCESS)
-    {
+    ret = XAMediaRecorderAdapt_CheckCodec(mCtx, XACAP_AUDIO,
+            pSettings->encoderId);
+    if (ret == XA_RESULT_SUCCESS)
+        {
         /*change of settings - pipeline must be regenerated**/
         mCtx->encodingchanged = XA_BOOLEAN_TRUE;
-        memcpy(&mCtx->audioEncSettings, pSettings, sizeof(XAAudioEncoderSettings));
-    }
-    DEBUG_API("<-XAAudioEncoderItfAdapt_SetEncoderSettings");
+        memcpy(&mCtx->audioEncSettings, pSettings,
+                sizeof(XAAudioEncoderSettings));
+        }DEBUG_API("<-XAAudioEncoderItfAdapt_SetEncoderSettings");
     return ret;
-}
+    }
 
-XAresult XAAudioEncoderItfAdapt_GetEncoderSettings( XAAdaptationBaseCtx *bCtx,
-                                                 XAAudioEncoderSettings *pSettings )
-{
+XAresult XAAudioEncoderItfAdapt_GetEncoderSettings(XAAdaptationBaseCtx *bCtx,
+        XAAudioEncoderSettings *pSettings)
+    {
     XAMediaRecorderAdaptationCtx* mCtx = NULL;
     XAresult ret = XA_RESULT_SUCCESS;
 
     DEBUG_API("->XAAudioEncoderItfAdapt_GetEncoderSettings");
-    if( !bCtx || (bCtx->ctxId != XAMediaRecorderAdaptation) || !pSettings )
-    {
+    if (!bCtx || (bCtx->ctxId != XAMediaRecorderAdaptation) || !pSettings)
+        {
         DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
         return XA_RESULT_PARAMETER_INVALID;
-    }
+        }
     mCtx = (XAMediaRecorderAdaptationCtx*) bCtx;
-    memcpy(pSettings, &(mCtx->audioEncSettings), sizeof(XAAudioEncoderSettings));
+    memcpy(pSettings, &(mCtx->audioEncSettings),
+            sizeof(XAAudioEncoderSettings));
     DEBUG_API("<-XAAudioEncoderItfAdapt_GetEncoderSettings");
     return ret;
-}
+    }