Commit Graph

1350 Commits (59ea3becf2fea0c394bd21cb366d18b7c7c9c240)

Author SHA1 Message Date
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
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
BtbN 34b67db50f Minor refactor for creation of sub-windows
This refactors the sub-window code a bit so that instead of deleting the
window pointers, it calls QWidget::close() on them to safely trigger a
normal close on them instead (which will also delete them).
Moves setting the DeleteOnClose flag from inside of the Dialog classes
into the OBSBasic class, to make that behaviour more obvious.
2014-07-23 17:46:17 +02:00
BtbN dfa2d992c1 Make application quit on main window close
This causes the main window to signal the application to exit and delete
its own pointer on close.  This fixes an issue where apparently some
windows that aren't explicitly connected to the main window would be
left open when the main window was closed because by default Qt will
only exit when all windows have been closed.

Because it deletes its own pointer, instead of storing it in a
std::unique_ptr, use a QPointer because it has an internal mechanism for
automatically tracking QObject deletion even if the deletion was not
done on the QPointer itself, where as unique_ptr does not have that
functionality.  In other words, if the pointer is deleted elsewhere for
whatever reason, the QPointer will still set that internal pointer value
to null.

(message and minor modificiations by Jim)
2014-07-23 00:02:13 -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
Palana 77bb225910 Add OBS_TEXT_MULTILINE for text obs properties 2014-07-21 04:31:19 +02:00
Palana adf6beb03f Add color property implementation 2014-07-21 04:31:19 +02:00
jp9000 3a2677c502 If Direct3D doesn't initialize, try OpenGL 2014-07-20 18:25:57 -07:00
jp9000 86d634eeab Check for valid sizes when initializing video 2014-07-20 18:25:57 -07:00
jp9000 778cc2b318 (API Change) obs_reset_video: Use return codes
Changed API functions:
libobs: obs_reset_video

Before, video initialization returned a boolean, but "failed" is too
little information, if it fails due to lack of device capabilities or
bad video device parameters, the front-end needs to know that.

The OBS Basic UI has also been updated to reflect this API change.
2014-07-20 18:25:57 -07:00
Palana e62f965d3e Mark menu entries for Qt application menu mangling on OSX 2014-07-21 03:22:18 +02:00
jp9000 89a5bdbcf1 Add gs_device_type function
This allows a programatic way of determining the type of graphics module
currently active.
2014-07-20 16:23:03 -07:00
jp9000 a446dd74af Add gs_device_name function
This returns the name of the device, "Direct3D 11" or "OpenGL"
respectively.
2014-07-20 15:31:45 -07: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
Jim 45c58f55c1 Merge pull request #162 from fryshorts/fixes
Implement system information on linux
2014-07-18 23:54:22 -07:00
Jim 93e66b739a Merge pull request #175 from BtbN/novs
Remove Visual Studio projects
2014-07-18 23:46:46 -07:00
jp9000 82168702cd Update INSTALL instructions for windows/mac 2014-07-18 23:19:06 -07:00
jp9000 7658231ae8 Remove/fix some files in .gitignore
Stuff like automake stuff is no longer used, as well as a number of
other files that are no longer in use.

Also fixed cmbuild/ and build/ to /cmbuild/ and /build/ to emphasize
that they're fot root-level.  Not that they'll ever be used recursively,
but still.
2014-07-18 23:19:05 -07:00
jp9000 f2d2b58ae2 Add support for 32/64bit environment variables
This can make it a bit easier to set up 32bit/64bit environments
separately on windows.  This simply allows you to additionally set
FFmpegPath32, FFmpegPath64, x264Path32, x264Path64, etc.
2014-07-18 22:41:23 -07:00
jp9000 85701b0925 Allow copying of all dependencies (windows only)
If the cmake user variable COPY_DEPENDENCIES is set, this script will
make it so that a windows build will automatically copy all required
dependencies (FFmpeg, x264, and Qt5) to the respective
additional_install_files\exec(32|64) directory.  This makes it much
easier to set up a development environment on windows, and much easier
to make usable test builds.

It will also copy the appropriate Direct3D compiler DLL, along with
dependencies of dependencies (the icu*.dll and EGL/GLES files for Qt)
2014-07-18 22:41:22 -07:00
jp9000 5c597102f2 Improve additional_install_files for debug/release
This improves dependency copying and adds separated debug/release
install files.
2014-07-18 22:41:11 -07:00
jp9000 fbf4d18399 Remove obsolete FindDirectX.cmake script
There's no need to find DirectX because with VS2013 and mingw it's
already available by default.  Older visual studio versions that didn't
come with DirectX by default are no longer supported anyway.

(Also mingw doesn't currently work at all due to lack of proper headers,
but once they do it'll be available in the same way.  I think.)
2014-07-19 01:38:43 +02:00