mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-28 08:31:52 +08:00
35 lines
1.7 KiB
C
35 lines
1.7 KiB
C
#ifndef FFMPEG_RAM_FFI_H
|
|
#define FFMPEG_RAM_FFI_H
|
|
|
|
#include <stdint.h>
|
|
|
|
#define AV_NUM_DATA_POINTERS 8
|
|
|
|
typedef void (*RamDecodeCallback)(const void *obj, int width, int height,
|
|
int pixfmt,
|
|
int linesize[AV_NUM_DATA_POINTERS],
|
|
uint8_t *data[AV_NUM_DATA_POINTERS], int key);
|
|
typedef void (*RamEncodeCallback)(const uint8_t *data, int len, int64_t pts,
|
|
int key, const void *obj);
|
|
|
|
void *ffmpeg_ram_new_encoder(const char *name, const char *mc_name, int width,
|
|
int height, int pixfmt, int align, int fps,
|
|
int gop, int rc, int quality, int kbs, int q,
|
|
int thread_count, int gpu, int *linesize,
|
|
int *offset, int *length,
|
|
RamEncodeCallback callback);
|
|
void *ffmpeg_ram_new_decoder(const char *name, int device_type,
|
|
int thread_count, RamDecodeCallback callback);
|
|
int ffmpeg_ram_encode(void *encoder, const uint8_t *data, int length,
|
|
const void *obj, int64_t ms);
|
|
int ffmpeg_ram_decode(void *decoder, const uint8_t *data, int length,
|
|
const void *obj);
|
|
void ffmpeg_ram_free_encoder(void *encoder);
|
|
void ffmpeg_ram_free_decoder(void *decoder);
|
|
int ffmpeg_ram_get_linesize_offset_length(int pix_fmt, int width, int height,
|
|
int align, int *linesize, int *offset,
|
|
int *length);
|
|
int ffmpeg_ram_set_bitrate(void *encoder, int kbs);
|
|
void ffmpeg_ram_request_keyframe(void *encoder);
|
|
|
|
#endif // FFMPEG_RAM_FFI_H
|