fix silence insertion problem in audio sync and pipeline stall problem
the current audio buffer was being dropped when silence was inserted, causing
the time to fall even further behind and provoke more silence insertion
in some cases.
with pont-to-point, it is possible for one stream to complete before the
other(s). when the work_loop exits for that stream, the fifo is no longer
serviced and may fill. This can back up and cause a stall in reader
causing the streams that are not yet complete to stall. The Solution is
to continue servicing the fifo after work for a stream is complete. This was
complicated by the fact that the video sync work object was being used as the
indicator that all work was finished. When it exited everything was told
to stop. So now, the muxer work object (last in the chain) is the
indicator when work is done.
fix audio detection problem during scan of ffmpeg audio sources
audio frames can be larger than their container packet sizes, but during
scan, we only feed one container packet to the decoder, then reset
the decoder and try the next packet. so the audio is never detected.
as buffers are tested, they are added to a cache. the entire cache is
passed to the decoder to scan for info. the cache is limited to 4KB.
WinGui:
- Add a new build target called "Install". If you have NSIS installed and it's in your path, you can now use the "Install" target to automatically build the HandBrake Installer for the Windows GUI.
HandBrakeCLI.exe, libgcc_s_sjlj-1.dll, "doc" folder, and handbrakepineapple.ico must all be copied into the "bin/install" folder for this to work.
when in cfr mode, tell x264 we are doing cfr and allow x264 to set the timebase to the framerate.
fixes compatibility issue with tsMuxer which many PS3 users use.
now they can select a specific framerate, which will output cfr video
that tsMuxer can grok. we should have been doing this anyway.
downmix support for ffmpeg audio sources
now we can eat our own dogfood. i.e. aac 6ch discrete input now works,
along with any other multi-channel audio ffmpeg can toss at us.
fix a problem processing PS stream that look a lot like DVD PS but are not.
these streams have start codes that all align on 2048 byte boundaries
which makes them look like DVD PS. But within the 2048 bytes, they have
multiple pack headers which we were tripping on.
sr55 [Sun, 28 Mar 2010 14:39:50 +0000 (14:39 +0000)]
MinGW:
- Initial checkin of some files for making CLI zip packages. This isn't functional yet but hopefully will be later. Also having to checkin a required dll which will be copied into the package.
jstebbins [Sat, 27 Mar 2010 21:21:29 +0000 (21:21 +0000)]
handle bluray LPCM streams
bluray lpcm uses an stype that is normally used for digicipher. so we use
the registration descriptor == HDMV in the PMT to recognize bluray streams.
also, ffmpeg doesn't provide a parser for this audio type because none
is needed. so when the parser is NULL, pass our buffer data directly to
the decoder.
Since ffmpeg is doing the decoding, we will still suffer from the same problem
with multi-channel ffmpeg streams. So this currenlty only works properly
with stereo.
sr55 [Sat, 27 Mar 2010 16:08:37 +0000 (16:08 +0000)]
WinGui:
- Audio Panel will now remove all audio tracks from the audio list if the source has no tracks. When changing back to a source / title that has audio tracks, it will re-add audio tracks that are setup in the selected preset. If no preset is selected it will not re add any tracks.
- Fix duplicate preset created when importing macgui preset.
- Fix CQ/Filesize/AvgBitrate settings not being set correctly with macgui preset import.
dynaflash [Fri, 26 Mar 2010 15:03:11 +0000 (15:03 +0000)]
MacGui: Add call to hb_global_close() upon application termination as per changes in rev 3170
- Also added a missing call to hb_close for the live preview encoding instance
jstebbins [Fri, 26 Mar 2010 14:54:05 +0000 (14:54 +0000)]
make it possible to dynamically create and close multiple libhb instances
tweaks to make libhb more usable from a C# app
remove pointers from preview filenames, replaces with hb instance and title id's
removes only previews upon hb_close, leaves temp dir for hb_global_close
jstebbins [Fri, 19 Mar 2010 17:20:17 +0000 (17:20 +0000)]
reduce mux interleave threshold more to prevent out of memory situations
when skewed timestamps or premature end of a stream is encountered, the muxer
buffers streams in an attempt to interleave stream timestamps. this
threshold tells it when to give up. The previous value still allowed
out of memory conditions with windows 2GB per application limit.
jstebbins [Sat, 13 Mar 2010 17:15:20 +0000 (17:15 +0000)]
extend search range for TS re-sync
we were only checking approx the next 16K bytes when sync was lost in
a transport stream. now we will continues searching to the end of the file.
jstebbins [Thu, 11 Mar 2010 22:54:32 +0000 (22:54 +0000)]
LinGui: fix an issue with hud widget sytle overrides
The overrides are based on widget name, and the names are no longer
being set by GtkBuilder. So I have to set them myself.
jstebbins [Wed, 10 Mar 2010 21:40:03 +0000 (21:40 +0000)]
LinGui: add 'orientation vertical' property to GtkVBox
Works around a bug in the Glade-3 ui layout tool. It shows VBoxs
as if they were HBoxs if this property is not set. libgtk has no such issue.
dynaflash [Tue, 9 Mar 2010 14:58:02 +0000 (14:58 +0000)]
MacGui: Fix pending encodes left in queue at quit warning that was borked in 3154.
- applicationShouldTerminate was trying to call a method that was removed in that revision which then aborted the rest of the shutdown logic.
dynaflash [Fri, 5 Mar 2010 22:40:29 +0000 (22:40 +0000)]
MacGui: Fix issue where closing the main window, then clicking on the dock icon did not make the main window reappear.
- Note: this does not fix the issue in snow leopard where minimizing the main window behind the dock icon does not reappear when dock icon is clicked.
dynaflash [Fri, 5 Mar 2010 22:37:48 +0000 (22:37 +0000)]
MacGui: More Preview Window changes.
- Refactor more code and reduce calls to setViewSize even more.
- Correctly show the gray storage size - display size area in both windowed and scale to screen.
- Restore 85% max windowed size which was changed in 3124 (unless in scale to screen mode).
- Correct Live Preview movie size when in scale to screen.
- Depending on window resizing and screen constraints repositioning of window after resize is a bit wonky.
- Known issue with live preview, when the movie is the full size of the window, the controller bar does not show during live preview playback, however the movies plays fine. Needs to rescale to allow for the 15 px increase in height for controller bar or better yet, implement hud movie controls.
jstebbins [Fri, 5 Mar 2010 22:27:53 +0000 (22:27 +0000)]
temporary hack to use old x264 b-pyramid default of 0 (none)
this will be reverted when the gui's and presets are updated to
reflect the new default of 2 (normal).
sr55 [Sat, 27 Feb 2010 18:19:28 +0000 (18:19 +0000)]
WinGui:
- Moved the Activity Log Code out of the Activity window into the Encode and Scan services. They now provide the log data. (Some duplicate code here will need to be refactored into a base class later)
sr55 [Fri, 26 Feb 2010 22:49:18 +0000 (22:49 +0000)]
WinGui:
- Fixed some issues with the DirectRun() Code and implemented some standard input / error readers received events / handlers
- Moved some code around. EncodeQueue is now a services layer
sr55 [Thu, 25 Feb 2010 20:45:44 +0000 (20:45 +0000)]
WinGui:
- Make the picture settings panel work more like the macgui.
No longer uses -X Max Width but instead does all the logic in-gui so it's less confusing to the user.
dynaflash [Tue, 23 Feb 2010 18:07:07 +0000 (18:07 +0000)]
MacGui: Audio fixes regarding CoreAudio as default.
- Base Patch by Rodeo, thanks Rodeo!
-- Puts CoreAudo at index 0 in the encoder popup to assure it is selected by default if no preset is applied.
-- Fixes issue where going to AC3 or DTS Passthru then back to aac chose faac even if the old "Use CoreAudo instead of FAAC" pref was in effect.
-- Removes some legacy AVI/OGM Code.
- Additional features added after Base Patch:
-- "Use CoreAudio instead of FAAC" preference is now only applied to the built in presets
--- This change means that a custom preset specifying faac is now respected instead of it being overridden by the previously global preference.
--- Xib description changed accordingly
--- Note this means that previous custom presets that used faac will now use it instead of coreaudio.
jstebbins [Tue, 23 Feb 2010 16:53:48 +0000 (16:53 +0000)]
LinGui: fix hud expose event rendering
another "change" in gtk causes "hidden" widgets to be rendered with
reduced opacity instead of zero opacity. So check the visibility of
the widgets manually and skip the hidden ones.
jstebbins [Tue, 23 Feb 2010 00:06:22 +0000 (00:06 +0000)]
LinGui: fix a bunch of brokenness on Ubuntu 10.04 (lucid)
gtk 2.19 has changed how object id's are stored by gtkbuilder.
The widget name is no longer assigned to the builder object id. Instead
the id is stored in a special property. Getting incorrect object id's
caused all settings values to be referenced incorrectly.
sr55 [Sat, 20 Feb 2010 18:08:41 +0000 (18:08 +0000)]
WinGui:
- Tied Microsoft StyleCop into the build process.
- Included a settings file for StyleCop so anyone who picks up the project can use the global project settings.
- Started Clearing up Warnings generated by stylecop.
- Also included Resharper 5 config files that users can use.
dynaflash [Sat, 20 Feb 2010 15:51:17 +0000 (15:51 +0000)]
MacGui: In preview only set the origin of the hud control panel for the preview window when setting the title, after that the origin will animate much smoother along with the window.
- Avoids the nasty resetting of the hud controller when the preview window resizes.
dynaflash [Fri, 19 Feb 2010 19:53:52 +0000 (19:53 +0000)]
MacGui: Removie Full Screen preview mode as its largely redundant when we have 100 percent full screen scaling in windowed mode. Removes a lot of code that is really not needed.
dynaflash [Thu, 18 Feb 2010 19:12:21 +0000 (19:12 +0000)]
MacGui: A bit of pixel nudging in the Destination area of the main window ... patch from Rodeo
- Moved "Destination" a bit higher up, "File:" a bit to the left, and made "Browse" Small instead of Mini
dynaflash [Thu, 18 Feb 2010 16:49:45 +0000 (16:49 +0000)]
MacGui: Preview, use screens visibleFrame instead of frame to get better scale to screen effect and clear the dock, etc.
- Some other code additions to troubleshoot initial window scaling where there shouldn't be any.
dynaflash [Thu, 18 Feb 2010 00:16:47 +0000 (00:16 +0000)]
MacGui: Preview fixes and changes
- Better scaling for windowed mode
- Re postion hud control panel so top is at 50% window y axis
- Other small enhancements
jstebbins [Fri, 12 Feb 2010 23:27:29 +0000 (23:27 +0000)]
try harder to identify program streams that do not begin with a pack header
search deeper into the file for a pack header followed by another start code
prefix. Fixes problem with file cut by StreamClip on non-pack header boundary
dynaflash [Fri, 12 Feb 2010 20:11:21 +0000 (20:11 +0000)]
MacGui: Fix issue where switching modulus would not properly recalibrate the exisiting pic size, only change the stepper increments.
- Bug found and fix tested by BradleyS.
- Do a dry run of hb_fix_aspect to reset dimensions as per the modulus before running through the rest of the settings.
dynaflash [Fri, 12 Feb 2010 16:55:02 +0000 (16:55 +0000)]
MacGui: Queue edit rescan fix for multiple title sources
- Do not try to set the title popup to the original title number since its a single title rescan.
dynaflash [Thu, 11 Feb 2010 23:38:00 +0000 (23:38 +0000)]
Adjustable picture modulus: Base patch by BradleyS, Thanks BradleyS!
- Enables setting modulus for all anamorphic modes (including non-anamorphic) except strict. The job variable "anamorphic.modulus" is repurposed for this and is renamed to simply "modulus"
- Other changes: Increases minimum output dimensions to 32x32 pixels in libhb (prevents possible crashes, notably in macgui). Better crop value and maximum crop value calculations to prevent crashes. Some code optimization / refactoring.
jstebbins [Wed, 10 Feb 2010 18:37:50 +0000 (18:37 +0000)]
manicure: fix some output format issues in api generation
and fix the "-" that should have been a "=". was only used by the defunct PS3 preset, but
a bug none the less.
jstebbins [Tue, 9 Feb 2010 23:34:56 +0000 (23:34 +0000)]
put a limit on how many buffers the muxer will cache when it is
having trouble interleaving timestamps
This prevents some out of memory crashes. In particular, it fixes
a crashed caused by a source in which the audio stream ends substantially
before the video stream ends.