mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-21 16:40:18 +00:00
Screen X11: fixed indention in probe
This commit is contained in:
@@ -244,36 +244,40 @@ static struct vidcap_type * vidcap_screen_x11_probe(bool verbose, void (**delete
|
||||
*deleter = free;
|
||||
|
||||
vt = (struct vidcap_type *) calloc(1, sizeof(struct vidcap_type));
|
||||
if (vt != NULL) {
|
||||
vt->name = "screen";
|
||||
vt->description = "Grabbing screen";
|
||||
if (vt == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (verbose) {
|
||||
vt->card_count = 1;
|
||||
vt->cards = calloc(vt->card_count, sizeof(struct device_info));
|
||||
// vt->cards[0].id can be "" since screen cap. doesn't require parameters
|
||||
snprintf(vt->cards[0].name, sizeof vt->cards[0].name, "Screen capture");
|
||||
vt->name = "screen";
|
||||
vt->description = "Grabbing screen";
|
||||
|
||||
int framerates[] = {24, 30, 60};
|
||||
if (!verbose) {
|
||||
return vt;
|
||||
}
|
||||
|
||||
snprintf(vt->cards[0].modes[0].name,
|
||||
sizeof vt->cards[0].name,
|
||||
"Unlimited fps");
|
||||
snprintf(vt->cards[0].modes[0].id,
|
||||
sizeof vt->cards[0].id,
|
||||
"{\"fps\":\"\"}");
|
||||
vt->card_count = 1;
|
||||
vt->cards = calloc(vt->card_count, sizeof(struct device_info));
|
||||
// vt->cards[0].id can be "" since screen cap. doesn't require parameters
|
||||
snprintf(vt->cards[0].name, sizeof vt->cards[0].name, "Screen capture");
|
||||
|
||||
for(unsigned i = 0; i < sizeof(framerates) / sizeof(framerates[0]); i++){
|
||||
snprintf(vt->cards[0].modes[i + 1].name,
|
||||
sizeof vt->cards[0].name,
|
||||
"%d fps",
|
||||
framerates[i]);
|
||||
snprintf(vt->cards[0].modes[i + 1].id,
|
||||
sizeof vt->cards[0].id,
|
||||
"{\"fps\":\"%d\"}",
|
||||
framerates[i]);
|
||||
}
|
||||
}
|
||||
int framerates[] = {24, 30, 60};
|
||||
|
||||
snprintf(vt->cards[0].modes[0].name,
|
||||
sizeof vt->cards[0].name,
|
||||
"Unlimited fps");
|
||||
snprintf(vt->cards[0].modes[0].id,
|
||||
sizeof vt->cards[0].id,
|
||||
"{\"fps\":\"\"}");
|
||||
|
||||
for(unsigned i = 0; i < sizeof(framerates) / sizeof(framerates[0]); i++){
|
||||
snprintf(vt->cards[0].modes[i + 1].name,
|
||||
sizeof vt->cards[0].name,
|
||||
"%d fps",
|
||||
framerates[i]);
|
||||
snprintf(vt->cards[0].modes[i + 1].id,
|
||||
sizeof vt->cards[0].id,
|
||||
"{\"fps\":\"%d\"}",
|
||||
framerates[i]);
|
||||
}
|
||||
return vt;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user