52#define MOD_NAME "[pipe] "
70 "\t-d pipe:<ptr>[:codec=<c>]\n";
83 if (!
fmt || strlen(
fmt) == 0 || strcmp(
fmt,
"help") == 0) {
84 fprintf(stderr,
"Pipe dummy video driver. For internal usage - please do not use.\n");
85 if (
fmt !=
nullptr && strcmp(
fmt,
"help") == 0) {
91 sscanf(
fmt,
"%p", &delegate);
92 if (strchr(
fmt,
':') !=
nullptr) {
93 fmt = strchr(
fmt,
':') + 1;
94 if (strstr(
fmt,
"codec=") ==
fmt) {
95 const char *codec_name =
fmt + strlen(
"codec=");
155 len += (*it)->data_len;
164 out->data = (
char *) malloc(
len);
195 MSG(ERROR,
"Insufficient prop length %zu B!\n", *
len);
203 const void *end = (
char *)
val + *
len;
210 MSG(ERROR,
"Insufficient prop length %zu B!\n", *
len);
213 memcpy(out++, &c,
sizeof c);
215 *
len = (
char *) out - (
char *)
val;
223 int rgb_shift[] = {0, 8, 16};
230 if(
sizeof(rgb_shift) > *
len) {
233 memcpy(
val, rgb_shift,
sizeof(rgb_shift));
234 *
len =
sizeof(rgb_shift);
241 if(
sizeof(supported_il_modes) <= *
len) {
242 memcpy(
val, supported_il_modes,
sizeof(supported_il_modes));
246 *
len =
sizeof(supported_il_modes);
277 lock_guard<mutex> lk(s->audio_lock);
294 *available_cards =
nullptr;
struct video_frame * frame
const char unsigned int flags
int void(** deleter)(void *))
void vf_free(struct video_frame *buf)
Frees video_frame structure.
struct video_frame * vf_alloc_desc_data(struct video_desc desc)
codec_t get_codec_from_name(const char *name)
This file contains definition of some common audio types.
virtual void frame_arrived(struct video_frame *, struct audio_frame *)=0
#define LOG_LEVEL_ERROR
general errors
#define LOG_LEVEL_WARNING
less severe errors
#define PITCH_DEFAULT
default pitch, i. e. respective linesize
#define VIDEO_DISPLAY_ABI_VERSION
#define DISPLAY_NO_GENERIC_FPS_INDICATOR
@ DISPLAY_PROPERTY_BUF_PITCH
requested framebuffer pitch - int (bytes), may be PITCH_DEFAULT
@ DISPLAY_PROPERTY_RGB_SHIFT
red,green,blue shift - int[3] (bits)
@ DISPLAY_PROPERTY_SUPPORTED_IL_MODES
display supported interlacing modes - enum interlacing_t[]
@ DISPLAY_PROPERTY_VIDEO_MODE
requested video mode - int (one of display_prop_vid_mode)
@ DISPLAY_PROPERTY_CODECS
list of natively supported codecs - codec_t[]
@ DISPLAY_PROPERTY_AUDIO_FORMAT
@ DISPLAY_PROPERTY_VIDEO_SEPARATE_TILES
framebuffer consists of separate tiles
@ LIBRARY_CLASS_VIDEO_DISPLAY
#define REGISTER_HIDDEN_MODULE(name, info, lclass, abi)
static bool display_pipe_reconfigure_audio(void *state, int quant_samples, int channels, int sample_rate)
static bool display_pipe_reconfigure(void *state, struct video_desc desc)
static bool display_pipe_putf(void *state, struct video_frame *frame, long long flags)
static struct audio_frame * display_pipe_get_audio(struct state_pipe *s)
static struct video_frame * display_pipe_getf(void *state)
static bool get_codecs(struct state_pipe *s, void *val, size_t *len)
static void display_pipe_probe(struct device_info **available_cards, int *count, void(**deleter)(void *))
static void display_pipe_usage()
static void display_pipe_put_audio_frame(void *state, const struct audio_frame *frame)
static bool display_pipe_get_property(void *state, int property, void *val, size_t *len)
static void display_pipe_dispose_audio(struct audio_frame *f)
static const struct video_display_info display_pipe_info
static void * display_pipe_init(struct module *parent, const char *fmt, unsigned int flags)
static void display_pipe_done(void *state)
struct used to comunicate with audio capture/playback device
list< struct audio_frame * > audio_frames
frame_recv_delegate * delegate
void(* dispose)(struct video_frame *)
Struct video_frame represents a video frame and contains video description.
struct video_frame_callbacks callbacks
@ PROGRESSIVE
progressive frame
@ SEGMENTED_FRAME
Segmented frame. Contains the same data as progressive frame.
@ INTERLACED_MERGED
Columngs of both fields are interlaced together.
@ VIDEO_CODEC_NONE
dummy color spec
@ VIDEO_CODEC_COUNT
count of known video codecs (including VIDEO_CODEC_NONE)
struct audio_desc audio_desc_from_frame(const struct audio_frame *frame)
bool audio_desc_eq(struct audio_desc a1, struct audio_desc a2)
void audio_frame_write_desc(struct audio_frame *f, struct audio_desc desc)
bool append_audio_frame(struct audio_frame *frame, char *data, size_t data_len)
struct audio_frame * audio_frame_copy(const struct audio_frame *src, bool keep_size)
This is an umbrella header for video functions.
bool is_codec_opaque(codec_t codec)
#define VIDEO_FRAME_DISPOSE(frame)