Commit Graph

85 Commits

Author SHA1 Message Date
FeRD (Frank Dana)
fd78be6b95 Remove JUCE defines
A few headers contained #defines that were intended to work around
issues with the JUCE library headers, but those things are best
handled in other ways.
2019-12-18 23:55:16 -05:00
Frank Dana
969e8320e6 Merge branch 'develop' into std-prefixes 2019-10-29 16:06:55 -04:00
FeRD (Frank Dana)
bcc62f900c Fix juce:: prefixing 2019-10-27 03:56:13 -04:00
FeRD (Frank Dana)
3ce85d0fff openshot:: prefixing as needed for SWIG
It turns out SWIG is a lot pickier than GCC about namespaces, and
requires a lot more `openshot::` prefixing in our headers, if we
eliminate the `using namespace...` statements from them.
2019-08-05 02:17:22 -04:00
FeRD (Frank Dana)
0ac3720023 SWIG: Warnings cleanup
* Remove a SWIG pragma from Frame.h (gcc warns on it)
* Place the equivalent %warnfilter in the openshot.i files
* Set openshot.i PROPERTY GENERATED_COMPILE_OPTIONS with flags to
  disable warning spew in generated SWIG code, if -Wall is used

(Also, remove 'using namespace std' from Frame.h, and add std::
prefixes to necessary variables.)
2019-07-12 13:28:47 -04:00
Chris Kirmse
572875b8d7 Merge remote-tracking branch 'upstream/develop' into develop 2019-06-24 10:00:22 -07:00
Jonathan Thomas
967f23b8a4 Merge pull request #245 from ferdnyc/license-block
Upgrade Doxygen documentation formatting/content
2019-06-21 00:24:54 -05:00
Frank Dana
a47d5b58fd Add backwards-compatible Imagemagick 7 support (#252)
* Add ImageMagick 7 compatibility

A new header, `imclude/MagickUtilities.h`, is created to hold the
compatibility `#define`s.

The image-conversion code in `src/Frame.cpp` received the only
major changes — instead of doing the export by hand (and having
to account for changes in the underlying API), it uses the
`MagickCore::ExportImagePixels()` function which does basically
the same work, but accounts for all of the API changes for us.
The API of that function is _unchanged_ from IM6 to IM7.

TODO: `MagickCore::ExportImagePixels()` will return an `exception`
struct if it encounters any problems. Currently the code ignores
that, which it should not.

* Add ImageMagick 7 compatibility

A new header, `imclude/MagickUtilities.h`, is created to hold the
compatibility `#define`s.

The image-conversion code in `src/Frame.cpp` received the only
major changes — instead of doing the export by hand (and having
to account for changes in the underlying API), it uses the
`MagickCore::ExportImagePixels()` function which does basically
the same work, but accounts for all of the API changes for us.
The API of that function is _unchanged_ from IM6 to IM7.

TODO: `MagickCore::ExportImagePixels()` will return an `exception`
struct if it encounters any problems. Currently the code ignores
that, which it should not.

Thanks @ferdnyc
2019-06-21 00:07:49 -05: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
2b308c6d59 Update Frame.h 2019-06-08 12:23:26 -05:00
Jonathan Thomas
13e74b147a Adding new CheckPixel method to validate a specific pixel color 2019-05-31 19:02:28 -05:00
Chris Kirmse
833fcb8e8e fix a number of memory leaks
- some were with libav functions
- same were due to non-virtual destructors
2019-05-08 15:02:33 -07:00
Jonathan Thomas
6e2600dcd4 Moving JuceHeader.h below other includes, to be sure it is always included after system libraries (for Mac Point build failure) 2019-03-30 14:23:50 -05:00
FeRD (Frank Dana)
7e7f5c341a Use new Juce header file location 2019-03-29 08:11:19 -04:00
Chris Kirmse
650d3ec820 fix grammar error with possessive its and update sample for audio parameter 2019-03-14 09:26:56 -07:00
Jonathan Thomas
e879188a7d FFmpeg 3 & 4 support, Travis CI support, OpenMP schedule change (#160)
* FFmpeg4 support. Compile warnings fixes. Credit goes to many people, including ferdnyc, peterM, and other awesome folks!

* Adding environment checking to enable/disable omp taskwait after each video/audio frame is processed. This is experimental for some users with crashes.

* Moving `omp taskwait` to after the ProcessVideoPacket() method, since that is the only place it is useful.

* Fixing crashes on missing Clip source file, and changing FFmpeg scaling algorthm from SWS_BILINEAR to  SWS_LANCZOS (for higher quality scaling)

* Update FindFFmpeg.cmake module, and updating build script. Also enabling debug builds.

* Updating experimental travis build script

* Fixed unit test for newer version of FFmpeg (audio resampling)

* Experimental travis multiple jobs

* Adding OMP schedule hint (thanks PeterM), which prevents crashes in some circumstances.
2018-09-11 00:40:31 -05:00
Jonathan Thomas
bc5607910d Fixing audio pops due to resampling (this fixes a bunch of audio popping-related bugs). Now Frame objects track their own max_audio_sample_count, as we add audio data... so we have an accurate bounds on each frame. 2018-05-30 03:20:31 -05:00
Jonathan Thomas
f2b0f3a0f4 Adding metadata from format, audio stream, and video streams to ReaderBase.info, which in some cases includes the 'rotate' metadata added by certain cameras, and audio metadata like title, album, artist, copyright, dates, etc... Auto-Rotates any Clip with Reader metadata 'rotate' attribute. 2018-02-03 01:57:18 -06:00
Jonathan Thomas
7b13001bf7 Fixing assignement and copy operators on Frame class (to prevent crashes for unintiailized image and audio pointers), and ensuring both copy and assignment operators work as expected. Also fixing the color property of Frames, which was being lost on some constructors. 2018-01-21 23:49:07 -06:00
Jonathan Thomas
2fcb35ddcc Removing throw statements from header files (thanks Peter) 2017-10-26 18:44:35 -05: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
f12ffe692b Migrating tr1 to std, adding C++11 support to build scripts, fixing crash in FFmpegReader (caused by shared_ptr, buffer, and last_video_frame corruption). Much improved stability with this change. Thanks to Craig and Peter for the help! 2017-08-20 17:37:39 -05:00
Jonathan Thomas
c30dbb90d8 Adding additional locks when adding/changing audio data. Reducing FrameMapper to a single frame at a time (increase seek speed and decrease crashes). Fixing crash on Time keyframes where it would sometimes calculate an invalid frame number. 2017-07-19 16:05:07 -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