Commit Graph

940 Commits (50e1ec585dc332175cf14c071d860bdffff49221)

Author SHA1 Message Date
bl 086e3f4a09 UI: Add GenerateSpecifiedFilename function
Maps specifiers and accepts ones that work across multiple OSes.

On some systems, depending on locale, the specifier may resolve to an
empty string or nothing.  GenerateSpecifiedFilename will avoid
conversion of the specifier if this happens, to help guard against this.
2016-03-25 03:28:53 -07:00
jp9000 c82771e594 UI: Add deinterlacing to UI
Accessible via the context menu of a source.
2016-03-21 21:22:32 -07:00
jp9000 4ef26e63f7 UI: Add installer script 2016-03-21 16:23:41 -07:00
TotalCaesar659 a42c967260 UI: Add Russian translation for desktop icon
Closes jp9000/obs-studio#522
2016-03-20 11:11:20 -07:00
jp9000 69da1151e0 Update translations from Crowdin 2016-03-19 12:08:48 -07:00
jp9000 27edc1b045 Revert "UI: Unify output record paths across setting dialogs"
This reverts commit 911f2df130.
2016-03-19 10:33:22 -07:00
jp9000 aa2bea3749 (API Change) libobs: Don't use signal for obs_load_sources
(Note: This commit also changes the UI)

Changed:
-------------------
void obs_load_sources(obs_data_array_t *sources_list);

To:
-------------------
void obs_load_sources(obs_data_array_t *sources_list,
		obs_source_load_cb callback, void *private_data);

Signals should really never be required to use to make some function
work properly.  The "source_load" signal was required for the
obs_load_sources function, but it's meant more for loading private data
in the settings, not for general loading of sources.

This changes it so that a callback is explicitly required to load the
sources.
2016-03-04 12:59:56 -08:00
jp9000 694a6da7b8 UI: Don't draw audio/transition sources in properties 2016-03-02 15:30:31 -08:00
jp9000 3b1775d97f UI: Add configurable transitions 2016-03-01 15:18:34 -08:00
jp9000 57054a237f UI: Don't add quick transition if it doesn't exist 2016-03-01 15:17:27 -08:00
Charles Ray Shisler III 911f2df130 UI: Unify output record paths across setting dialogs
It seems more intuitive if the recording paths for the Simple
Output, Advanced Default Output and Advanced FFmpeg Output are
linked together, so that the user does not have to manage three
paths if switching between the different options.

The UI elements are also connected so that a change to one
signals a change to the others with the corresponding config
setting.
2016-02-25 01:41:23 -08:00
Gol-D-Ace 2b7036dc93 Add latest translations from Crowdin 2016-02-21 22:16:12 +01:00
jp9000 5a071ace4a UI: Add label/control buddy pairs for main windows 2016-02-21 11:19:26 -08:00
jp9000 11271ce6e0 UI: Set accessible name for adv audio props button
People who are blind cannot know what the button does due to lack of any
strings associated with the button.
2016-02-21 11:17:26 -08:00
jp9000 560b69ecb3 UI: Use uncompressed audio for lossless
Originally there was an issue using FLAC for audio in AVI files, AVI
files wouldn't play back with some players.  Because FLAC doesn't work,
and lossless should be lossless, instead just used uncompressed WAV
data for the lossless audio, which is always supported.
2016-02-09 19:24:44 -08:00
jp9000 d66759d60f Revert "UI: Use flac for lossless audio"
This reverts commit 6e20310945.

FLAC doesn't work properly in AVI files, and MKV files don't work in
vegas.  So, sadly the only solution is to use lossless audio at a super
high bitrate for the time being.
2016-02-09 18:46:15 -08:00
partouf d75ed15037 libobs: Add file saving to file property
(This commit also modifies the UI)

