Commit Graph

257 Commits (84c7e665bd9e8c0598bb16d1284919b9615c73f8)

Author SHA1 Message Date
BtbN d09f6dae1f Don't hardcode include directory for plugins 2014-07-10 14:38:46 +02:00
Timo R f7b1bfa0a8 Reverse swap red&blue logic 2014-07-10 14:35:03 +02:00
jp9000 8355e8c848 Separate x264 parameters by space
Some x264 parameters actually use the ':' character for their
parameters, so I feel like space would probably be a bit more ideal.
2014-07-09 13:57:52 -07:00
Palana 23a83054b5 Remove AV_REV_FOURCC macro from mac-avcapture 2014-07-08 14:33:29 +02:00
Palana f57cc56268 Expand frame format support for mac-avcapture
Also add a fallback conversion via AVFoundation in case the native
format isn't supported
2014-07-08 14:31:04 +02:00
Palana a5108e5fd9 Simplify timestamp handling for mac-avcapture 2014-07-08 14:31:04 +02:00
jp9000 0364672cbb rtmp-stream: Add statistics callbacks
Add callbacks for total bytes sent and number of dropped frames
2014-07-06 17:36:45 -07:00
jp9000 be2b0d1398 rtmp-stream: Change TEST_FRAMEDROPS to just sleep
Instead of making the send buffer size super small, just do a sleep when
sending data to simulate the inability to send out as much data as
desired.
2014-07-06 17:35:26 -07:00
jp9000 7dfb26eb31 Reset blend state to default after drawing 2014-07-03 14:12:48 -07:00
Palana d79b28e9ba Add FPS entries "Highest" and "Match OBS FPS" for win-dshow 2014-07-02 19:37:50 +02:00
Palana 45d42af46c Add name for VideoFormat::Any 2014-07-02 19:37:50 +02:00
Palana 1052590aa5 Implement frame rate autoselection for win-dshow device update 2014-07-02 19:37:49 +02:00
Palana 2bf0163aa5 Update config modified callbacks with disable/autoselection semantics
Autoselection is only implemented for frame rate as it doesn't make
sense to autoselect the video format (Any fills the role of library
supplied autoselection) or the resolution (it may make sense to
implement resolution matching based on the current transformation
settings in the future though)
2014-07-02 19:37:43 +02:00
Palana 2702259c75 Add DecodeDeviceId helper with DStr targets 2014-07-02 19:31:53 +02:00
Palana fdc2ebf980 Add FPS/VideoFormat to name conversion helpers 2014-07-02 19:31:52 +02:00
Palana 453a8b21cd Add device caps matching helpers 2014-07-02 18:22:03 +02:00
Palana f854ac7b78 Remove user config modifying code 2014-07-02 17:55:05 +02:00
Palana 765d2e89f4 Use <limits> instead of constant 2014-07-02 17:42:20 +02:00
Palana a7cc60ec11 Refactor resolution, frame rate, and video format matching in win-dshow 2014-07-02 17:40:55 +02:00
jp9000 0b398cfad9 rtmp-stream: Log when user stops the stream 2014-07-02 00:24:55 -07:00
jp9000 697acbb4d5 rtmp-stream: Use helper log macros
Use warn/info/debug helper macro functions to output
warnings/information/debug log data that's preformatted to include the
module and the current output name.
2014-07-02 00:20:50 -07:00
jp9000 de478d3295 Change drop threshold to macro, use milliseconds
Like with other plugins, a macro is ideal for preventing typos and
misspellings of the setting.  Also, add a property for drop threshold.
2014-07-01 15:08:01 -07:00
jp9000 a527f30b94 rtmp-output: Remove unused properties 2014-07-01 15:05:15 -07:00
jp9000 058f3ca7b0 Remove FILE_TEST macro from rtmp-stream.c 2014-07-01 13:41:55 -07:00
jp9000 5c5f63e8b8 Output version/commit to RTMP stream metadata
Might come in useful for debugging issues later on.
2014-07-01 13:41:32 -07:00
BtbN 8b14aa8f4a Add missing header to CMakeLists.txt 2014-06-28 20:54:14 +02:00
jp9000 cf0b8be3a2 Add image source plugin
A simple plugin that does nothing more than display an image file as a
source.
2014-06-28 10:35:17 -07:00
jp9000 7b12133af3 Use uint8_t* instead of void* for texture data
NOTE: In texture_setimage, I had to move variables to the top of the
scope because microsoft's C compiler will give the legacy C90 error of:
'illegal use of this type as an expression'.

