Commit Graph

3213 Commits (ba7b53f33009beb70f4f5aea39b52ad060aaced4)

Author SHA1 Message Date
jp9000 ba7b53f330 obs-outputs: Close stream in send thread 2015-11-18 07:49:51 -08:00
jp9000 ee55dafe24 obs-outputs: Atomically update 'active' variable 2015-11-18 07:48:27 -08:00
jp9000 07254d0390 obs-outputs: Call free_packets in init_connect
This may end up being a bit redundant, but it's just to ensure that the
packet buffer is free before connecting.
2015-11-17 07:51:46 -08:00
jp9000 d4df6c191f obs-outputs: Only log packets remaining if above 0 2015-11-17 07:49:05 -08:00
jp9000 226337a6ca obs-outputs: Check for recv error 2015-11-16 13:57:06 -08:00
Gol-D-Ace 2ee1d82860 Add latest translations from Crowdin 2015-11-16 21:04:55 +01:00
jp9000 fd591fbd45 libobs-d3d11: Use debug log if duplicator fails to create
The duplicator is supposed to be able to safely fail to create, so using
a debug log message is more appropriate.
2015-11-16 11:11:16 -08: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 14bfa07168 libobs: Fix unsigned expression warning
Fixes warning introduced by d7848f3cb7 that pops up in GCC:

warning: comparison of unsigned expression < 0 is always false
[-Wtype-limits]

The proper solution was to use the 64bit integer values with the clamp,
and then convert to a 32bit unsigned integer.
2015-11-16 08:22:55 -08:00
jp9000 717e2b6e66 libobs: Update version to 0.12.1 2015-11-15 09:49:24 -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 d7848f3cb7 libobs: Fix "possible loss of data" warning
Fixes the following warning of MSVC:

warning C4244: '=' : conversion from '__int64' to 'uint32_t', possible
loss of data
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
jp9000 7634d1099c win-capture: Add new game capture patches 2015-11-14 14:25:17 -08:00
Palana fa2311bc4a mac-avcapture: Add color space/video range properties 2015-11-14 17:54:18 +01:00
Palana 3d558d65ba mac-avcapture: Add manual configuration
Currently supported settings:
- Resolution
- Frame rate
- Input format
2015-11-14 15:57:21 +01:00
Palana 520f300f0e mac-avcapture: Refactor code 2015-11-14 15:57:21 +01:00
Palana ad5aec99ff libobs: Fix obs_data crash
Accessing objects inside obs_datas after obs_data_clear was called on the
parent obs_data causes a NULL dereference.

Reproduce with:
	obs_data_t *data = obs_data_create();
	obs_data_set_obj(data, "foo", NULL);
	obs_data_clear(data);
	obs_data_get_obj(data, "foo");
2015-11-14 15:57:21 +01:00
Palana ddfe6483b3 UI: Add OBS_PROPERTY_FRAME_RATE implementation 2015-11-14 15:57:21 +01:00
Palana 1b078f57d8 libobs: Add frame rate property 2015-11-14 15:37:59 +01:00
Palana 0b3fcb8b6e libobs: Add obs_data wrappers for media_frames_per_second 2015-11-14 15:37:59 +01:00
Palana 95487c3eec libobs/media-io: Add frame rate helpers 2015-11-14 15:37:47 +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 b4928a62ad mac-avcapture: Move preset properties initialization 2015-11-14 15:34:46 +01:00
Palana 4d9bd7187b mac-avcapture: Remove obsolete UNUSED_PARAMETER marker 2015-11-14 15:34:46 +01:00
Palana 8a21668477 mac-avcapture: Allow deselecting capture devices 2015-11-14 15:34:46 +01:00
Palana d1468c186c mac-avcapture: Clear output when capture is stopped 2015-11-14 15:34:46 +01:00
Palana f3c33c232d mac-avcapture: Improve logging (less LOG_ERRORs) 2015-11-14 15:34:46 +01:00
Palana 5eb5453fcc mac-avcapture: Move to (Objective) C++ + ARC 2015-11-14 15:34:46 +01:00
Palana 8d90c8a44e mac-avcapture: Remove unnecesary file 2015-11-14 15:34:46 +01:00
Palana 404d600d53 mac-avcapture: Remove unused includes 2015-11-14 15:34:46 +01:00
jp9000 ea69f9cf61 obs-outputs: Call recv when data received
Not calling recv when data is received will accumulate data in the
internal recveive buffer until it's full, in which case is will stop
acknowledging.  This can lead to unjustified disconnections.
2015-11-11 17:45:02 -08:00
jp9000 a6b69a0704 obs-outputs: Log network interface information (win32) 2015-11-11 16:52:48 -08:00
jp9000 1e1f442a61 libobs/util: Remove unnecessary allocations (win32)
Removes unnecessary allocations for the os_event_* and os_sem_*
thread functions
2015-11-11 16:52:48 -08:00
Richard Stanway 94b5bc222b libobs: Rename create_proccess to create_process 2015-11-06 18:25:53 +01:00
Richard Stanway 3474c61085 win-capture: Use MEM_RESERVE to comply with VirtualAllocEx spec 2015-11-06 18:16:29 +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
Richard Stanway 3671153a4f libobs: Don't use SPI_SETSCREENSAVEACTIVE on Windows
SetThreadExecutionState with ES_DISPLAY_REQUIRED has the same effect of preventing the screensaver from activating. Using SPI_SETSCREENSAVEACTIVE leaves the screensaver disabled system-wide if OBS crashes before it can re-enable it.
2015-11-05 03:58:26 +01:00
jp9000 b7f64c7482 obs-outputs: Use atomic bool functions 2015-11-03 15:03:40 -08:00
jp9000 a914bb24fa libobs/util: Add atomic functions for bool values 2015-11-03 15:03:39 -08:00
jp9000 40250a62f0 obs-outputs: Remove unnecessary variable
The 'stopping' variable is superfluous due to the fact that 'stop_event'
accomplishes essentially the same exact thing.
2015-11-02 18:36:09 -08:00
jp9000 730132853a obs-outputs: Join with correct thread on destroy
If there was an attempt to destroy the rtmp-stream output while it was
already connecting and stopping at the same time, it would try to join
with the stop thread rather than with the connect thread.  The connect
thread would then continue past destruction.
2015-11-02 15:53:12 -08:00
jp9000 3dab1ebb0a obs-outputs: Send stop signal if no service assigned
The code assumed that the service was valid when that may not be the
case by the time it gets to the code.
2015-11-02 15:52:05 -08:00
jp9000 247c6526cf obs-outputs: Assign names to RTMP threads 2015-11-02 14:52:43 -08:00
jp9000 e350eb5a4c obs-outputs: Stop in thread to prevent locking UI
Sometimes stopping a connection can lock up due to data that still
remains to be sent, and this would lock up the thread requesting the
stop (typically the UI thread).  So instead of locking up the calling
thread, spawn a new thread specifically for stopping so the calling
thread can continue uninterrupted.  If the user attempts to reconnect,
it will wait for the stop thread to complete in the connect thread
before attempting to connect.
2015-11-02 14:50:34 -08:00
jp9000 a0e112ffd9 obs-outputs: Remove unused thread return variable 2015-11-02 14:02:27 -08:00
jp9000 a2a372c141 obs-outputs: Log remaining packets 2015-11-02 13:55:52 -08:00
jp9000 8756115f67 obs-outputs: Have a timeout for backed up packets
If packets get backed up for too long of a time, just disconnect instead
of trying to output them all.
2015-11-01 15:13:37 -08:00