2011-10-11 08:44:27 -05:00
|
|
|
#ifndef OPENSHOT_H
|
|
|
|
|
#define OPENSHOT_H
|
|
|
|
|
|
|
|
|
|
/**
|
2013-09-09 17:06:07 -05:00
|
|
|
* @file
|
2013-09-12 17:52:10 -05:00
|
|
|
* @brief This header includes all commonly used headers for libopenshot, for ease-of-use.
|
2013-09-09 17:06:07 -05:00
|
|
|
* @author Jonathan Thomas <jonathan@openshot.org>
|
2011-10-11 08:44:27 -05:00
|
|
|
*
|
2013-09-09 17:06:07 -05:00
|
|
|
* @mainpage OpenShot Video Editing Library C++ API
|
|
|
|
|
*
|
2013-09-10 12:59:06 -05:00
|
|
|
* Welcome to the OpenShot Video Editing Library (libopenshot) C++ API. This library was developed to
|
2013-09-09 17:06:07 -05:00
|
|
|
* make high-quality video editing and animation solutions freely available to the world. With a focus
|
|
|
|
|
* on stability, performance, and ease-of-use, we believe libopenshot is the best cross-platform,
|
|
|
|
|
* open-source video editing library in the world. This library powers
|
|
|
|
|
* <a href="http://www.openshot.org">OpenShot Video Editor</a> (version 2.0+), the highest rated video
|
2014-03-29 18:49:22 -05:00
|
|
|
* editor available on Linux (and soon Windows & Mac). It could also <b>power</b> your next video editing project!
|
2013-09-09 17:06:07 -05:00
|
|
|
*
|
|
|
|
|
* Our documentation is quite extensive, including descriptions and examples of almost every class, method,
|
2014-03-29 18:49:22 -05:00
|
|
|
* and parameter. Getting started is easy.
|
2013-09-09 17:06:07 -05:00
|
|
|
*
|
|
|
|
|
* All you need is a <b>single</b> include to get started:
|
|
|
|
|
* @code
|
2011-10-11 08:44:27 -05:00
|
|
|
* #include "OpenShot.h"
|
2013-09-09 17:06:07 -05:00
|
|
|
* @endcode
|
|
|
|
|
*
|
2013-09-09 23:32:16 -05:00
|
|
|
* ### The Basics ###
|
2013-09-09 17:06:07 -05:00
|
|
|
* To understand libopenshot, we must first learn about the basic building blocks:.
|
2013-09-13 17:11:38 -05:00
|
|
|
* - <b>Readers</b> - A reader is used to read a video, audio, image file, or stream and return openshot::Frame objects.
|
2015-02-05 00:11:11 -06:00
|
|
|
* - A few common readers are openshot::FFmpegReader, openshot::TextReader, openshot::ImageReader, openshot::ChunkReader, and openshot::FrameMapper
|
2013-09-12 23:41:49 -05:00
|
|
|
*
|
2013-09-13 17:11:38 -05:00
|
|
|
* - <b>Writers</b> - A writer consumes openshot::Frame objects, and is used to write / create a video, audio, image file, or stream.
|
2015-02-05 00:11:11 -06:00
|
|
|
* - A few common writers are openshot::FFmpegWriter, openshot::ImageWriter, and openshot::ChunkWriter
|
2013-09-12 23:41:49 -05:00
|
|
|
*
|
2013-09-13 17:11:38 -05:00
|
|
|
* - <b>Timeline</b> - A timeline allows many openshot::Clip objects to be trimmed, arranged, and layered together.
|
|
|
|
|
* - The openshot::Timeline is a special kind of reader, built from openshot::Clip objects (each clip containing a reader)
|
2013-09-12 23:41:49 -05:00
|
|
|
*
|
2013-09-13 17:11:38 -05:00
|
|
|
* - <b> Keyframe</b> - A Keyframe is used to change values of properties over time on the timeline (curve-based animation).
|
2013-09-12 23:41:49 -05:00
|
|
|
* - The openshot::Keyframe, openshot::Point, and openshot::Coordinate are used to animate properties on the timeline.
|
2013-09-09 17:06:07 -05:00
|
|
|
*
|
2013-09-09 23:32:16 -05:00
|
|
|
* ### Example Code ###
|
2013-09-09 17:06:07 -05:00
|
|
|
* Now that you understand the basic building blocks of libopenshot, lets take a look at a simple example,
|
|
|
|
|
* where we use a reader to access frames of a video file.
|
2011-10-11 08:44:27 -05:00
|
|
|
|
2013-09-09 17:06:07 -05:00
|
|
|
* @code
|
|
|
|
|
* // Create a reader for a video
|
|
|
|
|
* FFmpegReader r("MyAwesomeVideo.webm");
|
|
|
|
|
* r.Open(); // Open the reader
|
|
|
|
|
*
|
|
|
|
|
* // Get frame number 1 from the video
|
2017-08-20 17:37:39 -05:00
|
|
|
* std::shared_ptr<Frame> f = r.GetFrame(1);
|
2013-09-09 17:06:07 -05:00
|
|
|
*
|
|
|
|
|
* // Now that we have an openshot::Frame object, lets have some fun!
|
|
|
|
|
* f->Display(); // Display the frame on the screen
|
|
|
|
|
* f->DisplayWaveform(); // Display the audio waveform as an image
|
|
|
|
|
* f->Play(); // Play the audio through your speaker
|
|
|
|
|
*
|
|
|
|
|
* // Close the reader
|
|
|
|
|
* r.Close();
|
|
|
|
|
* @endcode
|
|
|
|
|
*
|
2013-09-14 22:52:29 -05:00
|
|
|
* ### A Closer Look at the Timeline ###
|
|
|
|
|
* The <b>following graphic</b> displays a timeline, and how clips can be arranged, scaled, and layered together. It
|
|
|
|
|
* also demonstrates how the viewport can be scaled smaller than the canvas, which can be used to zoom and pan around the
|
|
|
|
|
* canvas (i.e. pan & scan).
|
|
|
|
|
* \image html /doc/images/Timeline_Layers.png
|
|
|
|
|
*
|
2019-06-12 22:55:54 -04:00
|
|
|
* ### Build Instructions ###
|
|
|
|
|
* Build instructions are available for all three major Operating Systems:
|
|
|
|
|
* * [Building libopenshot for Windows](doc/INSTALL-WINDOWS.md)
|
|
|
|
|
* * [Building libopenshot for MacOS](doc/INSTALL-MAC.md)
|
|
|
|
|
* * [Building libopenshot for Linux](doc/INSTALL-LINUX.md)
|
2013-09-14 22:52:29 -05:00
|
|
|
*
|
|
|
|
|
* ### Want to Learn More? ###
|
2013-09-09 17:06:07 -05:00
|
|
|
* To continue learning about libopenshot, take a look at the <a href="annotated.html">full list of classes</a> available.
|
2013-09-09 23:32:16 -05:00
|
|
|
*
|
2019-06-09 08:31:04 -04:00
|
|
|
* \anchor License
|
2013-09-09 23:32:16 -05:00
|
|
|
* ### License & Copyright ###
|
2019-06-11 06:48:32 -04:00
|
|
|
* Copyright (c) 2008-2019 OpenShot Studios, LLC
|
2014-03-29 18:49:22 -05:00
|
|
|
* <http://www.openshotstudios.com/>. This file is part of
|
|
|
|
|
* OpenShot Library (libopenshot), an open-source project dedicated to
|
|
|
|
|
* delivering high quality video editing and animation solutions to the
|
|
|
|
|
* world. For more information visit <http://www.openshot.org/>.
|
2013-09-09 23:32:16 -05:00
|
|
|
*
|
2014-03-29 18:49:22 -05:00
|
|
|
* OpenShot Library (libopenshot) is free software: you can redistribute it
|
2014-07-11 16:52:14 -05:00
|
|
|
* and/or modify it under the terms of the GNU Lesser General Public License
|
2014-03-29 18:49:22 -05:00
|
|
|
* as published by the Free Software Foundation, either version 3 of the
|
|
|
|
|
* License, or (at your option) any later version.
|
2013-09-09 23:32:16 -05:00
|
|
|
*
|
2014-03-29 18:49:22 -05:00
|
|
|
* OpenShot Library (libopenshot) is distributed in the hope that it will be
|
|
|
|
|
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2014-07-11 16:52:14 -05:00
|
|
|
* GNU Lesser General Public License for more details.
|
2013-09-09 23:32:16 -05:00
|
|
|
*
|
2014-07-11 16:52:14 -05:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
2014-03-29 18:49:22 -05:00
|
|
|
* along with OpenShot Library. If not, see <http://www.gnu.org/licenses/>.
|
2011-10-11 08:44:27 -05:00
|
|
|
*/
|
|
|
|
|
|
2014-03-29 18:49:22 -05:00
|
|
|
// Include the version number of OpenShot Library
|
2019-07-01 12:24:50 -05:00
|
|
|
#include "OpenShotVersion.h"
|
2014-03-29 18:49:22 -05:00
|
|
|
|
|
|
|
|
// Include all other classes
|
2012-08-05 15:17:37 -05:00
|
|
|
#include "AudioBufferSource.h"
|
2014-01-28 17:17:38 -06:00
|
|
|
#include "AudioReaderSource.h"
|
2012-08-05 15:17:37 -05:00
|
|
|
#include "AudioResampler.h"
|
2016-09-07 00:40:01 -05:00
|
|
|
#include "CacheDisk.h"
|
2016-08-31 23:57:06 -05:00
|
|
|
#include "CacheMemory.h"
|
2013-08-28 13:51:22 -05:00
|
|
|
#include "ChunkReader.h"
|
2013-07-31 12:45:47 -05:00
|
|
|
#include "ChunkWriter.h"
|
2012-10-03 01:55:24 -05:00
|
|
|
#include "Clip.h"
|
2013-12-06 00:40:26 -06:00
|
|
|
#include "ClipBase.h"
|
2011-10-11 08:44:27 -05:00
|
|
|
#include "Coordinate.h"
|
2013-02-08 02:15:16 -06:00
|
|
|
#ifdef USE_BLACKMAGIC
|
2013-02-09 01:54:40 -06:00
|
|
|
#include "DecklinkReader.h"
|
2013-02-10 02:19:40 -06:00
|
|
|
#include "DecklinkWriter.h"
|
2013-02-07 16:00:57 -06:00
|
|
|
#endif
|
2012-10-16 16:45:31 -05:00
|
|
|
#include "DummyReader.h"
|
2013-09-28 22:00:52 -05:00
|
|
|
#include "EffectBase.h"
|
2014-01-10 17:24:12 -06:00
|
|
|
#include "Effects.h"
|
2015-08-06 20:01:34 -05:00
|
|
|
#include "EffectInfo.h"
|
2013-12-07 21:09:55 -06:00
|
|
|
#include "Enums.h"
|
2011-10-11 08:44:27 -05:00
|
|
|
#include "Exceptions.h"
|
2013-09-08 16:40:57 -05:00
|
|
|
#include "ReaderBase.h"
|
|
|
|
|
#include "WriterBase.h"
|
2011-10-11 08:44:27 -05:00
|
|
|
#include "FFmpegReader.h"
|
2012-07-12 15:55:41 -05:00
|
|
|
#include "FFmpegWriter.h"
|
2011-10-11 08:44:27 -05:00
|
|
|
#include "Fraction.h"
|
|
|
|
|
#include "Frame.h"
|
|
|
|
|
#include "FrameMapper.h"
|
2016-02-23 00:27:03 -06:00
|
|
|
#ifdef USE_IMAGEMAGICK
|
|
|
|
|
#include "ImageReader.h"
|
|
|
|
|
#include "ImageWriter.h"
|
|
|
|
|
#include "TextReader.h"
|
|
|
|
|
#endif
|
2011-10-11 08:44:27 -05:00
|
|
|
#include "KeyFrame.h"
|
2013-11-06 23:17:35 -06:00
|
|
|
#include "PlayerBase.h"
|
2011-10-11 08:44:27 -05:00
|
|
|
#include "Point.h"
|
2014-04-11 00:28:29 -05:00
|
|
|
#include "Profiles.h"
|
2019-08-11 22:58:15 +10:00
|
|
|
#include "QtHtmlReader.h"
|
2015-06-01 00:20:14 -07:00
|
|
|
#include "QtImageReader.h"
|
2019-07-12 15:14:38 +10:00
|
|
|
#include "QtTextReader.h"
|
2012-10-03 01:55:24 -05:00
|
|
|
#include "Timeline.h"
|
2019-01-09 16:50:40 -06:00
|
|
|
#include "Settings.h"
|
2011-10-11 08:44:27 -05:00
|
|
|
|
|
|
|
|
#endif
|