Author: duncan
Date: Sat Oct 14 17:33:52 2006
New Revision: 8370
Modified:
branches/rel-1-5/freevo/src/tv/ivtv.py
Log:
Updated for linux-2.6.18 and higher; simply doesn't do anything
Modified: branches/rel-1-5/freevo/src/tv/ivtv.py
==============================================================================
--- branches/rel-1-5/freevo/src/tv/ivtv.py (original)
+++ branches/rel-1-5/freevo/src/tv/ivtv.py Sat Oct 14 17:33:52 2006
@@ -26,12 +26,11 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# ----------------------------------------------------------------------- */
+# -----------------------------------------------------------------------
import string, struct, fcntl, time
-#import tv.v4l2, config
import config
import tv.v4l2
@@ -86,6 +85,7 @@
GOP_END_ST = "I"
# ioctls
+# changed in ivtv-0.8.0 and higher
IVTV_IOC_G_CODEC = 0xFFEE7703
IVTV_IOC_S_CODEC = 0xFFEE7704
MSP_SET_MATRIX = 0x40086D11
@@ -112,6 +112,8 @@
def setCodecInfo(self, codec):
+ if self.version >= 0x800:
+ return
val = struct.pack( CODEC_ST,
codec.aspect,
codec.audio_bitmask,
@@ -133,6 +135,8 @@
def getCodecInfo(self):
+ if self.version >= 0x800:
+ return
val = struct.pack( CODEC_ST, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 )
r = fcntl.ioctl(self.device, i32(IVTV_IOC_G_CODEC), val)
codec_list = struct.unpack(CODEC_ST, r)
@@ -150,6 +154,8 @@
def getvbiembed(self):
+ if self.version >= 0x800:
+ return
r = fcntl.ioctl(self.device, i32(GETVBI_EMBED_NO),
struct.pack(VBI_EMBED_ST,0))
if DEBUG >= 3:
print "getvbiembed: val=%r, r=%r, res=%r" %
(struct.pack(VBI_EMBED_ST,0), r, struct.unpack(VBI_EMBED_ST,r))
@@ -157,6 +163,8 @@
def setvbiembed(self, value):
+ if self.version >= 0x800:
+ return
r = fcntl.ioctl(self.device, i32(SETVBI_EMBED_NO),
struct.pack(VBI_EMBED_ST, value))
if DEBUG: print "setvbiembed: val=%r, res=%r" %
(struct.pack(VBI_EMBED_ST, value), r)
@@ -175,6 +183,8 @@
(width, height) = string.split(opts['resolution'], 'x')
self.setfmt(int(width), int(height))
+ if self.version >= 0x800:
+ return
codec = self.getCodecInfo()
codec.aspect = opts['aspect']
@@ -200,6 +210,8 @@
def print_settings(self):
tv.v4l2.Videodev.print_settings(self)
+ if self.version >= 0x800:
+ return
codec = self.getCodecInfo()
@@ -252,6 +264,8 @@
if __name__ == '__main__':
ivtv_dev = IVTV('/dev/video0')
+ print 'driver="%s"' % ivtv_dev.driver
+ print 'version=%x' % ivtv_dev.version
print config.TV_IVTV_OPTIONS
print ivtv_dev.print_settings()
print ivtv_dev.init_settings()
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog