Add more details installation/compilation instructions for
Redhat-based distros, debian-based distros, Arch Linux, Gentoo, and
OpenSUSE distros
Fix incomplete Debian installation instructions, and separate out
instructions and package requirements that were specific to Debian-based
distros. Most of the instructions in the file were previously specific
only to Debian. Also added some brief instructions for an easy and
minimal FFmpeg installation.
In older versions of visual studio 2013 microsoft's WORTHLESS C compiler
has a bug where it will, almost at random, not be able to handle having
variables declared in the middle of a function and give the warning:
"illegal use of this type as an expression". It was fixed in recent
VS2013 updates, but I'm not about to force everyone to update to it.
Because a vec3 structure can contain a __m128 variable and not the
expected three floats x, y, and z, you must use vec3_set when
setting a value for a vec3 structure to ensure that it uses the proper
intrinsics internally if necessary.
This adds functions for piping a command line program's stdin or stdout.
Note however that this is unidirectional only.
This will be especially useful later on when implementing MP4 output,
because MP4 output has to be piped to prevent unexpected program
termination from corrupting the file.
There's a little too much junk in the CONTRIBUTING file. I feel like
it's unnecessary to say some of the things that were being said in
there. It really needs to be to the point
This replaces the code for volume control with a newer version that
uses the new fader implementation in order to control the fader/slider
position and source volume.
The volume label will now indicate the gain in dB instead of percent,
mainly because it looks cool and is easy to do.
Due to libobs saving the multiplier option for the source instead of
the slider/fader positon, existing volume levels will (mostly) stay
the same with only the slider beeing at a different position.
This is of course within the resolution of the slider (100 steps).
This adds a new library of audio control functions mainly for the use in
GUIS. For now it includes an implementation of a software fader that can
be attached to sources in order to easily control the volume.
The fader can translate between fader-position, volume in dB and
multiplier with a configurable mapping function.
Currently only a cubic mapping (mul = fader_pos ^ 3) is included, but
different mappings can easily be added.
Due to libobs saving/restoring the source volume from the multiplier,
the volume levels for existing source will stay the same, and live
changing of the mapping will work without changing the source volume.
This function greatly simplifies the use of effects by making it so you
can call this function in a simple loop. This reduces boilerplate and
makes drawing with effects much easier. The gs_effect_loop function
will now automatically handle all the functions required to do drawing.
---------------------
Before:
gs_technique_t *technique = gs_effect_get_technique("technique");
size_t passes = gs_technique_begin(technique);
for (size_t pass = 0; pass < passes; pass++) {
gs_technique_begin_pass(technique, pass);
[draw]
gs_technique_end_pass(technique);
}
gs_technique_end(technique);
---------------------
After:
while (gs_effect_loop(effect, "technique")) {
[draw]
}
If you look at the previous commits, you'll see I had added
obs_source_draw before. For custom drawn sources in particular, each
time obs_source_draw was called, it would restart the effect and its
passes for each draw call, which was not optimal. It should really use
the effect functions for that. I'll have to add a function to simplify
effect usage.
I also realized that including the color matrix parameters in
obs_source_draw made the function kind of messy to use; instead,
separating the color matrix stuff out to
obs_source_draw_set_color_matrix feels a lot more clean.
On top of that, having the ability to set the position would be nice to
have as well, rather than having to mess with the matrix stuff each
time, so I also added that for the sake of convenience.
obs_source_draw will draw a texture sprite, optionally of a specific
size and/or at a specific position, as well as optionally inverted. The
texture used will be set to the 'image' parameter of whatever effect is
currently active.
obs_source_draw_set_color_matrix will set the color matrix value if the
drawing requires color matrices. It will set the 'color_matrix',
'color_range_min', and 'color_range_max' parameters of whatever effect
is currently active.
Overall, these feel much more clean to use than the previous iteration.
This adds a property to the source properties which lets the user
specify the X server to capture from. Since this is probably something
thats only useful under certain circumstances it is implemented as
an advanced setting which is only shown when the corresponding option
for advanced settings is checked.
This moves the code to start/stop the capture to respectively named
function in order to clean up the update function.
This means that the capture is stopped/started whenever the settings are
changed. While this increases overhead for some settings, this will also
enable future settings that require a full restart of capture process.
This adds the screen id from the source properties to the source
struct and changes the geometry function to use that value instead
of requiring the settings object of the source.
On windows, carriage return characters are used along with line feed
characters. When the carriage return is used, it's rendered as a space.
This removes carriage returns from strings before rendering them via
freetype.
Doing this in the expression will cause it to execute the function every
time the expression is evaluated, which is needless cycles wasted.
Instead, call wcslen before the loops begin.
If FFmpeg's experimental aac encoder is used, this changes the cutoff
frequency to better values in order to try to help make up for the
inherent lack of encoder quality a bit. If FFmpeg is compiled to use
another encoder by default, these settings will not be applied.
This function simplifies drawing textures for sources in order to help
reduce boilerplate code. If a source is a custom drawn source, it will
automatically set up the effect to draw the sprite. If it's not a
custom drawn source, it will simply draw the sprite as per normal. If
the source uses a specific color matrix, it will also handle that as
well.
When the image data is copied into a texture with flipping set to true
each row has to be copied into the (height - row - 1)th row instead of
the row with the same number. Otherwise it will just create an unflipped
copy.
XComposite, which is currently our only capture method for windows,
doesn't handle X border width. This works in a lot of cases but anytime
there's a border, a bug occurs where the lower right is clipped. This
patch has two goals:
1) To position and size the capture texture correctly in accordance to
the border.
2) Adds a configuration option to allow people to toggle it (which in
most cases will simply do nothing) with a default of not including it.
Apparently the audio isn't guaranteed to start up past the first video
frame, so it would trigger that assert (which I'm glad I put in). I
didn't originally have this happen when I was testing because my audio
buffering was not at the default value and didn't trigger it to occur.
A blunder on my part, and once again a fine example of how you should
never make assumptions about possible code path.
Some applications defer loading OpenGL until after they are visible as
running applications, which causes SyphonInject to not install a server
on the first try (e.g. Minecraft does this)
In some cases the actual application (bundle identifier) would get
overwritten with a wrapper application bundle identifier when the
application names matched (this happened with e.g., Minecraft)