khronosfws/openmax_al/src/mediaplayer/xaprefetchstatusitf.h
branchRCL_3
changeset 19 095bea5f582e
equal deleted inserted replaced
18:a36789189b53 19:095bea5f582e
       
     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 XAPREFETCHSTATUSITF_H_
       
    19 #define XAPREFETCHSTATUSITF_H_
       
    20 
       
    21 #include "openmaxalwrapper.h"
       
    22 #include "xaglobals.h"
       
    23 #include "xaadptbasectx.h"
       
    24 #include "xamediaplayer.h"
       
    25 
       
    26 #define PREFETCHSTATUSITF_DEFAULT_UPDATE_PERIOD 100
       
    27 
       
    28 /*
       
    29  * implementation declaration
       
    30  */
       
    31 typedef struct XAPrefetchStatusItfImpl_
       
    32 {
       
    33     /* "inherit" interface */
       
    34     struct XAPrefetchStatusItf_ itf;
       
    35     /* pointer to self */
       
    36     struct XAPrefetchStatusItfImpl_* self;
       
    37 
       
    38     /* variables */
       
    39 
       
    40     XAuint32 pStatus;
       
    41     XApermille pLevel;
       
    42 
       
    43     XAPrefetchStatusItf cbPtrToSelf;
       
    44     xaPrefetchCallback  callback;
       
    45     void                *cbcontext;
       
    46     XAuint32            eventFlags;
       
    47     XApermille          fillUpdatePeriod;
       
    48     XAAdaptationBaseCtx* adaptationCtx;
       
    49 }XAPrefetchStatusItfImpl;
       
    50 
       
    51 /**
       
    52  * XAPrefetchStatusItf interface implementation
       
    53  */
       
    54 XAresult XAPrefetchStatusItfImpl_GetPrefetchStatus(XAPrefetchStatusItf self,
       
    55                                                      XAuint32 *pStatus);
       
    56 
       
    57 XAresult XAPrefetchStatusItfImpl_GetFillLevel(XAPrefetchStatusItf self,
       
    58                                                 XApermille *pLevel);
       
    59 
       
    60 XAresult XAPrefetchStatusItfImpl_RegisterCallback(XAPrefetchStatusItf self,
       
    61                                                     xaPrefetchCallback callback,
       
    62                                                     void *pContext);
       
    63 
       
    64 XAresult XAPrefetchStatusItfImpl_SetCallbackEventsMask(XAPrefetchStatusItf self,
       
    65                                                          XAuint32 eventFlags);
       
    66 
       
    67 XAresult XAPrefetchStatusItfImpl_GetCallbackEventsMask(XAPrefetchStatusItf self,
       
    68                                                          XAuint32 *pEventFlags);
       
    69 
       
    70 XAresult XAPrefetchStatusItfImpl_SetFillUpdatePeriod(XAPrefetchStatusItf self,
       
    71                                                        XApermille period);
       
    72 
       
    73 XAresult XAPrefetchStatusItfImpl_GetFillUpdatePeriod(XAPrefetchStatusItf self,
       
    74                                                        XApermille *pPeriod);
       
    75 
       
    76 
       
    77 
       
    78 /*
       
    79  * implementation-specific methods
       
    80  */
       
    81 XAPrefetchStatusItfImpl* XAPrefetchStatusItfImpl_Create(  XAMediaPlayerImpl* impl );
       
    82 void XAPrefetchStatusItfImpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event );
       
    83 void XAPrefetchStatusItfImpl_Free(XAPrefetchStatusItfImpl* self);
       
    84 
       
    85 #endif /* XAPREFETCHSTATUSITF_H_ */