projects
/
HTML5TV.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5bffba0
)
record slide transitions and generate htmlEvents
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 11 Oct 2009 14:25:24 +0000
(16:25 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 11 Oct 2009 14:25:24 +0000
(16:25 +0200)
bin/mplayer.pl
patch
|
blob
|
history
diff --git
a/bin/mplayer.pl
b/bin/mplayer.pl
index
6da9b45
..
5e473de
100755
(executable)
--- a/
bin/mplayer.pl
+++ b/
bin/mplayer.pl
@@
-93,6
+93,8
@@
our @subtitles;
sub html5tv {
my $sync;
sub html5tv {
my $sync;
+ my @slide_t;
+
foreach my $s ( @subtitles ) {
push @{ $sync->{htmlEvents}->{'#subtitle'} }, {
startTime => $s->[0],
foreach my $s ( @subtitles ) {
push @{ $sync->{htmlEvents}->{'#subtitle'} }, {
startTime => $s->[0],
@@
-113,10
+115,22
@@
sub html5tv {
index => $1,
title => $s->[2],
description => $s->[2],
index => $1,
title => $s->[2],
description => $s->[2],
- src => sprintf('media/s/%s/p%0
8
d.jpg', $res, $1),
+ src => sprintf('media/s/%s/p%0
3
d.jpg', $res, $1),
href => '',
},
href => '',
},
- }
+ };
+
+ push @slide_t, $s->[0];
+ }
+
+ my $res = $prop->{width} . 'x' . $prop->{height};
+
+ foreach ( 0 .. $#slide_t ) {
+ push @{ $sync->{htmlEvents}->{'#slide'} }, {
+ startTime => $slide_t[$_],
+ endTime => $slide_t[$_ + 1] || $prop->{length},
+ html => sprintf( '<img src=media/s/%s/p%03d.jpg>', $res, $_ + 1 ),
+ };
}
my $html5tv = {
}
my $html5tv = {