1
0
mirror of https://github.com/DigitalDevices/dddvb.git synced 2023-10-10 13:37:43 +02:00

added puncture_rate to modulator stream setup

This commit is contained in:
mvoelkel 2021-04-17 21:03:05 +02:00
parent e974925430
commit f3d5adc777
2 changed files with 7 additions and 4 deletions

View File

@ -157,7 +157,7 @@ void output_cb(void *priv, char *par, char *val)
} else
printf("invalid connector\n");
} else if (!strcasecmp(par, "power")) {
mc->output.mod_setup_output.channel_power = (uint32_t) (strtod(val, NULL) * 100.0);
mc->output.mod_setup_output.channel_power = (int16_t) (strtod(val, NULL) * 100.0);
} else if (!strcasecmp(par, "channels")) {
mc->output.mod_setup_output.num_channels = strtol(val, NULL, 10);
}else if (!strcasecmp(par, "unit")) {
@ -207,6 +207,8 @@ void streams_cb(void *priv, char *par, char *val)
mc->stream.mod_setup_stream.fft_size = strtol(val, NULL, 10);
} else if (!strcasecmp(par, "guard_interval")) {
mc->stream.mod_setup_stream.guard_interval = strtol(val, NULL, 10);
} else if (!strcasecmp(par, "puncture_rate")) {
mc->stream.mod_setup_stream.puncture_rate = strtol(val, NULL, 10);
} else if (!strcasecmp(par, "standard")) {
mc->stream.mod_setup_stream.standard = strtol(val, NULL, 10);
} else if (!strcasecmp(par, "stream_format")) {
@ -276,11 +278,11 @@ int main(int argc, char*argv[])
return -1;
}
mc.fd = fd;
parse(configname, "output", (void *) &mc, output_cb);
if (mc.set_output)
mci_cmd(fd, &mc.output);
parse(configname, "channels", (void *) &mc, channels_cb);
if (mc.set_channels)
mci_cmd(fd, &mc.channels);
parse(configname, "streams", (void *) &mc, streams_cb);
parse(configname, "output", (void *) &mc, output_cb);
if (mc.set_output)
mci_cmd(fd, &mc.output);
}

View File

@ -230,6 +230,7 @@ struct mod_setup_stream {
u32 symbol_rate; /* only used when Standard doesn't define a fixed symbol rate */
u8 fft_size; /* 0 = 2K, 1 = 8K (2K yet supported) */
u8 guard_interval; /* 0 = 1/32, 1 = 1/16, 2 = 1/8, 3 = 1/4 (DVB-T Encoding) */
u8 puncture_rate; /* 0 = 1/2, 1 = 2/3, 2 = 3/4, 3 = 5/6, 4 = 7/8 (DVB-T Encoding) */
};
struct mod_setup_output {