summaryrefslogtreecommitdiffstats
path: root/libhb/bd.c
Commit message (Collapse)AuthorAgeFilesLines
* CLI: add option to log version, title, and progress in jsonJohn Stebbins2017-11-061-1/+1
| | | This is useful for scripts and other frontends that need to parse CLI output.
* subtitles: simplify and shorten subtitle descriptions (#591)John Stebbins2017-03-101-5/+7
| | | | | | | | | | | | | | | | | | * subtitles: simplify and shorten subtitle descriptions Generally, it eliminates parens to make things more readable. I.e. it turns this: English (Closed Caption)(Wide Screen)(Bitmap)(VOBSUB) Into this: English, Closed Caption [Wide Screen, VOBSUB] * Revise punctuation per BradleyS request * fix subtitle description formatting * incorporate suggestions from PR
* Update copyright dates to 2017.Bradley Sepos2017-01-011-1/+1
|
* bd: fix crash when invalid title specifiedJohn Stebbins2016-09-211-1/+4
| | | | fixes https://github.com/HandBrake/HandBrake/issues/272
* bd: log playlist clips at log level 2John Stebbins2016-05-251-0/+22
|
* libhb: send initial chapter through pipelineJohn Stebbins2016-05-171-10/+18
| | | | | Eliminate the need for everyone to assume that the first chapter starts at the first frame.
* Update copyright dates to 2016.Bradley Sepos2016-01-011-1/+1
|
* bd: fix discontinuity handlingJohn Stebbins2015-11-121-1/+2
| | | | | | | | Tag only one buffer with discontinuity flag, not multiple. Flush pre-discontinuity buffers before signaling the discontinuity, not after. Make sure discontinuity flag is on the buffer with the PCR change when possible.
* libhb: detect read errors and propagatejstebbins2015-06-291-9/+25
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7332 b64f7644-9d1e-0410-96f1-a4d463321fa5
* bd: use the correct printf specifier for unsigned variables.Rodeo2015-06-031-7/+7
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7273 b64f7644-9d1e-0410-96f1-a4d463321fa5
* bd: fix printf warningsjstebbins2015-06-031-3/+3
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7269 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix three warnings.ritsuka2015-06-011-3/+3
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7259 b64f7644-9d1e-0410-96f1-a4d463321fa5
* stream: Improve transport stream PCR handlingjstebbins2015-04-221-8/+4
| | | | | | | | When a new PCR is seen, emit all currently cached data. This prevents data that was referenced to the previous PCR from being associated with the new PCR. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7120 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Eliminate global variable hb_gui_use_hwd_flagjstebbins2015-03-291-2/+4
| | | | | | | | | | | | This global was shared between the CLI and libhb and used as a back door to force scan and encode passes to use the same ffmpeg context for hardware decoding. Aside from the fact that this context sharing should not be necessary and needs fixing, this information belongs in the hb_handle_t that is shared between the scan and the encode. So put it there and make sure the hb_handle_t get propagated to where the flag is needed. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7028 b64f7644-9d1e-0410-96f1-a4d463321fa5
* bd: fix printf format conversion warningjstebbins2015-02-161-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6911 b64f7644-9d1e-0410-96f1-a4d463321fa5
* New audio output options.Rodeo2015-02-151-2/+2
| | | | | | | | | Dolby Digital Plus (E-AC-3), Dolby TrueHD and FLAC can now be passed through without re-encoding. They aren't covered by Auto Passthru yet, however. In addition, encoding to E-AC-3 is now possible. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6908 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Update year to 2015.bradleys2015-02-011-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6852 b64f7644-9d1e-0410-96f1-a4d463321fa5
* json: add json APIsjstebbins2014-12-161-3/+6
| | | | | | | | | | There are several changes to job and title structs that break current windows interop code. The interop code should be changed such that it only uses json APIs. So if there is any missing features (or bugs) in these APIs, please let me know. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6602 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: improve preview generateion when there are no IDRsjstebbins2014-10-021-1/+0
| | | | | | | | | | Puts the decoder into a mode that returns *all* frames. I.e. it won't just scan to the end of the file looking for an IDR. Then we decode multiple frames (up to 100) searching for an I frame. This way, the reconstructed frame we use for a preview is more likely to be complete. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6430 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Sanitize BD chapter durationsjstebbins2014-08-111-2/+43
| | | | | | | | | | | | | | It appears some BDs have invalid chapter durations, see https://forum.handbrake.fr/viewtopic.php?f=12&t=30479 This compares chapter start time deltas and title duration to chapter duration to make best guess corrections. Note that chapter events generated by libbluray are based on the chapter start times. So the start time should be trusted more than the duration. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6292 b64f7644-9d1e-0410-96f1-a4d463321fa5
* bd: fix long delays caused by updated libblurayjstebbins2014-06-251-4/+4
| | | | | | | | bd_seek and the new m2ts_filter in libbluray have a bad interaction. So use bd_seek_time instead. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6221 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix overwriting of source pathjstebbins2014-05-271-4/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6206 b64f7644-9d1e-0410-96f1-a4d463321fa5
* demux: fix problem with widely spaced SCRsjstebbins2014-05-131-1/+1
| | | | | | | | | | | | | | | | | Fixes this bug report https://forum.handbrake.fr/viewtopic.php?f=12&t=30032 Split MPEG demuxer into TS demuxer and PS demuxer to allow using different PCR/SCR delta tolerance in each scenario. We were using a PCR/SCR delta tolerance that was a bit of a compromise between the max allowed by the specification for TS vs PS streams. But the spec for TS PCR is 100ms and the spec for PS SCR is 700ms, so we risked false detection of discontinuities in PS. In PS streams that pack multiple frames into one PES packet, the detection of a discontinuity causes recalculation of an scr offset which jumps around wildly. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6183 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-2/+2
| | | | | | | 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 crashes with some BDsjstebbins2014-01-311-1/+0
| | | | | | | | A stray line of code from the switch from mpeg2dec to libavcodec caused a failure to open the mpeg2 decoder for BDs git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6009 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: set audio description in LookForAudio (scan.c).Rodeo2014-01-251-5/+2
| | | | | | | | | 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
* remove contrib mpeg2decjstebbins2014-01-131-1/+2
| | | | | | | | We no longer need mpeg2dec. libav now has all the features we need for mpeg2 decoding. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5966 b64f7644-9d1e-0410-96f1-a4d463321fa5
* bump libav, libav-v10_alpha1-90-g63debaajstebbins2014-01-121-9/+0
| | | | | | | | | Adds interlaced VC1 and HEVC support. Eliminates the need for most of our local patches. Many assorted bug fixes and improvements. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5962 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Revert previous borked commit. Sorry!Rodeo2014-01-071-0/+9
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5958 b64f7644-9d1e-0410-96f1-a4d463321fa5
* parsecsv: always check result of malloc()Rodeo2014-01-071-9/+0
| | | | | | | | | RebiewBoard #670. Patch by icchan. Thanks! git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5957 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix BD audio detection problemjstebbins2013-10-281-15/+24
| | | | | | | | | | | BDs can (and occasionally do) have different audio stream types in different clips that compose a playlist. We try to pick the audios that appear in the most clips, but this breaks down when there are only 2 clips to choose from. So in the case of only 2 clips, choose audio from the longest clip. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5863 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 a problem with BD audio track detectionjstebbins2013-01-011-0/+3
| | | | | | | | | | Some BDs can have several clips that have no audio (The Girl With the Dragon Tattoo 2009). This fools our audio selection logic into thinking the entire BD has no audio. So ignore clips that have no audio tracks when searching for audio. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5127 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Bump libav to v9_beta3.Rodeo2012-12-311-22/+23
| | | | | | | | 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
* Bump libbluray to version 0.2.3.Rodeo2012-10-201-2/+2
| | | | | | | | Miscellaneous fixes and improvements. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5022 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Use libav for dts audio decoding instead of libdca jstebbins2012-07-151-2/+3
| | | | | | | | | 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
* 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-22/+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-5/+6
| | | | | | | | | | | | | | 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/+58
| | | | | | | | | | | | 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-4/+3
| | | | | | | | | | | | | | | | | | | | 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 corrupt first frame in BD point-to-pointjstebbins2011-09-191-0/+2
| | | | | | | | | | | Seek point may be a recovery point which will not be a complete clean frame. So consume frames till we reach the recovery frame count. Patches Libav so it can tell us when the recovery point has been reached. Also improves detection of recovery points in TS files. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4231 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Improve mpeg PS supportjstebbins2011-09-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | Adds support for MPEG-1 PS, HDDVD EVOB, and video codecs other than mpeg1/2 in PS Improves probing of unknown stream types by using Libav's probing utilities Use Libav to probe for dts profile in TS and PS files when profile is unknown Improves framerate detection (improved telecine detection) Fixes preview generation for mpeg video that has only a single sequence header Patches Libav to handle VC-1 pulldown flags properly Improve PS and TS stream log information git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4220 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Blu-ray: display playlist number in log, CLI scan output, and title drop-down.Rodeo2011-08-161-1/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4182 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix some log spam when scanning h.264 BDsjstebbins2011-08-011-0/+1
| | | | | | | | Some residual data from the previous preview was being sent to the decoder after a seek causing the decoder to complain. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4147 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix a couple small memory leaksjstebbins2011-07-111-3/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4102 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix a stack corruption crash when scanning some BDsjstebbins2011-07-071-11/+5
| | | | | | | | was overrunning the end of a stack based array when there were more than 32 clips in a BD title. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4086 b64f7644-9d1e-0410-96f1-a4d463321fa5