Commit Graph

43 Commits

Author SHA1 Message Date
Jonathan Thomas
fd3865a8e6 Detecting default sample rate of default audio device (Windows seems to play audio out of sync on certain audio drivers, if there is a mismatch between OpenShot and the default system audio sample rate). This info will help debug issues. Adding back in a mutex on Timeline::GetFrame causing crashes. 2022-02-11 14:12:25 -06:00
Jonathan Thomas
133bae40c3 Adding pre-roll to VideoCacheThread, and making video & audio threads wait for the isReady() method before playing. Also fixed an audio bug where our internal buffer was not being cleared on seek. Removed some unused caching from Clip, and did some minor refactor on FrameMapper/Clip cache clearing. 2022-01-26 17:56:33 -06:00
Jonathan Thomas
f1c2cc06de Adding ability to open *.osp files in QtPlayer app. 2022-01-26 15:12:15 -06:00
Jonathan Thomas
9eda757885 Merge branch 'develop' into audio-devices
# Conflicts:
#	src/AudioBufferSource.cpp
#	src/AudioReaderSource.cpp
#	src/AudioReaderSource.h
#	src/Clip.cpp
#	src/Frame.cpp
#	src/Qt/AudioPlaybackThread.h
#	src/audio_effects/Compressor.h
#	src/audio_effects/Delay.h
#	src/audio_effects/Echo.h
#	src/audio_effects/Expander.h
2021-12-02 22:05:19 -06:00
Frank Dana
59138ea3e4 Adopt license management via Reuse project/tool (#711)
* reuse-managed license/copyright headers

reuse is a tool for compliance with the REUSE recommendations. See
<https://reuse.software/> for more information, and
<https://reuse.readthedocs.io/> for the online documentation.

* Set jsoncpp license
* Add MIT license for Decklink sources
* Explicitly license examples/
  - Add headers to source files
  - Change blanket licensing in .reuse/dep5 to only cover binary media
  - Import CC-BY-3.0 license and assign to sintel_trailer
2021-10-16 01:26:26 -04:00
FeRD (Frank Dana)
6aab6fd957 Audio: New device name lookup
- A new AudioDevices class replaces the AudioDeviceInfo struct.
  It has a single method, getNames(), which:
  * creates an AudioDeviceManager (NOT using the singleton)
  * scans for available devices
  * returns the results as a std::vector containing
    std::pair<std::string, std::string> objects

  (The AudioDevices device manager is never initialize()d, so
  no devices are opened; it should be safe to use even DURING
  playback, without disruption.)

  By using STL containers (rather than a custom struct) to return
  the results, Python is able to consume the output as a native
  list of tuples.

  AudioDeviceInfo is still present for compatibility, but deprecated.

- Eliminated some unnecessary conversions (like):
  * calls to std::string::c_str, when passing to juce::String.
    juce::String accepts std::string directly.
  * calls to juce::String::toRawUTF8, when creating std::string.
    There's a juce::String::ToStdString, which is better.
2021-08-24 13:11:00 -04:00
Jonathan Thomas
bdf6e9f854 Fix invalid starting PTS value, preventing blank 1st frames on some thumbnailing and video players. 2021-06-25 15:57:52 -05:00
Jonathan Thomas
0c4e1bcce4 Improving performance after working with google-prof, to profile CPU. Calling OMP_MP_NUM_PROCESSORS less often, since it's quite expensive according to profiling. Adjusting Timeline final_cache to match the video caching thread max_frames, so one doesn't clobber the other. Also, fixing an issue with openshot-player, where a video file with no audio skips horribly. 2021-02-04 17:28:07 -06:00
FeRD (Frank Dana)
aa40ea29e0 Update include paths in all source/header files 2020-10-18 07:43:37 -04:00
FeRD (Frank Dana)
6aebb10cea More explicit prefixing in Qt/ and Player classes 2019-09-21 00:14:32 -04:00
Frank Dana
67934675eb Merge branch 'develop' into std-prefixes 2019-08-25 04:05:58 -04:00
SuslikV
16ca3aef32 Fix return type mismatch 2019-08-24 11:36:21 +02:00
FeRD (Frank Dana)
b56ebf5765 QtPlayer/QtImageReader: std:: prefixes 2019-08-04 22:59:56 -04:00
FeRD (Frank Dana)
f170fdd009 Update copyright range to current year 2019-06-11 06:48:32 -04:00
FeRD (Frank Dana)
0327c2ab5c Remove license block from documentation comment 2019-06-09 08:31:04 -04:00
Jonathan Thomas
140fbaddff Added new AudioDeviceInfo struct, and populate a vector of them on QtPlayer initialization. This allows a user to overwrite the preferred audio device by using the setting PLAYBACK_AUDIO_DEVICE_NAME. 2019-04-23 16:45:02 -05:00
Jonathan Thomas
9dbb063ded Persist any error returned by JUCE during initialise() method, such as sample rate issues on Windows (when playback and recording sample rates do not match, which breaks WASAPI) 2019-04-04 00:55:47 -05:00
Jonathan Thomas
67291aab55 Preventing crash if Seek invoked before QtPlayer are initialized properly 2018-03-05 01:40:25 -06:00
Jonathan Thomas
c95db460d6 Big update! Updating all "long int" frame number types to int64_t, so all 3 OSes will produce the same depth and precision on frame numbers. Also removing variable bitrate support temporarily, since it causes more problems than it solves. 2017-09-28 16:03:01 -05:00
Jonathan Thomas
b3ca56b5ab Another attempted fix for audio device management. Moving CloseAudioDevice() call to only invoke when quiting OpenShot, and only initializing the JUCE audio manager 1 time. This fixes a audio freeze in Windows when the preview window launches. 2017-03-26 23:51:03 -07:00
Jonathan Thomas
6fe901f359 Refactoring closing of audio devices 2017-03-21 14:38:42 -05:00
Jonathan Thomas
85ac4bf6d2 Updating references to frame number / position to long int, there were still quite a few old "int" declarations, which limits the length of frame number. Also, updated precision of KeyFrames to use double (instead of float) for higher precision, which fixed lots of issues with very long videos (since our FrameMapper used a KeyFrame object to create a map to new frames) 2017-01-24 18:39:17 -06:00
Jonathan Thomas
98ccfb5ee1 Fixing cmake build scripts to support 64bit on Windows. Also refactoring some pointer handling to support 64bit on Windows (Linux and Mac have always supported it). Adding instructions for setting up a Windows 64 bit build environment using MSYS2. 2016-08-12 19:15:19 -05:00
Jonathan Thomas
92a9db2aa3 Improved detection of missing audio frames, and missing video frames. Also improved logic for giving up on missing frames in general. Also removed some deadlocks related to Seeking (Close() and Open() were deadlocking). The end result is much improved compatability with reading video files. 2016-06-29 02:42:00 -05:00
Jonathan Thomas
179d091005 Moved AppendDebugMessage to ZmqLogger, and updated 100+ references to use this new function. Removed debug var from readers/writers, and moved it to ZmqLogger.Enable(true/false). This allows debug output from all classes and functions, without any duplicate code. Also added some additional debug output for video playback and audio readers. 2016-04-21 01:39:17 -05:00