Author: rshortt
Date: Wed Mar  8 16:28:44 2006
New Revision: 8057

Modified:
   trunk/tvdev/src/ivtv.py

Log:
Some fixes and also config updates from Hans Meine.


Modified: trunk/tvdev/src/ivtv.py
==============================================================================
--- trunk/tvdev/src/ivtv.py     (original)
+++ trunk/tvdev/src/ivtv.py     Wed Mar  8 16:28:44 2006
@@ -56,41 +56,115 @@
         # set higher default priority
         self._cfg_set_default('priority', 7)
 
-        # TODO: config?
-        self.input = 4
+        # tuner for ivtv is usually 4
+        self._cfg_set_default('input', 4)
 
-        # TODO: add nice default values and descriptions
         codec = Group(name='codec', desc='Codec definitions', schema= [
-            Var(name='aspect',   type=int, default=None,
-                desc=_('Rob: add desc and check type')),
+            Var(name='aspect',   type=int, default=2,
+                desc=_('''aspect ratio:
+1 - 1:1
+2 - 4:3 (normal TV, default)
+3 - 16:9 (widescreen)
+4 - 2.21:1''')),
             Var('audio_bitmask', default=0x00a9,
-                desc=_('Rob: add desc and check type')),
-            Var('bframes',       type=int, default=None,
-                desc=_('Rob: add desc and check type')),
-            Var('bitrate_mode',  default=1,
-                desc=_('Rob: add desc and check type')),
-            Var('bitrate',       default=4500000,
-                desc=_('Rob: add desc and check type')),
-            Var('bitrate_peak',  default=4500000,
-                desc=_('Rob: add desc and check type')),
-            Var('dnr_mode',      type=int, default=None,
-                desc=_('Rob: add desc and check type')),
-            Var('dnr_spatial',   type=int, default=None,
-                desc=_('Rob: add desc and check type')),
-            Var('dnr_temporal',  type=int, default=None,
-                desc=_('Rob: add desc and check type')),
-            Var('dnr_type',      type=int, default=None,
-                desc=_('Rob: add desc and check type')),
-            Var('framerate',     type=int, default=None,
-                desc=_('Rob: add desc and check type')),
-            Var('framespergop',  type=int, default=None,
-                desc=_('Rob: add desc and check type')),
-            Var('gop_closure',   default=1,
-                desc=_('Rob: add desc and check type')),
-            Var('pulldown',      type=int, default=None,
-                desc=_('Rob: add desc and check type')),
-            Var('stream_type',   default=14,
-                desc=_('Rob: add desc and check type'))])
+                desc=_('''audio bitmask, binary OR of the following values:
+Samplerate
+  0x0000  44,100Hz (CD)
+  0x0001  48,00Hz (AC97, default)
+  0x0002  32,000Hz
+Layer
+  0x0004  Layer 1
+  0x0008  Layer 2 (default)
+Bitrate
+  0x0000  Free Format
+  0x0010  32kbps
+  0x0020  L1: 64kbps, L2: 48kbps
+  0x0030  L1: 96kbps, L2: 56kbps
+  0x0040  L1: 128kbps, L2: 64kbps
+  0x0050  L1: 160kbps, L2: 80kbps
+  0x0060  L1: 192kbps, L2: 96kbps
+  0x0070  L1: 224kbps, L2: 112kbps
+  0x0080  L1: 256kbps, L2: 128kbps
+  0x0090  L1: 288kbps, L2: 160kbps
+  0x00A0  L1: 320kbps, L2: 192kbps (default)
+  0x00B0  L1: 352kbps, L2: 224kbps
+  0x00C0  L1: 384kbps, L2: 256kbps
+  0x00D0  L1: 416kbps, L2: 320kbps
+  0x00E0  L1: 448kbps, L2: 384kbps
+Mode
+  0x0000  Stereo (default)
+  0x0100  Joint Stereo
+  0x0200  Dual
+  0x0300  Mono
+Mode Extension (for Joint Stereo)
+  0x0000  subbands 4-31 in intensity_stereo, bound==4
+  0x0400  subbands 8-31 in intensity_stereo, bound==8
+  0x0800  subbands 12-31 in intensity_stereo, bound==12
+  0x0C00  subbands 16-31 in intensity_stereo, bound==16
+Emphasis
+  0x0000  none (default)
+  0x1000  50/15uS
+  0x3000  CCITT J.17
+CRC (Cyclic Redundancy Check)
+  0x0000  Off (default)
+  0x4000  On
+Copyright
+  0x0000  Off (default)
+  0x8000  On
+Generation
+  0x0000  Copy (default)
+  0x10000  Original''')),
+            Var('bframes',       type=int, default=3,
+                desc=_('number of B (bidirectional) frames PLUS 1\n(default '+
+                       'setting of 3 generates 2 b-frames between P and I 
frames)')),
+            Var('bitrate_mode',  type=int, default=1,
+                desc=_('bitrate mode: 0 = variable, 1 = constant')),
+            Var('bitrate',       type=int, default=5500000,
+                desc=_('bitrate (bits/second, DVD max = 9.6Mbps)')),
+            Var('bitrate_peak',  type=int, default=5500000,
+                desc=_('maximal bitrate (must be >= bitrate)')),
+            Var('dnr_mode',      type=int, default=3,
+                desc=_('''Dynamic Noise Reduction filter mode
+0 both manual
+1 spatial: automatic, temporal: manual
+2 spatial: manual, temporal: automatic
+3 both automatic''')),
+            Var('dnr_spatial',   type=int, default=1,
+                desc=_('amount of spatial (horizontal) smoothing (0..15)')),
+            Var('dnr_temporal',  type=int, default=1,
+                desc=_('amount of temporal (motion) smoothing (0..31)')),
+            Var('dnr_type',      type=int, default=0,
+                desc=_('''Median Filter 
+0  Disabled
+1  Horizontal
+2  Vertical
+3  Horizontal/Vertical
+4  Diagonal''')),
+            Var('framerate',     type=int, default=1,
+                desc=_('0: 30 frames/s (NTSC)\n1: 25 frames/s (PAL, 
default)')),
+            Var('framespergop',  type=int, default=15,
+                desc=_('number of frames in a Group Of Pictures')),
+            Var('gop_closure',   type=int, default=1,
+                desc=_('0/1: open/closed GOP (Group Of Pictures)')),
+            Var('pulldown',      type=int, default=0,
+                desc=_('1 activates inverse telecine (default: 0 = 
off)\n(needed for '+
+                       'telecined material, mostly NTSC, search for "pulldown 
explained")')),
+            Var('stream_type',   type=int, default=14,
+                desc=_('''0  Program Stream (PS)
+ 1: Transport Stream (TS, may not work)
+ 2: MPEG1
+ 3: PES A/V
+ 4: ?
+ 5: PES Video
+ 6: ?
+ 7: PES Audio
+ 8: ?
+ 9: ?
+10: DVD
+11: VCD
+12: SVCD
+13: DVD_S1
+14: DVD_S2'''))])
 
         # add codec group to config
         self._cfg_add(codec)
@@ -115,7 +189,7 @@
     Class for handling an IVTV card, based on kaa.record.IVTVDevice.
     """
     def __init__(self, card):
-        kaa.record.IVTVDevice.__init__(self, card.vdev, card.norm,
+        kaa.record.IVTVDevice.__init__(self, card.vdev, str(card.norm),
             card.chanlist, card.channels_conf, card.input,
             card.resolution, card.codec.aspect, card.codec.audio_bitmask,
             card.codec.bframes, card.codec.bitrate_mode,
@@ -136,7 +210,8 @@
         Start a recording, create the filter chain and add the filters we care
         about.
         """
-        log.info('we wish to record channel %s' % channel)
+        log.debug('we wish to record channel %s' % channel)
         chain = kaa.record.Chain()
         chain.append(output)
         return kaa.record.IVTVDevice.start_recording(self, channel, chain)
+


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to