Commit Graph

997 Commits (8af2c168cf756679cc2790f155af36cfabeb1101)

Author SHA1 Message Date
Jess Mayo 132e58fb31 obs-outputs: Enable rtmp authentication
Authentication code has been updated as per the changes to support
multiple streams.

Authentication is now also enabled by default, and should be a no-op
if the server does not request authentication or username and password
details are not provided.
2015-07-07 19:55:35 -07:00
jp9000 fdcb27230c text-freetype2: Add translation for source name 2015-07-06 21:28:40 -07:00
CommanderRoot 740e0084a0 rtmp-services: Update recommended Youtube settings
Closes jp9000/obs-studio#439
2015-07-06 19:24:49 -07:00
jp9000 e30255fbee win-dshow: Log device info on update
Logs all device settings on update
2015-07-06 17:03:41 -07:00
jp9000 a9c769897d obs-x264: Add separator to logging 2015-07-06 17:03:41 -07:00
jp9000 5f75993882 obs-ffmpeg: Improve AAC logging
Adds a separator and uses better logging techniques
2015-07-06 17:03:40 -07:00
jp9000 f4d0da4e04 win-capture: Add direct hooking and use by default
I've come to realize that it's probably not wise to deviate from the
original version's functionality due to the fact that the original
version works without issues.  I'm wondering if some of the capture
problems have been due to the fact that the direct hook method (via
CreateRemoteThread) was removed, so I put it back in, made it default,
and added an option to use anti-cheat compatibility just like in the
original version.
2015-07-05 15:17:07 -07:00
jp9000 b0570c46c3 win-capture: Add inject library files
This is intended to separate the library injection code so that both the
inject helper process and the plugin itself can inject directly if they
wish.
2015-07-05 15:17:06 -07:00
Palana f3473901de coreaudio-encoder: Reduce log level for some non-fatal errors
This should reduce debug breaks due to LOG_ERROR on windows when running
with debugger attached
2015-07-05 08:52:38 +02:00
Palana f7ee1cf7f9 coreaudio-encoder: Add log level parameter to log_osstatus 2015-07-05 08:51:13 +02:00
Gol-D-Ace 7873d5b61a rtmp-services: Add recommended video bitrate for Livecoding.tv 2015-07-04 05:29:48 +02:00
Gol-D-Ace 3e742d13b7 rtmp-services: Add recommended video bitrate for Beam.pro 2015-07-04 04:12:11 +02:00
jp9000 d1e9b9d66a obs-ffmpeg: Fix potential integer overflows
This particularly affected audio encoding, audio encoding previously
would count samples and use it to create an encoding timestamp, but
because I was using a standard integer (which is 32bit by default on
x86), it would max out at about 0x7FFFFFFF samples, which is about 12
hours of samples at 48000 sample rate.  After that, it would start going
into negative territory (overflowing).  By changing it to int64_t, it
will make it so that audio at 48000 samples per second would only be
able to overflow after about..  6.09 million years.  In other words,
this should fix the issue for good.
2015-07-03 17:18:08 -07:00
jp9000 6f68d9eb97 UI: Add a couple new common services
Livecoding.tv (coding), gaminglive.tv (gaming), and beam.pro
(gaming/music)

I really don't see any problems with adding these particular services to
the local list while the actual remote ingest lookup code has yet to be
even started yet (as of this writing).  They seem to be harmless
services that are dedicated to specific types of content (stated above).
2015-07-03 16:22:53 -07:00
jp9000 a6aa2f9204 win-capture: Add 64bit bounce to func_hook
When hooking 64bit functions, sometimes the offset between the function
being hooked and the hook itself can be large enough to where it
requires a 64bit offset to be used.  However, because a 64bit jump
requires overwriting so many code instructions in the function, it can
sometimes overwrite code in to an adjacent function, thereby causing a
crash.

The 64bit hook bounce (created by R1CH) is designed to prevent using
very long jumps in the target by creating executable memory within a
32bit offset of that target, and then writing it with the 64bit long
jump instruction instead.  Then in the target function, it will jump to
that memory instead, thus forcing the actual hooked function to use a
32bit hook instead of a 64bit hook, and using at most 5 bytes for the
actual hook, preventing any likelihood of it overwriting an adjacent
function.
2015-07-03 12:17:25 -07:00
Palana 7766f5a42f coreaudio-encoder: Register get_properties 2015-07-02 10:05:31 +02:00
Palana 61dd42565c coreaudio-encoder: Add missing da_free call
Fortunately this didn't actually leak memory since the function was
never called
2015-07-02 10:05:20 +02:00
jp9000 ae733230b7 decklink: Use audio/video timestamps from SDK
System timestamps were being used instead of timestamps from the
audio/video input.  This would cause potential desync as well as
incremental buffering when using devices with the blackmagic video
source.  Using the timestamps direct from the SDK itself fixes those
issues, and causes audio/video to play back properly and in sync.
2015-07-01 20:03:10 -07:00
jp9000 f8c5c7f55f obs-filters: Add gain filter
This filter simply modifies the volume of the signal as a convenient way
of modifying the volume before other filters, or amplify the volume
without having to mess with advanced audio properties.
2015-06-26 06:11:54 -07:00
jp9000 8bb84cdb3b obs-filters: Use audio-math.h for db conversions 2015-06-26 03:40:29 -07:00
jp9000 204d5f30ce obs-filters: Remove fminf/fmaxf redefinitions
These functions are already defined in math.h, so there's no need to
define them again.
2015-06-26 03:03:15 -07:00
jp9000 07ca99f523 obs-filters: Change 'db' abbreviation to 'dB' 2015-06-25 23:28:26 -07:00
jp9000 cc45b92a8e obs-filters: Add noise gate filter 2015-06-25 15:55:28 -07:00
Palana e45f9f1b9a coreaudio-encoder: Use HE-AAC for low bitrates 2015-06-25 21:16:15 +02:00
Palana eb6aa9ba47 coreaudio-encoder: Add format id to string helper 2015-06-25 21:16:15 +02:00
Palana ca15e71129 coreaudio-encoder: Add missing format ids for windows 2015-06-25 21:16:15 +02:00
Palana 0d12ffb559 coreaudio-encoder: Extract encoder creation 2015-06-25 21:16:15 +02:00
Palana 7a430000fc coreaudio-encoder: Fix low bitrate sound (≤64 kbit/s) 2015-06-25 21:16:15 +02:00
jp9000 9048743ebe obs-ffmpeg: Add ffmpeg muxer
In addition to the flv file format, this allows the ability to save to
container formats such as mp4, ts, mkv, and any other containers that
support the current codecs being used.

It pipes the encoded data to the ffmpeg-mux process, which then safely
muxes the file from the encoded data.  If the main program unexpectedly
terminates, the ffmpeg-mux piped program will safely close the file and
write trailer data, preventing file corruption.
2015-06-21 22:34:49 -07:00
jp9000 33a040b025 obs-ffmpeg: Add ffmpeg muxer pipe program 2015-06-21 22:34:49 -07:00
jp9000 ecabe35f36 obs-filters: Add scroll filter 2015-06-21 01:21:22 -07:00
jp9000 eab60e04d9 obs-filters: Make crop shader wrap texture
This is mostly so that it can be used with the scroll filter, which uses
identical shaders, but needs to wrap the texture instead of clamp.
2015-06-21 01:12:02 -07:00
Night f62b659d45 rtmp-services: Update Twitch ingests
You should really auto-update these lists from Twitch API.

Closes jp9000/obs-studio#440
2015-06-20 01:39:33 -07:00
Gol-D-Ace c0610b0119 rtmp-services: Update twitch.tv ingests 2015-06-12 05:37:23 +02:00
jp9000 4d75c888a3 obs-ffmpeg: Use timestamps from video/audio frames
Instead of using system timestamps for playback, use the timestamps
directly from the video/audio data to ensure all the data is synced up
using the obs_source back-end.

I think the original misconception when this was written was that OBS
would not handle timestamp resets/loops, which isn't the case; it will
actually handle all timestamp resets and abnormalities.  It's always
best to use the obs_source back-end for all playback and syncing.
2015-06-10 09:44:25 -07:00
Palana f02db95d07 coreaudio-encoder: Fix input buffer freeing in complex_input_data_proc
When the bitrate was set to 64 CoreAudio would call
complex_input_data_proc more than once, which in turn would cause
consumed bytes in the input buffer to be "freed" more than once (once
for every additional call of complex_input_data_proc and once in
aac_encode)
2015-06-07 05:33:12 +02:00
Palana 897fbcfe1c coreaudio-encoder: Make encoder available on windows 2015-06-07 04:22:24 +02:00
Palana df44e5c0ed Add CoreAudio AAC encoder 2015-06-07 04:22:24 +02:00
jp9000 5492c02e0b win-dshow: Add audio output mode options
This allows the ability to output the audio of the device as desktop
audio (via the WaveOut or DirectSound audio renderers) instead of
capturing the audio only.