To sum it up, microsoft's C compiler is still utter garbage.
2014-06-28 10:12:57 -07:00
jp9000 9478624b22 win-wasapi: Use macros instead of strings
Instead of using strings for setting names, use macros.  Macros prevent
mis-spellings, prevent usage of the wrong name, and if you get it wrong,
it will simply fail to compile, helping to ensure that the right setting
value is being used.
2014-06-28 09:03:57 -07:00
jp9000 9851c061e2 linux-xshm: Fix potentially uninitialized var. 2014-06-27 21:43:42 -07:00
Jim 8e860576ea Merge pull request #128 from palana/mac-avcapture-settings-changes
Update mac-avcapture to use recent property and data changes
2014-06-26 11:27:31 -07:00
jp9000 dbb9124bf6 Remove 'effect' param from effect param funcs
Similar to the shader functions, the effect parameter functions take
the effect as a parameter.  However, the effect parameter is pretty
pointless, because the effect parameter.. parameter stores the effect
pointer interally.
2014-06-25 22:24:27 -07:00
Palana f09f969bc0 Disable default device selection for mac-avcapture
Since adding a source now opens the config dialog for that source
the convenience gain from having a device automatically start capturing
is outweighed by the inconvenience from having captured images
unintentionally recorded/streamed
2014-06-25 23:33:26 +02:00
Palana 2b5bd11671 Implement preset auto select notification for mac-avcapture 2014-06-25 23:33:26 +02:00
Palana 77e9763747 Add disconnected (selected) devices to device list for mac-avcapture
This requires the (localized) device name to be stored
2014-06-25 23:33:26 +02:00
Palana e4601ac655 Show unsupported selected presets for mac-avcapture
Configured presets that are unsupported are now preserved in the user config,
but listed as disabled
2014-06-25 23:33:26 +02:00
Palana 847bb83007 Change preset order to highest first for mac-avcapture 2014-06-25 23:32:58 +02:00
Jim 2ea50cab36 Merge pull request #124 from jp9000/new-locale-handling
Update to new module locale API
2014-06-25 12:58:05 -07:00
jp9000 0b4a259e56 Remove 'locale' parameter from all callbacks
The locale parameter was a mistake, because it puts extra needless
burden upon the module developer to have to handle this variable for
each and every single callback function.  The parameter is being removed
in favor of a single centralized module callback function that
specifically updates locale information for a module only when needed.
2014-06-25 12:36:26 -07:00
jp9000 74b4743bce Remove 'locale' from properties
Having the value stored here is somewhat pointless, so this is one step
in fixing the locale handling.  Locale should be handled by the modules
themselves with their own loaded locale lookup information.
2014-06-25 12:36:26 -07:00
jp9000 3e5d486d24 DShow: Comment unused functions until needed 2014-06-25 01:54:34 -07:00
Christoph Hohmann fdf1b25c07 linux-xcomposite: Fix that the configuration is lost when source is recreated 2014-06-22 12:51:58 +02:00
jp9000 68f7191549 Merge branch 'v4l2-input' of https://github.com/bazukas/obs-studio into bazukas-v4l2-input 2014-06-19 21:57:42 -07:00
jp9000 b9ab48c70c linux-xshm: Fix cursor draw position
Due to the recent change with matrices, the way space is represented by
matrices is a bit different.  The matrix stack represents the view
matrix, rather than the model matrix, so the position is more
representative of the camera (view) itself, rather than that of the
objects (model).
2014-06-19 20:55:30 -07:00
Azat Khasanshin 32911f774c v4l2 plugin properties
added ability to choose device, pixel format, resolution
and frame rate
2014-06-18 23:37:19 +04:00
fryshorts 5f8a6db816 Add initial implementation of a v4l2 capture plugin
This patch adds a plugin to capture video data from v4l2 devices under linux.
2014-06-18 21:31:23 +02:00
Palana 6654473fa0 Restore compatibility with released Jansson versions 2014-06-17 17:02:41 +02:00
jp9000 7c8ef6f6ef rtmp-common: Apply service encoder settings
Common services that require specific encoder settings (specified in the
'recommended' section of the json file) will now have those encoder
settings applied before the encoders start up.

