… | |
… | |
15 | =item new |
15 | =item new |
16 | |
16 | |
17 | Create a new VBI decoder object. VBI decoding often requires state, which |
17 | Create a new VBI decoder object. VBI decoding often requires state, which |
18 | this object represents |
18 | this object represents |
19 | |
19 | |
20 | =item reset |
20 | =item reset (NYI) |
21 | |
21 | |
22 | Reset the state (e.g. after switching a channel). |
22 | Reset the state (e.g. after switching a channel). |
23 | |
23 | |
24 | =back |
24 | =back |
25 | |
25 | |
… | |
… | |
46 | ); |
46 | ); |
47 | bootstrap Video::Capture::VBI $VERSION; |
47 | bootstrap Video::Capture::VBI $VERSION; |
48 | } |
48 | } |
49 | |
49 | |
50 | use Fcntl; |
50 | use Fcntl; |
|
|
51 | |
|
|
52 | =head1 CONSTANTS / MASK OPERATORS |
|
|
53 | |
|
|
54 | The following constants are available (see ETS 300 706 for a more thorough |
|
|
55 | definition). |
|
|
56 | |
|
|
57 | VTX_SUB 0x003f7f # S1..S4 field mask |
|
|
58 | |
|
|
59 | VTX_C4 0x000080 # erase page |
|
|
60 | VTX_C5 0x004000 # newsflash |
|
|
61 | VTX_C6 0x008000 # subtitle |
|
|
62 | VTX_C7 0x010000 # suppress header |
|
|
63 | VTX_C8 0x020000 # update indicator |
|
|
64 | VTX_C9 0x040000 # interrupted sequence |
|
|
65 | VTX_C10 0x080000 # inhibit display |
|
|
66 | VTX_C11 0x100000 # magazine serial |
|
|
67 | |
|
|
68 | VTX_C12 0x200000 # ... option ... |
|
|
69 | VTX_C13 0x400000 # ... character ... |
|
|
70 | VTX_C14 0x800000 # ... set |
|
|
71 | |
|
|
72 | The following mask functions all take a single "CTRL" bitfield and return |
|
|
73 | the corresponding subfield: |
|
|
74 | |
|
|
75 | VTX_S1 (shift )&15 } # S1 |
|
|
76 | VTX_S2 (shift>> 4)& 7 } # S2 |
|
|
77 | VTX_S3 (shift>> 8)&15 } # S3 |
|
|
78 | VTX_S4 (shift>>12)& 3 } # S4 |
|
|
79 | VTX_NOC (shift>>21)& 7 } # national character set... |
|
|
80 | |
|
|
81 | =cut |
51 | |
82 | |
52 | sub VTX_SUB (){ 0x003f7f } |
83 | sub VTX_SUB (){ 0x003f7f } |
53 | sub VTX_S1 ($){ (shift )&15 } |
84 | sub VTX_S1 ($){ (shift )&15 } |
54 | sub VTX_S2 ($){ (shift>> 4)& 7 } |
85 | sub VTX_S2 ($){ (shift>> 4)& 7 } |
55 | sub VTX_S3 ($){ (shift>> 8)&15 } |
86 | sub VTX_S3 ($){ (shift>> 8)&15 } |