[vlc-commits] DTV: verbose frontend status
Rafaël Carré
git at videolan.org
Wed Aug 20 12:01:40 CEST 2014
vlc | branch: master | Rafaël Carré <funman at videolan.org> | Wed Aug 20 12:01:27 2014 +0200| [a4d4690c5f8dc73e97d05244fe9e6eaf19527130] | committer: Rafaël Carré
DTV: verbose frontend status
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a4d4690c5f8dc73e97d05244fe9e6eaf19527130
---
modules/access/dtv/linux.c | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/modules/access/dtv/linux.c b/modules/access/dtv/linux.c
index 1339bcd..f382462 100644
--- a/modules/access/dtv/linux.c
+++ b/modules/access/dtv/linux.c
@@ -301,6 +301,23 @@ void dvb_close (dvb_device_t *d)
free (d);
}
+static void dvb_frontend_status(vlc_object_t *obj, fe_status_t s)
+{
+ msg_Dbg(obj, "frontend status:");
+#define S(f) \
+ if (s & FE_ ## f) \
+ msg_Dbg(obj, "\t%s", #f);
+
+ S(HAS_SIGNAL);
+ S(HAS_CARRIER);
+ S(HAS_VITERBI);
+ S(HAS_SYNC);
+ S(HAS_LOCK);
+ S(TIMEDOUT);
+ S(REINIT);
+#undef S
+}
+
/**
* Reads TS data from the tuner.
* @return number of bytes read, 0 on EOF, -1 if no data (yet).
@@ -345,7 +362,7 @@ ssize_t dvb_read (dvb_device_t *d, void *buf, size_t len)
return 0;
}
- msg_Dbg (d->obj, "frontend status: 0x%02X", (unsigned)ev.status);
+ dvb_frontend_status(d->obj, ev.status);
}
if (ufd[0].revents)
More information about the vlc-commits
mailing list