In the future, we'll implement audio monitoring which will make this
feature obsolete, but for the time being I decided to add this option as
a temporary measure to allow users to play the audio from their devices
via the DirectShow output.
2015-06-05 10:49:50 -07:00
jp9000 c237638fb5 win-dshow: Update libdshowcapture to 0.5.3 2015-06-05 10:49:08 -07:00
Bl00drav3n ba4ac47ee3 win-capture: Modify 16bit to 32bit color conversion to use SSE 2015-06-04 22:23:50 +02:00
Radzaquiel 244ed30b06 rtmp-services: update Hitbox ingest servers list
Modified: Asia
2015-06-02 16:41:34 +02:00
Palana 78ad3ec132 text-freetype2: Fix undefined behavior for alpha > 127
Found via UBSan, actual (sample) error:
"plugins/text-freetype2/text-functionality.c:284:26: runtime error: left
shift of 194 by 24 places cannot be represented in type 'int'"
2015-05-31 04:45:40 +02:00
Palana 41c32fd6b6 mac-avcapture: Fix NSString being initialized with NULL
Calling [NSString stringWithUTF8String:] with NULL causes it to raise an
exception: +[NSString stringWithUTF8String:]: NULL cString
2015-05-31 04:43:23 +02:00
jp9000 08e288c1ae win-dshow: Update libdshowcapture to 0.5.2 2015-05-18 12:33:33 -07:00
jp9000 aafd114e67 Add latest translations from Crowdin 2015-05-12 15:29:43 -07:00
dodgepong d0fbe3b382 Add latest translations from CrowdIn 2015-05-08 17:10:39 -04:00
fryshorts 64fae808d6 linux-jack: Add include directory to cmake
Add the include directories found by cmake to the jack plugin.
This allows for the plugin to compile when the jack headers were
found in a directory that is not normally in the search path of the
compiler (e.g. /usr/local/include)
2015-05-04 22:37:17 +02:00
fryshorts 4bdb45a8ac linux-v4l2: Add include directory to cmake
Add the include directories found by cmake to the v4l2 plugin.
This allows for the plugin to compile when the vl42 headers were
found in a directory that is not normally in the search path of the
compiler (e.g. /usr/local/include)
2015-05-04 22:37:17 +02:00
fryshorts 5983b506e9 linux-pulseaudio: Add include directory to cmake
Add the include directories found by cmake to the pulseaudio plugin.
This allows for the plugin to compile when the pulseaudio headers were
found in a directory that is not normally in the search path of the
compiler (e.g. /usr/local/include)
2015-05-04 22:37:17 +02:00
Kris Moore cef95722f9 linux-v4l2: Fix device enumeration on FreeBSD
Add platform specific code to enumerate v4l2 devices on FreeBSD.
2015-05-04 22:37:17 +02:00
Kris Moore 88abdf7e51 cmake: Enable plugins on FreeBSD
Add a list of plugins to cmake that should be build when on FreeBSD.
2015-05-04 22:37:17 +02:00
fryshorts 4497ab31c2 linux-v4l2: Fix build errors for older api
Fix build errors for older versions of the api where
VIDIOC_ENUM_DV_TIMINGS was defined but V4L2_IN_CAP_DV_TIMINGS was not.
I was under the impression that they were added at the same time, but
apparently i was wrong there.

Thanks to kmoore@FreeBSD.org for spotting this on FreeBSD.
2015-05-02 15:05:38 +02:00
jp9000 5d75d88ccd win-capture: Fix compatibility bug for window cap.
The compatibility mode setting wasn't being set when an update occurred.
2015-05-01 02:07:19 -07:00
jp9000 6e98fb89f4 obs-filters: Add sharpen filter 2015-05-01 02:07:18 -07:00
kc5nra 5b97cfbbdd obs-ffmpeg: Only set codec ids if format non-null
In the settings if you select default container then the
format becomes null.  If null then audio/video codec ids should
not be set on the output format as they will both be
AV_CODEC_ID_NONE causing a context with no streams specified
to be created (error).
2015-04-26 17:31:21 -05:00
fryshorts 4bf7a7b61e linux-v4l2: Replace custom udev callbacks
Use the signal system provided by obs instead of the custom callback
implementation. This reduces the amount of code and complexity.
2015-04-23 21:50:36 +02:00
fryshorts 34c3be43d1 linux-v4l2: Fix build when missing ENUM_DV_TIMINGS
Add compatibility with older versions of the api by not failing to
build when the VIDIOC_ENUM_DV_TIMINGS is missing. In older versions
of the api there was a different system to get dv-timing presets, which
was replaced by the current enumeration system with Linux 3.4.
This will allow for the plugin to be built against older versions of the
api by disabling the enumeration support, thus reducing the
functionality for some devices.
2015-04-22 20:09:18 +02:00
fryshorts 85518e7cca linux-v4l2: Fix build when missing CAP_DEVICE_CAPS
Improve compatibility with older versions of the api by not requiring
V4L2_CAP_DEVICE_CAPS. If we don't have this, we fall back to using the
capabilities member for the whole device instead of the device_caps
member for the currently selected subdevice. Just like we would do if
the device would not support this.
The new device_caps field was introduced with Linux 3.3.
2015-04-22 20:07:35 +02:00
fryshorts 161552beb8 linux-v4l2: Fix compile error for missing formats
Add ifdefs around the video format definitions in order to allow for
compilation with older kernel headers that don't yet have those defined.
2015-04-20 20:53:30 +02:00
fryshorts 3f4174a8c0 linux-v4l2: Add additional video formats
Add BGRX and BGRA as supported video formats, since obs can handle them
directly. I unfortunately missed those when i initially wrote this
mapping due to my webcam not offering those formats.
2015-04-20 20:09:14 +02:00
jp9000 63b3cfb5b2 obs-outputs: Reset frame drop variables on start
These variables should be reset when a stream is restarted.
2015-04-18 00:47:00 -07:00
jp9000 c33384fe7a obs-ffmpeg: Add support for YUV 4:4:4
Add support for YUV 4:4:4 output (if supported by the encoder currently
in use by FFmpeg)
2015-04-18 00:03:14 -07:00
jp9000 62b2d60580 obs-x264: Call video info func to get format
Call the video information function to determine the video format that
needs to be used to prevent having to use the same code in the update
function.
2015-04-17 20:17:45 -07:00
jp9000 f7f79cc689 obs-x264: Add support for YUV 4:4:4 encoding 2015-04-17 20:17:44 -07:00
jp9000 4d002f588b (API Change) Remove encoder callback boilerplate
API Changed (in struct obs_encoder_info):
----------------------------------------
bool (*get_audio_info)(void *data, struct audio_convert_info *info);
bool (*get_video_info)(void *data, struct video_scale_info *info);

To:
----------------------------------------
void (*get_audio_info)(void *data, struct audio_convert_info *info);
void (*get_video_info)(void *data, struct video_scale_info *info);

The encoder video/audio information callbacks no longer need to manually
query the libobs video/audio information, that information is now passed
via the parameter, which the callbacks can modify.

The refactor that reduces boilerplate in the encoder video/audio
information callbacks also removes the need for their return values, so
change the return types to void.
2015-04-17 20:17:43 -07:00
jp9000 908a165d62 Add planar YUV 4:4:4 format support
Adds the ability to natively output with planar YUV 4:4:4.
2015-04-17 20:16:40 -07:00
GoaLitiuM d23c217237 win-wasapi: Fix capture during silence 2015-04-15 19:42:37 +03:00
jp9000 13051da0e8 win-dshow: Add option to allow vertical flip
I'm putting this option in due to the fact that there are legitimate
cases where a device may flip the output unexpectedly (such as the
Datapath VisionDVI-DL running in RGB video format), and that a user may
want to be able to view the source in a projector or source properties
without the image being inverted.

My original line of thinking was that they can just use a transform to
flip the image, but I felt this problem impacts rendering everywhere,
such as in the projector and in the source properties, so having it as
an option in the source itself feels like the best way to ensure that a
user can get it to render everywhere properly.
2015-04-13 15:13:45 -07:00
vividnightmare f29f286402 obs-ffmpeg: Only set x264 opts if actually x264
Check the actual name of the codec before applying an x264-specific
preset so we don't encounter an "Invalid argument" error when using
other h264 encoders in FFmpeg (such as NVEnc).

Closes jp9000/obs-studio#412
2015-04-11 06:06:04 -07:00
Jim 3fb00756c1 Merge pull request #413 from fryshorts/doc-fixes
Documentation fixes
2015-04-11 05:45:18 -07:00
Palana a5f78e6f92 win-dshow: Update libdshowcapture to 0.5.0
Changes:
- Prevent concurrent calls to EnumDevices (resolves a crash with
  some device filters (like the XCAPTURE-1) with multiple active
  dshow sources)
2015-04-10 22:33:43 +02:00
jp9000 d18a164c78 win-dshow: Update libdshowcapture to 0.4.4
Adds the following changes:
- Prioritize YUV formats over non-YUV formats for performance and to
  prevent intermediary filters
