0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00
Commit Graph

1371 Commits

Author SHA1 Message Date
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
Palana
1abde3d476 Preserve source data for sources with unknown source ids 2014-07-29 20:06:36 +02: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
Palana
e123c9c062 Clarify source creation error message 2014-07-29 17:11:49 +02:00
Jim
40178f127e Merge pull request #205 from jp9000/improved-module-handling
Improve module path handling
2014-07-28 16:59:06 -07:00
jp9000
53aa0a60d5 Check for duplicate sources/outputs/encoders/etc
With the recent change to module handling by BtbN, I felt that having
this information might be useful in case someone is actually using make
install to set up their libraries.
2014-07-28 16:15:09 -07:00
jp9000
cd2c75a05d Rename get_encoder_info for consistency
Sources/Outputs/Services all use a find_* naming scheme, so it felt out
of place for the encoder to use a different naming scheme.
2014-07-28 16:13:04 -07:00
jp9000
11c7e07eac Add extra search path for third party plugins
The OBSBasic UI will now allow the use of a subdirectory of the user
application data directory for third-party plugins.  Though I'm not
entirely sure if this ideal or not.  Regardless, this is one of the
first (of many) steps towards a plugin manager.

On windows, this is %appdata%/obs-studio/plugins
On linux, this is ~/.obs-studio/plugins
On mac, this is ~/Library/Application Support/obs-sudio/plugins
2014-07-27 17:29:11 -07:00
jp9000
e87ed914f8 Add API functions to get information about modules 2014-07-27 17:29:11 -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
jp9000
c2a0b9c00d Change macro to MODULE_MISSING_EXPORTS for clarity
This is a bit more clear than MODULE_FUNCTION_NOT_FOUND.
2014-07-27 17:28:35 -07:00
jp9000
16f2475046 Add functions to specify OS module extensions 2014-07-27 17:28:35 -07:00
Jim
c3d03f419f Merge pull request #214 from BtbN/libprefix
Search for plugins without lib prefix
2014-07-27 17:28:16 -07:00
BtbN
1098c75d34 Search for plugins without lib prefix
Fixes #213
2014-07-28 01:25:18 +02:00
jp9000
c5c8cba74d Fix incompatible pointer type warning
Well, needless to say I'm very happy this didn't end up exploding.  I'm
surprised GCC and clang let this through.
2014-07-27 14:33:37 -07:00
jp9000
ee4a93b47b Add function to get current core version
The version macro that modules use to compile versus the actual core
version that may be in use may be different, so this is a way to compare
them to check for compatibility issues later on.
2014-07-27 13:27:02 -07:00
jp9000
24afd26d5d Output total frames and percentage skipped 2014-07-27 13:26:52 -07:00
jp9000
289137d5f9 media-io: Add function for total video frames 2014-07-27 13:26:51 -07:00
jp9000
e796aba928 Set proper output length for string conversions 2014-07-27 13:26:51 -07:00
jp9000
99d8bdcee7 Add 'glob' functions for file searching 2014-07-27 13:26:51 -07:00
Jim
c9b205fbf7 Merge pull request #212 from dodgepong/latest-crowdin-translations
Instruct translators where to go to translate
2014-07-27 02:07:11 -07:00
dodgepong
cb403e565f Instruct translators where to go to translate 2014-07-27 01:47:59 -07:00
Jim
ffedbb489e Merge pull request #191 from BtbN/plugin_search
Add searching for plugins instead of a hardcoded list
2014-07-26 19:31:18 -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
BtbN
8380d10805 Export plugin destination and relative prefix to obsconfig.h 2014-07-26 14:27:39 +02:00
BtbN
3442654259 Remove lib prefix from plugins 2014-07-26 14:09:34 +02:00
BtbN
0b7ef499c5 Add relative plugin dest obsconfig.h define 2014-07-26 14:07:14 +02:00
BtbN
cac6ad1822 Move config values from the commandline to obsconfig.h 2014-07-26 14:07:14 +02:00
Jim
94e2badb0e Merge pull request #206 from benklett/v4l2-add-pal
Add 720x576 (DV-PAL) as another fallback v4l2 framesize
2014-07-25 09:01:37 -07:00
benklett
4b2010aa4e Add 720x576 (DV-PAL) as another fallback v4l2 framesize 2014-07-25 15:46:38 +02:00
jp9000
3ab7d4f9fd Minor fix to formatting in call_module_load 2014-07-24 14:56:50 -07:00
jp9000
57dcf49757 Fix NULL pointer dereference with text lookups 2014-07-24 00:27:15 -07:00
jp9000
c9e225d719 Prevent loading image files with null/empty paths 2014-07-24 00:25:59 -07:00
jp9000
6d89dde0da Fix dstr_end bug (it's len - 1)
Somewhat of an embarassing fix.  Using 'len' will just return the null
terminator.
2014-07-23 20:16:37 -07:00
jp9000
dc42ac0012 Add dstr_end function to get the last character 2014-07-23 17:53:27 -07:00
jp9000
7303009ff2 Set minimum version on mac to 10.8.5 2014-07-23 17:52:41 -07:00
Jim
12fd4ea68f Merge pull request #195 from hwdro/master
Workaround for audio meter widget getting stuck.
2014-07-23 10:07:33 -07:00
HomeWorld
6036857232 Workaround for audio meter widget getting stuck 2014-07-23 19:56:36 +03:00
Jim
88ede467b5 Merge pull request #199 from BtbN/qt_exit
Make application quit on main window close
2014-07-23 08:59:28 -07:00