Commit Graph

417 Commits (de3c7cafccfe83b3ee207771f54891ff5df3dd1b)

Author SHA1 Message Date
jp9000 778cc2b318 (API Change) obs_reset_video: Use return codes
Changed API functions:
libobs: obs_reset_video

Before, video initialization returned a boolean, but "failed" is too
little information, if it fails due to lack of device capabilities or
bad video device parameters, the front-end needs to know that.

The OBS Basic UI has also been updated to reflect this API change.
2014-07-20 18:25:57 -07:00
Palana e62f965d3e Mark menu entries for Qt application menu mangling on OSX 2014-07-21 03:22:18 +02:00
BtbN 415a698bac Add support for build time dependency copying 2014-07-19 01:38:42 +02:00
BtbN 38c2fc87aa Move all data into the subdir it belongs to
Completely removes the build dir in favor of cmake based build layouting
2014-07-19 01:38:41 +02:00
jp9000 5da8d14570 Fix update checck bug
Fix bug where updates for windows would check for mac updates and vise
versa.

(I am ashamed)
2014-07-17 07:03:27 -07:00
jp9000 18026c363d No need to initialize map value to 0 (bug fix)
There's no need to initialize the map value to 0.  What was happening is
that obs_scene_add was adding a ref to a non-existent value, which
simply created it and added 1, which is perfectly fine.  Then,
obs_add_source would set the ref to 0, overwriting the existing value.

So this meant that if you didn't call them in the right order, it
wouldn't work properly, and would break, which was pretty stupid.

Turns out that if you access a map value that doesn't exist, it'll
create one with the default constructor of that type.  In this case, int
will initialize to 0, which was exactly what we wanted in the first
place, and defeats the purpose of even needing to initialize the value
to 0.  So, there's no need to manually set it to 0 in
OBSBasic::SourceAdded, or worry about the order in which the functions
are called.

