Commit Graph

257 Commits (84c7e665bd9e8c0598bb16d1284919b9615c73f8)

Author SHA1 Message Date
jp9000 4cf68e6bee window capture: Fix defaults overriding values 2014-08-05 10:58:10 -07:00
jp9000 0f2f83d034 V4L2: Fix 'show_cursor' setting forcing default 2014-08-05 10:48:39 -07:00
Jim eecc9ab937 Merge pull request #202 from fryshorts/v4l2-input
Add libv4l2 as dependency for the v4l2 plugin
2014-07-29 11:39:43 -07:00
jp9000 32e668438d Fix CBR for x264 versions under 139
According to issue #204 on the obs-studio repository, always setting the
ABR rate control method fixes the issue.  I checked, and this was and
issue, and that does seem to fix the issue properly.
2014-07-29 10:42:56 -07:00
jp9000 892fdea83e Remove macro to free locale
This functionality can now be handled automatically because locale can
now be freed seaparately from obs_module_unload with
obs_module_free_locale, which is called automatically when the module is
being freed.
2014-07-27 17:29:10 -07:00
jp9000 f0ac19abba Remove version parameter from obs_module_load
Replaced by obs_get_version() API
2014-07-27 17:29:10 -07:00
jp9000 59ea3becf2 (API Change) Refactor module handling
Changed API:
- char *obs_find_plugin_file(const char *sub_path);

  Changed to: char *obs_module_file(const char *file);

  Cahnge it so you no longer need to specify a sub-path such as:
  obs_find_plugin_file("module_name/file.ext")

  Instead, now automatically handle the module data path so all you need
  to do is:
  obs_module_file("file.ext")

- int obs_load_module(const char *name);

  Changed to: int obs_open_module(obs_module_t *module,
                                  const char *path,
                                  const char *data_path);
              bool obs_init_module(obs_module_t module);

  Change the module loading API so that if the front-end chooses, it can
  load modules directly from a specified path, and associate a data
  directory with it on the spot.

  The module will not be initialized immediately; obs_init_module must
  be called on the module pointer in order to fully initialize the
  module.  This is done so a module can be disabled by the front-end if
  the it so chooses.

New API:
- void obs_add_module_path(const char *bin, const char *data);

  These functions allow you to specify new module search paths to add,
  and allow you to search through them, or optionally just load all
  modules from them.  If the string %module% is included, it will
  replace it with the module's name when that string is used as a
  lookup.  Data paths are now directly added to the module's internal
  storage structure, and when obs_find_module_file is used, it will look
  up the pointer to the obs_module structure and get its data directory
  that way.

  Example:
  obs_add_module_path("/opt/obs/my-modules/%module%/bin",
                      "/opt/obs/my-modules/%module%/data");

  This would cause it to additionally look for the binary of a
  hypthetical module named "foo" at /opt/obs/my-modules/foo/bin/foo.so
  (or libfoo.so), and then look for the data in
  /opt/obs/my-modules/foo/data.

  This gives the front-end more flexibility for handling third-party
  plugin modules, or handling all plugin modules in a custom way.

- void obs_find_modules(obs_find_module_callback_t callback, void
                        *param);

  This searches the existing paths for modules and calls the callback
  function when any are found.  Useful for plugin management and custom
  handling of the paths by the front-end if desired.

- void obs_load_all_modules(void);

  Search through the paths and both loads and initializes all modules
  automatically without custom handling.

- void obs_enum_modules(obs_enum_module_callback_t callback,
                        void *param);

  Enumerates currently opened modules.
2014-07-27 17:29:10 -07:00
fryshorts 273c244eff Improved Documentation and Logging for mmap functions in v4l2 plugin.
This adds some documentation to the mmap functions and also
improves the logging by bumping errors to LOG_ERROR.
2014-07-26 19:55:57 +02:00
fryshorts 276a97877b Add const keyword to fixed lists in v4l2 plugin.
This should save a little bit of memory memory.
2014-07-26 19:29:08 +02:00
fryshorts 25f71fd71d Improved Documentation and Logging for update in v4l2 plugin.
This adds some documentation to the update function and also
improves the logging by adding some info and bumping errors
to LOG_ERROR.
2014-07-26 19:29:08 +02:00
fryshorts b88fe5078c Remove the getwidth/getheight functions from v4l2 plugin.
Those functions are actually causing more problems than
helping out with the preview because the width/height is
updated immediately while the actual size of the frames
displayed changes later.
2014-07-26 19:29:08 +02:00
fryshorts b629087513 Reorganized data struct and update function for v4l2 plugin.
Due to the plugin creating a thread to retrieve and output the
captured image data, care must taken to not modify data the
thread reads from the outside while the thread is running.

In previous revisions some settings accessed by the capture
thread were written to in the update function which could cause
image corruption and in the worst case crashes.

The members of the data struct are now split into two groups,
those that are used by the thread while it is running and must
not be changed from the outside, and those can be changed at any
time.
2014-07-26 19:29:08 +02:00
fryshorts 05ddbeb1fe Add function to prepare frame structure to v4l2 plugin.
This adds a function to prepare the source_frame struct for use
with obs_source_output_video. Since all of the values except for
the timestamp and data pointers are known in before it makes
little sense to compute them over and over again.