Closes jp9000/obs-studio#502
2016-02-07 16:33:57 -08:00
jp9000 292e893a2d UI: Prevent video init with bad video settings
A lot of people had the problem where they'd initialize video settings
with 0 width or height on their output resolution value.  This just
changes it so that the user always has a valid resolution so video
initialization doesn't just outright fail.
2016-02-04 14:42:46 -08:00
jp9000 a999017e95 UI: Do not select on right-click
Originally an intentional design decision, right-clicking would also
perform selection, which is actually rather annoying and unnecessary.
2016-02-04 12:10:30 -08:00
jp9000 6e20310945 UI: Use flac for lossless audio
It was mistakenly using ac3 at a high bitrate -- lossless should be
lossless, both video and audio.
2016-02-04 11:56:20 -08:00
jp9000 a071c03470 UI: Fix studio mode always duplicating scene
If scene duplication mode is disabled and studio mode is turned on, it
would always initially duplicate scene regardless of whether scene
duplication mode was activated or not.
2016-02-04 10:11:50 -08:00
jp9000 fddb7d283d UI: Fix settings window data always being "changed"
Fixes a bug introduced in 6407707a04 where if you open the settings
window the settings would always think there were new changes.  It was
marking a control as changed when it shouldn't be
2016-01-31 15:32:43 -08:00
dodgepong ea9db8249b Add latest translations from CrowdIn 2016-01-31 18:28:35 -05:00
jp9000 6407707a04 UI: Ensure the output res. is modified along with base 2016-01-31 00:55:05 -08:00
jp9000 3ca327fd76 UI: Resize program view if resolution settings changed 2016-01-31 00:55:04 -08:00
jp9000 48a3230b07 UI: Fix a wrong label alignment in settings window 2016-01-31 00:54:56 -08:00
jp9000 9e17328392 UI: Fix Delete shortcut for scenes/sources listboxes
When the new UI was put in, the action shortcuts were unintentionally
removed from the list boxes.
2016-01-31 00:54:50 -08:00
boombatower 8593c4bacd UI: Fix GCC 4.8 compilation issue
Apparently using QPointer container for the QObject being given to the
connect function makes it so it can't find the actual function to use.
I'm guessing this is incomplete functionality or a bug that existed in
GCC 4.8.  Doesn't happen in 4.9+.
2016-01-29 14:09:13 -06:00
jp9000 544953c870 UI: Implement transitions and preview/program mode
Implements transitions, and introduces "Studio Mode" which allows live
editing of the same or different scenes while preserving what's
currently being displayed.

Studio Mode offers a number of new features:
  - The ability to edit different scenes or the same scene without
    modifying what's currently being displayed (of course)

  - The ability to set up "quick transitions" with a desired transition
    and duration that can be assigned hotkeys

  - The option to create full copies of all sources in the program scene
    to allow editing of source properties of the same scene live without
    modifying the output, or (by default) just use references.  (Note
    however that certain sources cannot be duplicated, such as capture
    sources, media sources, and device sources)

  - Swap Mode (enabled by default) which swaps the program scene with
    the preview scene when a transition completes

Currently, only non-configurable transitions (transitions without
properties) are listed, and the only transitions available as of this
writing are fade and cut.  In future versions more transitions will be
added, such as swipe, stingers, and many other various sort of
transitions, and the UI will support being able to add/configure/remove
those sort of configurable transitions.
2016-01-26 11:49:56 -08:00
jp9000 a61933dd8e (API Change) libobs: Add 'type' to obs_scene_duplicate
(Note: This commit also modifies the UI)

Allows the ability to duplicate sources fully copied, and/or have the
scene and its duplicates be private sources
2016-01-26 11:49:52 -08:00
jp9000 669da7ba36 libobs: Do not use signals with audio capture/controls
(Note: This commit also modifies UI)

Instead of using signals, use designated callback lists for audio
capture and audio control helpers.  Signals aren't suitable here due to
the fact that signals aren't meant for things that happen every frame or
things that happen every time audio/video is received.  Also prevents
audio from being allocated every time these functions are called due to
the calldata structure.
2016-01-26 11:49:47 -08:00
jp9000 b0104fcee0 (API Change) libobs: Remove source_type param from functions
(Note: test and UI are also modified by this commit)