- Directly connect filters when possible to avoid intermediary filters
2015-04-10 07:27:31 -07:00
jp9000 21deb26557 win-dshow: Ensure autoselected FPS updates formats
Fix an issue where if the FPS property is set to "Match Output FPS" it
will not show all the available video formats.
2015-04-10 07:27:30 -07:00
jp9000 75bc7d3153 win-wasapi: Fix timeout bug
The WaitForSignal message is supposed to return return true if the
handle was signaled, not if the wait timed out.
2015-04-10 07:27:29 -07:00
jp9000 1143b1d631 win-wasapi: Prevent repeating connect fail message
Fixes an issue where if the device can't be connected, it will
continually repeat the connection failure message.
2015-04-10 07:27:29 -07:00
jp9000 f3069e3ea5 text-freetype2: Prevent potential null dereference 2015-04-10 07:27:28 -07:00
jp9000 0e2a5d2de2 obs-outputs: Do not drop I-frames
When frames were dropped, it would also drop I-frames, which can mess
with the keyframe calculation of certain services that depend on
I-frames in their output protocol (such as HLS).
2015-04-10 07:27:27 -07:00
fryshorts cee8c6efa6 linux-capture: Fix documentation
Fix argument name in the documentation to match the code.
2015-04-08 23:02:58 +02:00
fryshorts 9734c6a49d linux-v4l2: Fix documentation
Change argument name in documentation to match the code.
2015-04-08 23:02:58 +02:00
fryshorts 707047a31e linux-v4l2: Fix documentation
Remove argument in documentation that does not exist in the code.
2015-04-08 23:02:58 +02:00
Jim 8b472dc3a0 Merge pull request #408 from flibitijibibo/master
Buildfix for older FFmpeg versions (F20 RPMFusion)
2015-04-05 18:20:05 -07:00
jp9000 35a4acede0 mac-capture: Get cursor visible setting on create
When display capture is created, the hide_cursor variable is not
initialized, so just initialize it to the setting in the create
function.
2015-04-02 17:48:22 -07:00
jp9000 a892fa9e33 mac-capture: Fix display capture cursor bug
The kCGDisplayStreamShowCursor option used with the dictionary does not
work if you assign @true or @false to it.  After some testing, it needs
to point to the id cast of either kCFBooleanTrue or kCFBooleanFalse in
order for it to work properly.

If it doesn't use either of those values, the display stream seems to
use its internal default, which on 10.8 and 10.9 is visible, and 10.10+
is invisible, which would explain why people on 10.10 couldn't get the
cursor to capture.
2015-04-02 17:47:53 -07:00
Ethan Lee fd4f2e29aa Buildfix for older FFmpeg versions (F20 RPMFusion) 2015-04-01 06:50:22 -04:00
kc5nra f04be51947 obs-ffmpeg: Set channel layout to avoid warning 2015-03-30 17:58:44 -05:00
kc5nra aa82340a1e obs-ffmpeg: Set stream time_base to avoid warnings 2015-03-30 17:58:44 -05:00
kc5nra c53f8cbed8 obs-ffmpeg: Add format and codec id support
Allow specification of specific codec ids and container
format to muxing.
2015-03-30 17:58:37 -05:00
John Bradley 4c570826c2 obs-ffmpeg: Workaround for a64 encoder bug
the Commodore A64 codecs seem to deref the video frame
too many times causing a crash.  For now just skip if this
codec.
2015-03-30 17:30:38 -05:00
kc5nra f128283655 obs-ffmpeg: Fix outputs without both video/audio
Fixes a crash in formats that don't support both video and audio
streams.
2015-03-30 17:30:38 -05:00
John Bradley fc596f6141 obs-ffmpeg: Fix spurious bad channel layout
Some formats (like WMV) would send out audio packets that
had channels set but did not specify a channel layout.
Solution is to no longer rely on channel layout to get the
channels and just get the channel count directly off the
FFmpeg audio frame.
2015-03-30 10:59:59 -05:00
Jim 1ab1a97b30 Merge pull request #404 from dodgepong/latest-crowdin-translations
UI: Add latest translations from CrowdIn
2015-03-25 18:03:26 -07:00
dodgepong a04548070c UI: Add latest translations from CrowdIn 2015-03-25 20:51:25 -04:00
Jim fc5d335cb6 Merge pull request #403 from Gol-D-Ace/ingest-servers-Vaughn-Live-iNSTAGIB
rtmp-services: Update Vaughn Live / iNSTAGIB.tv ingests
2015-03-25 17:43:18 -07:00
John Bradley 54fdd6555e mac-syphon: Fix NSURL selector compatibility 10.8
Use NSURL path.fileSystemRepresentation to be
compatibile with the 10.8 SDK. This appears to be
a convenience selector and should operate the same.
2015-03-25 19:01:47 -05:00
jp9000 96353332f3 win-capture: Fix game capture acquiring issue
If capture starts too quickly, the file mapping will return 2, which
means file not found, and it would then reset the capture and try again.
Sometimes this would result in long intervals where it wouldn't capture.
This fixes the issue by simply making game capture retry if file mapping
returns error number 2.
2015-03-25 14:14:43 -07:00
jp9000 2f6ba39b41 obs-filters: Add color key filter
Masks out a specific color range in RGB color space.  Commonly used with
solid image data or animated video rather than live video.
2015-03-25 14:14:39 -07:00
jp9000 adb392e08a obs-filters: Add chroma key filter
This allows applying a mask based upon the chroma value (U/V) of a
specific color in YUV color space.  Commonly used to mask out
greenscreens and bluescreens in live video.
2015-03-25 14:14:38 -07:00
jp9000 bee5b3a2d2 obs-filters: Add color correction filter
Adds a color correction filter if one wishes to just apply
gamma/constrast/brightness/opacity/color to a source.
2015-03-25 14:12:05 -07:00
jp9000 bd1ede883d obs-filters: Add crop filter
Allows any source to be cropped, though note that this renders to
texture first, so for more optimal results, cropping values should
probably be put in to capture sources that can be cropped as they're
actually rendered by the source.
2015-03-25 14:12:05 -07:00
jp9000 9138766620 obs-filters: Add mask/blend filter
This filter allows the ability to use a texture to modify the video
output of a source, the ability to:
- apply a color-based mask (dark = transparent, light = opaque)
- apply a mask based upon the alpha of an image
- blend an image via subtraction, addition, or multiplication
2015-03-25 14:12:04 -07:00
jp9000 55534d5d8d obs-filters: Add async delay filter
Adds a filter for delaying asynchronous video/audio data, for example
from webcams, video devices, or media playback sources.  Mainly intended
to allow users to sync up their webcams to other devices.
2015-03-25 14:12:03 -07:00
Gol-D-Ace f374c7198e rtmp-services: Update Vaughn Live / iNSTAGIB.tv ingests 2015-03-24 21:37:25 +01:00
kc5nra 946b9d01e3 obs-ffmpeg: Clearer meaning for ClearMediaOnEnd 2015-03-24 07:25:57 -05:00
kc5nra dd2d6494a1 obs-ffmpeg: Add clear on media end option
Clears source video when the media stream ends.
2015-03-24 00:21:24 -05:00
kc5nra c7ad555eae obs-ffmpeg: Handle null frames in frame callbacks
This is in preparation of an API change that will send null
frames to signal the end of the media being played.
2015-03-24 00:16:35 -05:00
kc5nra b091b03291 obs-ffmpeg: Split definition and assignment 2015-03-24 00:12:10 -05:00
kc5nra 54baa1a369 obs-ffmpeg: Change from sws_* cacheing to our own
Since sws_getCachedContext possibly logs a message every
time it is used (depending on the input), use our own caching
logic to minimize log spam.
2015-03-23 22:14:42 -05:00
jp9000 2e1eb4d7eb decklink: Fix log message 2015-03-22 20:54:18 -07:00
jp9000 716ef61cf9 decklink: Don't use error log if not supported
Using LOG_ERROR here isn't really necessary, it just means that there's
no blackmagic support.
2015-03-22 19:18:20 -07:00
jp9000 2d5c6dfae9 win-capture: Rename 'Monitor' to 'Display' capture
The name 'Monitor' is a bit inconsistent with what it's called by the
operating system.
2015-03-22 19:18:18 -07:00
jp9000 5247434d14 win-dshow: Change avermedia encoder names 2015-03-22 19:18:17 -07:00
jp9000 24053f4a9c win-dshow: Fix bad settings causing frozen video
If the settings are reset to defaults or if the settings are just bad,
the video would get stuck on the last frame that was displayed, which
feels a bit awkward.  Best to make it stop video output entirely rather
than get stuck on the last video frame.
2015-03-22 19:18:16 -07:00
jp9000 d5631dd1f8 win-dshow: Make devices active by default
Having devices not active by default may cause confusion for some users.
2015-03-22 19:18:16 -07:00
jp9000 f3104d92d5 mac-capture: If channels above 8, force to stereo
Certain devices (particularly certain mixers and soundflower 64ch) would
have an arbitrary number of channels, and wouldn't really be mappable to
a specific speaker layout supported by libobs.

So to fix this issue, if the channel count is above 8, force the data to
stereo to ensure playback can still occur, rather than cause it to just
fail.
2015-03-22 19:18:08 -07:00
jp9000 e20ec366b2 Make capture sources w/o alpha use opaque effect
This fixes an issue primarily with filter rendering: when capturing
windows and displays, their alpha channel is almost always 0, causing
the image to be completely invisible unintentionally.  The original fix
for this for many sources was just to turn off the blending, which would
be fine if you're not rendering any filters, but filters will render to
render targets first, and that lack of alpha will end up carrying over
in to the final image.

