39 Commits

Author SHA1 Message Date
Vainock
eb06594381 Use property suffixes for units everywhere 2022-07-22 08:24:51 -04:00
Norihiro Kamae
7e3656ab33 plugins: Cleanup unused-parameters
- Remove unnecessary UNUSED_PARAMETER
- Add OBS_UNUSED attribute to unused parameters
- Also removes unused variables
2022-07-19 11:01:00 -04:00
tytan652
831fe03048 vlc-video: Fix sign-compare warning 2022-05-19 17:10:47 -04:00
Paul Mc Galey
59bdac1569 vlc-video: Fix video rotation and aspect ratio
Fixes #5250 and #3843.
Gets dimensions, aspect ratio and orientation/rotation from source video track.
2022-05-07 16:03:24 -07:00
pkv
5e4081e563 vlc-source: Fix surround sound not properly downmixed
This fixes issue https://github.com/obsproject/obs-studio/issues/6295 .
libvlc does some downmixing/upmixing when the number of channels
requested is less than the number of channels of the source.
We take advantage of that feature to avoid doing it with swresample
because we're missing info that libvlc is not giving (the exact channel
layout of the source).

Signed-off-by: pkv <pkv@obsproject.com>
2022-05-06 12:34:14 -04:00
PatTheMav
4ac3299575 vlc-video: Fix compiler warnings 2022-05-04 12:09:04 -04:00
jpark37
848e128435 libobs,plugins: Replace video matrix function
video_format_get_parameters_for_format provides a more accurate matrix
than video_format_get_parameters.
2022-04-07 19:28:51 -07:00
Jim
3e4e8d2fd0 vlc-video: Set channel limit to 8 instead of 2
17c069e1d02049b changed to add support for surround sound, but the limit
should really just be 8 channels as pointed out by tt
2022-01-29 15:28:36 -08:00
pkv
17c069e1d0 vlc-video: Enable surround sound support
The vlc plugin was keeping only up to two audio channels. It was overlooked when surround sound support was added to obs-studio. This commit remedies this oversight.

Signed-off-by: pkv <pkv@obsproject.com>
2022-01-29 15:22:29 -08:00
tt2468
c9b327d0f0 vlc-video: Emit media ended signal regardless of loop setting
Makes the signal's behavior on-par with `obs_source_media_started`.
`obs_source_media_started` is emitted every time a file in the playlist
is played, and so therefore should `obs_source_media_ended`. In this
scenario, the loop setting is actually irrelevant to the behavior that
this signal should have.
2021-12-11 15:25:40 -08:00
tt2468
dca1d3714b vlc-video: Ignore URLs when checking for missing files 2021-04-12 20:15:58 +12:00
VodBox
fb95e1d1e9 libobs: Add missing file API to sources 2021-01-17 10:31:58 +13:00
Alex
08ebc25e42 vlc-video: Free media struct 2020-12-03 14:28:26 -08:00
Matt Gajownik
737481c09e vlc-video: Use case insensitive compare for valid extension check
It's possible for files to have some/all characters uppercase.

Fixes #3562
2020-10-31 20:45:31 -07:00
Richard Stanway
c13357ff91 vlc-video: Fix format conversion typos
Introduced by 8b632fa227e2df4865ad59af84af39b8c2ce8e49
Fixes https://github.com/obsproject/obs-studio/issues/3396
2020-09-03 01:13:33 +02:00
Richard Stanway
8b632fa227 vlc-video: Fix possible undefined behavior in format conversion
Casting from char[] to uint32_t * is considered undefined behavior due
to different alignment requirements. Instead of using char[] for the new
value, this uses a macro to set a uint32_t directly.

