Commit Graph

50 Commits

Author SHA1 Message Date
Jonathan Thomas
096c2c409d Converting RGB8888 to ARGB32_Premultiplied (for performance reasons) 2020-10-19 16:17:20 -04:00
Jonathan Thomas
8387b124ad Large refactor of Timeline, TimelineBase, ClipBase, and Clip, to allow a Clip access to the parent timeline instance (if available), and thus, certain properties (preview size, timeline FPS, etc...). This allows for a simpler rendering of Clip keyframes (during the Clip::GetFrame method), and a simpler Timeline class, that can change the preview window size dynamically and no longer requires a Singleton Settings class.
- Also removed "crop" from Clip class, as it was never implmeneted correctly, and we have a fully functional "crop" effect when needed
 - Added caching to Clip class, to optimize previewing of cached frames (much faster than previous)
2020-10-19 16:05:01 -04:00
FeRD (Frank Dana)
6c656dd7f7 QtImageReader: Consolidate ctors 2020-10-17 06:23:44 -04:00
Jonathan Thomas
8f6c64215e Merge pull request #556 from ferdnyc/use-make-shared
Use std::make_shared to allocate shared ptrs, instead of std::shared_ptr constructors
2020-10-16 14:48:14 -05:00
FeRD (Frank Dana)
bd90b8d6c9 ReaderBase: Deprecate SetClip/GetClip names
- Replacement method names are SetParentClip/GetParentClip
- Old names are retained as deprecated alternates, for now
- libopenshot internal calls (very few) are updated

ReaderBase.cpp: Remove (Set,Get)Clip
2020-09-01 23:05:04 -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
Frank Dana
4fad197fbe Add version gating for Zmq and Qt deprecations (#470)
* ZmqLogger: Avoid deprecated send() in later ZMQ
* QtImageReader: byteCount() deprecated in QT 5.10+
2020-03-23 08:16:02 -04:00
Frank Dana
8ea7449363 Merge branch 'develop' into json-parsing 2020-01-20 15:25:40 -05:00
FeRD (Frank Dana)
48fc7de326 Fix RESVG format in GetFrame 2020-01-11 19:27:53 -05:00
FeRD (Frank Dana)
4f2800664b Change RESVG image format to ARGB32_Pre 2020-01-08 17:00:46 -05:00
FeRD (Frank Dana)
22bf6edfba Enhance Json data handling
- Parsing from string to Json::Value is now done by utility function
  openshot::stringToJson() in Json.cpp, all SetJson() methods call it.
- Expand use of const member functions and args where appropriate.
- Use std::to_string() to format int/float values as strings.
- Correct mentions of nonexistent Json::JsonValue type in docstrings
2019-12-27 08:51:51 -05:00
Frank Dana
969e8320e6 Merge branch 'develop' into std-prefixes 2019-10-29 16:06:55 -04:00
Frank Dana
178c8e2ba3 Merge pull request #346 from jeffski/fix-text-24hr-memory-issue
Reduce duration of Image/Text Readers to 1 hour (#327)
2019-10-25 13:57:31 -04:00
FeRD (Frank Dana)
e15c0c168b Set still-image duration to 1 hour 2019-10-25 13:42:57 -04:00
Frank Dana
8bde07682c Merge branch 'develop' into std-prefixes 2019-10-22 21:00:27 -04:00
Jonathan Thomas
56b1126c21 Merge pull request #302 from ferdnyc/svg-path-check
QtImageReader: Safer ReSVG file extension checks
2019-10-22 17:30:35 -05:00
Jeff Shillitto
acadab708f Stop 24 hours worth for frames being loaded in to memory 2019-10-15 22:11:24 +11:00
FeRD (Frank Dana)
366ff2c5e6 src: Don't pass "" file_path args to exceptions 2019-08-27 15:47:39 -04:00
FeRD (Frank Dana)
76fc1ef571 QtImageReader: Safer ReSVG file extension checks
This changes the type of the private `path` variable to QString
internally (which we were converting it to for a bunch of operations
anyway), and uses QString's more robust string-manipulation and
comparison methods to ensure that only filenames that _end in_ an
.svg/.svgz extension (case-insensitively) are recognized as SVG files.

Previously, a filename such as "Title.svg.png" would be interpreted as
an SVG file.

The change in QString type is purely internal, all of the class's
interfaces remain the same, and accept `std::string path`. We simply
convert it to/from QString at opposite places in the code, now.
2019-08-09 20:50:28 -04:00
FeRD (Frank Dana)
352fd6629a Remaining std:: prefixes 2019-08-04 23:51:02 -04:00
FeRD (Frank Dana)
b56ebf5765 QtPlayer/QtImageReader: std:: prefixes 2019-08-04 22:59:56 -04:00
Jonathan Thomas
5f331e24df Merge pull request #265 from ferdnyc/catch-by-reference
Exceptions: catch-by-reference and other cleanup
2019-07-29 16:27:40 -05:00
FeRD (Frank Dana)
35eb6adc55 Clean up allocated memory in JSON code 2019-07-11 05:00:47 -04:00
Jonathan Thomas
9806694e13 Fix crash caused by resvg failing to parse SVG (when Qt can still parse things fine) 2019-07-09 15:48:46 -05:00
Jonathan Thomas
a4cc119717 Fix SVG render size for Resvg (breaking common transitions) 2019-07-09 15:23:52 -05:00