Just goes to show you have to be careful with reference counting.
2014-07-16 15:26:14 -07:00
Palana 1759d28ee2 Fix scene editing for device pixel ratios ≠ 1
Fixes #177
2014-07-16 02:29:13 +02:00
Jim defceeef5d Merge pull request #169 from hwdro/master
Simple volume meter widget
2014-07-14 11:14:47 -07:00
HomeWorld 6b284d9e58 Fix audio meters so that volume is applied linearly. 2014-07-14 21:12:53 +03:00
jp9000 633799f1c3 Use OBS_CONFIG as the actual version string
I didn't understand how tags worked so I was trying to filter it out
when I should really be using it for the actual version string.
2014-07-14 09:51:21 -07:00
HomeWorld 37828ce26d Implemented a simple volume meter widget 2014-07-14 19:32:39 +03:00
jp9000 b7e0c9fb22 Parse obs-config.h version string to just the hash 2014-07-14 09:07:15 -07:00
jp9000 eee2ac038f Set User-Agent value of update check to OBS ver. 2014-07-14 08:51:57 -07:00
jp9000 e03f34de9f Don't use separate update files per OS
Instead, just use separate version and download entries.
2014-07-14 03:48:30 -07:00
jp9000 4e7f076c68 Add basic update checking 2014-07-14 03:19:24 -07:00
jp9000 b92b2e1031 Add text for missing window titles 2014-07-13 13:10:35 -07:00
Palana 57736d308b Add OSX native shortcut for scene/source deletion 2014-07-13 21:46:44 +02:00
jp9000 dbe166178f Save last version to global.ini on exit 2014-07-13 12:38:58 -07:00
jp9000 c16e6cc6d7 Add license agreement dialog 2014-07-13 11:40:47 -07:00
Palana 85219bd13f Show current locale in basic settings dialog 2014-07-13 19:10:39 +02:00
Palana 0a80960b5b Implement language autoselection using platform priority lists 2014-07-13 19:10:39 +02:00
Palana e3d7d90115 Add platform specific locale priority enumeration
These functions match the known obs locales with the system supplied
locales and return a vector of possible locales with the highest
priority locale first
2014-07-13 19:10:39 +02:00
Palana 5623f1d62d Use locale (name) enumeration helper in basic settings window 2014-07-13 19:10:39 +02:00
Palana 0413ada9b5 Add helper function for locale (name) enumeration 2014-07-13 19:10:38 +02:00
Palana b5ec57c2b5 Use macro for setting the config default language 2014-07-13 19:10:38 +02:00
Palana 10a6ffdbf8 Add OBSErrorBox for early initialization failures 2014-07-13 15:23:26 +02:00
Palana 37601eb0c0 Adjust OBSErrorBox severity 2014-07-13 15:23:26 +02:00
Palana d41b9e2839 Move application initialization out of OBSApp constructor 2014-07-13 15:23:26 +02:00
jp9000 e61cb07a94 Change names of default outputs/encoders/service 2014-07-13 05:05:29 -07:00
jp9000 0da870afeb Remove unused config directory 2014-07-13 04:38:06 -07:00
jp9000 fe8c71e7d4 Remove '32bit' text from 32bit windows version
Users of the 32bit version need to realize that it doesn't really matter
all that much.
2014-07-13 04:36:50 -07:00
jp9000 f3285e2cfa Fix bug where x264 buffer size was always 1000 2014-07-13 02:59:34 -07:00
jp9000 a1073b8c1d Remove loading of test-input module 2014-07-12 12:06:26 -07:00
jp9000 0bf0266b2a Use the "Stop Streaming" translated text 2014-07-12 05:34:23 -07:00
jp9000 9dc8ff84cf Add a title to the properties window 2014-07-12 02:08:51 -07:00
Palana c9bcfc69eb Fix compilation with OSX 10.8 SDK 2014-07-11 23:27:37 +02:00
jp9000 4cc1a42908 Use IETF standard language tags for locale names 2014-07-10 21:10:03 -07:00
Palana 5bbd918af3 Update default video save path for OSX 2014-07-10 22:00:18 +02:00
jp9000 5585ae0eff Rename volume control if audio source renamed 2014-07-08 11:58:48 -07:00
jp9000 b92e8dfe92 Change "kbp/s" to "kb/s"
As pointed out by da_coder
2014-07-07 22:06:06 -07:00
jp9000 c27ddb9066 Rename locale extensions from .txt to .ini
Because we're using .ini format, the translation servies spit out files
with .ini extensions, so this makes it so we don't necessarily have to
rename those files from .ini to .txt before merging.
2014-07-07 21:49:36 -07:00
jp9000 48d8ebcc47 Move locale.ini to obs-studio base data directory
Being in with the other locale files causes a bit of confusion,
especially since the locale files will all be renamed to have .ini
extensions.
2014-07-07 21:46:55 -07:00
jp9000 f0cc386499 Implement status bar
The status bar now displays:
 - Auto-reconnect information (reconnecting and reconnect success)
 - Dropped frames (as well as percentage of total video frames)
 - Duration of session
 - CPU usage of the program
 - Kbp/s

The OBSBasic class is getting a bit big, so I separated out the
status bar code to its own class derived from QStatusBar.
2014-07-06 17:36:46 -07:00
jp9000 a9b3da010d Add function to main window to query CPU usage 2014-07-06 17:36:45 -07:00
jp9000 118e3edd18 Remove unnecessary tests to delete
The delete operator can be called on a null pointer, so there's no
reason for these tests.
2014-07-06 17:35:17 -07:00
jp9000 df3623b478 Swap reconnect parameters
Fixes a bug where it would use the max retries for the delay time and
vise-versa.
2014-07-04 13:21:11 -07:00
jp9000 07b2fd5972 Do not visually select audio-only sources 2014-07-04 10:58:03 -07:00
jp9000 d3e6148ae7 Add auto-reconnect settings 2014-07-03 18:07:33 -07:00
jp9000 18966a9ca0 Implement 'Order' menu
Contains Move Up, Move Down, Move to Top, Move to Bottom.  Also assigns
Ctrl-Up, Ctrl-Down, Ctrl-Home, Ctrl-End to each action.

