UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
Loading...
Searching...
No Matches
null.c
Go to the documentation of this file.
1/*
2 * FILE: video_capture/null.c
3 * AUTHOR: Colin Perkins <csp@isi.edu>
4 *
5 * A fake video capture device, used for systems that either have no capture
6 * hardware or do not wish to transmit. This fits the interface of the other
7 * capture devices, but never produces any video.
8 *
9 * Copyright (c) 2005-2023 CESNET
10 * Copyright (c) 2004 University of Glasgow
11 * Copyright (c) 2003 University of Southern California
12 *
13 * Redistribution and use in source and binary forms, with or without
14 * modification, is permitted provided that the following conditions
15 * are met:
16 *
17 * 1. Redistributions of source code must retain the above copyright
18 * notice, this list of conditions and the following disclaimer.
19 *
20 * 2. Redistributions in binary form must reproduce the above copyright
21 * notice, this list of conditions and the following disclaimer in the
22 * documentation and/or other materials provided with the distribution.
23 *
24 * 3. All advertising materials mentioning features or use of this software
25 * must display the following acknowledgement:
26 *
27 * This product includes software developed by the University of Southern
28 * California Information Sciences Institute.
29 *
30 * 4. Neither the name of the University nor of the Institute may be used
31 * to endorse or promote products derived from this software without
32 * specific prior written permission.
33 *
34 * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS
35 * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
36 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
37 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
38 * EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
39 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
40 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
41 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
42 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
43 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
44 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
45 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
46 *
47 * $Revision: 1.3.2.1 $
48 * $Date: 2010/01/30 20:07:35 $
49 *
50 */
51
52#include "config.h"
53#include "config_unix.h"
54#include "config_win32.h"
55#include "debug.h"
56#include "lib_common.h"
57#include "video.h"
58#include "video_capture.h"
59
60static int capture_state = 0;
61
71
72static void vidcap_null_done(void *state)
73{
74 assert(state == &capture_state);
75}
76
77static struct video_frame *vidcap_null_grab(void *state, struct audio_frame **audio)
78{
79 assert(state == &capture_state);
80 *audio = NULL;
81 return NULL;
82}
83
84static void vidcap_null_probe(struct device_info **available_cards, int *count, void (**deleter)(void *))
85{
86 *deleter = free;
87 *available_cards = NULL;
88 *count = 0;
89}
90
98
100
void ** state
struct audio_frame ** audio
int void(** deleter)(void *))
#define VIDCAP_INIT_OK
initialization successful
#define VIDCAP_NO_GENERIC_FPS_INDICATOR
#define VIDEO_CAPTURE_ABI_VERSION
#define VIDCAP_INIT_AUDIO_NOT_SUPPORTED
card does not support audio
int count
Definition hd-rum.c:44
@ LIBRARY_CLASS_VIDEO_CAPTURE
Definition lib_common.h:78
#define REGISTER_HIDDEN_MODULE(name, info, lclass, abi)
Definition lib_common.h:156
struct used to comunicate with audio capture/playback device
Definition types.h:99
Struct video_frame represents a video frame and contains video description.
Definition types.h:305
This is an umbrella header for video functions.
static int capture_state
Definition null.c:60
static int vidcap_null_init(struct vidcap_params *params, void **state)
Definition null.c:62
static const struct video_capture_info vidcap_null_info
Definition null.c:91
static struct video_frame * vidcap_null_grab(void *state, struct audio_frame **audio)
Definition null.c:77
static void vidcap_null_done(void *state)
Definition null.c:72
static void vidcap_null_probe(struct device_info **available_cards, int *count, void(**deleter)(void *))
Definition null.c:84
unsigned int vidcap_params_get_flags(const struct vidcap_params *params)
#define VIDCAP_FLAG_AUDIO_ANY