khronosfws/openmax_al/src/common/xavolumeitf.h
changeset 12 5a06f39ad45b
child 16 43d09473c595
equal deleted inserted replaced
0:71ca22bcf22a 12:5a06f39ad45b
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef XAVOLUMEITF_H
       
    19 #define XAVOLUMEITF_H
       
    20 
       
    21 #include "openmaxalwrapper.h"
       
    22 #include "xaglobals.h"
       
    23 #ifdef _GSTREAMER_BACKEND_  
       
    24 #include "XAAdaptationContextBase.h"
       
    25 #endif
       
    26 /** MACROS **/
       
    27 
       
    28 /* Max volume level is implementation-dependent but must be at least 0mB
       
    29  * now used max volume 10 mB
       
    30  */
       
    31 #define MAX_VOLUME_LEVEL 10
       
    32 #define MAX_VOLUME_AT_LEAST 0
       
    33 /* Stereo position range is -1000 to 1000 permille. -1000 permille is fully left
       
    34  * and 1000 permille is fully right. 0 permille is center.
       
    35  */
       
    36 #define STEREO_POSITION_RIGHT 1000
       
    37 #define STEREO_POSITION_LEFT -1000
       
    38 #define STEREO_POSITION_CENTER 0
       
    39 
       
    40 /** TYPES **/
       
    41 
       
    42 /** ENUMERATIONS **/
       
    43 
       
    44 /** STRUCTURES **/
       
    45 /* Definition of XAVolumeItf implementation */
       
    46 typedef struct XAVolumeItfImpl_
       
    47 {
       
    48     /* parent interface */
       
    49     struct XAVolumeItf_ itf;
       
    50     /* pointer to self */
       
    51     struct XAVolumeItfImpl_* self;
       
    52 
       
    53     XAmillibel volumeLevel;
       
    54     XAboolean mute;
       
    55     XAboolean enableStereoPos;
       
    56     XApermille stereoPosition;
       
    57 #ifdef _GSTREAMER_BACKEND_  
       
    58     /*Adaptation variables*/
       
    59     XAAdaptationBaseCtx *adapCtx;
       
    60 #endif
       
    61 } XAVolumeItfImpl;
       
    62 
       
    63 /** METHODS **/
       
    64 
       
    65 /* Base interface XAVolumeItf implementation */
       
    66 XAresult XAVolumeItfImpl_SetVolumeLevel(XAVolumeItf self, XAmillibel level);
       
    67 
       
    68 XAresult XAVolumeItfImpl_GetVolumeLevel(XAVolumeItf self, XAmillibel *pLevel);
       
    69 
       
    70 XAresult XAVolumeItfImpl_GetMaxVolumeLevel(XAVolumeItf self, XAmillibel *pMaxLevel);
       
    71 
       
    72 XAresult XAVolumeItfImpl_SetMute(XAVolumeItf self, XAboolean mute);
       
    73 
       
    74 XAresult XAVolumeItfImpl_GetMute(XAVolumeItf self, XAboolean *pMute);
       
    75 
       
    76 XAresult XAVolumeItfImpl_EnableStereoPosition(XAVolumeItf self, XAboolean enable);
       
    77 
       
    78 XAresult XAVolumeItfImpl_IsEnabledStereoPosition(XAVolumeItf self, XAboolean *pEnable);
       
    79 
       
    80 XAresult XAVolumeItfImpl_SetStereoPosition(XAVolumeItf self, XApermille stereoPosition);
       
    81 
       
    82 XAresult XAVolumeItfImpl_GetStereoPosition(XAVolumeItf self, XApermille *pStereoPosition);
       
    83 
       
    84 #ifdef _GSTREAMER_BACKEND_  
       
    85 /* XAVolumeItfImpl -specific methods */
       
    86 XAVolumeItfImpl* XAVolumeItfImpl_Create(XAAdaptationBaseCtx *adapCtx);
       
    87 #endif
       
    88 void XAVolumeItfImpl_Free(XAVolumeItfImpl* self);
       
    89 
       
    90 #endif /* XAVOLUMEITF_H */