mirror of
https://github.com/pikvm/ustreamer.git
synced 2026-03-14 03:23:43 +00:00
US_FRAME_META_DECLARE
This commit is contained in:
@@ -26,26 +26,30 @@
|
|||||||
#include "tools.h"
|
#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 {
|
typedef struct {
|
||||||
u8 *data;
|
u8 *data;
|
||||||
uz used;
|
uz used;
|
||||||
uz allocated;
|
uz allocated;
|
||||||
int dma_fd;
|
int dma_fd;
|
||||||
|
|
||||||
uint width;
|
US_FRAME_META_DECLARE;
|
||||||
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_s;
|
} us_frame_s;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -23,33 +23,23 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
#include "frame.h"
|
||||||
|
|
||||||
|
|
||||||
#define US_MEMSINK_MAGIC ((u64)0xCAFEBABECAFEBABE)
|
#define US_MEMSINK_MAGIC ((u64)0xCAFEBABECAFEBABE)
|
||||||
#define US_MEMSINK_VERSION ((u32)6)
|
#define US_MEMSINK_VERSION ((u32)7)
|
||||||
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u64 magic;
|
u64 magic;
|
||||||
u32 version;
|
u32 version;
|
||||||
|
|
||||||
u64 id;
|
u64 id;
|
||||||
|
|
||||||
uz used;
|
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;
|
ldf last_client_ts;
|
||||||
bool key_requested;
|
bool key_requested;
|
||||||
|
|
||||||
|
US_FRAME_META_DECLARE;
|
||||||
} us_memsink_shared_s;
|
} us_memsink_shared_s;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user