This doesn't apply to any mac captures because mac actually seems to set
the alpha channel to 1.
2015-03-22 19:18:05 -07:00
jp9000 233004631f linux-capture: Mark captures as custom drawn
The linux window and monitor captures draw in a custom way, therefore
they must be marked as types of sources that do custom rendering.
2015-03-22 18:38:49 -07:00
Jim 23bb999470 Merge pull request #376 from SkylerLipthay/feat/blackmagic-decklink-plugin
Blackmagic DeckLink plugin
2015-03-21 19:22:04 -07:00
Skyler Lipthay dd739d1e49 decklink: Add Windows DeckLink project
The code specific to Windows: helps convert `BSTR` instances to
`std::string`s; provides a Windows COM-specific implementation of
`CreateDeckLinkDiscoveryInstance`; aliases CFUUIDGetUUIDBytes,
CFUUIDBytes, and IUnknownUUID (the Linux SDK does this, but for some
reason the Windows SDK does not).
2015-03-21 16:43:16 -07:00
Skyler Lipthay b959f56291 decklink: Add Windows DeckLink SDK
Some changes were made to the stock DeckLink SDK: removed all references
to legacy API headers in DeckLinkAPI.idl; removed all instances of
`importlib("stdole2.tlb");`.
2015-03-21 16:43:00 -07:00
Skyler Lipthay 70f8369ae3 decklink: Add Linux DeckLink project
The code specific to Linux helps convert `const char *` instances to
`std::string`s.
2015-03-21 16:42:59 -07:00
Skyler Lipthay c9ff86dd01 decklink: Add Linux DeckLink SDK 2015-03-21 16:42:42 -07:00
Skyler Lipthay 496031e8c8 decklink: Add Mac DeckLink project
The code specific to Mac OS X helps convert `CFString` instances to
`std::string`s.
2015-03-21 16:42:40 -07:00
Skyler Lipthay fd83f5c85f decklink: Add Mac DeckLink SDK 2015-03-21 16:40:15 -07:00
Skyler Lipthay 4225fa8eee decklink: Add Blackmagic DeckLink capture plugin
This is a cross-platform Blackmagic device capture plugin that makes use
of the manufacturer provided DeckLink SDK.
2015-03-21 16:40:05 -07:00
Jim caa4e36704 Merge pull request #402 from Radzaquiel/patch-3
Update hitbox.tv ingest servers list
2015-03-21 09:51:37 -07:00
John Bradley d69f03c6a5 obs-ffmpeg: Use deferred update flag for properties 2015-03-19 16:02:24 -05:00
John Bradley c539c16ecc obs-ffmpeg: Instead of failing with unsupported CS, use default 2015-03-19 14:40:24 -05:00
John Bradley 52aae96f74 obs-ffmpeg: Add alias of CS601 support 2015-03-19 14:40:24 -05:00
John Bradley 17f8e3c58b obs-ffmpeg: Add frame drop controls to the ffmpeg source UI 2015-03-19 14:40:24 -05:00
Radzaquiel 3e1a521acb Update hitbox.tv ingest servers list
Added: US-West (San Francisco)
2015-03-19 11:18:52 +01:00
Radzaquiel 57c5c5ee52 Update hitbox.tv ingest servers list
Added: EU-South
2015-03-18 21:32:38 +01:00
Jim b4bca874b4 Merge pull request #400 from Gol-D-Ace/GoodGame.ru-ingests
rtmp-services: Update GoodGame.ru ingests
2015-03-16 15:26:48 -07:00
Gol-D-Ace 3421112ac9 rtmp-services: Update GoodGame.ru ingests 2015-03-16 23:14:43 +01:00
jp9000 9832a760b8 (API Change) Always use planar float audio output
Core API functions changed:
-----------------------------
EXPORT bool obs_reset_audio(struct audio_output_info *aoi);
EXPORT bool obs_get_audio_info(struct audio_output_info *aoi);

To:
-----------------------------
EXPORT bool obs_reset_audio(const struct obs_audio_info *oai);
EXPORT bool obs_get_audio_info(struct obs_audio_info *oai);

Core structure added:
-----------------------------
struct obs_audio_info {
	uint32_t            samples_per_sec;
	enum speaker_layout speakers;
	uint64_t            buffer_ms;
};

Non-interleaved (planar) floating point output is standard with audio
filtering, so to prevent audio filters from having to worry about
different audio format implementations and for the sake consistency
between user interfaces, make it so that audio is always set to
non-interleaved floating point output.
2015-03-12 22:22:02 -07:00
Gol-D-Ace a4b8114cab rtmp-services: Update Twitch Singapore ingest 2015-03-12 15:40:45 +01:00
John Bradley f23d958122 obs-ffmpeg: Cache picture buffer in the same way as sws context 2015-03-10 14:37:28 -05:00
John Bradley baea0f583a obs-ffmpeg: Remove extra curly braces 2015-03-10 14:34:37 -05:00
John Bradley a73c15ae16 obs-ffmpeg: Fix bug where update_sws_context result not checked 2015-03-10 14:33:21 -05:00
John Bradley e13bb8f479 obs-ffmpeg: Cache swscale context during frame callback
Some codecs don't report the correct dimensions until the first
frame is rendered.
2015-03-10 12:53:17 -05:00
John Bradley 0e944735e0 obs-ffmpeg: Fix error fetching properties from wrong pointer 2015-03-10 12:25:24 -05:00
Jim eb7d631694 Merge pull request #394 from kc5nra/ffmpeg-source-plugin
Ffmpeg source plugin
2015-03-09 19:41:59 -07:00
John Bradley 2fc6c4d725 obs-ffmpeg: Add FFMpeg input source 2015-03-09 21:22:32 -05:00
John Bradley 8a32345071 obs-ffmpeg: Add FFmpeg format -> obs format func 2015-03-09 21:22:32 -05:00
jp9000 b03eae57c6 (API Change) Fix "apply service settings" functions
API changed from:
------------------------
EXPORT void obs_service_apply_encoder_settings(obs_service_t *service,
		obs_encoder_t *video_encoder,
		obs_encoder_t *audio_encoder);

void obs_service_info::apply_encoder_settings(void *data
			obs_encoder_t *video_encoder,
			obs_encoder_t *audio_encoder);

To:
------------------------
EXPORT void obs_service_apply_encoder_settings(obs_service_t *service,
		obs_data_t *video_encoder_settings,
		obs_data_t *audio_encoder_settings);

void obs_service_info::apply_encoder_settings(void *data
			obs_data_t *video_encoder_settings,
			obs_data_t *audio_encoder_settings);

These changes make it so that instead of an encoder potentially being
updated more than once with different settings, that these functions
will be called for the specific settings being used, and the settings
will be updated according to what's required by the service.

This fixes that design flaw and ensures that there's no case where
obs_encoder_update is called where the settings might not have
service-specific settings applied.
2015-03-07 16:32:00 -08:00
jp9000 56f4dd5359 obs-outputs: Fix bug (headers not always sent)
If a disconnection occurs, the sent_headers would still be set to true,
and when a reconnect occurs, it would not send the headers again.
2015-03-07 10:11:18 -08:00
Christoph Hohmann c6008316e2 image-source: Add option (unload when not showing)
If this option is on, the image will unload when the image isn't
displayed anywhere, and then reload it when it's displayed again to
reduce the amount of memory images take up on VRAM at any given time.
If this option is off, then it's always loaded in VRAM regardless of
whether it's displayed or not.

Closes Pull Request #380

(edited by Jim)
2015-03-05 00:21:36 -08:00
Christoph Hohmann 52ff7b9734 image-source: Add a macro for logging info messages 2015-03-05 00:21:35 -08:00
jp9000 c5b8c744ed rtmp-services: Remove hitbox Vienna at request
Apparently it's not meant to be used quite yet.
2015-03-04 23:49:12 -08:00
Jim f0370f556a Merge pull request #395 from fryshorts/v4l2-buffering
linux-v4l2: Replace system timing option
2015-03-04 23:25:12 -08:00
fryshorts cdbf193e2e linux-v4l2: Add buffering option
Add a source property to enable buffering of frames, which is enabled by
default. This replaces the old "Use system timing" option by setting the
unbuffered source flag instead of using different timestamps.
While similar in intentions to the old option, this method should reduce
latency even more.
2015-03-04 21:21:22 +01:00
fryshorts c0f47c7efd linux-v4l2: Remove the system timing option
Remove the system timing property and code-path.
2015-03-04 21:01:18 +01:00
Radzaquiel d40e459e5c Update hitbox.tv ingest servers list
(Updated from Hitbox API)
Added: EU-West (Paris), US-East (New York)
2015-03-03 21:28:29 +01:00
Manuel Kroeber 8a55f3bda7 text-freetype2: Fix bug 0000151
Fix bug 0000151: File loading not properly handled.

Link to bug: https://obsproject.com/mantis/view.php?id=151

A newly selected font is not loaded properly if "read from file" is
active without a valid file.  Old error handling lead to random memory
being displayed.

Closes Pull Request #390

(message edited by Jim)
2015-03-01 23:39:13 -08:00
Skyler Lipthay 7d3eedbcb0 mac-avcapture: Default to unbuffered video capture
By default, video plays back based upon the timestamp for each frame,
and buffers the frames as needed to ensure that they play back at the
expected timing.

However, this can add some minor additional delay to the video, and may
not be ideal for certain devices such as webcams and generally any
device that has minimal latency.  However, because those are the only
type of devices that typically have drivers, there's no real need to
have it on by default.

This adds an option to use buffering, and leaves it off by default.

Closes pull request #384

(message added by jim)
2015-03-01 23:18:56 -08:00
fryshorts 6b95b2ccf7 linux-v4l2: Improve logging of pixel format
Use the macro from the mac capture plugin to convert the fourcc integer
value to a string. This makes the debug statement for the pixel format
slightly more readable for the casual developer.
2015-03-01 18:53:51 +01:00
fryshorts 7905197b7c linux-v4l2: Remove "Leave Unchanged" option
Remove the "Leave Unchanged" option for the input and video format
select.

