mirror of
https://github.com/pikvm/ustreamer.git
synced 2026-03-02 22:01:42 +00:00
US_FRAME_META_DECLARE
This commit is contained in:
@@ -26,26 +26,30 @@
|
||||
#include "tools.h"
|
||||
|
||||
|
||||
#define US_FRAME_META_DECLARE \
|
||||
uint width; \
|
||||
uint height; \
|
||||
uint format; \
|
||||
uint stride; \
|
||||
/* Stride is a bytesperline in V4L2 */ \
|
||||
/* https://www.kernel.org/doc/html/v4.14/media/uapi/v4l/pixfmt-v4l2.html */ \
|
||||
/* https://medium.com/@oleg.shipitko/what-does-stride-mean-in-image-processing-bba158a72bcd */ \
|
||||
bool online; \
|
||||
bool key; \
|
||||
uint gop; \
|
||||
\
|
||||
ldf grab_ts; \
|
||||
ldf encode_begin_ts; \
|
||||
ldf encode_end_ts;
|
||||
|
||||
|
||||
typedef struct {
|
||||
u8 *data;
|
||||
uz used;
|
||||
uz allocated;
|
||||
int dma_fd;
|
||||
|
||||
uint width;
|
||||
uint height;
|
||||
uint format;
|
||||
uint stride;
|
||||
// Stride is a bytesperline in V4L2
|
||||
// https://www.kernel.org/doc/html/v4.14/media/uapi/v4l/pixfmt-v4l2.html
|
||||
// https://medium.com/@oleg.shipitko/what-does-stride-mean-in-image-processing-bba158a72bcd
|
||||
bool online;
|
||||
bool key;
|
||||
uint gop;
|
||||
|
||||
ldf grab_ts;
|
||||
ldf encode_begin_ts;
|
||||
ldf encode_end_ts;
|
||||
US_FRAME_META_DECLARE;
|
||||
} us_frame_s;
|
||||
|
||||
|
||||
|
||||
@@ -23,33 +23,23 @@
|
||||
#pragma once
|
||||
|
||||
#include "types.h"
|
||||
#include "frame.h"
|
||||
|
||||
|
||||
#define US_MEMSINK_MAGIC ((u64)0xCAFEBABECAFEBABE)
|
||||
#define US_MEMSINK_VERSION ((u32)6)
|
||||
#define US_MEMSINK_VERSION ((u32)7)
|
||||
|
||||
|
||||
typedef struct {
|
||||
u64 magic;
|
||||
u32 version;
|
||||
|
||||
u64 id;
|
||||
|
||||
uz used;
|
||||
uint width;
|
||||
uint height;
|
||||
uint format;
|
||||
uint stride;
|
||||
bool online;
|
||||
bool key;
|
||||
uint gop;
|
||||
|
||||
ldf grab_ts;
|
||||
ldf encode_begin_ts;
|
||||
ldf encode_end_ts;
|
||||
|
||||
ldf last_client_ts;
|
||||
bool key_requested;
|
||||
|
||||
US_FRAME_META_DECLARE;
|
||||
} us_memsink_shared_s;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user