This fixes the issue with services like twitch that weren't getting
their required 2-second keyframe maximum interval set.
2014-06-16 21:39:27 -07:00
jp9000 8ab1bc8e7b win-capture: Fix bug calculating cursor position
Cursor position calculation was not taking in to account the window
client coordinates relative to the screen.
2014-06-14 23:49:35 -07:00
Palana c2eebd8d1d Remove property list prefill code in mac-avcapture 2014-06-12 02:35:35 +02:00
jp9000 5cd8304dc0 CoreAudio: Enumerate AudioDeviceID manually
Apparently, despite the fact that Apple added
kAudioHardwarePropertyTranslateUIDToDevice in 10.8, it's not actually
usable in 10.8, only 10.9.  So, instead of being able to use it like a
normal, sane person, we have to enumerate all devices manually and find
the AudioDeviceID ourselves.  A slight annoyance and a mark against
apple's competence, but audio devices should now be working again on
10.8 at least, so whatever.
2014-06-07 06:07:51 -07:00
Palana 1df433e7cc Add connect/disconnect handling for mac-avcapture 2014-06-04 20:02:03 +02:00
Palana 6eeabb6b49 Enable device selection for mac-avcapture 2014-06-04 20:02:03 +02:00
Palana 8b5891e973 Improve preset selection robustness in mac-avcapture 2014-06-04 20:02:03 +02:00
Palana f20136b96e Fix minor style-deviation in mac-avcapture 2014-06-04 20:02:03 +02:00
Palana 1c46fd27bc Move device handling in mac-avcapture to separate functions 2014-06-04 20:02:03 +02:00
Palana 9ca450426a Refactor mac-avcapture cleanup and improve session init error handling 2014-06-04 20:02:02 +02:00
Palana 994565dbfb Improve mac-avcapture logging
Log messages are now prefixed with the source name to distinguish between
multiple sources
2014-06-04 20:02:02 +02:00
jp9000 e72c0925be win-dshow module: Fix configuration issues
The biggest problem with DirectShow is that available configuration
capabilities can change if you so much as look at it the wrong way.

Previously, configuring devices often didn't configure the device
settings correctly, you would choose one setting and then another
setting wouldn't be compatible with that settings.

Let's take the terrible microsoft lifecam series for example.  First,
you'd be at 640x480 happily webcam'ing away, which is using the YUY2
format.  Then you decide "hey, this webcam resolution is a bit low.  I
would love to have it a bit high resolution so it's a bit more crisp and
clear."  You'd select 1280x720, and then suddenly the only format
supported is MJPEG output.  However, the interface has to update that
fact, it can't list YUY2 if MJPEG is the only one available for this
resolution.  This doesn't just apply to formats either, this applies to
framerates and such as well.  Some framerates will only be supported by
certain resolutions which can in turn only be supported by certain
formats.

