Fix to qt-faststart for some malformed MP4s, by Daniel G. Taylor.
Reported by "rlafleur".
License and history from qt-faststart 1.7. Note that we didn't use any
of the changes from 1.6 or 1.5, and this is still a modified version.
Removed video_pct option.
Removed par option.
Removed precaching.
Removed audio_codec option.
These options shouldn't be in the HD_ and SD_ sections.
Some additional image types need converting.
Save JPEGs at quality 85 instead of the default 75.
cgi is not used here.
Separate HTTP query parsing and response from image rendering in photo
plugin.
FFmpeg-based image scaling and rotation, if the PIL is unavailable.
To Do: Lots of images don't work, for reasons yet unclear.
Common code for new size calculation.
Separate EXIF parsing from get_image_pil().
Cache results of get_size_ffmpeg().
Add a JFIF tag when FFmpeg doesn't. This fixes most of the broken pics.
Cleanup.
FFmpeg doesn't want to scale down too much at once, so break it into
successive invocations of the scale filter if needed. This fixes most of
the remaining broken pics. To Do: Figure out _exactly_ where the split
needs to be.
Use PLATFORM_VIDEO instead of PLATFORM_MAIN for the old-style beacons
_if_ only video shares are defined. This resolves the exclamation-point
icon issue in those cases. If there _are_ music or photo shares,
PLATFORM_MAIN is still used, in order to avoid the "Music on sharename's
PC"-style names in the HDUI.