[MPlayer-dev-eng] [PATCH] TV auto scan and channel list in file
Bernd Ernesti
mplayer-dev-eng at lists.veego.de
Sat Aug 25 11:36:10 CEST 2007
On Fri, Aug 24, 2007 at 12:19:04PM +0700, Vladimir Voroshilov wrote:
> Hi, Bernd
>
> 2007/8/23, Bernd Ernesti <mplayer-dev-eng at lists.veego.de>:
> > On Thu, Aug 23, 2007 at 04:44:30AM +0700, Vladimir Voroshilov wrote:
> > > Somebody must implement TVI_CONTROL_TUN_GET_SIGNAL for bsdbt848 (or
> > > provide sample code showing how to do this).
> >
> > That and maybe some other parts too which are allready missing.
> > Comparing the cases in bt848 with the v4l2 code.
>
> Could you make functional test test of attached patch?
Hmm, it seems to scan the channels.
I had to fix compile problems and made some format changes to make it more
readable.
BUT, it always scans the channels even when I don't use -tvscan (just
mplayer tv://1).
Btw, tvi_bsdbt848.c needs some cleanup because it wasn't using mp_msg
before your patch. A lot of perror remains in it, which has to be fixed
in another run.
> It should enable tv scanning under *BSD too (if bt848 driver provides
> signal status of course).
> Look into "tvi_bt848: get signal 0xXX" lines in verbose output.
> I want to see printed value for active and inactive channels.
- inactive
tvi_bt848: get signal 0x4
- active
tvi_bt848: get signal 0x2
> P.S. I didn't find any *BSD BT848 related docs thus i'm not sure about
> 0x07 constatnt (got from fmio source)
I was looking at the chip docs but couldn't find it there either.
Bernd
-------------- next part --------------
Index: stream/tvi_bsdbt848.c
===================================================================
--- stream/tvi_bsdbt848.c (revision 24154)
+++ stream/tvi_bsdbt848.c (working copy)
@@ -60,6 +60,7 @@
#endif
#endif
+#include "mp_msg.h"
#include "libaf/af_format.h"
#include "libmpcodecs/img_format.h"
#include "tv.h"
@@ -251,6 +252,20 @@
return(TVI_CONTROL_TRUE);
}
+ case TVI_CONTROL_TUN_GET_SIGNAL:
+ {
+ int status;
+ if(ioctl(priv->tunerfd, TVTUNER_GETSTATUS, &status) < 0)
+ {
+ mp_msg(MSGT_TV, MSGL_ERR, "%s: ioctl get status failed: %s\n",
+ priv->tunerdev, strerror(errno));
+ return TVI_CONTROL_FALSE;
+ }
+ *(int*)arg = status & 0x07 ? 100 : 0;
+ mp_msg(MSGT_TV, MSGL_V, "tvi_bt848: get signal 0x%x\n", status & 0x07);
+ return (TVI_CONTROL_TRUE);
+ }
+
case TVI_CONTROL_TUN_GET_TUNER:
case TVI_CONTROL_TUN_SET_TUNER:
More information about the MPlayer-dev-eng
mailing list