API Changed (removed "enum obs_source_type type" parameter):
-------------------------
obs_source_get_display_name
obs_source_create
obs_get_source_output_flags
obs_get_source_defaults
obs_get_source_properties

Removes the "type" parameter from these functions.  The "type" parameter
really doesn't serve much of a purpose being a parameter in any of these
cases, the type is just to indicate what it's used for.
2016-01-26 11:49:37 -08:00
jp9000 adcbf9311b UI: Remove "audio buffering time" (skip)
(Note: This commit breaks libobs compilation.  Skip if bisecting)
2016-01-26 11:49:30 -08:00
bla f32f65bb1f UI: Don't create sources popup menu if no scenes
Closes jp9000/obs-studio#499
2016-01-26 11:48:53 -08:00
jp9000 832043fc7f UI: Disable OSX V-Sync when program is open
OSX has an annoying feature called "BeamSync", which on later versions
of OSX is always on.  For whatever reason, Apple devs decided to force
this feature to always be on, so applications must always render with
v-sync regardless of what they set their swap interval to.

This issue would cause syncing to the vertical refresh for each
additional active display, and wouldn't allow rendering above the
current refresh rate.  This caused major rendering stalls and prevented
video frame timing from being accurate.

This fixes the issue by using an undocumented set of functions to
disable BeamSync.  Note that because this is an undocumented method of
working around the issue, its existence cannot be guaranteed.  If the
functions no longer exist for whatever reason, it will safely do
nothing.
2016-01-25 17:44:41 -08:00
jp9000 c072ba55b2 UI: Hide renderer/adapter when not on windows
Also hide adapter list if not using Direct3D.
2016-01-25 17:29:11 -08:00
jp9000 22f7e6a82d UI: Move Renderer/Adapter to advanced
These really are advanced options that users shouldn't need to change
normally, so moving them to advanced makes sense, and keeps them away
from users who don't know what they're doing.
2016-01-25 17:29:11 -08:00
jp9000 9e4761347d UI: Fix a case where output res. stays invalid
If the base resolution is set to an invalid resolution, it would cause
the output resolution to automatically change to an invalid resolution.
After the invalid resolution was set for the output resolution, it would
stay at that invalid resolution.

This fixes it so it always tries to find the output resolution closest
to what was last actually set or actually edited.
2016-01-25 17:29:10 -08:00
jp9000 9b5ac1fbd2 UI: Fix preview right-click menu getting wrong source
When right-clicking items in the preview window and getting context
menus for them, it would often make the wrong scene item be associated
with the context menu because of the fact that it was using
QListWidget::currentItem instead of querying the actual selected list.

