Commit Graph

148 Commits

Author SHA1 Message Date
FeRD (Frank Dana)
9c83429ab1 Frame: Use delegating constructors 2020-09-13 16:35:35 -04:00
FeRD (Frank Dana)
1c8aea94d0 Frame: Put Qt includes where they're used 2020-09-13 16:28:31 -04:00
FeRD (Frank Dana)
c14922d57e Frame.cpp/h: Fix a bunch of wrong comments
Best reason not to narrate the code in the comments: The code gets
changed, but the documentation doesn't.
2020-08-20 20:40:55 -04:00
FeRD (Frank Dana)
3c2532b4de Use std::make_shared to allocate shared ptrs
std::make_shared does in a single allocation what the constructors
for std::shared_ptr usually take at least 2 allocations to do.
May give us an infinitesimal performance/memory improvement.

https://www.modernescpp.com/index.php/memory-and-performance-overhead-of-smart-pointer
2020-08-20 16:50:12 -04:00
FeRD (Frank Dana)
9f4cdd46fb Frame: juce::String supports std::basic_ostream 2020-08-07 02:01:48 -04:00
Jonathan Thomas
7831cfe912 Adding some new functionality and documentation to DummyReader. Adding the ability to add test frames, with fake image and audio data. This will can be used in unittests, and will soon be used to verify some new audio improvements (coming soon). 2020-06-06 01:55:52 -05:00
FeRD (Frank Dana)
affd4b2488 Add some missing juce:: prefixing 2020-05-19 06:33:30 -04:00
FeRD (Frank Dana)
130829a412 Deprecated juce::ScopedPointer => std::unique_ptr 2020-05-19 06:32:35 -04:00
Jonathan Thomas
4d7b4072c3 Fixing abs -> fabs regression. Not sure how this worked before. 2020-03-02 23:50:10 -06:00
FeRD (Frank Dana)
86bfa2fa4a Frame: Fix interlaced AddImage 2020-01-21 11:19:27 -05:00
Jonathan Thomas
4cf322d21a Merge pull request #397 from ferdnyc/frame-copy
Frame: Copy has_audio_data correctly in DeepCopy
2020-01-02 17:45:32 -06:00
Jonathan Thomas
0bec048acc Copy max_audio_samples with Frame DeepCopy 2020-01-02 17:15:49 -06:00
FeRD (Frank Dana)
e49f62247e Use C++11 range-based for loops where we can 2019-12-28 09:50:09 -05:00
FeRD (Frank Dana)
31a0565d26 Frame: DeepCopy has_audio_data correctly 2019-12-27 10:51:02 -05:00
Daniel Jour
7e2846039e More traditional placement of const specifier, matching casts
As suggested in the code review:

 - More traditional placment of the const specifier, e.g. const unsigned char * instead of unsigned char const *
 - Matching casts to also cast to const unsigned char * instead of of unsigned char *

Co-Authored-By: Frank Dana <ferdnyc@gmail.com>
2019-11-27 23:57:58 +01:00
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