This was also added to the right-click context menu popup for sources.
2014-06-30 19:47:06 -07:00
jp9000 0b52828086 Remove 'remove item' action, clean up code
The removeItemAction just for a keyboard shortcut was unnecessary.
Instead, use the toolbar button to associate a shortcut with, and remove
the removeItemAction object.
2014-06-30 18:21:40 -07:00
jp9000 c48ec48765 Implement 'scenes' list context menu 2014-06-30 16:03:12 -07:00
jp9000 66c3c862e4 Make 'remove' toolbar buttons query for removal 2014-06-30 13:47:51 -07:00
jp9000 ff2a2cceb3 Implement context menu on 'sources' box 2014-06-30 01:13:32 -07:00
jp9000 67440b92b5 Fix renaming bugs, deny if empty, and simplify
I screwed it up a bit originally, using && instead of ||.

Use 'trimmed' function to prevent sources with leading or trailing
whitespace.

Also, do not allow an empty value.
2014-06-30 01:08:12 -07:00
jp9000 68c8fa3e17 Do not rename items if the name is the same 2014-06-30 00:40:51 -07:00
jp9000 11a7b57cd8 Implement renaming of scenes/sources 2014-06-30 00:18:44 -07:00
jp9000 25780b3ce0 Fix renderer listbox to be a global config setting
The current renderer should be a global config setting, not a local
setting.
2014-06-29 20:23:40 -07:00
jp9000 269a91f522 Give the 'add source' popup the 'Add' title
This allows the popup to be appended directly as an item for other
popups.
2014-06-29 18:43:54 -07:00
jp9000 3f262b8a4a Use signal/slot when creating a source via popup
I realized that there's no other way to share the menu if I want to add
it as a sub-menu somewhere else.
2014-06-29 17:33:40 -07:00
jp9000 dfb7ff4139 Add image source module to obs-studio basic UI
...We really need to make this search for modules and automatically load
them.
2014-06-28 10:35:40 -07:00
jp9000 51e9704385 Implement 'path' property in to properties view 2014-06-28 10:12:58 -07:00
jp9000 dbb9124bf6 Remove 'effect' param from effect param funcs
Similar to the shader functions, the effect parameter functions take
the effect as a parameter.  However, the effect parameter is pretty
pointless, because the effect parameter.. parameter stores the effect
pointer interally.
2014-06-25 22:24:27 -07:00
Jim 2ea50cab36 Merge pull request #124 from jp9000/new-locale-handling
Update to new module locale API
2014-06-25 12:58:05 -07:00
jp9000 0b4a259e56 Remove 'locale' parameter from all callbacks
The locale parameter was a mistake, because it puts extra needless
burden upon the module developer to have to handle this variable for
each and every single callback function.  The parameter is being removed
in favor of a single centralized module callback function that
specifically updates locale information for a module only when needed.
2014-06-25 12:36:26 -07:00
jp9000 899f053034 Add API for setting/getting current locale
This API is used to set the current locale for libobs, which it will set
for all modules when a module is loaded or specifically when the locale
is manually changed.
2014-06-25 12:36:17 -07:00
jp9000 21665430d6 Fix 'multiple copy constructors' warning 2014-06-25 02:12:30 -07:00
jp9000 2e6063ce79 Fix 'potentially uninitialized variable' warnings 2014-06-25 02:03:29 -07:00
jp9000 31fcbd893f UI: Fix a few more warnings 2014-06-25 01:54:34 -07:00
jp9000 11514d36ea Mark unused lambda parameter 2014-06-25 01:54:33 -07:00
jp9000 31dcb3e1c3 UI: Fix 'unused param' warnings in windows code 2014-06-25 01:54:33 -07:00
jp9000 9f652e6416 Make settings window only save data that changes
Currently, if a user presses 'OK' or 'Apply' on the settings window, it
will save all data from all controls on a settings pane, regardless of
whether of not they were changed.  The major issue with this is that
setting the data will overwrite all default values, making it impossible
for default values to be used if a user didn't actually change a value.
(Thanks to palana for pointing this fact out)

