54 lines
1.9 KiB
C
54 lines
1.9 KiB
C
/*
|
|
*
|
|
* Singe 2
|
|
* Copyright (C) 2006-2020 Scott Duensing <scott@kangaroopunch.com>
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License
|
|
* as published by the Free Software Foundation; either version 2
|
|
* of the License, or (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
*
|
|
*/
|
|
|
|
|
|
#ifndef VIDEOPLAYER_H
|
|
#define VIDEOPLAYER_H
|
|
|
|
|
|
#include <SDL2/SDL.h>
|
|
|
|
#include "common.h"
|
|
|
|
|
|
typedef void (*videoIndexingCallback)(int32_t);
|
|
|
|
|
|
int32_t videoInit(void);
|
|
int32_t videoIsPlaying(int32_t playerHandle);
|
|
int64_t videoGetFrame(int32_t playerHandle);
|
|
int64_t videoGetFrameCount(int32_t playerHandle);
|
|
int32_t videoGetHeight(int32_t playerHandle);
|
|
int32_t videoGetWidth(int32_t playerHandle);
|
|
int32_t videoGetVolume(int32_t playerHandle, int32_t *leftPercent, int32_t *rightPercent);
|
|
int32_t videoLoad(char *filename, char *indexPath, bool stretchVideo, SDL_Renderer *renderer);
|
|
int32_t videoLoadWithAudio(char *vFilename, char *aFilename, char *indexPath, bool stretchVideo, SDL_Renderer *renderer);
|
|
int32_t videoPause(int32_t playerHandle);
|
|
int32_t videoPlay(int32_t playerHandle);
|
|
int32_t videoQuit(void);
|
|
int32_t videoSeek(int32_t playerHandle, int64_t seekFrame);
|
|
int32_t videoSetIndexCallback(videoIndexingCallback callback);
|
|
int32_t videoSetVolume(int32_t playerHandle, int32_t leftPercent, int32_t rightPercent);
|
|
int32_t videoUnload(int32_t playerHandle);
|
|
int32_t videoUpdate(int32_t playerHandle, SDL_Texture **texture);
|
|
|
|
|
|
#endif // VIDEOPLAYER_H
|