This causes user interface for configuration to be really be a nightmare
to manage if you want these features to be available to the user.  It's
extremely annoying because you have to update all the configuration UI
after something has changed, double check the configuration values, and
if the values aren't supported, update those configuration values.
2014-05-30 19:54:58 -07:00
jp9000 040615c6bc Fix CMakeLists.txt yet again 2014-05-30 03:45:34 -07:00
jp9000 40f9448a83 Fix win-dshow module CMakeLists.txt
Didn't include the DirectShow library, and forgot to add one source file
2014-05-30 03:43:53 -07:00
jp9000 c55b1771cd Add preliminary DirectShow capture plugin
This covers the basics of devices.  Mostly functional but not at 100%
yet.  Uses 'libdshowcapture' library to capture directshow video/audio.
Both libdshowcapture and the plugin still need some work.  Should at
least capture basic webcams and capture cards for the time being.
2014-05-30 03:29:48 -07:00
jp9000 1c8e27f220 win-dshow: Add submodule 'libdshowcapture' 2014-05-30 03:17:25 -07:00
jp9000 924f780f50 WASAPI plugin: Mark parameter macro 2014-05-30 03:09:31 -07:00
jp9000 796ad99335 Plugins: Remove old dshow plugin 2014-05-30 03:09:09 -07:00
BtbN 862840b3a0 Hide librtmp symbols so they don't collide with system libraries 2014-05-24 14:13:44 +02:00
Jim df47f31e83 Merge pull request #93 from BtbN/fdk
Add libfdk_aac encoder module
2014-05-22 18:33:46 -07:00
BtbN 817c25884d Make obs-ffmpeg aac encoder output which encoder is beeing used 2014-05-23 00:06:29 +02:00
BtbN ca7ba2e234 Add libfdk encoder 2014-05-23 00:06:28 +02:00
Jim e703c92c85 Merge pull request #92 from fryshorts/pulse-input
A few smaller fixes for the pulseaudio plugin
2014-05-22 05:40:23 -07:00
BtbN e2c2e50f4c Fix ffmpeg/x264 find modules according to cmake find module naming conventions 2014-05-22 13:03:47 +02:00
jp9000 d536df30b0 Add dst_size parameter to character conv funcs
Character conversion functions did not previously ask for a maximum
buffer size for their 'dst' parameter, it's unsafe to assume some given
destination buffer may have enough size to accommodate a conversion.
2014-05-22 03:46:57 -07:00
fryshorts 65b8fb2f4e Remove pa timestamps option from pulseaudio plugin
Due to desync issues with the pa timestamps, os ones are
now the only option.
2014-05-21 22:54:23 +02:00
fryshorts e0536e70ba Fix requested latency for pulseaudio plugin
When the PA_STREAM_ADJUST_LATENCY flag is passed, pulse will interpret
the fragsize attribute as a literal targeted latency.
2014-05-21 22:54:23 +02:00
fryshorts 66d8ad8eaf Fix packet/frame counter for pulseaudio plugin
Reset the counters when the recording is stopped.
2014-05-21 22:49:34 +02:00
fryshorts ac4a054bdd Add some statistics to pulseaudio plugin
This patch adds counters for packets and frames for debugging purposes.
2014-05-19 21:28:41 +02:00
fryshorts f3d9d248b6 Fix a memory leak in pulseaudio plugin 2014-05-19 21:28:33 +02:00
fryshorts ad9d15c838 Change logging statements for pulseaudio plugin
This removes some useless and annoying logging and on the other
hand bumps the prio on more important ones.
2014-05-19 21:28:33 +02:00
jp9000 1d2e5d50a4 Add FLV file output code
This doesn't add FLV file output to the user interface yet, but we'll
get around to that eventually.  This just adds an FLV output type.