Due to the fact that v4l2 uses a single continuous memory segment
for multi planar formats we can also precompute memory offsets for
the planes.
2014-07-26 19:29:08 +02:00
fryshorts a5e53d5a8d Fix handling of multiplanar pixelformats in v4l2 plugin.
The data provided by v4l2 for multiplanar formats is one
consecutive block that just needs to be splitted for obs.
2014-07-26 19:29:08 +02:00
fryshorts a6bb42c367 Display emulated formats as such in v4l2 plugin.
Formats that are emulated by v4l2 are marked by appending
"(Emulated)" to them.
2014-07-26 19:29:08 +02:00
fryshorts 9a573bb456 Replace all system calls with there counterpart in libv4l2.
By using the wrapper functions supplied by libv4l2 we gain
support for formats not natively supported by obs.
The library intercepts certain system calls to transparently
enable recoding.
2014-07-26 19:29:08 +02:00
fryshorts d6f65be966 Add libv4l2 as requirement for the v4l2 plugin.
In order to convert formats not natively supported by obs the
v4l2 userspace library is required. This patch adds a cmake
script to find the library.
2014-07-26 19:29:08 +02:00
benklett 4b2010aa4e Add 720x576 (DV-PAL) as another fallback v4l2 framesize 2014-07-25 15:46:38 +02:00
jp9000 c9e225d719 Prevent loading image files with null/empty paths 2014-07-24 00:25:59 -07:00
jp9000 6db316398b Fix x264 stdint.h message (it's already included) 2014-07-22 23:25:51 -07:00
Palana 263d4ec605 Remove unnecessary compiler flag 2014-07-21 04:49:16 +02:00
Jim eeb6fc6e9c Merge pull request #180 from fryshorts/v4l2-input
Assorted fixes for the v4l2 plugin
2014-07-18 23:54:47 -07:00
BtbN 38c2fc87aa Move all data into the subdir it belongs to
Completely removes the build dir in favor of cmake based build layouting
2014-07-19 01:38:41 +02:00
BtbN 3b26db389d Fix Jansson dependency importing 2014-07-17 18:13:25 +02:00
jp9000 a01b59fb21 Reset blend state for image source
This is more of a temporary fix for the time being, it needs to handle
blend state changes better, perhaps via push/pop of state changes
2014-07-16 14:53:21 -07:00
fryshorts 87a527701a Use default color space in v4l2 plugin 2014-07-16 23:42:55 +02:00
fryshorts ba3c093156 Add fallback sizes and framerates to v4l2 plugin.
Until a proper fix is found to support devices that use stepwise
or continuous values for framesize and framerate this adds fixed
values that can be selected.
For devices that support discrete values those are still queried
and used.
2014-07-16 23:42:55 +02:00
fryshorts 27297e7009 Add more logging to v4l2 plugin.
This adds some mostly user focused logging statements.
2014-07-16 23:42:55 +02:00
fryshorts 720f159274 Use macro for prefixing log messages in v4l2 plugin 2014-07-16 23:42:55 +02:00
fryshorts d8f3761cad Fix a possibly left open file descriptor in v4l2 plugin 2014-07-16 23:42:55 +02:00
fryshorts d03c94a000 Some minor code refactoring in v4l2 plugin
Small code changes to decrease indentation a little.
2014-07-16 23:42:55 +02:00
Palana 2920281e69 mac-avcapture: Remove debug code 2014-07-16 22:39:00 +02:00
Anry 07ac02e62b Localization correction for image plugin
Closes #181
2014-07-16 02:38:11 +02:00
jp9000 a3293c4cd6 Update libdshowcapture to the latest version 2014-07-15 08:20:47 -07:00
jp9000 4c539a427d Use OBS_CONFIG as version string for the FLV mux 2014-07-14 09:52:36 -07:00
Palana 902874e362 mac-avcapture: Fix logic error in preset list handling 2014-07-13 20:20:07 +02:00
Palana 082e1bff02 mac-avcapture: Remove default device name
No need to give it a name other than the empty string
2014-07-13 20:20:07 +02:00
jp9000 ea3e755427 Log fdk_aac module settings 2014-07-13 03:12:54 -07:00
jp9000 94d047bb69 Log FFmpeg AAC encoder settings 2014-07-13 03:10:16 -07:00
jp9000 c5667a9e46 Log x264 settings 2014-07-13 03:03:31 -07:00
jp9000 2956386109 Make x264 internal logging use the log macros 2014-07-13 03:03:07 -07:00
jp9000 2099ffc33b Fix bug where it would try to set a blank profile 2014-07-13 03:02:18 -07:00
jp9000 5b12a46d41 Use log macros for x264 2014-07-13 03:00:59 -07:00
jp9000 1188ad7561 Fix unreachable code warning 2014-07-12 12:00:12 -07:00
jp9000 f675c8029f Fix 'unused parameter' warnings on windows 2014-07-12 11:59:07 -07:00
jp9000 482791c5b6 Add locale for modules 2014-07-11 17:29:00 -07:00
jp9000 1e7a99eeb4 Rename mac display capture source file
Rename it from mac-screen-capture.m to mac-display-capture.m to be a bit
more consistent
2014-07-11 17:25:53 -07:00
fryshorts 1cf19d06f9 Fix infinite loop in v4l2 plugin
With no device present the capability callbacks would cause an
infinite loop.
2014-07-11 17:48:12 +02:00
jp9000 3394ac6488 Move mac display capture to mac-capture module
It was kind of silly that it was residing within the test-input module.
2014-07-10 21:55:46 -07:00
Jim 83c041e14f Merge pull request #152 from BtbN/cmake_fixes
Cmake fixes
2014-07-10 20:43:23 -07:00