This option was primarily added for cases in which the
resolution and framerate are set by another program or the capture
device itself and the values are not directly supported by the plugin.
One major usecase here would be capture devices for tv signals which
might be set to a spcific resolution and refresh rate, and might fail
to initialize in case any other combination of those settings is forced.

In case of the input this option did not make much sense, as the first
input is probably the best default option in most cases.

For the video format this default is even bad in some cases. If an
format emulated by libv4l2 is selected for example, this will usually
configure the device to use mjpeg with libv4l2 converting it to some
format obs can use. When obs or the source is then restarted and the
"Leave Unchanged" is enabled the plugin will fail, because it will only
notice that the device is set to mjpeg, without any knowledge about the
possibility of letting libv4l2 handle the conversion.

Using the first available and supported format is not nescessarily the
best choice, but still preferable to some random format that will
cause the plugin to not capture at all. Forcing a choice here will
hopefully also make the plugin behaviour more predicatable for the user.
2015-03-01 18:53:51 +01:00
Radzaquiel b86af28380 linux-v4l2: Fix string for translation
Changed "ImageFormat" for "VideoFormat"
(checked in v4l2-input.c)
2015-02-27 00:52:17 +01:00
fryshorts 1c0df043fa linux-v4l2: Use dv timing property in source
Use the dv timing selected in the source properties to configure the
device instead of resolution/framerate.
2015-02-24 23:32:46 +01:00
fryshorts 99b6a018cc linux-v4l2: Add helper function to set dv timing
Add a helper function to set the dv timing for the input.
2015-02-24 23:32:46 +01:00
fryshorts bcf8400137 linux-v4l2: Show dv timings when supported
Show the dv timing property when the selected input supports it.
2015-02-24 23:32:46 +01:00
fryshorts 5d317920f1 linux-v4l2: Add dv timing property
Add the dv timing property and hide it by default.
2015-02-24 23:32:46 +01:00
fryshorts bf27d4c1cb linux-v4l2: Add function to list dv timings
Add a helper function to enumerate dv timings supported by the
selected input and add them to a property.
2015-02-24 23:32:46 +01:00
fryshorts 0a6cf208f1 linux-v4l2: Add helper function to get dv timings
Add a helper function to get a dv timing by index for the input.
2015-02-24 23:32:46 +01:00
fryshorts f38347acc6 linux-v4l2: Use video standard property in source
Use the video standard selected in the source properties to configure
the device instead of resolution/framerate.
2015-02-23 21:27:08 +01:00
fryshorts 7dc9069c1b linux-v4l2: Add helper function for video standard
Add a helper function to get/set the video standard for the input.
2015-02-23 21:27:08 +01:00
fryshorts a9df1d921a linux-v4l2: Use input caps for properties
Use the capabilities for the selected input to decide which properties
are enumerated and displayed.
2015-02-23 21:27:08 +01:00
fryshorts bab2aa24d5 linux-v4l2: Add video standard property
Add the video standard property and hide it by default.
2015-02-23 20:34:44 +01:00
fryshorts cc57222aa9 linux-v4l2: Add function to enum video standards
Add a helper function to enumerate video standards supported by the
selected input and add them to a property.
2015-02-23 20:34:44 +01:00
fryshorts 96b994afb2 linux-v4l2: Add helper function to get input caps
Add a helper function to get the capabilities of a specific or the
currently selected input of the device.
2015-02-23 20:34:44 +01:00
fryshorts ff8ac210fb linux-v4l2: Remove camera constraint for inputs
Remove the constraint for device inputs to be of the type "CAMERA".
This was added under the false assumption that inputs of the type
"TUNER" are only used for control purposes.
2015-02-23 20:34:44 +01:00
jp9000 3c8a3d7866 mac-capture: Add update callbacks for coreaudio
Somehow managed to forget to add this function at an earlier point.
Allows the audio device to be changed via a simple update.
2015-02-20 21:53:00 -08:00
jp9000 8bc2288dfe mac-capture: Separate audio shudown code
This allows the code to be used elsewhere as needed.
2015-02-20 21:49:51 -08:00
jp9000 c69b70b847 obs-outputs: Fix bug (RTMP only working once)
This was caused to do the new RTMP code that added support for multiple
streams; the stream index needs to be reset on RTMP_Close otherwise it
will keep using the wrong stream information.
2015-02-17 20:38:23 -08:00
jp9000 d3c8f81cc2 obs-outputs: Fix potential RTMP auth issue 2015-02-17 17:23:32 -08:00
jp9000 8e9924d6a1 win-dshow: Do not update encoders if active
Do not update the avermedia encoders if they are already active, they
weren't designed to be updated in real time, so it will cause encoding
to break.
2015-02-14 15:04:11 -08:00
Martell Malone f079bc9f7f win-dshow: Reorder CapsMatch for gcc 2015-02-14 19:14:27 +00:00
jp9000 104415d5c3 win-capture: Fix hook bug that could cause crashes
I had this issue where IDXGISwapChain::ResizeBuffers would fail in the
hooks, causing games to crash when they resized their backbuffers
because ResizeBuffers would return an 'invalid call' HRESULT value.  In
the ResizeBuffers documentation it says that it will only happen if a
backbuffer currently has any outstanding references, but there's no way
this would happen unless ResizeBuffers internally calls Present or vise
versa.

After ResizeBuffers has been called, the very first call to Present will
somehow seemingly invalidate and/or destroy the current backbuffer.
It's very strange, but that seems to be what's going on, at least for
the game I was testing.  So if you are performing a post-overlay
capture, then you must ignore the capture on the very first call to
Present.

It's Microsoft's code so you can't really know what's going on, you just
have to work around these strange issues seemingly in the dark.
2015-02-14 09:12:24 -08:00
jp9000 8b59b606c5 win-capture: Use right call type for hook funcs
Although STDMETHODCALLTYPE is technically WINAPI (__stdcall), it's best
not to make any assumptions.
2015-02-14 07:48:36 -08:00
jp9000 5d9cac1f80 win-dshow: Rename the avermedia encoders again
Slight clarification (I guess)
2015-02-14 07:48:35 -08:00
jp9000 ae931b32cf win-capture: Fix debug function strings
These had an older name of what the function used to be named
2015-02-14 07:48:35 -08:00
Bl00drav3n 1f9f50c800 Fixed a bug in color conversion code for 16bit textures. 2015-02-14 01:08:38 +01:00
dodgepong 2b01030607 Add latest translations from crowdin 2015-02-11 19:15:08 -05:00
jp9000 04925993b0 win-dshow: Fix names of AVerMedia encoders 2015-02-11 15:29:31 -08:00
dodgepong 187f5181c7 Add latest translations from crowdin 2015-02-11 16:27:24 -05:00
jp9000 c90e55739f win-dshow: Allow overriding of color space/range
Certain devices may have a different color space or color range than
they may report, so allow the user to set it manually themselves if they
so wish.
2015-02-11 13:10:55 -08:00
jp9000 7e0a86e583 win-dshow: Fix stack overflow bug
Martell changed this function without realizing that this was calling a
function below it, not recursively calling itself.  The reason why he
got the warning was because there was no forward declaration of the
function that was being called; I think he's used to C where only one
function definition can exist with the same name.  In this case, it was
another function with the same name but with different parameters,
something that's permitted in C++.  I wish I had realized this sooner.

