Commit Graph

133 Commits

Author SHA1 Message Date
Daniel Jour
4b76c1eadc Frame.cpp: Avoid unnecessary copy of image data
As mentioned in issue #202 QImage::bits() and QImage::scanLine() make
a deep copy of the source image.  This is completely unnecessary when
read-only access to the pixel data is required.  Changing to
QImage::constBits() and QImage::constScanLine() solves this.  Both
functions were introduced in Qt 4.7.

https://doc.qt.io/qt-5/qimage.html#constBits
2019-11-26 00:56:13 +01: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)
552f7533fa Prefix all string types with std::
It confuses Doxygen if they're not prefixed, since they don't match
the declarations in `Frame.h`.
2019-08-04 15:13:40 -04:00
FeRD (Frank Dana)
4d7ecded14 Fix misleading indentation 2019-07-30 13:15:31 -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
722d672f58 Update Frame.cpp 2019-06-08 12:52:35 -05:00
Jonathan Thomas
438b2c333e Update Frame.cpp 2019-06-08 12:21:56 -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
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
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
b63a63ceb2 Fix many bugs around FPS and video length calculation (especially for MP3 and streaming WEBM formats). Also protecting samples_per_frame calculation to keep from crashing on undetected FPS. 2018-09-17 00:27:30 -05:00
Jonathan Thomas
f4b4aac7df Update Frame.cpp
Fixing merge error
2018-06-11 23:36:23 -07:00
Jonathan Thomas
805304312a Merge branch 'develop' into feature/new-audio-mixing 2018-06-11 23:32:05 -07:00
Jonathan Thomas
04e4f63ea8 Calculate max volume of all overlapping clips, and scale clip volume to fit within the 100%, to prevent popping 2018-06-11 12:02:21 -07:00
Jonathan Thomas
1c71659e94 Prevent a negative starting sample when adding audio to a frame
(cherry picked from commit 0327143)
2018-06-06 05:14:21 -05:00
Jonathan Thomas
032714316d Prevent a negative starting sample when adding audio to a frame 2018-06-06 03:56:02 -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
Rich Alloway
5335797767 Do not clobber gainFactor when determining volume adjustments and add a TODO note about current_max_volume always being 0 2018-05-10 12:09:55 -04:00
Jonathan Thomas
6e99445eca Fixing a bug with Frame::AddImage (convertToFormat) not actually doing anything. It returns a new image, and does not convert the format in-place. 2018-03-04 23:59:14 -06:00