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.
The removeItemAction just for a keyboard shortcut was unnecessary.
Instead, use the toolbar button to associate a shortcut with, and remove
the removeItemAction object.
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.
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.
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.
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.
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.
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".
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.
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.
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.
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.
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.
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.
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.
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.
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