mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-04-05 23:05:31 +00:00
vidcap: missing audio notavail checks
This commit is contained in:
@@ -604,6 +604,9 @@ static int vidcap_avfoundation_init(struct vidcap_params *params, void **state)
|
||||
[vidcap_avfoundation_state usage: true];
|
||||
return VIDCAP_INIT_NOERR;
|
||||
}
|
||||
if ((vidcap_params_get_flags(params) & VIDCAP_FLAG_AUDIO_ANY) != 0U) {
|
||||
return VIDCAP_INIT_AUDIO_NOT_SUPPORTED;
|
||||
}
|
||||
NSMutableDictionary *init_params = [[NSMutableDictionary alloc] init];
|
||||
char *tmp = strdup(vidcap_params_get_fmt(params));
|
||||
char *item, *save_ptr, *cfg = tmp;
|
||||
|
||||
@@ -96,9 +96,6 @@ struct vidcap_gpustitch_state {
|
||||
int frames;
|
||||
struct timeval t, t0;
|
||||
|
||||
int audio_source_index;
|
||||
|
||||
|
||||
gpustitch::Stitcher stitcher;
|
||||
gpustitch::Stitcher_params stitch_params;
|
||||
std::vector<gpustitch::Cam_params> cam_properties;
|
||||
@@ -521,12 +518,13 @@ static void stop_grab_workers(vidcap_gpustitch_state *s){
|
||||
static int
|
||||
vidcap_gpustitch_init(struct vidcap_params *params, void **state)
|
||||
{
|
||||
struct vidcap_gpustitch_state *s;
|
||||
|
||||
printf("vidcap_gpustitch_init\n");
|
||||
|
||||
if ((vidcap_params_get_flags(params) & VIDCAP_FLAG_AUDIO_ANY) != 0U) {
|
||||
return VIDCAP_INIT_AUDIO_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
s = new vidcap_gpustitch_state();
|
||||
struct vidcap_gpustitch_state *s = new vidcap_gpustitch_state();
|
||||
if(s == NULL) {
|
||||
printf("Unable to allocate gpustitch capture state\n");
|
||||
return VIDCAP_INIT_FAIL;
|
||||
|
||||
@@ -116,6 +116,10 @@ static void usage()
|
||||
|
||||
static int vidcap_spout_init(struct vidcap_params *params, void **state)
|
||||
{
|
||||
if ((vidcap_params_get_flags(params) & VIDCAP_FLAG_AUDIO_ANY) != 0U) {
|
||||
return VIDCAP_INIT_AUDIO_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
state_vidcap_spout *s = new state_vidcap_spout();
|
||||
|
||||
double fps = DEFAULT_FPS;
|
||||
|
||||
@@ -442,6 +442,10 @@ static int vidcap_syphon_init_common(char *opts, struct state_vidcap_syphon **ou
|
||||
|
||||
static int vidcap_syphon_init(struct vidcap_params *params, void **state)
|
||||
{
|
||||
if ((vidcap_params_get_flags(params) & VIDCAP_FLAG_AUDIO_ANY) != 0U) {
|
||||
return VIDCAP_INIT_AUDIO_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
char *opts = strdup(vidcap_params_get_fmt(params));
|
||||
struct state_vidcap_syphon *s = NULL;
|
||||
int ret = vidcap_syphon_init_common(opts, &s);
|
||||
|
||||
Reference in New Issue
Block a user