So instead, mark a control as 'changed' using QObject::property() and
QObject::sender(), and add a few helper functions to controls to ensure
that they are checked to see whether they were actually changed directly
by the user before saving the value to the config.
2014-06-23 19:59:22 -07:00
jp9000 1ac859f5ed Do not clamp aspect by default when using bounds
If the scene item has a bounding box set up for it, do not make it use
aspect ratio clamping by default.

Instead, make it so that shift will turn on aspect ratio, and make it
also apply to all types of bounding box modes.

The only time where aspect ratio clamping should apply by default is
when bounds are not in use (i.e. when a source is just created).  Some
will disagree with me just because that's how photoshop does it, but
we're not photoshop, and I feel that the majority of users will have
more trouble with it disabled by default than enabled by default.

So to sum it up:

If bounds inactive, clamp aspect ratio by default, because scene items
start out with it inactive, and it directly affects the scale.

If bounds active, do not clamp aspect ratio by default, because clamping
to aspect ratio doesn't particularly have an effect for mode bounds
modes except for "stretch to bounds".
2014-06-22 23:53:39 -07:00
jp9000 aef8c218c0 Make 'center to screen' just center the source
Instead of using bounds to force the source to be centered (and
unrotated), just center the source positionally on the screen.  Will
also preserve rotation.
2014-06-22 23:49:57 -07:00
jp9000 933f5787d0 UI: Change transform value 'scale' to 'size'
There's no reason to represent this value in terms of scale.  Scale is a
useless value for users to use.  What are they going to enter, 0.5?
2.0?  0.25?

Even if it can be subject to change by the source itself, and even if
it's still converted to scale internally, having it display the base
source size value is much more ideal for the user.
2014-06-22 17:37:06 -07:00
Palana dfc8f51785 Make properties-view reflect autoselect settings (for property lists) 2014-06-22 01:33:37 +02:00
Palana b5f56ff579 Highlight label in properties-view when a disabled list item is selected 2014-06-21 22:31:23 +02:00
fryshorts 5f8a6db816 Add initial implementation of a v4l2 capture plugin
This patch adds a plugin to capture video data from v4l2 devices under linux.
2014-06-18 21:31:23 +02:00
Palana d815831012 Make properties-view respect disabled list entries 2014-06-17 17:03:27 +02:00
jp9000 85ee5d591b UI: Open properties on user source creation
Every time I created a source I found myself in need to actually open up
the properties.  It was getting somewhat on my nerves, so I decided to
just make it automatically pop up when the source is created.
2014-06-16 19:45:47 -07:00
jp9000 ed5b4f590c Fix a number of warnings
Structures with anonymous unions would a warning when you do a brace
assignment on them.

Also fixed some unused parameters and removed some unused variables.
2014-06-16 17:55:48 -07:00
jp9000 f937d66fab UI: Allow editing outside of inner preview bounds 2014-06-16 15:38:43 -07:00
jp9000 98ddb846dc UI: Add padding to scene edges for editing
Add a 10 pixel padding to the sides and remove viewport cutting to
ensure that the editing rectangles are visible even when in the upper
corners.

Also, add a black background for the actual 'scene' in the preview
window so that the scene boundries are actually visible in relation to
the rest of the preview space.
2014-06-15 20:33:13 -07:00
jp9000 452e0695f4 UI: Add scene editing
So, scene editing was interesting (and by interesting I mean
excruciating).  I almost implemented 'manipulator' visuals (ala 3dsmax
for example), and used 3 modes for controlling position/rotation/size,
but in a 2D editing, it felt clunky, so I defaulted back to simply
click-and-drag for movement, and then took a similar though slightly
different looking approach for handling scaling and reszing.

I also added a number of menu item helpers related to positioning,
scaling, rotating, flipping, and resetting the transform back to
default.

There is also a new 'transform' dialog (accessible via menu) which will
allow you to manually edit every single transform variable of a scene
item directly if desired.

If a scene item does not have bounds active, pulling on the sides of a
source will cause it to resize it via base scale rather than by the
bounding box system (if the source resizes that scale will apply).  If
bounds are active, it will modify the bounding box only instead.

How a source scales when a bounding box is active depends on the type of
bounds being used.  You can set it to scale to the inner bounds, the
outer bounds, scale to bounds width only, scale to bounds height only,
and a setting to stretch to bounds (which forces a source to always draw
at the bounding box size rather than be affected by its internal size).
You can also set it to be used as a 'maximum' size, so that the source
doesn't necessarily get scaled unless it extends beyond the bounds.

Like in OBS1, objects will snap to the edges unless the control key is
pressed.  However, this will now happen even if the object is rotated or
oriented in any strange way.  Snapping will also occur when stretching
or changing the bounding box size.
2014-06-15 20:33:13 -07:00
jp9000 3fd6d83dfb UI: Remove unused variable 2014-06-07 06:07:21 -07:00
Jim 4eb6267372 Merge pull request #90 from antihax/master
Added simple volume meter for reference of input levels.
2014-06-03 05:15:18 -07:00
jp9000 ab1543977f UI: Add new volume meter handling
This adds support for the more smooth volume levels that accounts for
both level and magnitude.  Currently, it just averages level and
magnitude, later on a full audio meter control can be made that would
properly utilize level, magnitude, and peak.

Also cleaned up the code a bit and removed some trailing whitespace.
2014-06-03 04:51:27 -07:00
jp9000 d2ff9d5bf4 UI: Add 'win-dshow' plugin initialization
I really need to make this thing automatically search for plugins some
time.  I've got to admit it's kind of annoying.
2014-05-30 03:31:49 -07:00
jp9000 90f0bd6887 UI: Add support for buttons in properties view. 2014-05-30 02:44:14 -07:00
Danni 6d6bdfc038 Added simple volume meter. Updated per comments Pull Req #90
Missed a bit...
2014-05-24 20:18:28 -07:00
Danni 90d9a5204f Updated per comments pull #90. 2014-05-24 16:24:48 -07:00
BtbN ca7ba2e234 Add libfdk encoder 2014-05-23 00:06:28 +02:00
jp9000 68d40f13be Fix a few warnings on windows 2014-05-22 03:59:51 -07:00
jp9000 d536df30b0 Add dst_size parameter to character conv funcs
Character conversion functions did not previously ask for a maximum
buffer size for their 'dst' parameter, it's unsafe to assume some given
destination buffer may have enough size to accommodate a conversion.
2014-05-22 03:46:57 -07:00
jp9000 6578e2952b UI: Fix string conversion bug
Parameter two of os_wcs_to_utf8 is how many characters to convert, not
how big the buffer is.
2014-05-22 03:00:16 -07:00
jp9000 00086f0890 UI: Add FLV file output (sharing encoders)
Implement the 'file path' in output settings, and implement the 'start
recording' button, though for the time being I'm just going to make it
use a directory rather than allow custom file names.

This file output will actually share the video and audio encoder with
the stream.

I don't really know what to do about MP4 -- I don't really like the idea
of saving directly in the program, if you do and the program crashes,
that MP4 file is lost.  I'm contemplating making some sort of mp4 output
process stub.  So no MP4 file output for the time being.

If you need MP4, just remux it with FFmpeg:

ffmpeg -i flv_file.flv -acodec copy -vcodec copy mp4_file.mp4
2014-05-20 23:31:04 -07:00
jp9000 52ddee9755 UI: Add function to generate time/date filenames 2014-05-20 23:26:19 -07:00
jp9000 765ac2a76b UI: Add function to find default video save path
On windows this will return the documents\video directory, but on
linux/mac it'll just return $HOME for the time being because I don't
know if there really are any other appropriate adequate paths to use.
Perhaps someone else can be willing to fill this in if they wish.
2014-05-20 23:08:47 -07:00
Danni bc542a3e75 Added simple volume meter for reference of input levels. 2014-05-20 09:26:18 -05:00
BtbN 7b17f2e96b Update Qt5 usage in CMakeLists 2014-05-19 03:02:57 +02:00
jp9000 5ba8b09c9c Add help menu with log file uploading
Added github gist API uploading to the help menu to help make problems a
bit easier to debug in the future.  It's somewhat vital that this
functionality be implemented before any release in order to analyze any
given problem a user may be experiencing.
2014-05-18 17:44:10 -07:00