ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Linux-DVB/DVB.pm
(Generate patch)

Comparing Linux-DVB/DVB.pm (file contents):
Revision 1.1 by root, Mon Sep 6 06:25:12 2004 UTC vs.
Revision 1.3 by root, Thu Mar 3 17:27:40 2005 UTC

30package Linux::DVB; 30package Linux::DVB;
31 31
32use Fcntl (); 32use Fcntl ();
33 33
34BEGIN { 34BEGIN {
35 $VERSION = '0.1'; 35 $VERSION = '0.02';
36 @ISA = qw(Exporter); 36 @ISA = qw(Exporter);
37 37
38 require XSLoader; 38 require XSLoader;
39 XSLoader::load __PACKAGE__, $VERSION; 39 XSLoader::load __PACKAGE__, $VERSION;
40 40
152 152
153sub sct_filter { _filter ($_[0]{fd}, @_[1, 2, 3, 4, 5]) } 153sub sct_filter { _filter ($_[0]{fd}, @_[1, 2, 3, 4, 5]) }
154sub pes_filter { _pes_filter ($_[0]{fd}, @_[1, 2, 3, 4, 5]) } 154sub pes_filter { _pes_filter ($_[0]{fd}, @_[1, 2, 3, 4, 5]) }
155sub buffer { _buffer ($_[0]{fd}, $_[1]) } 155sub buffer { _buffer ($_[0]{fd}, $_[1]) }
156 156
157package Linux::DVB::Decode;
158
159use Encode;
160
161sub text($) {
162 for ($_[0]) {
163 s/^([\x01-\x0b])// and $_ = decode sprintf ("iso-8859-%d", 4 + ord $1), $_;
164 # 10 - pardon you???
165 s/^\x11// and $_ = decode "utf16-be", $_;
166 # 12 ksc5601, DB
167 # 13 db2312, DB
168 # 14 big5(?), DB
169 s/\x8a/\n/g;
170 #s/([\x00-\x09\x0b-\x1f\x80-\x9f])/sprintf "{%02x}", ord $1/ge;
171 s/([\x00-\x09\x0b-\x1f\x80-\x9f])//ge;
172 }
173}
174
1571; 1751;
158 176
159=head1 AUTHOR 177=head1 AUTHOR
160 178
161 Marc Lehmann <pcg@goof.com> 179 Marc Lehmann <schmorp@schmorp.de>
162 http://www.goof.com/pcg/marc/ 180 http://home.schmorp.de/
163 181
164=cut 182=cut
165 183

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines