Commit Graph

112 Commits

Author SHA1 Message Date
FeRD (Frank Dana)
3680144511 FrameMapper: Eliminate is_open member variable
It was being used uninitialized because it's never actually set,
therefore it serves no purpose.
2020-03-22 12:35:31 -04:00
Frank Dana
8ea7449363 Merge branch 'develop' into json-parsing 2020-01-20 15:25:40 -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
FeRD (Frank Dana)
e502f97d8a Don't compare differently-signed types 2019-12-15 14:22:59 -05:00
Frank Dana
8bde07682c Merge branch 'develop' into std-prefixes 2019-10-22 21:00:27 -04: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)
3879b09047 FrameMapper/KeyFrame/Point: std:: prefixes 2019-08-04 22:54:06 -04:00
Jonathan Thomas
12fce8040f Merge pull request #266 from ferdnyc/zmq-default-params
Default values for ZMQ logging calls
2019-07-29 16:30:22 -05: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
FeRD (Frank Dana)
f29a6bcb27 Trim unnecessary args off logging calls 2019-07-03 14:14:02 -04:00
FeRD (Frank Dana)
25b522589d Always catch-by-reference in C++11 2019-07-03 12:58:02 -04: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
FeRD (Frank Dana)
744a4f3ec1 Remove Json:Reader
`Json::Reader` has been deprecated for some time, so we replace it with
`Json::CharReader` generated by a `Json::CharReaderBuilder`, or (in the
one instance where we have a stream as input) `Json::parseFromStream();`
2019-06-19 21:20:04 -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
Chris Kirmse
25e51d815e free cache in FrameMapper::Close()
- this hugely reduces the memory used by rendering a timeline
  with a lot of clips
- could be related to issue #239
2019-05-30 09:44:39 -07:00
Chris Kirmse
d5a29500a5 change freeing of frame_mappers allocated in Timeline
- each class is now responsible to free whatever it allocates
- all tests passed on my machine with ffmpeg 3.2
- Clip is now more careful about freeing a reader if it allocated it as well
2019-05-09 10:51:40 -07: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
8f385c112a Improved Keyframe Performance (#197)
* Refactor of Coorindate and Keyframe optimized for performance (much faster than previously). Also refactored FrameMapper to not use a Keyframe, and to only process frame mapping when needed... speeding up Json loading of project files.

* Fixing FrameMapper linear calculation to match existing Keyframe calculation

* Fixing Keyframe to pass original unit tests, and correctly calculate the Keyframe repeat fractions and deltas.

* Small refactor of time mapped logic in Clip.cpp
2019-03-06 15:35:03 -06:00
Jonathan Thomas
7b6eb9c21b Integration of resvg SVG library (optional during build) (#185)
* Integration of libresvg SVG library (optional during build)

* Major refactor of max_width and max_height for preview optimization

* Fixed many bugs related to preview resizing, with regards to cached frames

* Updating gitlab CI to find RESVGDIR correctly for windows, and adding svgz support

* Updating cmake findresvg module to search for windows locations first, to prevent an issue on our windows builders and updating some CMake output.

* Removing folder path from resvg header, since it could be installed in different named folders. This is an attempt to fix Windows include issues.

* Making call to AV_FREE_FRAME conditional for non windows systems (because it crashes on Windows for seemingly no reason). Needs more investigation.
2019-01-19 02:18:52 -06: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
566c8f5a82 Spelling and typo fixes. Thanks Gelma for the pull request 2018-01-06 02:22:05 -06:00
Jonathan Thomas
2fcb35ddcc Removing throw statements from header files (thanks Peter) 2017-10-26 18:44:35 -05:00