You must query the actual selection list via QListWidget::selectedItems
because QListWidget::currentItem does not work properly for
multi-selection list widgets.
2016-01-25 17:29:10 -08:00
jp9000 e5fc4dbbcd UI: Warn if high resource usage when encoding
Shows a warning stating that encoding is stalling, and shows the number
and percentage of frames that were skipped due to encoding.
2016-01-25 17:29:10 -08:00
jp9000 3749436cd5 UI: Fix "invalid" audio devices in audio settings
If a global audio device is disconnected or for whatever reason is no
longer available when audio settings is opened, it will erroneously
select index 0 of the combo box ("Disabled") by default because it can't
find it in the combo box.  This fixes that issue by making it insert an
item in to the combo box specifying that the previously available audio
device is no longer available, and properly preserving the user's
settings.
2016-01-25 17:29:10 -08:00
jp9000 bbbdd4442c UI: Add options to enable/disable stream confirm dialogs
Some streamers would accidentally hit start/stop streaming, which on
certain services would send out mass emails to all their followers.
This just adds options to general settings to optionally enable dialogs
that confirm whether to actually start/stop streaming when the button is
clicked.
2016-01-25 17:29:10 -08:00
jp9000 213d8ce154 UI: Add "Always On Top" option to file menu 2016-01-25 17:29:10 -08:00
jp9000 9991f6a7ec UI: Fix advanced audio properties duplication bug
Because of the patch that removed the "user sources list" in libobs
(70fec7ae8), obs_enum_sources will now enumerate the global audio
sources, where it didn't before.  In the advanced audio properties
dialog, before the patch I had to use code to manually include them, but
I neglected to remove that code when I made that patch, so it would
cause them to be added more than once.  This just removes that code.
2016-01-25 17:29:10 -08:00
jp9000 6da742ba02 UI: Fix bug where default scene would not be added to list 2016-01-25 17:29:10 -08:00
jp9000 db48e3471e UI: Add GetCurrentSceneSource inline function 2016-01-25 17:29:10 -08:00
jp9000 b8547aa811 UI: Add menu button (split button) class
When you assign a menu to a normal QPushButton, it becomes a button that
only allows you to have a menu.  This class lets you click the button
and have a menu at the same time.
2016-01-25 17:29:10 -08:00
jp9000 370761ba29 UI: Add helper to delete layout and layout contents 2016-01-25 17:29:09 -08:00
jp9000 6262abc2c8 UI: Resize main preview on the widget's resize signal
Fixes a bug where the preview's size calculations wouldn't update if the
widget itself was resizes but the window wasn't resized.
2016-01-25 17:29:09 -08:00
jp9000 d7d5e55d2c UI: Add splitter to main window
Allows adjusting the size of the bottom section of the main window
2016-01-25 17:29:09 -08:00
jp9000 3c83be374e UI: Remove obs_source_add and sourceSceneRefs variable
Prunes code used to workaround libobs "user sources" (such as
sourceSceneRefs) and instead simply holds its own references and saves
sources it chooses with obs_save_sources_filtered.
2015-12-22 05:49:01 -08:00
jp9000 e3795a2187 UI: Hold ref when storing signals (skip)
(Note: This commit breaks UI compilation.  Skip if bisecting)