This fixes the crashes people have been having with devices.
2015-02-11 13:10:54 -08:00
Palana 8a3dd2ef8a librtmp: Try to parse IPv6 addresses
This should (hopefully) allow URLs of the form rtmp://[abcd::1]/app
2015-02-11 17:52:56 +01:00
Palana ce25cf86b6 librtmp: Remember addrlen from getaddrinfo
OS X doesn't like sizeof(struct sockaddr_storage) as last parameter
for connect
2015-02-11 17:52:56 +01:00
Palana b7375fd1be Revert "Revert "obs-outputs: Update to latest librtmp version""
This reverts commit ac72e0392d.
2015-02-11 17:40:14 +01:00
jp9000 9b850c7be1 mac-syphon: Name plugin "Game Capture (Syphon)"
People were getting a bit confused over what the "Syphon" source was,
and often wouldn't use it because they didn't know what it was for.
2015-02-10 22:28:56 -08:00
jp9000 2149817af7 obs-x264: Set lower buffer size limit to 0
0 is a common value used for recording.
2015-02-10 19:32:35 -08:00
jp9000 5a4a9befd2 rtmp-services: Add encoder settings callback
Swaps out the old initialize callback code that applied encoder settings
to the new apply_encoder_settings callback
2015-02-10 19:27:37 -08:00
jp9000 ac72e0392d Revert "obs-outputs: Update to latest librtmp version"
This reverts commit 36666c6712.
2015-02-09 19:30:11 -08:00
dodgepong eb918d01b4 Add latest translations from CrowdIn 2015-02-09 19:26:17 -05:00
Bl00drav3n 74042fff96 win-capture: Implement D3D8 game capture support 2015-02-09 05:02:48 -08:00
jp9000 bc57e5b2c2 win-dshow: Update libdshowcapture to 0.4.3 2015-02-09 03:56:14 -08:00
jp9000 4ba293a6d9 text-freetype2: Fix wrong parameter type
These functions expect char*, where as the string is stored as a
unsigned char* (FT_Byte*).
2015-02-09 03:56:13 -08:00
jp9000 8943ccc1d6 win-dshow: Use member initialization
Instead of using initializer list to set variables to null/false, use
C++11 member initialization
2015-02-09 03:56:07 -08:00
jp9000 02065f10af win-dshow: Remove deprecated FFmpeg functions 2015-02-09 03:56:07 -08:00
jp9000 731930af50 win-capture: Fix parameter type warning
Parameter expects uint8_t*, was using char*, so just cast to fix it.
2015-02-09 03:56:06 -08:00
jp9000 883d93e84c win-dshow: Remove unnecessarily inline define
This is already defined when including libobs headers
2015-02-09 03:55:31 -08:00
jp9000 372a23de68 win-capture: Use inline define with VC only
mingw already supports the regular inline keyword in C; VC does not.
2015-02-09 03:55:17 -08:00
jp9000 12a000cae5 win-capture: Refactor inline functions
Apparently someone dumb (aka me) neglected to properly handle the inline
graphics hook API functions.  You're not supposed to 'extern' inline
functions, they need to be defined for each file when ever they're used.
2015-02-09 03:51:08 -08:00
jp9000 91b33908d9 win-capture: Remove unused static variables 2015-02-09 03:50:50 -08:00
jp9000 fce3cf6bdb win-capture: static keyword comes before const 2015-02-09 03:49:48 -08:00
jp9000 f8c7df2616 win-capture: Fix bug initializing via d3d9 swap
Apparently neglected to use the reference operator.  I think this may
partially be one of the reasons why many developers still choose to use
pointers instead of references, but fortunately an actual GOOD compiler
warns about this (aka anything but vc)
2015-02-09 03:49:47 -08:00
jp9000 fbf881ecdd win-capture: Fix enum switch warnings
The enum switch warning is used to signify when you are missing
enum values.
2015-02-09 03:49:46 -08:00
jp9000 253989bd72 win-capture: Mark unused parameters 2015-02-09 03:49:45 -08:00
jp9000 04c54162b2 win-capture: Fix ptr -> int cast warnings (mingw) 2015-02-09 03:49:44 -08:00
jp9000 2301a6f578 win-capture: Clarify if statement via inline func
Clears up a warning (to prevent && and || confusion), and clarifies what
specifically the if statement is trying to accomplish (check to see if
the capture is valid)
2015-02-09 03:49:43 -08:00
jp9000 e2ee8adf77 win-capture: Fix potentially uninitialized vars 2015-02-09 03:49:20 -08:00
jp9000 aa3bdd9845 win-capture: Fix incorrect parameter type warning
Was using const char** when the parameter expects const uint8_t**
2015-02-09 03:49:19 -08:00
jp9000 6b38fa35b0 Use _MSC_VER for MSVC-specific pragmas
These aren't used on mingw so they need to be surrounded by #ifdef
_MSC_VER
2015-02-09 03:49:18 -08:00
jp9000 73d3be9311 obs-outputs: Use INVALID_SOCKET instead of -1
On windows, for whatever reason sockets use the SOCKET type which is not
a signed integer.  Still, even though it's not a signed integer, -1 is
used to indicate an invalid socket, but the way you use it is via
microsoft's fabulously dumb little INVALID_SOCKET define, so we have to
make librtmp use that instead.
2015-02-09 03:49:17 -08:00
jp9000 5dfecab15c Fix windows printf format warnings (from mingw) 2015-02-09 03:49:14 -08:00
jp9000 0c1d121ff2 Remove various unused variables
Unused variables detected by mingw
2015-02-09 03:49:13 -08:00
martell a83e74dc1c Disable SEH for mingw-w64
The SEH implementation is not quite working properly in mingw-w64, so
disable it for the time being.
2015-02-09 03:47:27 -08:00
martell 97cc9b610a win-capture: on mingw-w64 support try and catch 2015-02-09 03:41:56 -08:00
martell c5478f52d9 win-capture: explicitly cast function pointers
This solves invalid conversions when building with gcc
2015-02-09 03:41:55 -08:00
martell 1e056fd7ec win-capture: deal with a 32bit handle cast errors
The HWND type is a void pointer, but HWND values are global and always
32bit despite, so casting to 32bit can cause cast warnings on actual
good compilers like gcc via mingw.  This change correctly handles the
casting to 32bits without producing unwanted warnings or errors on
mingw.
2015-02-09 03:41:54 -08:00
martell c5fa22ae93 win-capture: avoid multiple definitions of data
At link time unless they are defined static they will conflict
2015-02-09 03:41:54 -08:00
martell 45cec546bd win-capture: fix link libs for mingw-w64
win-capture should not postfix .lib to psapi.

The graphics hook also requires psapi when linking.

Also change some link libs as mingw-w64 libraries are not postfixed
.lib.
2015-02-09 03:41:53 -08:00
martell d161f92105 obs-output: avoid w32-pthreads for mingw-w64
mingw-w64 provides its own pthreads library.

Also, change link libs as mingw-w64 libraries are not postfixed .lib
2015-02-09 03:41:52 -08:00
martell b8055ed944 obs-ffmpeg: avoid w32-pthreads for mingw-w64
mingw-w64 provides its own pthreads library
2015-02-09 03:41:51 -08:00
martell e13a19207f wasapi: add PKEY_Device_FriendlyName on mingw-w64
Hopefully we can get this function merged for mingw-w64 4.1.  As for the
4.0 release, adding a new header is a big change, it'll have to wait for
the next version.
2015-02-09 03:41:46 -08:00
martell 5fa4889c9c dshow: call to CapsMatch is missing an argument
Evidently Visual Studio did not complain about this.  GCC however is
much more strict about this.
2015-02-09 03:41:45 -08:00
martell 4f5807e0b0 dshow: link to correct uuid libs
Remove the .lib postfix from strmiids

ksuser provides KSCATEGORY_ENCODER and similar GUIDS used

wmcodecdspuuid provides MEDIASUBTYPE_H264 MEDIASUBTYPE_RAW_AAC1 and
MEDIASUBTYPE_I420 so no need to define them in dshow-formats.  The
submodule will have to be updated to support this change.
2015-02-09 03:41:45 -08:00
jp9000 28278682a3 win-capture: Add option to show/hide game cursor 2015-02-07 03:06:16 -08:00
jp9000 8db480416d obs-x264: Add "(None)" option for preset/tune 2015-02-04 16:52:01 -08:00
jp9000 398ae3e288 obs-x264: Use more common defaults
I feel like it's important to use simple defaults just in the case that
users might be confused about the encoder settings.
2015-02-04 16:52:01 -08:00
jp9000 0a14119ba6 obs-x264: Make property name a bit shorter 2015-02-04 16:52:00 -08:00
jp9000 ffd401fcc7 obs-x264: Clarify preset property
I feel like due to lack of user understanding, it's important to specify
that the higher the preset is (veryfast/superfast/ultrafast) the less
CPU that the encoder will use
2015-02-04 16:52:00 -08:00
jp9000 0aec530e23 obs-x264: Set bitrate/bufsize max to 10 mil.
The max bitrate for the property was 100000 before, which felt a bit
low.  Might as well have a super high upper limit of 10 million.
2015-02-04 16:51:57 -08:00
jp9000 6682f79d4a obs-x264: Add more properties
Add CBR, CRF to properties so that it can be changed by the user.  If
CBR is on, CRF will be disabled.  Also added a 'Use Custom Buffer Size'
option to make it so that the buffer size will automatically be set to
the bitrate if its value is false.  This is primarily a convenience
feature for users.
2015-02-04 16:51:57 -08:00
jp9000 e1acd93002 obs-outputs: Remove trailing whitespace 2015-02-04 16:51:56 -08:00
jp9000 7c5034d58f obs-outputs: Add support for multi-track RTMP
Certain RTMP services will support multi audio tracks via RTMP.  This
updates librtmp with custom code that enables multiple streams per
connection to be used; each subsequent stream typically containing extra
audio tracks.  The audio encoder names are used to indicate the names of
tracks, and the name of the tracks are used for the stream keys for
those subsequent tracks.
2015-02-04 16:51:56 -08:00
jp9000 36666c6712 obs-outputs: Update to latest librtmp version
Should be all the fixes and updates made by R1CH, mostly bug fixes as
well as IPv6 support
2015-02-04 16:51:55 -08:00
jp9000 d3f92ca5d6 obs-ffmpeg: Make FFmpeg a usable output
This makes FFmpeg usable as an output, and removes or changes most of
the code that was originally intended for testing purposes.

Changes the settings for the FFmpeg output to the following:
* url:             Sets the output URL or file path
* video_bitrate:   Sets the video bitrate
* audio_bitrate:   Sets the audio bitrate
* video_encoder:   Sets the video encoder (by name, blank for default)
* audio_encoder:   Sets the audio encoder (by name, blank for default)
* video_settings:  Sets custom video encoder FFmpeg settings
* audio_settings:  Sets custom audio encoder FFmpeg settings
* scale_width:     Image scale width (0 if none)
* scale_height:    Image scale height (0 if none)

The reason why scale_width and scale_height are provided is because it
may internally convert formats, and it may be a bit more optimal to use
that scaler instead of the pre-output scaler just in case it already has
to convert formats internally anyway (though you can do it either way
you wish).

