Ticket #6023: mythweb_stream_aspect.patch
File mythweb_stream_aspect.patch, 1.7 KB (added by , 15 years ago) |
---|
-
modules/stream/stream_flv.pl
41 41 my ($vbitrate) = $sh->fetchrow_array; 42 42 $sh->execute('WebFLV_ab'); 43 43 my ($abitrate) = $sh->fetchrow_array; 44 # Someday, we can auto-detect height based on aspect ratio45 my $height = int($width * 3/4);46 47 44 $sh->finish(); 45 # auto-detect height based on aspect ratio 46 $sh = $dbh->prepare('SELECT data FROM recordedmarkup WHERE chanid=? AND starttime=FROM_UNIXTIME(?) AND data IS NOT NULL ORDER BY data DESC'); 47 $sh->execute($chanid,$starttime); 48 $x = $sh->fetchrow_array; 49 $y = $sh->fetchrow_array if ($x); 50 if ($x && $y) { 51 $height = int($width * ($y/$x)); 52 } else { 53 $height = int($width * 3/4); 54 } 55 $sh->finish(); 48 56 49 57 $width = 320 unless ($width && $width > 1); 50 58 $height = 240 unless ($height && $height > 1); -
modules/mythweb/tmpl/default/set_flvplayer.php
52 52 <td><input type="text" name="width" 53 53 size="5" title="FLV Width" 54 54 value="<?php echo intVal(_or(setting('WebFLV_w'), 320)) ?>" /> 55 x56 <?php echo intVal(_or(setting('WebFLV_w'), 320) * 3/4) ?>57 55 <br> 58 (h ard-coded at 4:3 until we can detect recording aspect)56 (height is calculated automatically from the recording aspect ratio) 59 57 </td> 60 58 </tr><tr> 61 59 <th><?php echo t('Video Bitrate') ?>:</th>