Issue detected by PVS Studio.
2020-08-29 02:42:03 +02:00
univrsal
79c6e0dc13 vlc-video: Allow metadata retrieval through proc_handler 2020-05-03 10:55:52 -07:00
Clayton Groeneveld
62b1911e33 obs-plugins: Check if sources are showing for media hotkeys 2020-04-26 21:57:01 -05:00
Clayton Groeneveld
1e244d7d49 vlc-video: Add media control support 2020-02-05 08:14:18 -08:00
Clayton Groeneveld
82ffcdc827 UI: Add source icons 2019-11-24 20:50:42 -08:00
Clayton Groeneveld
e8ad89fc75 libobs, obs-scripting, vlc-video: Fix compiler warnings 2019-08-15 03:00:06 -05:00
jp9000
f53df7da64 clang-format: Apply formatting
Code submissions have continually suffered from formatting
inconsistencies that constantly have to be addressed.  Using
clang-format simplifies this by making code formatting more consistent,
and allows automation of the code formatting so that maintainers can
focus more on the code itself instead of code formatting.
2019-06-23 23:49:10 -07:00
dwot
8c7dbf69f2 vlc-video: Enable subtitle track selection 2019-04-17 06:45:33 -07:00
pkv
5114dc1b91 vlc-video: Enable audio track selection 2019-04-08 12:25:40 +02:00
jp9000
48ecd99b2d vlc-video: Fix a video format not playing back correctly 2019-02-14 23:51:17 -08:00
jp9000
9321b822bf vlc-video: Fix shuffle not being quite that random
This changes it so that the chooses indices at random from an index list
until the index list is exhausted.
2017-10-03 18:48:57 -07:00
jp9000
c914c1c23b vlc-video: Set properties to defer update mode
Makes it so that the settings do not update every time the user touches
a property of the source, but instead update when the user is finished.
2017-10-02 07:36:02 -07:00
cg2121
be77b13e58 vlc-source: Add media control hotkeys
This adds play/pause, restart, stop, next, and previous hotkeys to the
VLC source.

Closes jp9000/obs-studio#972
2017-09-11 01:13:59 -07:00
jp9000
a2d7aa3563 vlc-video: Don't allow VLC sources to be cloned 2017-08-05 21:24:39 -07:00
jp9000
5026d26b85 vlc-video: Fix integer conversion warning 2017-06-26 07:28:59 -07:00
John Cheng
31c67d83a6 vlc-video: Add network caching property
Allows having a bit more buffering for network-based video to prevent
things such as artifacting.

Closes jp9000/obs-studio#786
2017-06-24 16:11:39 -07:00
cg2121
7ff9510661 vlc-video: Add ability to shuffle playlist in VLC source 2017-05-05 01:04:08 -05:00
jp9000
ba1112470d vlc-video: Comment libvlc_video_get_size usage with video files 2016-08-20 12:15:34 -07:00
Andreas Reischuck
e6f950fde9 vlc-video: Fix URLs not working on windows
libvlc_media_new_path implies a file.  To get media based upon URLs, use
libvlc_media_new_location.  Additionally, if using a URL, it's best to
give it some playback caching/buffering, at least 100 milliseconds.

Closes jp9000/obs-studio#590
2016-08-20 12:15:22 -07:00
jp9000
f39f15325a vlc-video: Allow URLs to be used with VLC video source 2016-08-06 20:05:11 -07:00
jp9000
cbc1f63990 vlc-video: Allow all VLC-supported file types
Instead of just having a limited number of video file types that can be
used, allow all files types that VLC supports.
2016-08-06 19:47:50 -07:00
jp9000
67ac11f40e vlc-video: Fix downmixing issue
libVLC doesn't seem to provide full speaker configuration info, so when
downmixing audio from a file that had more than 2 channels, the audio
would sound wrong.

This change makes it so that libVLC does the downmixing to stereo rather
than libobs, just due to that lack of speaker configuration info.
2016-07-20 15:12:04 -07:00
jp9000
dc04acdb44 vlc-video: Add ability to add directories to playlist 2016-06-15 16:20:36 -07:00
jp9000
d89299fc1a vlc-video: Add VLC video source
Adds the ability to add video playlists via libvlc instead of via the
media source.  This is mostly just being added as a secondary option to
the media source to reduce maintenance costs and save time.  Currently
libff cannot pause/unpause/seek, and isn't programmed to handle
playlists yet.

If VLC is installed on the computer (with the same architecture) it will
allow video playback via libVLC.  In the future, users should be able to
optionally download VLC libraries via the installer as well if they
don't want to necessarily install VLC to get the plugin working.

This plugin performs runtime linking instead of compile-time linking;
compiling VLC is not required, only its headers are required.  To
compile, clone the VLC repository and set the VLCPath cmake variable to
point to the VLC repository directory.
2016-06-06 23:53:59 -07:00