Video format handling has also changed; it will now attempt to use the
closest format to the current format if available for a given video
codec.
2015-02-04 16:51:54 -08:00
jp9000 f091f062f0 obs-ffmpeg: Do not use CBR by default for FFmpeg
The FFmpeg output source will now mostly be used for file output, so
using CBR by default makes no real sense.
2015-02-04 16:51:53 -08:00
jp9000 84e1f47ced (API Change) Add support for multiple audio mixers
API changed:
--------------------------

void obs_output_set_audio_encoder(
		obs_output_t *output,
		obs_encoder_t *encoder);

obs_encoder_t *obs_output_get_audio_encoder(
		const obs_output_t *output);

obs_encoder_t *obs_audio_encoder_create(
		const char *id,
		const char *name,
		obs_data_t *settings);

Changed to:
--------------------------

/* 'idx' specifies the track index of the output */
void obs_output_set_audio_encoder(
		obs_output_t *output,
		obs_encoder_t *encoder,
		size_t idx);

/* 'idx' specifies the track index of the output */
obs_encoder_t *obs_output_get_audio_encoder(
		const obs_output_t *output,
		size_t idx);

/* 'mixer_idx' specifies the mixer index to capture audio from */
obs_encoder_t *obs_audio_encoder_create(
		const char *id,
		const char *name,
		obs_data_t *settings,
		size_t mixer_idx);

Overview
--------------------------
This feature allows multiple audio mixers to be used at a time.  This
capability was able to be added with surprisingly very little extra
overhead.  Audio will not be mixed unless it's assigned to a specific
mixer, and mixers will not mix unless they have an active mix
connection.

Mostly this will be useful for being able to separate out specific audio
for recording versus streaming, but will also be useful for certain
streaming services that support multiple audio streams via RTMP.

I didn't want to use a variable amount of mixers due to the desire to
reduce heap allocations, so currently I set the limit to 4 simultaneous
mixers; this number can be increased later if needed, but honestly I
feel like it's just the right number to use.

Sources:

Sources can now specify which audio mixers their audio is mixed to; this
can be a single mixer or multiple mixers at a time.  The
obs_source_set_audio_mixers function sets the audio mixer which an audio
source applies to.  For example, 0xF would mean that the source applies
to all four mixers.

Audio Encoders:

Audio encoders now must specify which specific audio mixer they use when
they encode audio data.

Outputs:

