khronosfws/openmax_al/src/mediaplayer/xaprefetchstatusitf.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 16 Apr 2010 15:29:42 +0300
changeset 12 5a06f39ad45b
child 16 43d09473c595
permissions -rw-r--r--
Revision: 201011 Kit: 201015

/*
* 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 XAPREFETCHSTATUSITF_H_
#define XAPREFETCHSTATUSITF_H_

#include "openmaxalwrapper.h"
#include "xaglobals.h"
#ifdef _GSTREAMER_BACKEND_
#include "XAMediaPlayerAdaptCtx.h"
#endif
#define PREFETCHSTATUSITF_DEFAULT_UPDATE_PERIOD 100

/*
 * implementation declaration
 */
typedef struct XAPrefetchStatusItfImpl_
{
    /* "inherit" interface */
    struct XAPrefetchStatusItf_ itf;
    /* pointer to self */
    struct XAPrefetchStatusItfImpl_* self;

    /* variables */

    XAuint32 pStatus;
    XApermille pLevel;

    XAPrefetchStatusItf cbPtrToSelf;
    xaPrefetchCallback  callback;
    void                *cbcontext;
    XAuint32            eventFlags;
    XApermille          fillUpdatePeriod;
#ifdef _GSTREAMER_BACKEND_
    XAAdaptationBaseCtx* adaptationCtx;
#endif
}XAPrefetchStatusItfImpl;

/**
 * XAPrefetchStatusItf interface implementation
 */
XAresult XAPrefetchStatusItfImpl_GetPrefetchStatus(XAPrefetchStatusItf self,
                                                     XAuint32 *pStatus);

XAresult XAPrefetchStatusItfImpl_GetFillLevel(XAPrefetchStatusItf self,
                                                XApermille *pLevel);

XAresult XAPrefetchStatusItfImpl_RegisterCallback(XAPrefetchStatusItf self,
                                                    xaPrefetchCallback callback,
                                                    void *pContext);

XAresult XAPrefetchStatusItfImpl_SetCallbackEventsMask(XAPrefetchStatusItf self,
                                                         XAuint32 eventFlags);

XAresult XAPrefetchStatusItfImpl_GetCallbackEventsMask(XAPrefetchStatusItf self,
                                                         XAuint32 *pEventFlags);

XAresult XAPrefetchStatusItfImpl_SetFillUpdatePeriod(XAPrefetchStatusItf self,
                                                       XApermille period);

XAresult XAPrefetchStatusItfImpl_GetFillUpdatePeriod(XAPrefetchStatusItf self,
                                                       XApermille *pPeriod);

#ifdef _GSTREAMER_BACKEND_

/*
 * implementation-specific methods
 */
XAPrefetchStatusItfImpl* XAPrefetchStatusItfImpl_Create( XAAdaptationBaseCtx* adaptationCtx);
void XAPrefetchStatusItfImpl_AdaptCb( void *pHandlerCtx, XAAdaptEvent *event );
#endif

void XAPrefetchStatusItfImpl_Free(XAPrefetchStatusItfImpl* self);

#endif /* XAPREFETCHSTATUSITF_H_ */