2 * Copyright (C) 2013 Team XBMC
5 * This Program is free software; you can redistfribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
10 * This Program is distfributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with XBMC; see the file COPYING. If not, see
17 * <http://www.gnu.org/licenses/>.
21 #include "StageFrightInterface.h"
22 #include "StageFrightVideo.h"
24 #include "windowing/WindowingFactory.h"
25 #include "settings/AdvancedSettings.h"
27 void* create_stf(CWinSystemEGL* windowing, CAdvancedSettings* advsettings)
29 return (void*)new CStageFrightVideo(windowing, advsettings);
32 void destroy_stf(void* stf)
34 delete (CStageFrightVideo*)stf;
37 bool stf_Open(void* stf, CDVDStreamInfo &hints)
39 return ((CStageFrightVideo*)stf)->Open(hints);
42 void stf_Close(void* stf)
44 ((CStageFrightVideo*)stf)->Close();
47 int stf_Decode(void* stf, uint8_t *pData, int iSize, double dts, double pts)
49 return ((CStageFrightVideo*)stf)->Decode(pData, iSize, dts, pts);
52 void stf_Reset(void* stf)
54 ((CStageFrightVideo*)stf)->Reset();
57 bool stf_GetPicture(void* stf, DVDVideoPicture *pDvdVideoPicture)
59 return ((CStageFrightVideo*)stf)->GetPicture(pDvdVideoPicture);
62 bool stf_ClearPicture(void* stf, DVDVideoPicture* pDvdVideoPicture)
64 return ((CStageFrightVideo*)stf)->ClearPicture(pDvdVideoPicture);
67 void stf_SetDropState(void* stf, bool bDrop)
69 ((CStageFrightVideo*)stf)->SetDropState(bDrop);
72 void stf_SetSpeed(void* stf, int iSpeed)
74 ((CStageFrightVideo*)stf)->SetSpeed(iSpeed);
77 void stf_LockBuffer(void* stf, EGLImageKHR eglimg)
79 ((CStageFrightVideo*)stf)->LockBuffer(eglimg);
82 void stf_ReleaseBuffer(void* stf, EGLImageKHR eglimg)
84 ((CStageFrightVideo*)stf)->ReleaseBuffer(eglimg);