1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- #ifndef VIDEOPLAYER_H
- #define VIDEOPLAYER_H
- #pragma once
- #ifdef __cplusplus
- extern "C" {
- #endif
- #include "videoutil.h"
- #ifndef VIDEOPLAYER_FLAG_DOUBLESIZE
- #define VIDEOPLAYER_FLAG_DOUBLESIZE 0x01
- #endif
- #ifndef VIDEOPLAYER_FLAG_NOTIMER
- #define VIDEOPLAYER_FLAG_NOTIMER 0x02
- #endif
- #ifndef VIDEOPLAYER_FLAG_PUSH
- #define VIDEOPLAYER_FLAG_PUSH 0x04
- #endif
- #ifndef VIDEOPLAYER_FLAG_PULL
- #define VIDEOPLAYER_FLAG_PULL 0x08
- #endif
- #ifndef VIDEOPLAYER_FLAG_CHECKTOP
- #define VIDEOPLAYER_FLAG_CHECKTOP 0x10
- #endif
- #ifndef VIDEOPLAYER_FLAG_ZOOMOUTSIZE
- #define VIDEOPLAYER_FLAG_ZOOMOUTSIZE 0x100
- #endif
- typedef struct videoplayer_t videoplayer_t;
- typedef int (*videoplayer_on_pull)(videoplayer_t *player, void *user_data, video_frame **frame);
- typedef void (*videoplayer_free_frame)(videoplayer_t *player, void *user_data, video_frame *frame);
- // must call at ui thread
- int videoplayer_create(HWND hWndVideo,
- int x, int y, int cx, int cy,
- int fps_num,int fps_den,
- int width, int height,
- int flags,
- const char *name,
- videoplayer_on_pull on_pull,
- videoplayer_free_frame free_frame,
- void *user_data,
- videoplayer_t **p_player);
- // must call at ui thread
- void videoplayer_destroy(videoplayer_t *player);
- int videoplayer_queue_frame(videoplayer_t *player, video_frame *frame, videoplayer_free_frame free_frame, void *user_data);
- #ifdef __cplusplus
- }//extern "C" {
- #endif
- #endif // VIDEOPLAYER_H
|