Ensures that a reference is kept until the signals associated with that
reference are disconnected.
2015-12-22 05:49:00 -08:00
Palana 124ccb68de UI: Allow file name generation without spaces
This will probably go away once proper file name formatting is
implemented (https://obsproject.com/mantis/view.php?id=361)
2015-11-27 15:48:30 +01:00
Palana feb0ccd858 UI: Add HLS entries for ffmpeg-mux output 2015-11-27 15:48:29 +01:00
Palana d4c4a0d1aa UI: Add custom muxer settings for ffmpeg-mux 2015-11-27 15:48:29 +01:00
Gol-D-Ace 2ee1d82860 Add latest translations from Crowdin 2015-11-16 21:04:55 +01:00
jp9000 34bbc444eb UI: Only inhibit when active or if projector open
Having sleep or screensavers inhibited at all times was causing some
annoyances for people.  Sleep/screensavers are now only inhibited when
the program is active or when a projector is open.
2015-11-16 09:08:55 -08:00
jp9000 24d217f799 UI: Fix "unreferenced local function" warning
Fixes the following warning:

warning C4505: 'operator ==' : unreferenced local function has been
removed

This function actually is used despite this warning, so the only way to
get rid of the warning is to disable the warning itself in this
particular case.
2015-11-15 09:49:23 -08:00
jp9000 6ba723a997 UI: Fix multi-item selection
Allows changing item selection via list box or via preview window, and
keeps their selection status in sync with each other.
2015-11-15 09:49:22 -08:00
jp9000 c1b9901b6a UI: Add signal blocker helper class 2015-11-15 09:49:14 -08:00
Palana ddfe6483b3 UI: Add OBS_PROPERTY_FRAME_RATE implementation 2015-11-14 15:57:21 +01:00
Palana f4aae94fe2 UI: Remove "unsupported" part from AutoSelect message
The unsupported part should basically be signaled via making that
value inaccessible
2015-11-14 15:34:46 +01:00
Palana dd825f7d33 UI: Change CenterToScreen shortcut to ctrl+d 2015-11-14 15:34:46 +01:00
Palana 3fc7453933 UI: Clear ListItem selection before deleting widgets
This works around a crash in the "widget->clear()" call in
ClearListItems under the following circumstances:
- Create at least two scenes
- Create at least one source in both scenes
- Have at least one source selected in both scenes
- Set the same "Switch to scene" hotkey on both scenes
- Use "Switch to scene" hotkey

Reduced stack trace on my machine:
    frame #0: 0x00000001004bac2d QtWidgets`QWidget::show() + 93
    frame #1: 0x00000001006d32a2 QtWidgets`QAbstractItemView::updateEditorGeometries() + 690
    frame #2: 0x00000001006d36d7 QtWidgets`QAbstractItemView::updateGeometries() + 23
    frame #3: 0x00000001006f1ae6 QtWidgets`QListView::updateGeometries() + 438
    frame #4: 0x00000001006ccdce QtWidgets`QAbstractItemView::doItemsLayout() + 46
    frame #5: 0x00000001006f1916 QtWidgets`QListView::doItemsLayout() + 214
    frame #6: 0x00000001006f9cf3 QtWidgets`QListViewPrivate::rectForIndex(QModelIndex const&) const + 611
    frame #7: 0x00000001006eb48d QtWidgets`QListView::visualRect(QModelIndex const&) const + 29
    frame #8: 0x00000001006f1567 QtWidgets`QListView::visualRegionForSelection(QItemSelection const&) const + 1863
    frame #9: 0x00000001006d7ba9 QtWidgets`QAbstractItemView::selectionChanged(QItemSelection const&, QItemSelection const&) + 73
    frame #10: 0x00000001006f97d2 QtWidgets`QListView::selectionChanged(QItemSelection const&, QItemSelection const&) + 674
    frame #11: 0x00000001006d9b9e QtWidgets`QAbstractItemView::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) + 1246
    frame #12: 0x0000000102b10372 QtCore`QMetaObject::activate(QObject*, int, int, void**) + 2994
    frame #13: 0x0000000102aa001c QtCore`QItemSelectionModel::emitSelectionChanged(QItemSelection const&, QItemSelection const&) + 300
    frame #14: 0x0000000102a9fe6c QtCore`QItemSelectionModel::select(QItemSelection const&, QFlags<QItemSelectionModel::SelectionFlag>) + 748
    frame #15: 0x0000000102aa048b QtCore`QItemSelectionModel::clear() + 75
    frame #16: 0x000000010072e9d8 QtWidgets`QListWidget::clear() + 24
    frame #17: 0x000000010015759d obs`ClearListItems(widget=0x000000010683afa0) + 141 at item-widget-helpers.cpp:43
    frame #18: 0x000000010003424b obs`OBSBasic::UpdateSources(this=0x0000000105f5bf50, scene=(val = obs_scene * = 0x0000000110679440)), &(obs_scene_release)>) + 75 at window-basic-main.cpp:1254
    frame #19: 0x0000000100036a96 obs`OBSBasic::UpdateSceneSelection(this=0x0000000105f5bf50, source=<unavailable>), &(obs_source_release)>) + 422 at window-basic-main.cpp:1473
    frame #20: 0x0000000100175c48 obs`OBSBasic::qt_static_metacall(_o=0x0000000105f5bf50, _c=InvokeMetaMethod, _id=17, _a=0x00007fff5fbfb640) + 776 at moc_window-basic-main.cpp:494

This crash was reported at
https://obsproject.com/mantis/view.php?id=364
2015-11-06 11:36:51 +01:00
Palana 6c193435cc UI: Move properties window creation for new sources
Currently creating new sources can cause a deadlock:
OBSBasicSourceSelect locks the scene mutex when adding a new source
(required to add invisible sources), and later OBSBasic tries to
lock the graphics mutex (via CreatePropertiesWindow); meanwhile the
graphics thread is holding the graphics mutex and tries to lock each
scene as it renders them, resulting in a (non-obvious from the code)
lock ordering conflict.

Moving the CreatePropertiesWindow call out of the locked scene mutex
restores the previous lock ordering; in addition, the requirement
for keeping sourceSceneRefs for opening that initial properties
window is removed
2015-10-30 10:15:42 +01:00
jp9000 8d895eaa6a UI: Prevent calling of obs functions with NULL params 2015-10-21 06:30:33 -07:00
jp9000 6ad8df8adb (API Change) libobs: Use single func for base effects
API removed:
--------------------
gs_effect_t *obs_get_default_effect(void);
gs_effect_t *obs_get_default_rect_effect(void);
gs_effect_t *obs_get_opaque_effect(void);
gs_effect_t *obs_get_solid_effect(void);
gs_effect_t *obs_get_bicubic_effect(void);
gs_effect_t *obs_get_lanczos_effect(void);
gs_effect_t *obs_get_bilinear_lowres_effect(void);

API added:
--------------------
gs_effect_t *obs_get_base_effect(enum obs_base_effect effect);

Summary:
--------------------
Combines multiple near-identical functions into a single function with
an enum parameter.
2015-10-19 00:52:45 -07:00
jp9000 c59a796a8f UI: Use byte sequence for non-breaking spaces
Use explicit UTF-8 byte sequence for the "no-break space" character.

Prevents issues with certain editors, and fixes the following compiler
warning on Visual C++:

warning C4819: The file contains a character that cannot be represented
in the current code page (X). Save the file in Unicode format to prevent
data loss
2015-10-15 01:31:38 -07:00
wayne wang 2be5291a3e UI: Fix non-standard string character in source
(Jim) For some reason a character outside of the standard ASCII
character set was used in this source file.  "Eight Spoked Asterisk",
Unicode character 0x02733.  Non-ASCII characters should probably not be
used directly in source files due to potential character encoding
issues that can occur depending on the operating system and compiler.

Closes jp9000/obs-studio#485
2015-10-14 01:18:06 -07:00
Christoph Hohmann fc063444ca UI: Add checkbox for visibility of new scene items
Note: This functionality should probably be considered as a temporary
solution.  Ideally, sources should not be visible on creation until the
user presses "OK" in the initial properties dialog.  Also, the problem
of initial visibility can additionally be solved by implementing the
preview/program functionality.  Once preview/program is implemented the
need for this patch will be negated, and the option should probably be
removed.

Closes jp9000/obs-studio#483
2015-10-11 11:42:40 -07:00
Palana 80b20abde2 UI: Fix removing wrong scene from list
RemoveScene would always remove the currently selected item from the
scenes list, even if that item didn't reference the actual scene being
removed; finding the proper item via its OBSRef fixes this issue.

How to reproduce the original issue:
Create two scenes "a" and "b", set a hotkey for switching to scene "a",
select scene "b" and press the remove scene button, then while the
confirmation dialog is up press the hotkey while the UI is out of focus.
The active scene should have switched to "a", while the dialog still
displays "b" as its target; now confirm the removal of "b". Note how "a"
was removed from the scenes list instead.

Reported at https://obsproject.com/mantis/view.php?id=333
2015-09-24 10:11:49 +02:00
jp9000 ecb8c2c045 Revert "UI: Always create a display capture on first run"
This reverts commit 35b2ce565a.

There is far too much potential for issues to occur if the first-time
start creates a display capture by default on linux and windows.
Display capture on windows laptops will not be guaranteed to capture
properly, leaving the user with a blank screen.  Display capture on
linux downloads its image off the graphics processor, so it's quite
inefficient to have on by default.
2015-09-23 08:53:41 -07:00
dodgepong 76c18b079b Latest translations from CrowdIn 2015-09-22 23:33:29 -04:00
jp9000 0b119ba1e8 UI: Remove 22.05khz
22.05khz audio really doesn't make sense to have available, and causes
issues with encoders (primarily CoreAudio)
2015-09-21 19:31:08 -07:00
jp9000 17fa004104 UI: If audio bitrate not available, use closest
When an encoder has been removed (such as CoreAudio) and the audio
bitrates currently configured no longer are available to the current
audio encoders anymore, it would cause GetAACEncoderForBitrate to return
false with no encoder available.

To fix the issue, instead just choose the closest bitrate relative to
the current bitrate (rounded up).
2015-09-21 18:49:07 -07:00
jp9000 718035efa2 UI: Use better default UI icons 2015-09-21 00:01:40 -07:00
jp9000 5d8f07310d UI: Use utvideo for lossless compression
After some more testing, utvideo not only gives better encoding
performance, but also better compression and better decoding
performance.  It's pretty much superior all around over huffyuv.
2015-09-19 21:21:34 -07:00
jp9000 54a3e6696f UI: Add recording presets to simple output
So certain high-profile individuals were complaining that it was
difficult to configure recording settings for quality in OBS.  So, I
decided to add a very easy-to-use auto-configuration for high quality
encoding -- including lossless encoding.  This feature will
automatically configure ideal recording settings based upon a specified
quality level.

Recording quality presets added to simple output:

- Same as stream: Copies the encoded streaming data with no extra usage
  hit.

- High quality: uses a higher CRF value (starting at 23) if using x264.

- Indistinguishable quality: uses a low CRF value (starting at 16) if
  using x264.

- Lossless will spawn an FFmpeg output that uses huffyuv encoding.  If a
  user tries to select lossless, they will be warned both via a dialog
  prompt and a warning message in the settings window to ensure they
  understand that it requires tremendous amounts of free space.  It will
  always use the AVI file format.

Extra Notes:

- When High/Indistinguishable quality is set, it will allow you to
  select the recording encoder.  Currently, it just allows you to select
  x264 (at either veryfast or ultrafast).  Later on, it'll be useful to
  be able to set up pre-configured presets for hardware encoders once
  more are implemented and tested.

- I decided to allow the use of x264 at both veryfast or ultrafast
  presets.  The reasoning is two-fold:

  1.) ultrafast is perfectly viable even for near indistinguishable
