aboutsummaryrefslogtreecommitdiffstats
path: root/utils/rds-ctl/rds-ctl.cpp
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2012-08-24 12:11:28 +0200
committerHans Verkuil <hans.verkuil@cisco.com>2012-08-24 12:13:27 +0200
commitd6fe1c685ebb579afed6dee6f3ea2aa2555bcd76 (patch)
tree89ead92de88a8bd220419b49b21ddfbdfc451e98 /utils/rds-ctl/rds-ctl.cpp
parent5a64d8b66d5dd94de01a2832b8e9bb87d4002d5c (diff)
rds-ctl: add --rbds option.
Added a new rbds option to select RBDS decoding instead of the default RDS decoding. Note that this also fixes a bug where RBDS decoding was the default. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> CC: Konke Radlow <koradlow@gmail.com>
Diffstat (limited to 'utils/rds-ctl/rds-ctl.cpp')
-rw-r--r--utils/rds-ctl/rds-ctl.cpp25
1 files changed, 11 insertions, 14 deletions
diff --git a/utils/rds-ctl/rds-ctl.cpp b/utils/rds-ctl/rds-ctl.cpp
index 69064313..fb9ea269 100644
--- a/utils/rds-ctl/rds-ctl.cpp
+++ b/utils/rds-ctl/rds-ctl.cpp
@@ -60,6 +60,7 @@ typedef std::map<std::string, std::string> dev_map;
In general the lower case is used to set something and the upper
case is used to retrieve a setting. */
enum Option {
+ OptRBDS = 'b',
OptSetDevice = 'd',
OptGetDriverInfo = 'D',
OptGetFreq = 'F',
@@ -99,6 +100,7 @@ static int app_result;
static struct option long_options[] = {
{"all", no_argument, 0, OptAll},
+ {"rbds", no_argument, 0, OptRBDS},
{"device", required_argument, 0, OptSetDevice},
{"file", required_argument, 0, OptOpenFile},
{"freq-seek", required_argument, 0, OptFreqSeek},
@@ -160,22 +162,17 @@ static void usage_tuner(void)
static void usage_rds(void)
{
printf("\nRDS options: \n"
- " -R, --read-rds\n"
- " enable reading of RDS data from device\n"
- " --file=<path>\n"
- " open a RDS stream file dump instead of a device\n"
+ " -b, --rbds parse the RDS data according to the RBDS standard\n"
+ " -R, --read-rds enable reading of RDS data from device\n"
+ " --file=<path> open a RDS stream file dump instead of a device\n"
" all General and Tuner Options are disabled in this mode\n"
- " --wait-limit=<ms>\n"
- " defines the maximum wait duration for avaibility of new\n"
+ " --wait-limit=<ms> defines the maximum wait duration for avaibility of new\n"
" RDS data\n"
- " <default>: 5000ms\n"
- " --print-block\n"
- " prints all valid RDS fields, whenever a value is updated\n"
+ " <default>: 5000 ms\n"
+ " --print-block prints all valid RDS fields, whenever a value is updated\n"
" instead of printing only updated values\n"
- " --tmc\n"
- " enables decoding of TMC (Traffic Message Channel) data\n"
- " --verbose\n"
- " turn on verbose mode - every received RDS group\n"
+ " --tmc enables decoding of TMC (Traffic Message Channel) data\n"
+ " --verbose turn on verbose mode - every received RDS group\n"
" will be printed\n"
);
}
@@ -656,7 +653,7 @@ static void read_rds_from_fd(const int fd)
struct v4l2_rds *rds_handle;
/* create an rds handle for the current device */
- if (!(rds_handle = v4l2_rds_create(true))) {
+ if (!(rds_handle = v4l2_rds_create(params.options[OptRBDS]))) {
fprintf(stderr, "Failed to init RDS lib: %s\n", strerror(errno));
exit(1);
}

Privacy Policy