You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Merge branch 'develop' into cmake-owns-version
# Conflicts: # CMakeLists.txt
This commit is contained in:
@@ -16,7 +16,8 @@ matrix:
|
||||
- cmake -D"CMAKE_BUILD_TYPE:STRING=Debug" ../
|
||||
- make VERBOSE=1
|
||||
- make os_test
|
||||
|
||||
- make install DESTDIR=dist/
|
||||
|
||||
- language: cpp
|
||||
name: "FFmpeg 3"
|
||||
before_script:
|
||||
@@ -31,7 +32,8 @@ matrix:
|
||||
- cmake -D"CMAKE_BUILD_TYPE:STRING=Debug" ../
|
||||
- make VERBOSE=1
|
||||
- make os_test
|
||||
|
||||
- make install DESTDIR=dist/
|
||||
|
||||
- language: cpp
|
||||
name: "FFmpeg 4"
|
||||
before_script:
|
||||
@@ -48,3 +50,4 @@ matrix:
|
||||
- cmake -D"CMAKE_BUILD_TYPE:STRING=Debug" ../
|
||||
- make VERBOSE=1
|
||||
- make os_test
|
||||
- make install DESTDIR=dist/
|
||||
|
||||
@@ -63,8 +63,6 @@ namespace openshot {
|
||||
/// @param max_bytes The maximum bytes to allow in the cache. Once exceeded, the cache will purge the oldest frames.
|
||||
CacheBase(int64_t max_bytes);
|
||||
|
||||
virtual ~CacheBase();
|
||||
|
||||
/// @brief Add a Frame to the cache
|
||||
/// @param frame The openshot::Frame object needing to be cached.
|
||||
virtual void Add(std::shared_ptr<Frame> frame) = 0;
|
||||
@@ -114,6 +112,7 @@ namespace openshot {
|
||||
virtual void SetJson(string value) = 0; ///< Load JSON string into this object
|
||||
virtual Json::Value JsonValue() = 0; ///< Generate Json::JsonValue for this object
|
||||
virtual void SetJsonValue(Json::Value root) = 0; ///< Load Json::JsonValue into this object
|
||||
virtual ~CacheBase() = default;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -148,8 +148,8 @@ namespace openshot {
|
||||
void reverse_buffer(juce::AudioSampleBuffer* buffer);
|
||||
|
||||
public:
|
||||
GravityType gravity; ///< The gravity of a clip determines where it snaps to it's parent
|
||||
ScaleType scale; ///< The scale determines how a clip should be resized to fit it's parent
|
||||
GravityType gravity; ///< The gravity of a clip determines where it snaps to its parent
|
||||
ScaleType scale; ///< The scale determines how a clip should be resized to fit its parent
|
||||
AnchorType anchor; ///< The anchor determines what parent a clip should snap to
|
||||
FrameDisplayType display; ///< The format to display the frame number (if any)
|
||||
VolumeMixType mixing; ///< What strategy should be followed when mixing audio with other clips
|
||||
|
||||
@@ -72,7 +72,6 @@ namespace openshot {
|
||||
|
||||
/// Constructor for the base clip
|
||||
ClipBase() { };
|
||||
virtual ~ClipBase();
|
||||
|
||||
// Compare a clip using the Position() property
|
||||
bool operator< ( ClipBase& a) { return (Position() < a.Position()); }
|
||||
@@ -105,6 +104,7 @@ namespace openshot {
|
||||
/// of all properties at any time)
|
||||
virtual string PropertiesJSON(int64_t requested_frame) = 0;
|
||||
|
||||
virtual ~ClipBase() = default;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace openshot
|
||||
/// modified openshot::Frame object
|
||||
///
|
||||
/// The frame object is passed into this method, and a frame_number is passed in which
|
||||
/// tells the effect which settings to use from it's keyframes (starting at 1).
|
||||
/// tells the effect which settings to use from its keyframes (starting at 1).
|
||||
///
|
||||
/// @returns The modified openshot::Frame object
|
||||
/// @param frame The frame object that needs the effect applied to it
|
||||
@@ -108,6 +108,7 @@ namespace openshot
|
||||
|
||||
/// Set the order that this effect should be executed.
|
||||
void Order(int new_order) { order = new_order; }
|
||||
virtual ~EffectBase() = default;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ namespace openshot {
|
||||
/// Check the current seek position and determine if we need to seek again
|
||||
bool CheckSeek(bool is_video);
|
||||
|
||||
/// Check if a frame is missing and attempt to replace it's frame image (and
|
||||
/// Check if a frame is missing and attempt to replace its frame image (and
|
||||
bool CheckMissingFrame(int64_t requested_frame);
|
||||
|
||||
/// Check the working queue, and move finished frames to the finished queue
|
||||
@@ -210,10 +210,10 @@ namespace openshot {
|
||||
/// Read the stream until we find the requested Frame
|
||||
std::shared_ptr<Frame> ReadStream(int64_t requested_frame);
|
||||
|
||||
/// Remove AVFrame from cache (and deallocate it's memory)
|
||||
/// Remove AVFrame from cache (and deallocate its memory)
|
||||
void RemoveAVFrame(AVFrame *);
|
||||
|
||||
/// Remove AVPacket from cache (and deallocate it's memory)
|
||||
/// Remove AVPacket from cache (and deallocate its memory)
|
||||
void RemoveAVPacket(AVPacket *);
|
||||
|
||||
/// Seek to a specific Frame. This is not always frame accurate, it's more of an estimation on many codecs.
|
||||
@@ -240,7 +240,7 @@ namespace openshot {
|
||||
/// frame 1, or it throws one of the following exceptions.
|
||||
FFmpegReader(string path);
|
||||
|
||||
/// Constructor for FFmpegReader. This only opens the media file to inspect it's properties
|
||||
/// Constructor for FFmpegReader. This only opens the media file to inspect its properties
|
||||
/// if inspect_reader=true. When not inspecting the media file, it's much faster, and useful
|
||||
/// when you are inflating the object using JSON after instantiating it.
|
||||
FFmpegReader(string path, bool inspect_reader);
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace openshot {
|
||||
* FFmpegWriter w("/home/jonathan/NewVideo.webm");
|
||||
*
|
||||
* // Set options
|
||||
* w.SetAudioOptions(true, "libvorbis", 44100, 2, 128000); // Sample Rate: 44100, Channels: 2, Bitrate: 128000
|
||||
* w.SetAudioOptions(true, "libvorbis", 44100, 2, ChannelLayout::LAYOUT_STEREO, 128000); // Sample Rate: 44100, Channels: 2, Bitrate: 128000
|
||||
* w.SetVideoOptions(true, "libvpx", openshot::Fraction(24,1), 720, 480, openshot::Fraction(1,1), false, false, 300000); // FPS: 24, Size: 720x480, Pixel Ratio: 1/1, Bitrate: 300000
|
||||
*
|
||||
* // Open the writer
|
||||
@@ -111,7 +111,7 @@ namespace openshot {
|
||||
* FFmpegWriter w("/home/jonathan/NewVideo.webm");
|
||||
*
|
||||
* // Set options
|
||||
* w.SetAudioOptions(true, "libvorbis", 44100, 2, 128000); // Sample Rate: 44100, Channels: 2, Bitrate: 128000
|
||||
* w.SetAudioOptions(true, "libvorbis", 44100, 2, ChannelLayout::LAYOUT_STEREO, 128000); // Sample Rate: 44100, Channels: 2, Bitrate: 128000
|
||||
* w.SetVideoOptions(true, "libvpx", openshot::Fraction(24,1), 720, 480, openshot::Fraction(1,1), false, false, 300000); // FPS: 24, Size: 720x480, Pixel Ratio: 1/1, Bitrate: 300000
|
||||
*
|
||||
* // Prepare Streams (Optional method that must be called before any SetOption calls)
|
||||
|
||||
@@ -200,7 +200,7 @@ namespace openshot
|
||||
/// Clean up buffer after QImage is deleted
|
||||
static void cleanUpBuffer(void *info);
|
||||
|
||||
/// Clear the waveform image (and deallocate it's memory)
|
||||
/// Clear the waveform image (and deallocate its memory)
|
||||
void ClearWaveform();
|
||||
|
||||
/// Copy data and pointers from another Frame instance
|
||||
|
||||
@@ -83,7 +83,7 @@ namespace openshot
|
||||
/// frame 1, or it throws one of the following exceptions.
|
||||
ImageReader(string path);
|
||||
|
||||
/// Constructor for ImageReader. This only opens the media file to inspect it's properties
|
||||
/// Constructor for ImageReader. This only opens the media file to inspect its properties
|
||||
/// if inspect_reader=true. When not inspecting the media file, it's much faster, and useful
|
||||
/// when you are inflating the object using JSON after instantiating it.
|
||||
ImageReader(string path, bool inspect_reader);
|
||||
|
||||
@@ -130,7 +130,7 @@ namespace openshot
|
||||
/// @param height Height in pixels of image
|
||||
/// @param quality Quality of image (0 to 100, 70 is default)
|
||||
/// @param loops Number of times to repeat the image (used on certain multi-frame image formats, such as GIF)
|
||||
/// @param combine Combine frames into a single image (if possible), or save each frame as it's own image
|
||||
/// @param combine Combine frames into a single image (if possible), or save each frame as its own image
|
||||
void SetVideoOptions(string format, Fraction fps, int width, int height,
|
||||
int quality, int loops, bool combine);
|
||||
|
||||
|
||||
@@ -107,6 +107,7 @@ namespace openshot
|
||||
/// Set the Volume (1.0 = normal volume, <1.0 = quieter, >1.0 louder)
|
||||
virtual void Volume(float new_volume) = 0;
|
||||
|
||||
virtual ~PlayerBase() = default;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace openshot
|
||||
/// frame 1, or it throws one of the following exceptions.
|
||||
QtImageReader(string path);
|
||||
|
||||
/// Constructor for QtImageReader. This only opens the media file to inspect it's properties
|
||||
/// Constructor for QtImageReader. This only opens the media file to inspect its properties
|
||||
/// if inspect_reader=true. When not inspecting the media file, it's much faster, and useful
|
||||
/// when you are inflating the object using JSON after instantiating it.
|
||||
QtImageReader(string path, bool inspect_reader);
|
||||
|
||||
@@ -110,8 +110,6 @@ namespace openshot
|
||||
/// Constructor for the base reader, where many things are initialized.
|
||||
ReaderBase();
|
||||
|
||||
virtual ~ReaderBase();
|
||||
|
||||
/// Information about the current media file
|
||||
ReaderInfo info;
|
||||
|
||||
@@ -152,6 +150,8 @@ namespace openshot
|
||||
|
||||
/// Open the reader (and start consuming resources, such as images or video files)
|
||||
virtual void Open() = 0;
|
||||
|
||||
virtual ~ReaderBase() = default;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -96,6 +96,7 @@ namespace openshot
|
||||
double size;
|
||||
string text_color;
|
||||
string background_color;
|
||||
string text_background_color;
|
||||
std::shared_ptr<Magick::Image> image;
|
||||
MAGICK_DRAWABLE lines;
|
||||
bool is_open;
|
||||
@@ -116,9 +117,13 @@ namespace openshot
|
||||
/// @param font The font of the text
|
||||
/// @param size The size of the text
|
||||
/// @param text_color The color of the text
|
||||
/// @param background_color The background color of the text (also supports Transparent)
|
||||
/// @param background_color The background color of the text frame image (also supports Transparent)
|
||||
TextReader(int width, int height, int x_offset, int y_offset, GravityType gravity, string text, string font, double size, string text_color, string background_color);
|
||||
|
||||
/// Draw a box under rendered text using the specified color.
|
||||
/// @param text_background_color The background color behind the text
|
||||
void SetTextBackgroundColor(string color);
|
||||
|
||||
/// Close Reader
|
||||
void Close();
|
||||
|
||||
|
||||
@@ -104,6 +104,7 @@ namespace openshot {
|
||||
* Fraction(25,1), // framerate
|
||||
* 44100, // sample rate
|
||||
* 2 // channels
|
||||
* ChannelLayout::LAYOUT_STEREO,
|
||||
* );
|
||||
*
|
||||
* // Create some clips
|
||||
|
||||
@@ -119,6 +119,8 @@ namespace openshot
|
||||
|
||||
/// Open the writer (and start initializing streams)
|
||||
virtual void Open() = 0;
|
||||
|
||||
virtual ~WriterBase() = default;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ namespace openshot
|
||||
/// modified openshot::Frame object
|
||||
///
|
||||
/// The frame object is passed into this method, and a frame_number is passed in which
|
||||
/// tells the effect which settings to use from it's keyframes (starting at 1).
|
||||
/// tells the effect which settings to use from its keyframes (starting at 1).
|
||||
///
|
||||
/// @returns The modified openshot::Frame object
|
||||
/// @param frame The frame object that needs the effect applied to it
|
||||
|
||||
@@ -96,7 +96,7 @@ namespace openshot
|
||||
/// modified openshot::Frame object
|
||||
///
|
||||
/// The frame object is passed into this method, and a frame_number is passed in which
|
||||
/// tells the effect which settings to use from it's keyframes (starting at 1).
|
||||
/// tells the effect which settings to use from its keyframes (starting at 1).
|
||||
///
|
||||
/// @returns The modified openshot::Frame object
|
||||
/// @param frame The frame object that needs the effect applied to it
|
||||
|
||||
@@ -83,7 +83,7 @@ namespace openshot
|
||||
/// modified openshot::Frame object
|
||||
///
|
||||
/// The frame object is passed into this method, and a frame_number is passed in which
|
||||
/// tells the effect which settings to use from it's keyframes (starting at 1).
|
||||
/// tells the effect which settings to use from its keyframes (starting at 1).
|
||||
///
|
||||
/// @returns The modified openshot::Frame object
|
||||
/// @param frame The frame object that needs the effect applied to it
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace openshot
|
||||
/// modified openshot::Frame object
|
||||
///
|
||||
/// The frame object is passed into this method, and a frame_number is passed in which
|
||||
/// tells the effect which settings to use from it's keyframes (starting at 1).
|
||||
/// tells the effect which settings to use from its keyframes (starting at 1).
|
||||
///
|
||||
/// @returns The modified openshot::Frame object
|
||||
/// @param frame The frame object that needs the effect applied to it
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user