quality as long as it has the appropriate CRF value.  It's nice if you
want to record but would like to or need to reduce the impact of
encoding on the CPU.  It will automatically compensate for the preset at
the cost of larger file size.

  2.) It was suggested to just always use ultrafast, but ultrafast
requires 2-4x as much disk space for the same CRF (most likely due to
x264 compensating for the preset).  Providing veryfast is important if
you really want to reduce file size and/or reduce blocking at lower
quality levels.

- When a recording preset is used, a secondary audio encoder is also
  spawned at 192 bitrate to ensure high quality audio.  I chose 192
  because that's the limit of the media foundation aac encoder on
  windows, which I want to make sure is used if available due to its
  high performance.

- The CRF calculation is based upon resolution, quality, and whether
  it's set to ultrafast.  First, quality sets the base CRF, 23 for
  "good" quality, 16 for "very high" quality.  If set to ultrafast,
  it'll subtract 2 points from the CRF value to help compensate.  Lower
  resolutions will also lower the CRF value to help improve higher
  details with a smaller pixel ratio.
2015-09-19 17:04:22 -07:00
jp9000 27d2860629 UI: Clarify base/scaled resolution text 2015-09-19 15:45:14 -07:00
jp9000 6d9bb63fac UI: Default to colorspace 601 instead of 709
Seems that most decoders that don't read the h264 header tend to expect
601 instead of 709.
2015-09-19 12:29:27 -07:00
jp9000 165766254a UI: Remove duplicate widget connection 2015-09-19 08:20:20 -07:00
jp9000 5ba8333da3 UI: Add more potential recording errors 2015-09-19 08:20:19 -07:00
Palana cf69f24917 UI: Fix crash when saving advanced FFmpeg output
Selecting any supported FFmpeg format where ff_format_desc_extensions
returns NULL would crash the std::string constructor, so we pass an
empty extension instead (rtsp is one candidate format that triggers
the crash, on my machine at least)
2015-09-16 16:25:47 +02:00
Palana edec540695 UI: Add custom muxer settings to advanced FFmpeg output 2015-09-16 10:47:58 +02:00
jp9000 274841860b UI: Inhibit sleep/screensavers while active 2015-09-12 22:08:06 -07:00
jp9000 01e7a3c621 UI: Use empty scene for new scene collection
The user may not want their audio or their display to be captured when
creating a new scene collection.  Make new scene collections default to
fully empty.
2015-09-11 21:51:09 -07:00
jp9000 35b2ce565a UI: Always create a display capture on first run
For the sake of consistency, always create a display capture source on
the very first run of the program, just to have something displayed.

