summaryrefslogtreecommitdiffstats
path: root/libhb/common.h
Commit message (Collapse)AuthorAgeFilesLines
* Add metadata support to libhb, add importing of MP4 metadata, add export of ↵eddyg2008-12-021-0/+17
| | | | | | MP4 metadata, add importing of MP4 chapters, add seek to chapter for input files, add new libmp4v2, remove old MP4 chapter muxing - now in libmp4v2. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1987 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Adds two new parameters to hb_scan, to control the number of preview frames ↵jbrjake2008-11-301-1/+2
| | | | | | | | generated during scan, and whether or not they're written to disk for later display. This will break any interfaces that use hb_scan until the new params are specified...sorry. Also adds a new job->seek_points setting (set this to the same as the number of previews) to be used with job->start_at_preview when doing live preview encodes, so the seek function has a frame of reference. Wires up the CLI with a --previews option (long option only) to control the new scan parameters, and defaults the CLI to not writing previews to disk. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1970 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - add John A. Stebbins' changes to handle TrueHD and DTS-HD multiplexed ↵van2008-11-251-1/+1
| | | | | | | | | | streams. - give transport streams their own demuxer rather than constructing fake PS packets to use the DVD demuxer. - start re-doing the transport stream code so it does fewer memory to memory copies. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1953 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb support for live previewjstebbins2008-11-111-0/+8
| | | | | | | | set job->start_at_preview to the preview frame you want to start at set job->pts_to_stop to the number of 90khz ticks duration git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1915 b64f7644-9d1e-0410-96f1-a4d463321fa5
* ETSI TS 102 366 V1.2.1 compliant AC3 in MP4, replaces older hacked version ↵eddyg2008-10-291-0/+4
| | | | | | that was hardcoding the AC3 stream information in the dac3 atom based on the AppleTV startup movie stream. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1879 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Added support for extracting the audio and subtitle types and adding those ↵eddyg2008-10-231-0/+2
| | | | | | 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
* Adds a configuration option for whether the COLR atom and h.264 VUI header ↵jbrjake2008-10-191-0/+1
| | | | | | should signal Bt.601 or Bt.7709 color, instead of just setting it based on whether the source is standard or high definition (which is preserved as default, and made more sensitive to letterboxed HD content). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1851 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Makes sure loose anamorphic respects max width and height settings, and ↵jbrjake2008-10-181-1/+1
| | | | | | removes a bunch of code by repurposing MULTIPLE_MOD() (thanks j45!). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1843 b64f7644-9d1e-0410-96f1-a4d463321fa5
* CLI: Add support for naming audio tracks to the HandBrakeCLI, thanks to ↵eddyg2008-10-101-0/+1
| | | | | | LePetomane for the patch. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1825 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - Only do 'lost PCR' checks (r1712) when we're dealing with something that ↵van2008-10-031-1/+2
| | | | | | | | | could be an over-the-air transport stream. We can't lose the clock of a program stream and shouldn't have losses on an m2ts stream. - Widen the DTS-to-PCR acceptance window from +-5sec to +-5min since there's nothing in the standard that bounds the offset between a DTS and its clock reference. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1802 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - change aspect from a scaled int to a double so we can handle the widervan2008-08-081-2/+2
| | | | | | | | | | | | | | | | | | | 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
* Splits the display of job settings off from the actual work of beginning of ↵jbrjake2008-08-011-0/+5
| | | | | | | | a job, and reorganizes/elaborates the display's layout. Adds new title variables to provide more description of sources: video_codec_name, video_bitrate (currently only used by DVD sources), and container_name and data_rate (currently only used by ffmpeg input sources). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1599 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Adds a job->cfr boolean to indicate "encode this with a constant frame rate" ↵jbrjake2008-06-051-11/+16
| | | | | | instead of passing through the true frame durations from the source. Includes CLI implementation, which sets cfr to 1 if the user specifies a frame rate. Otherwise, it uses "same as source" frame rate. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1496 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Keep track of the input pixel aspect ratio as well as the output one. ↵jbrjake2008-06-041-0/+4
| | | | | | Hopefully doesn't break anything. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1489 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - support blu-ray, avchd & dvb x264van2008-05-311-2/+46
| | | | | | | - support video files handled by ffmpeg (avi, mkv, mp4, etc.) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1480 b64f7644-9d1e-0410-96f1-a4d463321fa5
* git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1471 ↵jbrjake2008-05-291-0/+1
| | | | 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
* Fixes for different number of frames between pass 1 & 2, missing frames at ↵van2008-04-131-0/+1
| | | | | | | | | | | | end, and an deadlock with pcm audio. - since the SCR clock recovery is done in reader.c we can't currently skip audio frames during pass 1 or we miss clock changes signaled by those frames & end up dropping more video frames in pass 1 than pass 2. - since many modules buffer frames we can't tell if we're done just by looking for empty fifos. Send an empty buffer to mark end-of-stream all the way along the processing pipeline & use it to flush internally buffered data. - in a processing pipeline you're done when the end of the pipe says your done. add a thread status variable so we can tell when individual threads are finished then make do_job wait until the encoder thread is done so that we're sure all the frames have been processed and sent to the muxer. - since the muxer alternates between reading video & audio packets we have to have enough buffer in the audio pipeline to handle a video-frame's worth of audio packets (33ms). Since pcm packets are <1ms we need >60 slots in the audio fifos or we'll deadlock. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1412 b64f7644-9d1e-0410-96f1-a4d463321fa5
* New internal audio handling.saintdev2008-04-011-103/+111
| | | | | | | | 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
* = Adds an hb_detect_comb() function that indicates whether or not a frame ↵jbrjake2008-03-231-0/+1
| | | | | | | | | shows interlacing artifacts. - Utilitizes that function in scan.c to analyze the preview frames - Sets a new title->detected_interlacing variable to true if half or more previews show combing, and warns the user in the log. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1359 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Theora.saintdev2008-03-201-0/+2
| | | | | | | | This adds the theora encoder to the Xcode project as well. It does not enable anything in the Mac GUI, just allows it to build. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1350 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Formatting: Remove a lot of trailing whitespace.saintdev2008-02-211-10/+10
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1307 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Allow mac gui to select AC-3 + AAC at the same time, still needs CLI work ↵eddyg2008-02-161-0/+7
| | | | | | for the same. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1267 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGui: Queue Update - thanks travistexdynaflash2007-12-171-0/+1
| | | | | | | | | | | - The primary change is that HBJob now copies the relevant fields out of hb_job_s that it needs. It no longer keeps a pointer reference to libhb's job. - The only time the queue looks at libhb's jobs is when scanning the job list in order to build of the GUI queue display. - Removed all uses of hb_current_job(). - Canceled jobs now stay listed in the queue, with a canceled icon. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1130 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MPEG-2 stream reading fixes for missing audio, multiple audio tracks, ↵jbrjake2007-12-131-3/+0
| | | | | | language codes, reading streams larger than 2GB, and incorrect title numbers. This vastly expands HandBrake's TS/PS compatibility. Thanks, van! git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1123 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Adds extra, user-selectable dynamic range compression to the liba52 ↵jbrjake2007-12-081-0/+1
| | | | | | | | interface, making softer sounds louder. Based on code from liba52's A52Decoder, used in Perian's preferences pane. Set with a job->dynamic_range_compression float, with valid values being 1.0 - 4.0. Controlled from the CLI with --dynamic-range-compression or -D. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1108 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Gives the CLI a separate option for adding the iPod UUID atom to mp4 files, ↵jbrjake2007-11-281-0/+1
| | | | | | instead of it just being a side-effect of using the x264b30 encoder. It's called with -I or --ipod-atom . git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1084 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Optimize MP4 files for HTTP streaming (on the CLI it's -O or --optimize).jbrjake2007-11-211-1/+1
| | | | | | | | Has mpeg4ip run a second pass after muxing is complete, to move the MOOV atom to the beginning of the file. To get this to work, I had to replace a patch from Perian, which has written the avc1 "Compressor Name" in the Pascal string style QuickTime expects. Unfortunately, that patch left mpeg4ip unable to parse its own output, when muxing x264 video. Instead, now the Compressor Name is a blank string, and QuickTime substitutes "H.264" for it. NOTE: This is *not* hinting for RTP streaming, just shuffling the container around so it starts playing faster over the web. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1074 b64f7644-9d1e-0410-96f1-a4d463321fa5
* First attempt at variable frame rate detelecining for NTSC video sources.jbrjake2007-11-101-1/+2
| | | | | | | This check-in includes the library code as well as the CLI implementation. Only works with MP4 and MKV, untested with high profile, results may vary with mixed content, consult a physician if condition persists for longer than four hours. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1051 b64f7644-9d1e-0410-96f1-a4d463321fa5
* "Loose" anamorphic:jbrjake2007-10-161-0/+2
| | | | | | | | - Scales the storage frame size to arbitrary widths, like 640 for the iPod. - Uses dimensions that divide cleanly by an arbitrary number (default: 16) and adjusts the SAR to match - Uses ITU PAR values when the video is meant to be overscanned ( 7+ pixels cropped on left+right) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1029 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Added buffer management and changed fifo sizes. Changed job->subtitle_scan ↵eddyg2007-09-111-1/+1
| | | | | | to job->indepth_scan, and fixed memory init bug in denoise.c. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@945 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGui: Queue Improvements from travistexdynaflash2007-09-071-3/+1
| | | | | | | | | | | | | | | | | | | - Add view selection widget to choose "encode by encode" or "pass by pass" view - Add "Show Detail" button to toggle detailed view on/off - Removed #define JOB_GROUPS. You can now control this in the UI and show either "encodes" or "passes". - Revamped the progress strings to give you exact progress. - New terminology (encodes and passes) - New toolbar in queue window (not complete, icons need work) - New files, added to project: Encodes.png EncodesPressed.png Info.png JobPassLarge.png JobPassSmall.png Passes.png PassesPressed.png git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@931 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGui: New Active Queue implementation courtesy of travistexdynaflash2007-09-051-0/+5
| | | | | | | | | | | | | - Thanks travistex! - queue is now in a separate window - queue currently shows jobs grouped together as one encode, which is configurable - queue now shows currently encoding job, which is independently cancellable without losing the rest of the queue. - can start and pause encoding in the queue window - queue uses its own nib - progress status needs work - This has a way to go, but needed to get checked in as it changes the current xcode project structure. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@925 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Enable jam to work by changing the error handling to use a callback rather ↵eddyg2007-08-271-0/+4
| | | | | | than a direct call outside of libhb. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@880 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add Subtitle scanning for forced subtitles and normal subtitles from the CLIeddyg2007-08-211-1/+2
| | | | | | | and the MacOS GUI. See the new subtitle language options in the GUI. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@844 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Added "--subtitle-force" option to the CLI, and added changes to decsub toeddyg2007-08-201-0/+1
| | | | | | | | select only forced subtitles curtesy of Utumno (thanks!). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@843 b64f7644-9d1e-0410-96f1-a4d463321fa5
* This huge patch from huevos_rancheros ports a number of video filters from ↵jbrjake2007-07-271-0/+32
| | | | | | | | | | mencoder to HandBrake: yadif+mcdeint, hqdn3d, pp7, and pullup+softskip+harddup. What this means is that HB now has stateless inverse telecine, temporal denoising, and motion-adaptive deinterlacing! HandBrake is growing up =) Thank you, huevos_rancheros! git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@749 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Matroska muxer!saintdev2007-07-141-0/+1
| | | | | | | | | | -Chapters don't work in VLC. I'll need to update the library to work-around this. Most other players should pick them up, however. -PAR, check. -x264 b-frames, check. -Multi-track audio, check. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@680 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Implement transport and program stream support. With these changes it's now ↵awk2007-07-041-0/+4
| | | | | | possible to open a .ts or .mpg files and transcode to standard Handbrake Output files. This fixes Ticket #21. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@648 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Finally recommitting clee's patch from r518 to allow 64-bit mp4 files that ↵jbrjake2007-06-131-10/+14
| | | | | | | | can hold more than 4 gigs... controlled by a boolean called job->largeFileSize and enabled from the cli with -4 or --large-file. Note that this breaks compatibility with stuff like the iPod, AppleTV, PS3 (I think), etc...so it is off by default. Also converted a few stray hard tabs into soft tabs. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@618 b64f7644-9d1e-0410-96f1-a4d463321fa5
* A big batch of patches from eddyg.jbrjake2007-06-061-0/+6
| | | | | | | | | | | | | Adds following options to the CLI: --subtitle-scan for auto-selecting subtitles for foreign language segments in native language audio tracks --native-language for auto-selecting subtitles for foreign language audio without knowing the track number --longest for auto-selecting the longest title like in the MacGui --turbo for improving speed on the first pass of a two pass encode with x264 (based on superdump's turbo x264 options in mencoder). Thanks, eddyg! git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@600 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Updated the input channel layouts to store the source LFE information as ↵maurj2007-05-061-16/+10
| | | | | | | | | well as the non-LFE layout. This is so muxavi.c can output the correct channel count for AC3 passthru for all AC3 sources. Updated Controller.mm, scan.c and work.c to use these revised layouts. Added a new property to the work object, to remember the source audio codec for audio work objects. This enables encfaac to detect an 6-channel AC3 source to apply the QuickTime 6-channel audio mapping (as opposed to a DTS source, which doesn't need it). Fixed the Dolby Pro Logic I/II downmix mappings in libdca and updated the libdca patch. Uploaded a new set of pre-built darwin contribs (0014) with this patch applied. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@570 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Enabled DTS channel mixdowns by moving to a more generic input channel ↵maurj2007-05-041-0/+30
| | | | | | layout set of constants. Updated Controller.mm to use these generic input layout constants when deciding which mixdowns to offer. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@565 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Added support for DTS audio. DTS audio streams (of 5.1 audio and below) ↵maurj2007-05-021-16/+39
| | | | | | | | | will be detected and decoded. This requires a new library - libdca (and patch) - which is included (in patched form) in a new version of the pre-built UB Darwin contribs (0012). These have been uploaded to download.m0k.org/handbrake/contrib/ . I haven't yet added any code to Controller.mm to recognise the DTS streams as supporting mono / 6ch DPL1 / DPL2 downmixes. Note: running Jam on the new library required me to update some tools on Mac OS X - possibly libtool, autoconf, automake. Not sure which made the difference, but these were the ones I updated. it won't jam successfully without this. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@559 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Cyanders Named Chapter Markersdynaflash2007-04-251-0/+4
| | | | | | - Thanks Cyander git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@547 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Removed all references to the old job->surround variable, as it is no longer ↵maurj2007-04-181-6/+0
| | | | | | used. Also, removed the "Extract 5.1 Dolby Digital to 6-Channel AAC" preference option from the Mac OS GUI prefs window and controller, as it is no longer needed. It may be worth adding in a new "Default mixdown" preference in its place for a future version of Handbrake? git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@523 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Cleaning up some compiler warnings.clee2007-04-151-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@508 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGui: Presets now utilize Audio Mixdowns Thanks maurj!dynaflash2007-04-121-0/+2
| | | | | | | | | | | - Added second audio track support in presets - Mixdowns regress gracefully depending on current dvd source - Source Track 2 sets to "None" if one is specified that doesn't exist in current dvd. Note: in initial testing, second track using 6 channel kills encode performance and yields a track with no sound. Needs to be tested and verified. Main track works flawlessly in initial testing. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@499 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Updated the Mac GUI to use the new audio mixdowns. This means that the Mac ↵maurj2007-04-121-0/+4
| | | | | | | | | | | | | GUI now supports Dolby PRo Logic 2 mixdowns! The Audio tab now has two mixdown NSPopUpButtons, which are set to display all of the possible mixdowns for the current input audio codec / output audio codec / input audio channel configuration. A mixdown of HB_AMIXDOWN_DOLBYPLII is used by default (or the next best mixdown if this isn't possible). Ideally this will become a prefs option to specify your choice of default audio mixdown. For AC3 passthru, a single mixdown of "AC3 Passthru" is displayed. I've had to update the Xcode project file, to make the Handbrake target look for headers in the "../contrib/include" folder too. This is so that it can find the a52 headers which are now used by Controller.mm. I've added an ac3flags property to hb_audio_s, to enable us to access the source ac3 flags outside of libhb. This is set in scan.c for each source audio. I've updated hb_mixdown_s and the hb_audio_mixdowns[] to include the CLI "short name" version of the mixdowns too, ready for the Mac GUI "default mixdown" prefs saving / loading. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@497 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Added libhb and CLI support for Dolby Pro Logic II 5.0 matrix encoding. ↵maurj2007-04-111-19/+64
| | | | | | | | *NOT YET ADDED TO THE GUI*. Handbrake now uses a more general "audio mixdown" concept. For each audio track to be converted you specify a mixdown. These are defined in common.h. This checkin only allows you to specify one mixdown for all tracks in the CLI, although everything is in place internally to specify a different mixdown per track. In the CLI, the "-6 --surround" option has been repurposed as a "-6 --mixdown" option, with a string parameter of mono/stereo/dpl1/dpl2/6ch. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@494 b64f7644-9d1e-0410-96f1-a4d463321fa5