Also, removed ftello/fseeko because off_t is a really annoying data
type, and I'd rather have a firm int64_t for large sizes, so I named it
to os_fseeki64 and os_ftelli64 instead, and changed the file size
function to return an int64_t.
2014-05-16 00:18:23 -07:00
Jim f5e85e167b Merge pull request #74 from BtbN/linux_new_plugins
Add xcomposite capture
2014-05-15 02:24:26 -07:00
Jim 4d13e2fbca Merge pull request #83 from fryshorts/xshm-input
linux-xshm: added support for multi-screen setups
2014-05-15 02:24:16 -07:00
jp9000 3280cd1dbb Fix code formatting issues
80 columns limit preferably
spaces after if/for/while
KNF code styling
2014-05-15 02:18:01 -07:00
jp9000 03ca5919ce UI: Add popup warnings for connection failure
Also, check for null stream path/key in the RTMP output module.
2014-05-12 15:34:46 -07:00
Palana fa22417f8c Handle libobs fourcc byte order change in mac-avcapture 2014-05-13 00:17:12 +02:00
Palana c57d883506 Fix mac-avcapture compilation with OSX SDK version < 10.9 2014-05-13 00:14:27 +02:00
Palana e9b6d1d189 Fix typo in mac-avcapture 2014-05-13 00:10:57 +02:00
fryshorts 76d2bf2c29 Add README for the xshm plugin
The file contains some development information specific to the plugin.
2014-05-12 22:07:07 +02:00
fryshorts 071c4251d8 Add support for multi-screen setups
This patch adds support for multi-screen setups by using xinerama
information if available to determine the screen size and position.

In case xinerama is not available or not active it uses the information
provided for the x screen.

To clean up the code some generic helper functions were moved to a
separate source file.
2014-05-12 22:07:07 +02:00
fryshorts 9f76396227 Add offset to xcursor
This patch adds the option to specify an offset for the cursor position.

Small fix to texture format aswell.
2014-05-12 22:07:07 +02:00
BtbN b3adef6c8d Fix all warnings in rtmp output 2014-05-10 03:40:23 +02:00
BtbN 8dc9ca5c81 Add xcomposite capture 2014-05-09 03:12:30 +02:00
BtbN 3e224b9750 Fix mav-avcapture dependencies 2014-05-08 14:43:16 +02:00
BtbN ce542525fc Fix dependency on win32-pthreads 2014-05-08 14:43:16 +02:00
Palana cfc3f2590e Update OSX dependencies for cmake generators other than ninja/make 2014-05-08 14:31:43 +02:00
Palana b9c544969e Request global headers from ffmpeg aac encoder
FAAC and FDK AAC don't populate AVCodecContext::extradata{_size} unless
CODEC_FLAG_GLOBAL_HEADER is set
2014-05-08 14:19:10 +02:00
Palana 00bdf11649 Bypass time conversion if AVCaptureInputPort has no clock
This should add compatibility for OSX < 10.9
2014-05-05 20:31:47 +02:00
Palana c36ce49706 Minor cleanup in mac-avcapture 2014-05-05 20:31:47 +02:00
jp9000 52746c2523 Add (temporary terrible) volume controls
- Add volume control

   These volume controls are basically nothing more than sliders.  They
   look terrible and hopefully will be as temporary as they are
   terrible.

 - Allow saving of specific non-user sources via obs_load_source and
   obs_save_source functions.

 - Save data of desktop/mic audio sources (sync data, volume data, etc),
   and load the data on startup.

 - Make it so that a scene is created by default if first time using the
   application.  On certain operating systems where supported, a default
   capture will be created.  Desktop capture on mac, particularly.  Not
   sure what to do about windows because monitor capture on windows 7 is
   completely terrible and is bad to start users off with.
2014-05-03 22:54:38 -07:00
jp9000 5a3bdc413d Fix Obj-C property usage
...I really need to go through my Objective-C reading material
2014-04-29 02:33:08 -07:00
jp9000 24cf70053e Mac A/V capture: Fix minor issue
Use the port clock instead of the master clock
2014-04-29 02:27:17 -07:00