(NOTE: The only exception here is on windows 7/vista, which isn't ideal
for display capture, so it'll continue to be left blank)
2015-09-11 21:49:21 -07:00
jp9000 f10fb07f0e UI: Log an error if loading of a scene file failed 2015-09-11 21:45:51 -07:00
jp9000 44b34431be UI: Create default scene if no file found 2015-09-11 21:45:06 -07:00
jp9000 b574407c74 UI: Remove cbr/bufsize from simple output mode
CBR is now always on by default for streaming, so there's no reason to
have a setting for this in particular.  Still available in advanced
output settings of course, but simple output mode really should be kept
as simple as possible.
2015-09-11 08:43:10 -07:00
jp9000 6b4d267682 UI: Clear reconnect timeout if reconnect canceled 2015-09-11 08:23:03 -07:00
jp9000 a4f8d18948 UI: Move reconnect options to advanced settings
This is mostly just to remove the unnecessary clutter from the output
sections.  The reconnect settings are generally rarely modified by users
as it is.
2015-09-10 21:54:11 -07:00
jp9000 981ead18a3 UI: Refactor upgrade_settings function
This is a refactor to move the config file open/saving out of the
individual settings upgrade functions that may be called per file.
2015-09-10 19:56:29 -07:00
jp9000 fe164eca87 UI: Rename FFmpeg update func to upgrade_settings
This function should really be considered a function that upgrades
general config file settings.
2015-09-10 19:06:18 -07:00
jp9000 f592c33eec UI: Implement stream delay
When stream delay is active, the "Start/Stop Streaming" button is
changed in to a menu button, which allows the user to select either the
option to stop the stream (which causes it to count down), or forcibly
stop the stream (which immediately stops the stream and cuts off all
delayed data).

If the user decides they want to start the stream again while in the
process of counting down, they can safely do so without having to wait
for it to stop, and it will schedule it to start up again with the same
delay after the stop.

On the status bar, it will now show whether delay is active, and its
duration.  If the stream is in the process of stopping/starting, it will
count down to the stop/start.

If the option to preserve stream cutoff point on unexpected
disconnections/reconnections is enabled, it will update the current
delay duration accordingly.
2015-09-10 12:13:40 -07:00
jp9000 d1293b2b8a UI: Add stream delay options to advanced settings
I added stream delay options to advanced settings not just because I
feel it's an advanced option, but also to reduce clutter in the outputs
section and its sub-sections, which already have far too many options as
it is.
2015-09-10 12:13:40 -07:00
jp9000 84d5938af2 Revert "UI: Add confirmation when clicking stop stream"
This reverts commit a508c17f0a.

I realized that this would become more of an annoyance for most people
rather than anything helpful.  This has only happened only twice that I
am aware of in all the years that the program has been around.
2015-09-10 12:11:29 -07:00
jp9000 4c3394f7bf UI: Use a default size for the properties window
When I changed the properties window to remove the .ui file, I forgot to
give it a default initial size.  This just sets it to 720x580 by
default.
2015-09-07 18:40:06 -07:00
jp9000 c23c0f4615 UI: Prevent writing endlessly repeating log entries
Limits similar log entries (determined by a simple hash function that
sums the characters) to certain number of lines in a row.  When a
different log entry occurs, it resets the repeat check and logs how many
times the last message was repeated.
2015-09-07 14:06:21 -07:00
jp9000 9d940249bb UI: Remove redundant log message
This log message is already used in the StreamingStop callback.
2015-09-06 16:57:57 -07:00