/* * * Singe 3 * Copyright (C) 2006-2026 Scott Duensing * * 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 3 * 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 #include #include "common.h" #define VIDEO_VOLUME_MAX 100 #define VIDEO_AUDIO_DELAY_MAX 1000 // Milliseconds either way #define LUMA_LEVEL_MAX 8 // videoSetLuma takes 0 to 8 ... #define LUMA_LEVEL_NEUTRAL 4 // ... where this level changes nothing, 0 halves the luma and 8 raises it by half void videoFlash(int32_t playerHandle); int32_t videoGetAudioCalibration(void); int32_t videoGetAudioDelay(void); int32_t videoGetAudioLatency(void); int32_t videoGetAudioTrack(int32_t playerHandle); int32_t videoGetAudioTracks(int32_t playerHandle); double videoGetFps(int32_t playerHandle); int64_t videoGetFrame(int32_t playerHandle); int64_t videoGetFrameCount(int32_t playerHandle); int32_t videoGetHeight(int32_t playerHandle); const char *videoGetLanguage(int32_t playerHandle, int32_t audioTrack); const char *videoGetLanguageDescription(const char *languageCode); MIX_Mixer *videoGetMixer(void); const char *videoGetDecoderDescription(void); bool videoGetMonochrome(int32_t playerHandle); bool videoGetPixel(int32_t playerHandle, int32_t x, int32_t y, uint8_t *r, uint8_t *g, uint8_t *b); bool videoGetPixels(int32_t playerHandle, const uint8_t **pixels, int32_t *pitch); void videoGetVolume(int32_t playerHandle, int32_t *leftPercent, int32_t *rightPercent); int32_t videoGetWidth(int32_t playerHandle); bool videoGetYUVPixel(int32_t playerHandle, int32_t x, int32_t y, uint8_t *luma, uint8_t *cb, uint8_t *cr); void videoInit(MIX_Mixer *mixer); bool videoIsPlaying(int32_t playerHandle); int32_t videoLoad(const char *videoFilename, const char *audioFilename, const char *indexPath, SDL_Renderer *renderer, bool rgb); void videoLockAudio(void); void videoPause(int32_t playerHandle); void videoPlay(int32_t playerHandle); void videoQuit(void); bool videoReopenAudio(int32_t playerHandle, const char *audioFilename); void videoSeek(int32_t playerHandle, int64_t seekFrame); void videoSetAudioCalibration(int32_t milliseconds); void videoSetAudioDelay(int32_t milliseconds); void videoSetAudioTrack(int32_t playerHandle, int32_t track); void videoSetBlend(int32_t playerHandle, bool enabled); void videoSetHardwareDecoding(bool enabled); void videoSetLuma(int32_t playerHandle, bool enabled, int32_t level); void videoSetMonochrome(int32_t playerHandle, bool enabled); void videoSetVolume(int32_t playerHandle, int32_t leftPercent, int32_t rightPercent); void videoUnload(int32_t playerHandle); void videoUnlockAudio(void); int64_t videoUpdate(int32_t playerHandle, SDL_Texture **texture); #endif // VIDEOPLAYER_H