diff options
author | Tuomas Virtanen <katajakasa@gmail.com> | 2016-01-11 02:35:02 +0200 |
---|---|---|
committer | Tuomas Virtanen <katajakasa@gmail.com> | 2016-01-11 02:35:02 +0200 |
commit | 9ad6420f5e781ec3800604835221cf026b91483c (patch) | |
tree | 1785f04af6bb60eff1c68245dbe27427d5a52031 /include | |
parent | 8ee9b3e560a39d65c62a87fc797ddcc1279b3a78 (diff) |
Basic video sync + frameskip + play/pause/stop control
Diffstat (limited to 'include')
-rw-r--r-- | include/kitchensink/internal/kitbuffer.h | 2 | ||||
-rw-r--r-- | include/kitchensink/kitplayer.h | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/include/kitchensink/internal/kitbuffer.h b/include/kitchensink/internal/kitbuffer.h index 772edf1..19a0c79 100644 --- a/include/kitchensink/internal/kitbuffer.h +++ b/include/kitchensink/internal/kitbuffer.h @@ -14,6 +14,8 @@ KIT_LOCAL Kit_Buffer* Kit_CreateBuffer(unsigned int size); KIT_LOCAL void Kit_DestroyBuffer(Kit_Buffer *buffer); KIT_LOCAL void* Kit_ReadBuffer(Kit_Buffer *buffer); +KIT_LOCAL void* Kit_PeekBuffer(const Kit_Buffer *buffer); +KIT_LOCAL void Kit_AdvanceBuffer(Kit_Buffer *buffer); KIT_LOCAL int Kit_WriteBuffer(Kit_Buffer *buffer, void *ptr); KIT_LOCAL int Kit_IsBufferFull(const Kit_Buffer *buffer); diff --git a/include/kitchensink/kitplayer.h b/include/kitchensink/kitplayer.h index 8f67a9b..a40b12d 100644 --- a/include/kitchensink/kitplayer.h +++ b/include/kitchensink/kitplayer.h @@ -15,8 +15,6 @@ extern "C" { #define KIT_CODECMAX 16 #define KIT_CODECNAMEMAX 128 -#define KIT_VBUFFERSIZE 3 -#define KIT_ABUFFERSIZE 65536 typedef enum Kit_PlayerState { KIT_STOPPED = 0, @@ -44,6 +42,10 @@ typedef struct Kit_Player { Kit_PlayerState state; Kit_VideoFormat vformat; Kit_AudioFormat aformat; + double clock_sync; + double clock_vprev; + double clock_aprev; + double pause_start; SDL_Thread *dec_thread; SDL_mutex *vmutex; SDL_mutex *amutex; |