Outputs that use encoders can now support multiple audio tracks at once
if they have the OBS_OUTPUT_MULTI_TRACK capability flag set.  This is
mostly only useful for certain types of RTMP transmissions, though may
be useful for file formats that support multiple audio tracks as well
later on.
2015-02-04 16:51:29 -08:00
Radzaquiel 6eeff3f2c5 Update hitbox.tv ingest servers list
(Updated from Hitbox API's list)
All cities/countries written
Changed: EU-North
Added: Russia, US-Central, South Korea, China & Oceania
2015-02-01 16:44:21 +01:00
Gol-D-Ace cffe5d3ddf Add Asia/Australia Twitch ingests 2015-02-01 06:37:48 +01:00
Bernd Buschinski e04dc57e8a Initial obs-studio jack support 2015-01-25 20:42:02 +01:00
Akagi201 471d87c940 obs-outputs: Add #pragma once to rtmp-helpers.h 2015-01-16 00:19:17 -08:00
fryshorts 35ed828bc2 linux-capture: Fix crash on missing texture
Add a check to the cursor render function to ensure the cursor texture
exists. It seems like it is very unlikely but still possible, that the
first tick which should set the texture might fail. In that case obs
would crash in the render function.
2015-01-13 22:22:39 +01:00
fryshorts e009c7951d linux-capture: Fix possible null dereferences
Add checks for valid pointers when requesting the cursor information and
pixel data.
2015-01-13 22:19:47 +01:00
jp9000 e8f2d1baba win-dshow: Update dshowcapture library to 0.4.2
Previously a DirectShow hardware encoder would get 'stuck' and couldn't
be recreated due to a strange issue with the graph filter not properly
shutting down the encoder.  This would make it so that the user could
only use the encoder once, and then it wouldn't work anymore any time it
was initialized again.  dshowcapture version 0.4.2 ensures that the
encoder can restart properly by manually shutting down the filter graph.
2015-01-10 13:20:46 -08:00
Luke Yelavich 8dbb0cff6b mac-capture: Add Sound Siphon as a supported audio routing device
Add support for Static Z Software's Sound Siphon audio routing software
(http://staticz.com/soundsiphon/) which provides more advanced audio routing
possibilities.
2015-01-09 08:12:51 +11:00
jp9000 428a7def16 win-capture: Use PSAPI GetProcessImageFileName
If the PSAPI_VERSION macro is not set to 1 when using
GetProcessImageFileName, it will attempt to import it as
K32GetProcessImageFileName from kernel32.dll instead of psapi.dll, which
breaks compatibility with vista and xp.
2015-01-07 05:26:32 -08:00
jp9000 95f0b1065e win-dshow: Change "Device Preferred" text
Changes "Device Preferred" to "Device Default"
2015-01-07 05:23:03 -08:00
jp9000 ccfae7e287 rtmp-services: Fix setting of custom x264 profile
Profile was being set as a bool rather than a string, resulting in an
embarrassing situation where the profile was being set to 'true' rather
than the actual profile name.  ..There really needs to be a compiler
warning for using non-bools as bools.  This is one of the reason I
started using !! to change non-bools to bools.
2015-01-07 03:16:02 -08:00
jp9000 733398e660 win-capture: Remove Activate/Reactivate text
The Activate button is longer in use, so this text isn't used anymore.
I neglected to remove the text when removing the Activate button.
2015-01-06 02:18:11 -08:00
jp9000 67ed290148 win-capture: Clarify inject helper intervals 2015-01-06 01:55:17 -08:00
jp9000 2e6010b36d win-capture: Use macros for intervals
Having macros that state what these numbers mean is much more ideal than
just having a random number thrown in there, wondering why it was used
and what its purpose is (magic numbers).
2015-01-06 01:41:13 -08:00
jp9000 4f2c48a937 win-capture: Remove game capture 'Activate' button
The activate button is just silly for configuration in retrospect.  It's
confusing to users, and was even confusing to some other developers.
Instead of using an 'Activate' button for game capture every time you
want to capture a window, just make the 'window' list have a default 'no
window' value (empty), and then have it always active when an actual
window is selected.  The way syphon handles this on mac is actually
where I took the idea from (as suggested by Palana).
2015-01-06 01:30:55 -08:00
jp9000 cca34bfb4e win-capture: Fix bug with GDI monitor capture
With the new code that checks to see if the source is visible, I didn't
realize that I actually didn't set the source variable, so it would end
up never actually drawing.
2015-01-05 14:15:34 -08:00
jp9000 6b8b5e5f64 mac-capture: Fix potential crash querying devices
I didn't check to see if the size of the string was 0, when it's 0 it
won't create the converted string and it'll send a null pointer to
CFStringGetCString, causing it to crash.
2015-01-05 14:11:33 -08:00
jp9000 0e2b29b365 win-dshow: Update dshowcapture to 0.4.1 2015-01-05 11:29:24 -08:00
jp9000 0f09834c68 win-capture: Change error message for file mapping
If shared memory file mapping fails, I've found that it's somewhat
normal due to something in windows -- usually the capture will always
eventually start up after a few tries.  Only seems to apply to some
games though, for example seems to happen with counterstrike a lot for
some strange reason.  Capture always eventually starts back up though.
I remember seeing this with OBS1 as well in many cases but always
thought it was some sort of fluke
2015-01-05 03:01:20 -08:00
jp9000 c1289b893e win-capture: Log more hooking errors
Adds a few previously-missing log messages that specify the actual
reason why there was an error acquiring the hook, rather than just
saying nothing.
2015-01-05 03:01:20 -08:00
jp9000 e7790ab52c win-capture: Wait before auto-fullscreen hooking
If using the auto-fullscreen feature to hook in to a fullscreen, I found
that if you don't wait a few seconds before initializing the hook that
you can catch the process when it's just starting up and loading
important libraries (especially things such as steam/uplay/etc), which
can cause a little bit of interference with the process and on rare
occasions cause it to crash.

To help prevent the likelihood of that happening, this just makes it so
that the hook waits at least 3 seconds before even attempting to inject
the hook when using auto-fullscreen mode.  After some extensive testing
I haven't had any issues since.
2015-01-05 03:01:19 -08:00
jp9000 69223e3645 win-capture: Retry hooks on most failures
The design to not retry the hooks on most general error is just bad.
There are plenty of legitimate cases where it should retry the hook.

This changes it so that if a general failure occurs or if it isn't
capturing when the inject helper exits, it retries and increases the
length of time between retries.
2015-01-05 03:01:12 -08:00
jp9000 6a0677a407 win-capture: Rename variables for consistency
Variables that track time should not have the name 'interval', they
should have the name 'time' instead so it's crystal clear that the
variable is tracking time.
2015-01-05 02:53:29 -08:00
jp9000 edf9d9f41f win-capture: Add 'retry_interval' variable
Adds a variable 'retry_interval' to game capture that allows the
interval at which game capture checks to update to longer intervals if
the hook initialization has some sort of failure.

The reason why I want to do this is because I don't really like it when
the hook updates too often in failure, it just leads to log file spam
that I feel can be reduced, and it frequent updates feel a bit invasive.
I just generally feel more comfortable reducing the interval at which
the hook retries after failure.
2015-01-05 02:52:57 -08:00
jp9000 272f709d1d win-hook: Fix variable name typo
Was 'error_aqcuiring', now 'error_acquiring'
2015-01-05 02:45:42 -08:00
jp9000 14bcb3ad18 win-capture: Change inject-hook intervals
This makes a minor adjustment to the interval at which the inject helper
tries to post the inject message to the target process.  Only 2 seconds
before, now up to 4 seconds, with the PostThreadMessage called every
half second for the duration.

The reason I did this is because I noticed that on rare occasions that
it wouldn't hook due to the low interval; usually just because the
target process is busy and isn't able to process its message queue, and
therefor the hook wouldn't go through due to the fact that
SetWindowsHookEx won't inject until the set event has occurred.  The
inject helper program would just close before the thread message had
finally been processed, which would cancel the SetWindowsHookEx hooking.
2015-01-05 02:45:41 -08:00
jp9000 8a97199072 text-freetype2: Set font log warning to debug only 2015-01-05 02:45:38 -08:00
jp9000 12011d4380 win-capture: Increase game capture update interval
Instead of checking every 3 seconds whether to hook, check every 2
seconds.  3 seconds felt a bit long to me.
2015-01-05 02:45:37 -08:00
jp9000 e6752f6b41 win-capture: Fix potentially overwritten values
The code neglected to take in to account that start_capture can also be
called when the texture updates its size/format in the hook and 'ready'
is signaled again, so it's possible that existing variables in the game
capture structure could be overwritten with new ones unintentionally.
2015-01-05 02:45:37 -08:00
jp9000 6d5aecbb70 win-capture: Fix cursor hotspot bug
Did I just..  forget to have it save the cursor hotspot?  You have to
have the cursor hotspot to draw it correctly.
2015-01-05 02:45:36 -08:00
jp9000 6a85407270 win-capture: Change 'Activate' text if active
The game capture 'Activate' button is likely to fool users in to
thinking it's not actually active if the game capture displays black, so
if it's active, rename the button to 'Reactivate' in order to sort of
hint at the user that it's actually active.
2015-01-05 02:42:18 -08:00
jp9000 b277f2b737 Don't update video of sources if not displaying
This is a bit of an optimization to reduce load a little bit if any of
the video capture sources are not currently being displayed on the
screen.  They will simply not capture or update their texture data if
they are not currently being shown anywhere.

The mac and window game capture sources don't really apply due to the
fact that their textures aren't updated on the source's end (they update
inside of the hooks).
2015-01-05 02:10:32 -08:00
jp9000 77105f1d93 win-dshow: Add activate/deactivate button
The DirectShow input source would always turn on first use, whether the
user wanted it to or not.  I feel like having an activate/deactivate
option is a really nice thing to have, and makes configuration feel a
little bit less awkward.
2015-01-05 02:10:31 -08:00
jp9000 f93b2fe794 Set various thread names
Helps identify which threads are which when debugging
2015-01-03 02:37:20 -08:00
jp9000 3259a6831b obs-x264: Fix color space/range not being set
I originally had it set the color space and color range in the video
info callback, but I forgot that it's a function that's called after the
encoder is initialized.  You can change the color space and color range,
but you have to reconfigure the encoder, and there's no real reason to
do that.
2015-01-03 02:37:19 -08:00
jp9000 f466e9ec1c win-capture: Add win8+ monitor capture
Uses the output duplicator API in order to get a high performance
monitor capture on windows 8+.  This is actually designed to be
interchangeable with regular GDI-based monitor capture (uses the same
source id).
2015-01-03 02:37:18 -08:00
jp9000 d3abdf39a2 win-capture: Don't draw cursor if outside area 2015-01-03 02:37:18 -08:00
jp9000 d6e98829ca win-dshow: Add buffering options
Allow the user to select whether to buffer the source or not.  The
settings are auto-detect, on, and off.  Auto-Detect turns it off for
non-encoded devices, and on for encoded devices.

Webcams, internal devices, and other such things on windows do not
really need to be buffered, and buffering incurs a tiny bit of delay, so
turning off buffering is actually a little better for non-encoded
devices.
2015-01-03 02:37:17 -08:00
jp9000 a7d2450d8e obs-outputs: Fix FLV corruption bug
The 'sent_headers' member variable of the FLV output would not be reset
when the output was restarted, causing important data to not be written,
thus creating an invalid FLV file.
2014-12-31 04:03:46 -08:00
Jim 903bb137a0 Merge pull request #312 from fryshorts/xshm-xcb-conversion
linux-capture: Xshm plugin xcb conversion
2014-12-28 23:31:32 -08:00
raincomplex 01491a96d3 Mark windows changed on Expose
On i3wm, windows aren't unmapped when switching away from a window's
workspace, but it does cause OBS to lose the capture. Because
switching back will not trigger a MapNotify, the capture fails to
restart unless you resize or move the window (ConfigureNotify). An
Expose event is fired by the wm, however, so catching this correctly
restarts the capture.
2014-12-24 15:23:08 -05:00
fryshorts db9b71b80b linux-capture: Refactor source data
Remove comments from and align members in the source data struct for the
xshm capture plugin.
2014-12-22 00:47:44 +01:00
fryshorts ed839dce19 linux-capture: Remove unused dependencies
Remove dependencies from cmake that are no longer needed due to the
port to xcb.
2014-12-22 00:47:44 +01:00
fryshorts 2dffa894f3 linux-capture: Port display connection to xcb
Remove the last bits of Xlib code from the xshm capture plugin and use
xcb exclusively.
2014-12-22 00:30:14 +01:00
fryshorts 114ccd33ee linux-capture: Port geometry functions to xcb
Replace XLib code with xcb in the geometry helper functions.
2014-12-22 00:13:42 +01:00
fryshorts 4d2e730bfa linux-capture: Remove XLib based shm helpers
Remove the old XLib based shm helper functions from xhelpers.
2014-12-22 00:13:41 +01:00
fryshorts 008f4467f0 linux-capture: Use xcb to check for extensions
Use the previously added helper function to check for needed extensions.
2014-12-22 00:13:41 +01:00
fryshorts aa016706a2 linux-capture: Port cursor handling to xcb
Use the new xcb based cursor library to handle the cursor in the
xshm plugin.
2014-12-22 00:13:41 +01:00
fryshorts 38f2c57c12 linux-capture: Port xshm handling to xcb
Use the new xcb based xshm functions to attach the shared memory segment
and capture the image from the xserver.
2014-12-22 00:13:41 +01:00
fryshorts e20cf649b8 linux-capture: Add xcb screen to source data
Add xcb screen structure to the source data for later use in the porting
process.
2014-12-22 00:13:41 +01:00
fryshorts 53ee22ae5a linux-capture: Add xcb connection to source data
Add a xcb connection to the source data for the xshm capture for later
use in the porting process.
2014-12-22 00:13:41 +01:00
fryshorts 4ad41004e0 linux-capture: Add function to check extensions
Add an internal function to check for all the extensions needed by the
xshm capture to work.
2014-12-21 23:21:46 +01:00
fryshorts 172a4d7a52 linux-capture: Add xcb cursor helper library
Add a new helper library to handle the mouse cursor using xcb.
Since porting the old library without either keeping legacy code or
breaking the api would have been non-trivial, this is added as a
completely separate implementation. Once all code is ported over to
use this library, the old one can be removed.
2014-12-21 23:13:46 +01:00
fryshorts 069ee92ff4 linux-capture: Add helper to get xcb screen
Add a helper function to get a xcb screen from a screen id.
2014-12-21 23:13:27 +01:00
fryshorts e7cdb837aa linux-capture: Add xcb helper functions for shm
Add new helper functions managing the shm segment with xcb to xhelpers.
2014-12-21 23:13:27 +01:00
fryshorts 8caba4deca linux-capture: Add xcb libraries to cmake
Add xcb libraries needed to port the plugin away from xlib to cmake.
2014-12-21 23:13:25 +01:00
jp9000 c456e42191 win-dshow: Use actual encoder names
Was using a temporary name for the encoders still; now uses the actual
encoder names.
2014-12-21 10:41:30 -08:00
jp9000 eb4a05667f win-dshow: Add C985/C353 hardware h264 encoders
This adds support for the AverMedia C985 encoder (which is available on
C985 capture cards) as well as the C353 hardware encoder (which is
currently available on the X99S Gaming 9 motherboards).

These encoders have some limitations, such as limited resolutions
(1280x720 and 1024x768), a max GOP size of 30, and the encoder format
only supports YV12, which requires conversion if the current output
format isn't the same.  The C985 and C353 encoders seem to be pretty
much identical, although it seems like the C353 has a bit more efficient
encoding.

I don't believe these are really suitable for streaming, as they do not
really have the encoding efficiency needed to stream at lower bitrates,
and seem to only support variable bitrate.  However, for recording these
encoders are quite nice to have available, and work quite well.
2014-12-21 10:14:27 -08:00
jp9000 bbff0eeeb9 win-dshow: Move module loading to separate file
The main module code was originally all packed in to the win-dshow.cpp
file, which isn't exactly ideal or clean if one wants to add other
things to the module as a whole.
2014-12-21 10:14:26 -08:00