Commit Graph

587 Commits (bcf8400137ce424bd9f8d5b698fe1a4ed4f483b5)

Author SHA1 Message Date
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
jp9000 67587fbced win-dshow: Allow use of YV12 video format
Previously, due to a bug in libdshowcapture, the NV12 format was
actually being used for YV12 erroneously, and no actual support for YV12
existed.  This fixes the bug with NV12 and adds support for YV12.
2014-12-21 10:14:26 -08:00
jp9000 77f0f6802a win-dshow: Put device id mangling in separate file
This is going to be used for other code as well, so may as well put it
in its own file.
2014-12-21 10:14:25 -08:00
jp9000 1884fea349 win-dshow: Use obs_avc_keyframe instead of own 2014-12-21 10:14:24 -08:00
jp9000 3412a0e190 obs-outputs: Wait for packet before header output
Waiting for the first packet to arrive before sending the headers helps
prevent issues with certain types of encoders that may not get their
header/SEI until the first packet has been received.
2014-12-21 10:14:23 -08:00
jp9000 35d7a9ff1f obs-x264: Set x264 to use the cur. set cs/range
This causes x264 to use the currently set color space and color range
of the video media.  This helps prevent issues with decoding where the
colors wouldn't look right due to the fact that these settings were
never specified to x264, and prevents darkness and brightness from
looking washed out due to a potentially incorrect color range.
2014-12-11 20:06:54 -08:00
jp9000 56899df08f win-capture: Add game capture
This adds the windows version of game capture.

New features:

- An option to hook any fullscreen application automatically (that
  doesn't have borders) so that no specific window configuration is
  required.  Definitely a sorely needed feature

- An option to force memory capture for the sake of compatibility with
  things such as SLI, multi-adapter setups (usually laptops), as well as
  the ability to be used with the OpenGL renderer

- An optimization option to force scaling on the GPU before texture
  transfer, reducing the transfer bandwidth (which is especially
  important for compatibility capture)

- An optimization option to limit framerate to the current OBS framerate
  to improve capture performance (mostly useful for compatibility
  capture)

- An option to capture third-party overlays (such as steam)

- Logging improvements, game capture log will now be sent via pipe
  instead of written to a separate file, making diagnosing problems a
  little bit easier
2014-12-09 15:25:59 -08:00
jp9000 ca59b0c7d0 win-capture: Add cursor capture capability 2014-12-09 14:21:08 -08:00
jp9000 a5872955f4 win-capture: Add graphics-hook library
This library is a completely refactored and rewritten version of the
original graphics hook.  The code is more clean, readable, and has a
variety of new features, such as scaling and forcing memory capture.

Currently, only D3D9, 10, and 11 are implemented.  (This commit may be
updated on this branch)
2014-12-09 14:21:07 -08:00
jp9000 cb0db6240b win-capture: Add inject-helper program
This program simply injects a library in to the target progress using
SetWindowsHookEx.
2014-12-09 14:21:07 -08:00
jp9000 f02342ac0c win-capture: Add get-graphics-offsets helper
Before, game capture would find addresses to important graphics
functions by creating a graphics context for the desired API inside of
the hook, and then find the function addresses that way.

The big problem with that is that the context could often cause the
hooked application to crash, especially if another hook was active.

This bypasses that entire need by a simple console application that
creates the contexts, finds the hook address offsets and then returns
them via console output.
2014-12-09 14:21:06 -08:00