summaryrefslogtreecommitdiffstats
path: root/libhb/dvd.c
Commit message (Collapse)AuthorAgeFilesLines
* libhb: Fix crash found on some dvd'sjstebbins2012-10-131-16/+22
| | | | | | | New strutural protection caused us to access null pointer cell_playback table. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5014 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix logging of container aspect in dvd.c and dvdnav.cjstebbins2012-07-221-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4869 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Use libav for dts audio decoding instead of libdca jstebbins2012-07-151-0/+1
| | | | | | | | | libdca has no advantage over libav for dts audio decoding. It doesn't do drc and it's downmix capabilities are actually inferior to libav. So this completely removes libdca from libhb git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4844 b64f7644-9d1e-0410-96f1-a4d463321fa5
* bump libav to libav-v0.8-2197-g1a068bfjstebbins2012-07-111-0/+1
| | | | | | | | | | | | Resolves several deprecated api's Eliminates several libav patches Eliminates our builtin downmix in favour of avresample Eliminate HB_INPUT_CH_LAYOUT_* and replace with AV_CH_LAYOUT_* Resolves 6.x and 7.0 input channel layout issues HB had Adds downmix support to declpcm. We never had it! git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4825 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Updated file copyright / GPL headerssr552012-06-151-3/+6
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4737 b64f7644-9d1e-0410-96f1-a4d463321fa5
* audio->config.lang.description: code cleanup.Rodeo2012-05-031-72/+58
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4637 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: if no source chapter name information is available, set default ↵Rodeo2012-05-031-10/+11
| | | | | | | | | | | | | | chapters names explicitly (rather than leaving it to the interfaces). Standardize calculation of chapter->hours, chapter->minutes and chapter->seconds across all sources. Get rid of an unused variable in libhb/dvd.c Ignore chapter names set by MakeMKV. "Chapter 1" is just as good as, if not better than "Chapter 01" or even "Chapter 00". git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4636 b64f7644-9d1e-0410-96f1-a4d463321fa5
* merge assorted fixes provided by Rogerio Britojstebbins2012-05-011-1/+1
| | | | | | | | Pretty much all resource cleanup issues on error condition handling. Thanks Rogerio! git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4620 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix a potential null pointer referencejstebbins2012-04-281-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4609 b64f7644-9d1e-0410-96f1-a4d463321fa5
* PGS (bluray) subtitle support \o/jstebbins2012-04-261-0/+4
| | | | | | | | | | | | Thanks to patches supplied by David Mitchell and Rob McMullen we finally have PGS support. I added a fix for libav pgs timestamp processing and detection of forced subtitles to their work, then made foreign audio search work with PGS subs. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4605 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Rework filter pipelinejstebbins2012-03-271-3/+2
| | | | | | | | | | | | | | | | | | | | This patch enhances the filter objects. The 2 key improvements are: 1. A filter can change the image dimensions as frames pass through it. 2. A filter can output more than one frame. In addition, I have: Moved cropping & scalling into a filter object Added 90 degree rotation to the rotate filter Moved subtitle burn-in rendering to a filter object. Moved VFR/CFR handling into a framerate shaping filter object. Removed render.c since all it's responsibilities got moved to filters. Improves VOBSUB and SSA subtitle handling. Allows subtitle animations. SSA karaoke support. My apologies in advance if anything breaks ;) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4546 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix a couple small memory leaksjstebbins2011-07-071-3/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4088 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add DTS-HD passthru \o/jstebbins2011-06-141-2/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4055 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add support for TrueHD and DTS-HD from BD sourcesjstebbins2011-04-221-8/+16
| | | | | | | | | | | | | | TrueHD and DTS-HD now show up in the audio list along side their AC-3 and DTS counterparts. Note that currently the DTS-HD decoder we are using (ffmpeg) discards the HD portion of the stream and onle decodes the DTS core portion. So there is no advantage yet to using the DTS-HD stream. In the future I would like to add DTS-HD passthru support and hopefully ffmpeg will improve their DTS-HD decoder. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3950 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Make logging of audio and subtitle id's more consistantjstebbins2011-04-021-2/+2
| | | | | | | | | | | | 1) whenever we log audio->id or subtitle->id using hex formatting, precede the hex with 0x (which was already done in some places but not others) 2) format audio->id as hex instead of decimal in sync.c (makes it much easier to see which track "went backwards" or had silence added to it, checking the job configuration logged by work.c) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3898 b64f7644-9d1e-0410-96f1-a4d463321fa5
* [libhb] Change bad block handling using libdvdread to scan forward foreddyg2010-11-301-7/+22
| | | | | | | | | | good blocks instead of jumping to the end of cell after encountering bad blocks. Changed handling of libdvdnav to not abort after just 10 failures, however it will still jump to end of cell, I couldn't see how to scan forward for good blocks. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3695 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add Bluray supportjstebbins2010-09-081-8/+8
| | | | | | | | | | | | | | | | | | Unencrypted BD directory trees only. Doesn't support iso images. Also, no PGS subtitle support yet. Chapters and angles are supported. Adds a new contrib libbluray. Adds new option to hb_scan() for duration of short titles to filter. This applies to BD and DVD multi-title scans only. Does not apply to any single title scans. Fixes memory leak during scan. hb_buffer_close() was not freeing all buffers in a chain of buffers passed to it. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3510 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Support for reading VOB subtitle tracks from file inputs initital ↵dynaflash2010-05-201-4/+4
| | | | | | | | | | | | | | implementation. - Patch by davidfstr, Nice Work! - Adds support for reading VOB subtitle tracks from file inputs. Tested with: - MKV VOB -> MKV VOB passthru. - MKV VOB -> MKV VOB burned in. VOB subtitle palette moved from per-title to per-track. Discussion leading up to commit can be referenced here: http://forum.handbrake.fr/viewtopic.php?f=4&t=16267 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3308 b64f7644-9d1e-0410-96f1-a4d463321fa5
* add dvd main feature title detectionjstebbins2010-04-201-1/+26
| | | | | | | | | | | | scans the dvd menus and presses buttons to see where they might lead. when a button press leads to a title, i check to see if it is the longest seen thus far and save it's index. this only applies when dvdnav is enabled. when dvdread is in use, the longest title of all the titles is flagged as the "main feature" git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3245 b64f7644-9d1e-0410-96f1-a4d463321fa5
* batch file scanning and scan canceljstebbins2009-11-251-0/+2
| | | | | | | | | | When a directory is specified as the source, first we attempt to open as a dvd, then if that fails, we attempt to open each file in the directory as a stream source. Since opening a large directory of files can take a really long time, you can also now cancel a scan. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2980 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Allow dvd sources that have no audiojstebbins2009-09-141-6/+0
| | | | | | | | Removed the code that dropped titles if there was no audio. Do not add a default audio track in the CLI if there are no audios in the source git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2822 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: DVD drive region detection on linuxjstebbins2009-07-091-0/+11
| | | | | | | | | Read and log the region mask of the DVD drive. We get the occasional linux user that has an unset region. Logging the region will help isolate the problem more quickly. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2675 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - cleanup gcc format warnings showing up on linux 64-bitkonablend2009-06-251-2/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2619 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Format cleanup.konablend2009-06-251-1/+1
| | | | | | | | | | - fixed ports.c to use a more portable method of getting integral pthread_t representation; resolves mingw crash. - added GCC attribute to generate compiler warnings for invalid usage of hb_log, hb_deep_log and hb_errror; see new macro HB_WPRINTF(s,v) in common.h. - fixed various invalid usage of above functions on osx i386/x86_64, and mingw. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2618 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - fixed gcc warnings for various unused vars, implicit function decls, ↵konablend2009-06-241-0/+1
| | | | | | signedness. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2612 b64f7644-9d1e-0410-96f1-a4d463321fa5
* softsubtitles:jstebbins2009-06-021-1/+1
| | | | | | | | | | | | | | | | | | - when doing an indepth scan, do not scan CC tracks - separate subtitle configureation attributes into separate hb_subtitle_config_t. Add an instance of this to hb_job_t for setting the attributes of the subtitle found through an indepth scan - Add a default_track flag to hb_subtitle_config_t that tells the muxer that the track should be flaged as the default. muxmkv uses this. - When an indepth scan is complete, check to see if the autoselected subtitle matchces (by id) one of the manually selected subtitles. If a match is found, the autoselected subtitle with all the attributes the user assigned to it replaces the manually selected subtitle. - LinGui: Add "Default" column to subtitle tab. This is a radio that lets the user choose which subtitle should be displayed by default. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2468 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Minor cleanup in chapter size computation (backported from dvdnav.c).van2009-05-161-24/+7
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2422 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Stage 1 Soft Subtitle Support - Allow multiple subtitle tracks to be ↵eddyg2009-05-041-0/+4
| | | | | | selected, and mark them for Render or Pass Through. No functional difference from the UIs, however in theory they could render multiple tracks - would be a dogs breakfast on screen though, and is untested. Have tested all normal operations from the UIs, including scanning. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2373 b64f7644-9d1e-0410-96f1-a4d463321fa5
* dvdnav: improve title scanningjstebbins2009-05-011-5/+6
| | | | | | | | | | | - looks for ptt with longest pgc sequence instead of just picking first ptt solves many 'short title' problems - constructs chapters from the pg's within the pgc's instead of using ptt's solve the problem of ptt's that point to an intro pgc instead of to the actual chapter position in the title. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2361 b64f7644-9d1e-0410-96f1-a4d463321fa5
* add libdvdnav supportjstebbins2009-04-271-58/+166
| | | | | | | | | | | emulates the vm of a dvd player in order to navigate the disc more reliably it is optional and disabled by default CLI option '--dvdnav' enables. GUI's have a new option in preferences. When dvdnav is enabled, you can also select angles (cli '--angle') git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2355 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Don't crash during scan when a DVD contains an invalid PTT or PGC index. ↵van2009-04-121-0/+10
| | | | | | (Bug & fix from user macrule in forum post http://forum.handbrake.fr/viewtopic.php?f=4&t=10291&sid=8b5a573526397f7c26c44e2a50c6dc63#p54152) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2319 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix botched r2256 as suggested by forum user greed in post ↵van2009-04-051-31/+31
| | | | | | http://forum.handbrake.fr/viewtopic.php?f=4&t=9758&sid=b6deb84bf0f30e9dfa504e19d4c2d5c3&p=53722#p53722 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2301 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Detect bogus cell start and last addresses while scanning each title so we ↵van2009-03-111-0/+31
| | | | | | don't crash later in dvdread. Fix from user "greed" in forum thread http://forum.handbrake.fr/viewtopic.php?f=4&t=9758&start=0 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2256 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Added support for extracting the audio and subtitle types and adding those ↵eddyg2008-10-231-4/+83
| | | | | | to the audio and subtitle names, e.g. Director's Commentary. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1863 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - change aspect from a scaled int to a double so we can handle the widervan2008-08-081-3/+3
| | | | | | | | | | | | | | | | | | | range of aspect ratios we get from ffmpeg files. - add container_aspect to title struct (always zero except for DVDs when it's the aspect from the VTSI). To handle broken French DVDs, make HB complain & use the container aspect if it's different from the aspect computed from the video PAR. - fix ScanFunc's job template init so that it doesn't think the only legal aspect ratios are 16:9 & 4:3. - hb_reduce wouldn't reduce any fraction where both terms were equal and prime (e.g., 2/2, 3/3, 5/5, etc. would not become 1/1). Recoded it using Euclid's Algorithm so it always works and is faster. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1616 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Getting rid of dvd open failure error, it is not an error when eddyg2008-06-191-1/+4
| | | | | | | the input is a file. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1529 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Saearch & Replace domain names to move from .m0k.org to handbrake.fr. Only ↵jbrjake2008-04-151-1/+1
| | | | | | covers trunk files, libhb, and test. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1418 b64f7644-9d1e-0410-96f1-a4d463321fa5
* During conversion only log when there's an error or anomaly.van2008-04-061-5/+12
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1383 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Minor chapter cleanups.van2008-04-041-3/+2
| | | | | | | | | | - put chapter number in buf rather than a 'new chapter' flag. - use that chapter number to index chapter text in muxers so a dropped chapter doesn't make all subsequent chapter labeling wrong. - get rid of most of the chapter logging & just output one line giving the chapter text, number, frame & time. - fix a bug in sync that could cause chapter marks to be lost. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1377 b64f7644-9d1e-0410-96f1-a4d463321fa5
* New internal audio handling.saintdev2008-04-011-11/+12
| | | | | | | | Each audio track contains it's own settings for codec, bitrate, samplerate, etc. This allows for very complex combinations of audio tracks if desired. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1365 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Don't crash just because some dvd title uses an illegal pgn number.van2008-03-021-0/+6
| | | | | | | (Fixes bug reported in http://forum.handbrake.fr/viewtopic.php?p=28767&sid=23308d0c02b70fceb54db71b0d0f2660#p28767). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1324 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Formatting: Remove a lot of trailing whitespace.saintdev2008-02-211-16/+16
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1307 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - rather than completely giving up on a dvd because we got a read error on ↵van2008-01-221-5/+13
| | | | | | | | | next_vobu, just skip to the start of the next cell & keep going. - get rid of some unused variables so this compiles with no warnings. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1230 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - get rid of 'chapter merging'.van2008-01-201-110/+143
| | | | | | | | | | | | | | | | | | | | | - check for 'beginning of cell' before 'end of cell' so zero length cells don't make us advance to the next cell too early & fail to generate a chapter mark. - don't read beyond the last cell of a title. - if we get a read error just skip to the next vobu instead of giving up. - fix the next_vobu mask (the top two bits have special meaning, not just the MSB), make the next vobu decision logic a bit closer to what a hardware dvd player uses (interpret the 2^30 bit as "look for a better vobu pointer in this navpack), make the 'end of vobu chain' recognition more robust. - when we're searching for a navpack because we couldn't read the block 'next_vobu' points to, recognize when we walk out of the current cell & just go to the next cell for this title. - treat an internal vobu with a null prev_vobu pointer as if it were end-of-cell and advance to the next cell. - use consistent case in log messages (always "dvd:" rather than a random mix of upper & lower case). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1215 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Exit gracefully when trying to ifoOpen a title with no VTS entry, instead of ↵jbrjake2007-11-191-0/+7
| | | | | | crashing with a bus error. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1069 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Detect and workaround missing end of cell markers caused by corrupted DVD ↵eddyg2007-10-111-9/+83
| | | | | | content, note that any lost DVD content stays lost, but at least it doesn't cause repeated Cells, which are more annoying than a few seconds of lost movie. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1020 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix to the chapter merging to ensure that when reading from the media we ↵eddyg2007-10-091-6/+6
| | | | | | take into account chapters that we have merged. This prevents premature exiting from encoding. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1012 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Mistake in chapter merging well spotted by Van, which would cause the ↵eddyg2007-09-271-0/+1
| | | | | | encoding to terminate prematurely due to an incorrect movie duration. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@992 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Improved debug messages for Cell start/stop with Cell number and block.eddyg2007-08-291-2/+4
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@897 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Added rudimentory error handling to HB. Instead of using hb_log() use ↵eddyg2007-08-271-6/+14
| | | | | | hb_error(). Also causes us to stop muxing when we get a write error in MP4 and MKV containers. Still requires macosx dialog box by dynaflash (see main.mm for stub to use). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@869 b64f7644-9d1e-0410-96f1-a4d463321fa5