summaryrefslogtreecommitdiffstats
path: root/libhb/dvdnav.c
Commit message (Collapse)AuthorAgeFilesLines
* libhb: fix overwriting of source pathjstebbins2014-05-271-2/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6206 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: clean up handling dir directory separatorjstebbins2014-02-221-1/+4
| | | | | | | title->name was getting set to an empty string in some cases due to looking for the wrong directory separator. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6057 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: remove a52decjstebbins2014-02-201-0/+1
| | | | | | | replace it with libavcodec ac3 decoder git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6049 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Update some copyright dates to 2014.Rodeo2014-02-181-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6042 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix missing format specifier in printfjstebbins2014-01-261-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5998 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: set audio description in LookForAudio (scan.c).Rodeo2014-01-251-21/+3
| | | | | | | | | All audio tracks go through it since SVN revision 5424. This is where we have the most information about each audio track. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5996 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix scanning some dvdsjstebbins2013-09-191-9/+0
| | | | | | | | | | | | | | | | | | | | | e.g. star trek into darkness This reverts part of a patch that was originally written for dvdread access. So we need to watch for regressions. The patch was originally written for dvdread access and my not actually be a bug in dvdnav. So I have reverted it in dvdnav only. I also tried to reproduce the original bug in dvdread, but was unsuccessful. So I'm wondering if the original bug also got "fixed" by subsequent changes. The original bug report is here: https://forum.handbrake.fr/viewtopic.php?f=4&t=9758&start=0 The original fix is here: https://trac.handbrake.fr/changeset/2256 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5787 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix calculation of chapter durations in dvdread and dvdnav.Rodeo2013-06-161-9/+2
| | | | | | | | | | The values printed to the scan log were incorrect. Patch by Stuart Webster. Thanks! git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5588 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix incorrect sizeof()jstebbins2013-06-151-1/+1
| | | | | | | | | Function parameter array declarations are not treated the same way as local or global array declarations. sizeof will return only the size of the pointer instead of the size of the array. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5584 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Updated all the copyright headers to 2013.sr552013-03-091-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5318 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Fix main feature detection for some DVDs (Brave)jstebbins2013-01-281-1/+1
| | | | | | | | Some new discs are putting longer leaders before the feauture. So extend how far we search before giving up. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5216 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Bump libav to v9_beta3.Rodeo2012-12-311-2/+2
| | | | | | | | Miscellaneous bugfixes and improvements. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5124 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Improve management of titles and jobsjstebbins2012-11-121-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleans up several several unavoidable memory leaks caused by old api. Clearly separates titles from jobs. Titles are set during scan and never modified now. Since titles are immutable, this lead to API some changes. For example, We were setting chapter names in the title from the front ends. Now these get set in the job. These new APIs allow us to start moving away from our use of title->job. Eventually, I would like to eliminate title->job completely, but the mac ui is too tightly tied to using this field to allow removing it at this time. So there is temporarily a convenience function used only by the mac ui that allows it to continue using title->job and also use the new APIs. New APIs: typedef struct hb_title_set_s hb_title_set_t; struct hb_title_set_s { hb_list_t * list_title; int feature; // Detected DVD feature title }; hb_title_set_t * hb_get_title_set( hb_handle_t * ); This is just something I added to clean up how "feature title" info is passed. hb_job_t * hb_job_init( hb_title_t * title ); Initializes a new job with default settings from the title. hb_job_t * hb_job_init_by_index( hb_handle_t *h, int title_index ); Same as hb_job_init(). For use by win Interop lib. void hb_job_reset( hb_job_t * job ); Convenience function for the MacUi. Clears audio, subtitle, and filter lists. The macui still uses title->job because it is so intricately tied to it. So I created this convenience function that it can call after adding a job. void hb_job_close( hb_job_t ** job ); Releases the job an all resources it contains. void hb_job_set_advanced_opts( hb_job_t *job, const char *advanced_opts ); Makes a copy of "advanced_opts" and stores in job. Freed by hb_job_close(). void hb_job_set_file( hb_job_t *job, const char *file ); Makes a copy of "file" and stores in job. Freed by hb_job_close(). void hb_chapter_set_title(hb_chapter_t *chapter, const char *title); Makes a copy of "title" and stores in chapter. Freed by hb_chapter_close(). Recommended usage (cli and lingui are updated to do this): job = hb_job_init( title ); // set job settings ... hb_add(h, job); hb_job_close( &job ); I have also added new APIs for managing metadata. These are used to add metadata to a job. void hb_metadata_set_name( hb_metadata_t *metadata, const char *name ); void hb_metadata_set_artist( hb_metadata_t *metadata, const char *artist ); void hb_metadata_set_composer( hb_metadata_t *metadata, const char *composer ); void hb_metadata_set_release_date( hb_metadata_t *metadata, const char *release_date ); void hb_metadata_set_comment( hb_metadata_t *metadata, const char *comment ); void hb_metadata_set_genre( hb_metadata_t *metadata, const char *genre ); void hb_metadata_set_album( hb_metadata_t *metadata, const char *album ); void hb_metadata_set_coverart( hb_metadata_t *metadata, const uint8_t *coverart, int size ); Example: job = hb_job_init( &job ); // set job settings ... hb_metadata_set_artist( job->metadata, "Danny Elfman" ); hb_add(h, job); hb_job_close( &job ); Some APIs have changed in order to avoid using title incorrectly and use the new hb_title_set_t. -void hb_autopassthru_apply_settings( hb_job_t * job, hb_title_t * title ); +void hb_autopassthru_apply_settings( hb_job_t * job ); -void hb_get_preview( hb_handle_t *, hb_title_t *, int, uint8_t * ); +void hb_get_preview( hb_handle_t *, hb_job_t *, int, uint8_t * ); hb_thread_t * hb_scan_init( hb_handle_t *, volatile int * die, const char * path, int title_index, - hb_list_t * list_title, int preview_count, + hb_title_set_t * title_set, int preview_count, int store_previews, uint64_t min_duration ); These APIs have been removed. Win Interop will need some changes. I think what I've provided will be suffecient, but let me know if it's not. -void hb_get_preview_by_index( hb_handle_t *, int, int, uint8_t * ); -void hb_set_anamorphic_size_by_index( hb_handle_t *, int, - int *output_width, int *output_height, - int *output_par_width, int *output_par_height ); git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5058 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Fix crash found on some dvd'sjstebbins2012-10-131-20/+52
| | | | | | | 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 a collection of small memory leaksjstebbins2012-09-131-0/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4963 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-71/+55
| | | | 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-8/+10
| | | | | | | | | | | | | | 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
* 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-10/+12
| | | | | | | | | | | | | | | | | | | | 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
* Fix for DVD's that have broken udf filenamesjstebbins2011-09-261-3/+20
| | | | | | | | | A new obfuscation technique it to add UDF-16 filenames that have junk in the high byte and things like "VIDEO_TS.IFO" in the low byte. libdvdread throws away the high byte which results in references to the bogus copy of the file. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4252 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: improve dvdnav main feature detectionjstebbins2011-07-101-106/+145
| | | | | | | | | Add detection of fake menus. Some menus have very short duration and/or are hidden from the user by making the hightlight transparent. These menus can lead to invalid titles if traversed, so ignore them. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4096 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: improve dvdnav main feature detectionjstebbins2011-07-091-68/+76
| | | | | | | | Improve detection of fake titles that are transitioned through on the way to the real title when a menu button is pressed. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4095 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix crash when scanning True Gritjstebbins2011-07-081-3/+6
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4090 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
* libhb: when doing main feature search, skip prohibited buttons.jstebbins2011-07-061-33/+41
| | | | | | | | | | | | There is a field in the prohibited user operations PCI flags that says when the user can push buttons. If they are prohibited, we shouldn't push them when searching for the main feature since they would not be accessible on a dvd player. This fixes selection of "fake" titles on some discs. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4085 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: add some logging to main feature searchjstebbins2011-07-061-11/+33
| | | | | | | | | This lets us see in the logs if it finds a root menu title, a title menu title, or falls back to using the longest title. Log level 2 must be enabled to see these. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4084 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-13/+23
| | | | | | | | | | | | | | 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
* Improve loop detection in dvdnavjstebbins2011-02-111-0/+11
| | | | | | | | Loops in titles of only a single chapter were not being detected. We now also check the cell number for loops. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3796 b64f7644-9d1e-0410-96f1-a4d463321fa5
* [libhb] Change bad block handling using libdvdread to scan forward foreddyg2010-11-301-1/+1
| | | | | | | | | | 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
* log the title duration before throwing it out when it's too shortjstebbins2010-11-051-9/+9
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3649 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
* speed up main feature search in most circumstancesjstebbins2010-04-201-209/+284
| | | | | | | and fix a couple more corner case titles. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3246 b64f7644-9d1e-0410-96f1-a4d463321fa5
* add dvd main feature title detectionjstebbins2010-04-201-3/+422
| | | | | | | | | | | | 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
* fix some dvdnav hangsjstebbins2010-04-171-0/+18
| | | | | | | | | | title changes seem to confuse the vm sometimes. so do a dvdnav_reset whenever a title change is going to happen. Also, fix dvdnav_reset since it would deadlock on a mutex when called. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3240 b64f7644-9d1e-0410-96f1-a4d463321fa5
* dvdnav: fix seeking on some dvds that use multiple pgc's in a titlejstebbins2010-02-061-2/+7
| | | | | | | | The code that was in place to handle this did not allow for the possibility that there could be sector gaps between the segments git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3098 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix dvdnav read error retry jstebbins2009-12-101-1/+1
| | | | | | | | | the error count was being reset on dvdnav events that didn't involve any actual reading. So we got caught in an very long loop alternating between read failures and valid events. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3022 b64f7644-9d1e-0410-96f1-a4d463321fa5
* batch file scanning and scan canceljstebbins2009-11-251-0/+1
| | | | | | | | | | 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
* Rate limit hb_error() messages to at most 1 message per second of the same ↵eddyg2009-11-241-3/+3
| | | | | | | | | | | | message. Repeats will be counted and presented as a count when 1 second has elapsed since the first error of a sequence, or an error message with a different string. Also modified dvdnav to use hb_error() to take advantage of the limiting. This works around a real bug from dvdnav where the Mac GUI becomes unresponsive during the output of large numbers of errors. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2971 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
* dvdnav: read error recoveryjstebbins2009-09-121-1/+15
| | | | | | | | | - patch libdvdnav seek to guarantee the position will move forward when making a seek request to a position that is after the current position - when a read error is detected, seek forward and retry. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2815 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
* dvdnav: jstebbins2009-06-291-15/+1
| | | | | | | | | - revert read error recovery Attempting to seek one sector forward doesn't work. dvdnav rounds the seek request *down* to the nearest vobu. So the seek actually goes backwards. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2644 b64f7644-9d1e-0410-96f1-a4d463321fa5
* dvdnav: add read error recoveryjstebbins2009-06-281-1/+15
| | | | | | | | - a single read error was causing early encode termination. try to continue reading at next sector on an error. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2639 b64f7644-9d1e-0410-96f1-a4d463321fa5