diff --git a/include/CacheBase.h b/include/CacheBase.h index 379c734a..aaef5320 100644 --- a/include/CacheBase.h +++ b/include/CacheBase.h @@ -106,7 +106,7 @@ namespace openshot { /// Get and Set JSON methods virtual string Json() = 0; ///< Generate JSON string of this object - virtual void SetJson(string value) throw(InvalidJSON) = 0; ///< Load JSON string into this object + 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 diff --git a/include/CacheDisk.h b/include/CacheDisk.h index 905eb787..adecda9a 100644 --- a/include/CacheDisk.h +++ b/include/CacheDisk.h @@ -126,9 +126,9 @@ namespace openshot { /// Get and Set JSON methods string Json(); ///< Generate JSON string of this object - void SetJson(string value) throw(InvalidJSON); ///< Load JSON string into this object + void SetJson(string value); ///< Load JSON string into this object Json::Value JsonValue(); ///< Generate Json::JsonValue for this object - void SetJsonValue(Json::Value root) throw(InvalidFile, ReaderClosed); ///< Load Json::JsonValue into this object + void SetJsonValue(Json::Value root); ///< Load Json::JsonValue into this object }; } diff --git a/include/CacheMemory.h b/include/CacheMemory.h index 8220add3..2f3f018b 100644 --- a/include/CacheMemory.h +++ b/include/CacheMemory.h @@ -108,9 +108,9 @@ namespace openshot { /// Get and Set JSON methods string Json(); ///< Generate JSON string of this object - void SetJson(string value) throw(InvalidJSON); ///< Load JSON string into this object + void SetJson(string value); ///< Load JSON string into this object Json::Value JsonValue(); ///< Generate Json::JsonValue for this object - void SetJsonValue(Json::Value root) throw(InvalidFile, ReaderClosed); ///< Load Json::JsonValue into this object + void SetJsonValue(Json::Value root); ///< Load Json::JsonValue into this object }; } diff --git a/include/ChunkReader.h b/include/ChunkReader.h index e97c0efa..aa151093 100644 --- a/include/ChunkReader.h +++ b/include/ChunkReader.h @@ -130,7 +130,7 @@ namespace openshot /// frame 1, or it throws one of the following exceptions. /// @param path The folder path / location of a chunk (chunks are stored as folders) /// @param chunk_version Choose the video version / quality (THUMBNAIL, PREVIEW, or FINAL) - ChunkReader(string path, ChunkVersion chunk_version) throw(InvalidFile, InvalidJSON); + ChunkReader(string path, ChunkVersion chunk_version); /// Close the reader void Close(); @@ -149,7 +149,7 @@ namespace openshot /// @brief Get an openshot::Frame object for a specific frame number of this reader. /// @returns The requested frame (containing the image and audio) /// @param requested_frame The frame number you want to retrieve - std::shared_ptr GetFrame(int64_t requested_frame) throw(ReaderClosed, ChunkNotFound); + std::shared_ptr GetFrame(int64_t requested_frame); /// Determine if reader is open or closed bool IsOpen() { return is_open; }; @@ -159,12 +159,12 @@ namespace openshot /// Get and Set JSON methods string Json(); ///< Generate JSON string of this object - void SetJson(string value) throw(InvalidJSON); ///< Load JSON string into this object + void SetJson(string value); ///< Load JSON string into this object Json::Value JsonValue(); ///< Generate Json::JsonValue for this object - void SetJsonValue(Json::Value root) throw(InvalidFile); ///< Load Json::JsonValue into this object + void SetJsonValue(Json::Value root); ///< Load Json::JsonValue into this object /// Open the reader. This is required before you can access frames or data from the reader. - void Open() throw(InvalidFile); + void Open(); }; } diff --git a/include/ChunkWriter.h b/include/ChunkWriter.h index 6e569f8b..2cdef4fe 100644 --- a/include/ChunkWriter.h +++ b/include/ChunkWriter.h @@ -113,7 +113,7 @@ namespace openshot /// @brief Constructor for ChunkWriter. Throws one of the following exceptions. /// @param path The folder path of the chunk file to be created /// @param reader The initial reader to base this chunk file's meta data on (such as fps, height, width, etc...) - ChunkWriter(string path, ReaderBase *reader) throw(InvalidFile, InvalidFormat, InvalidCodec, InvalidOptions, OutOfMemory); + ChunkWriter(string path, ReaderBase *reader); /// Close the writer void Close(); @@ -125,7 +125,7 @@ namespace openshot bool IsOpen() { return is_open; }; /// Open writer - void Open() throw(InvalidFile, InvalidCodec); + void Open(); /// @brief Set the chunk size (number of frames to write in each chunk) /// @param new_size The number of frames to write in this chunk file @@ -133,18 +133,18 @@ namespace openshot /// @brief Add a frame to the stack waiting to be encoded. /// @param frame The openshot::Frame object that needs to be written to this chunk file. - void WriteFrame(std::shared_ptr frame) throw(WriterClosed); + void WriteFrame(std::shared_ptr frame); /// @brief Write a block of frames from a reader /// @param start The starting frame number to write (of the reader passed into the constructor) /// @param length The number of frames to write (of the reader passed into the constructor) - void WriteFrame(int64_t start, int64_t length) throw(WriterClosed); + void WriteFrame(int64_t start, int64_t length); /// @brief Write a block of frames from a reader /// @param reader The reader containing the frames you need /// @param start The starting frame number to write /// @param length The number of frames to write - void WriteFrame(ReaderBase* reader, int64_t start, int64_t length) throw(WriterClosed); + void WriteFrame(ReaderBase* reader, int64_t start, int64_t length); }; diff --git a/include/Clip.h b/include/Clip.h index 086ab74d..f8f4b340 100644 --- a/include/Clip.h +++ b/include/Clip.h @@ -136,7 +136,7 @@ namespace openshot { std::shared_ptr GetOrCreateFrame(int64_t number); /// Adjust the audio and image of a time mapped frame - std::shared_ptr get_time_mapped_frame(std::shared_ptr frame, int64_t frame_number) throw(ReaderClosed); + std::shared_ptr get_time_mapped_frame(std::shared_ptr frame, int64_t frame_number); /// Init default settings for a clip void init_settings(); @@ -172,7 +172,7 @@ namespace openshot { void AddEffect(EffectBase* effect); /// Close the internal reader - void Close() throw(ReaderClosed); + void Close(); /// Return the list of effects on the timeline list Effects() { return effects; }; @@ -181,25 +181,25 @@ namespace openshot { /// /// @returns The requested frame (containing the image) /// @param requested_frame The frame number that is requested - std::shared_ptr GetFrame(int64_t requested_frame) throw(ReaderClosed); + std::shared_ptr GetFrame(int64_t requested_frame); /// Open the internal reader - void Open() throw(InvalidFile, ReaderClosed); + void Open(); /// @brief Set the current reader /// @param new_reader The reader to be used by this clip void Reader(ReaderBase* new_reader); /// Get the current reader - ReaderBase* Reader() throw(ReaderClosed); + ReaderBase* Reader(); /// Override End() method - float End() throw(ReaderClosed); ///< Get end position (in seconds) of clip (trim end of video), which can be affected by the time curve. + float End(); ///< Get end position (in seconds) of clip (trim end of video), which can be affected by the time curve. void End(float value) { end = value; } ///< Set end position (in seconds) of clip (trim end of video) /// Get and Set JSON methods string Json(); ///< Generate JSON string of this object - void SetJson(string value) throw(InvalidJSON); ///< Load JSON string into this object + void SetJson(string value); ///< Load JSON string into this object Json::Value JsonValue(); ///< Generate Json::JsonValue for this object void SetJsonValue(Json::Value root); ///< Load Json::JsonValue into this object diff --git a/include/ClipBase.h b/include/ClipBase.h index 004a1279..06341640 100644 --- a/include/ClipBase.h +++ b/include/ClipBase.h @@ -98,7 +98,7 @@ namespace openshot { /// Get and Set JSON methods virtual string Json() = 0; ///< Generate JSON string of this object - virtual void SetJson(string value) throw(InvalidJSON) = 0; ///< Load JSON string into this object + 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 diff --git a/include/Color.h b/include/Color.h index 440cada9..a0edd602 100644 --- a/include/Color.h +++ b/include/Color.h @@ -68,7 +68,7 @@ namespace openshot { /// Get and Set JSON methods string Json(); ///< Generate JSON string of this object Json::Value JsonValue(); ///< Generate Json::JsonValue for this object - void SetJson(string value) throw(InvalidJSON); ///< Load JSON string into this object + void SetJson(string value); ///< Load JSON string into this object void SetJsonValue(Json::Value root); ///< Load Json::JsonValue into this object }; diff --git a/include/Coordinate.h b/include/Coordinate.h index 306d2a98..e686894b 100644 --- a/include/Coordinate.h +++ b/include/Coordinate.h @@ -93,7 +93,7 @@ namespace openshot { /// Get and Set JSON methods string Json(); ///< Generate JSON string of this object Json::Value JsonValue(); ///< Generate Json::JsonValue for this object - void SetJson(string value) throw(InvalidJSON); ///< Load JSON string into this object + void SetJson(string value); ///< Load JSON string into this object void SetJsonValue(Json::Value root); ///< Load Json::JsonValue into this object }; diff --git a/include/DecklinkReader.h b/include/DecklinkReader.h index 7cf211cd..1269f5e2 100644 --- a/include/DecklinkReader.h +++ b/include/DecklinkReader.h @@ -93,7 +93,7 @@ namespace openshot /// Constructor for DecklinkReader. This automatically opens the device and loads /// the first second of video, or it throws one of the following exceptions. - DecklinkReader(int device, int video_mode, int pixel_format, int channels, int sample_depth) throw(DecklinkError); + DecklinkReader(int device, int video_mode, int pixel_format, int channels, int sample_depth); ~DecklinkReader(); /// Destructor /// Close the device and video stream @@ -107,7 +107,7 @@ namespace openshot /// /// @returns The requested frame (containing the image) /// @param requested_frame The frame number that is requested. - std::shared_ptr GetFrame(int64_t requested_frame) throw(ReaderClosed); + std::shared_ptr GetFrame(int64_t requested_frame); unsigned long GetCurrentFrameNumber(); /// Determine if reader is open or closed @@ -118,12 +118,12 @@ namespace openshot /// Get and Set JSON methods string Json(); ///< Generate JSON string of this object - void SetJson(string value) throw(InvalidJSON); ///< Load JSON string into this object + void SetJson(string value); ///< Load JSON string into this object Json::Value JsonValue(); ///< Generate Json::JsonValue for this object - void SetJsonValue(Json::Value root) throw(InvalidFile); ///< Load Json::JsonValue into this object + void SetJsonValue(Json::Value root); ///< Load Json::JsonValue into this object /// Open device and video stream - which is called by the constructor automatically - void Open() throw(DecklinkError); + void Open(); }; } diff --git a/include/DecklinkWriter.h b/include/DecklinkWriter.h index a603a33b..9e40fe40 100644 --- a/include/DecklinkWriter.h +++ b/include/DecklinkWriter.h @@ -90,19 +90,19 @@ namespace openshot /// Constructor for DecklinkWriter. This automatically opens the device or it /// throws one of the following exceptions. - DecklinkWriter(int device, int video_mode, int pixel_format, int channels, int sample_depth) throw(DecklinkError); + DecklinkWriter(int device, int video_mode, int pixel_format, int channels, int sample_depth); /// Close the device and video stream void Close(); /// This method is required for all derived classes of WriterBase. Write a Frame to the video file. - void WriteFrame(std::shared_ptr frame) throw(WriterClosed); + void WriteFrame(std::shared_ptr frame); /// This method is required for all derived classes of WriterBase. Write a block of frames from a reader. - void WriteFrame(ReaderBase* reader, int start, int length) throw(WriterClosed); + void WriteFrame(ReaderBase* reader, int start, int length); /// Open device and video stream - which is called by the constructor automatically - void Open() throw(DecklinkError); + void Open(); /// Determine if writer is open or closed bool IsOpen() { return is_open; }; diff --git a/include/DummyReader.h b/include/DummyReader.h index 4d16a675..559215de 100644 --- a/include/DummyReader.h +++ b/include/DummyReader.h @@ -75,7 +75,7 @@ namespace openshot /// /// @returns The requested frame (containing the image) /// @param requested_frame The frame number that is requested. - std::shared_ptr GetFrame(int64_t requested_frame) throw(ReaderClosed); + std::shared_ptr GetFrame(int64_t requested_frame); /// Determine if reader is open or closed bool IsOpen() { return is_open; }; @@ -85,12 +85,12 @@ namespace openshot /// Get and Set JSON methods string Json(); ///< Generate JSON string of this object - void SetJson(string value) throw(InvalidJSON); ///< Load JSON string into this object + void SetJson(string value); ///< Load JSON string into this object Json::Value JsonValue(); ///< Generate Json::JsonValue for this object - void SetJsonValue(Json::Value root) throw(InvalidFile); ///< Load Json::JsonValue into this object + void SetJsonValue(Json::Value root); ///< Load Json::JsonValue into this object /// Open File - which is called by the constructor automatically - void Open() throw(InvalidFile); + void Open(); }; } diff --git a/include/EffectBase.h b/include/EffectBase.h index 2b8594a9..6ca92151 100644 --- a/include/EffectBase.h +++ b/include/EffectBase.h @@ -92,7 +92,7 @@ namespace openshot /// Get and Set JSON methods virtual string Json() = 0; ///< Generate JSON string of this object - virtual void SetJson(string value) throw(InvalidJSON) = 0; ///< Load JSON string into this object + 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 Json::Value JsonInfo(); ///< Generate JSON object of meta data / info diff --git a/include/FFmpegReader.h b/include/FFmpegReader.h index e99cfaaf..beed9bca 100644 --- a/include/FFmpegReader.h +++ b/include/FFmpegReader.h @@ -206,7 +206,7 @@ namespace openshot void RemoveAVPacket(AVPacket*); /// Seek to a specific Frame. This is not always frame accurate, it's more of an estimation on many codecs. - void Seek(int64_t requested_frame) throw(TooManySeeks); + void Seek(int64_t requested_frame); /// Update PTS Offset (if any) void UpdatePTSOffset(bool is_video); @@ -227,12 +227,12 @@ namespace openshot /// Constructor for FFmpegReader. This automatically opens the media file and loads /// frame 1, or it throws one of the following exceptions. - FFmpegReader(string path) throw(InvalidFile, NoStreamsFound, InvalidCodec); + FFmpegReader(string path); /// Constructor for FFmpegReader. This only opens the media file to inspect it's 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) throw(InvalidFile, NoStreamsFound, InvalidCodec); + FFmpegReader(string path, bool inspect_reader); /// Destructor ~FFmpegReader(); @@ -247,7 +247,7 @@ namespace openshot /// /// @returns The requested frame of video /// @param requested_frame The frame number that is requested. - std::shared_ptr GetFrame(int64_t requested_frame) throw(OutOfBoundsFrame, ReaderClosed, TooManySeeks); + std::shared_ptr GetFrame(int64_t requested_frame); /// Determine if reader is open or closed bool IsOpen() { return is_open; }; @@ -257,12 +257,12 @@ namespace openshot /// Get and Set JSON methods string Json(); ///< Generate JSON string of this object - void SetJson(string value) throw(InvalidJSON); ///< Load JSON string into this object + void SetJson(string value); ///< Load JSON string into this object Json::Value JsonValue(); ///< Generate Json::JsonValue for this object - void SetJsonValue(Json::Value root) throw(InvalidFile); ///< Load Json::JsonValue into this object + void SetJsonValue(Json::Value root); ///< Load Json::JsonValue into this object /// Open File - which is called by the constructor automatically - void Open() throw(InvalidFile, NoStreamsFound, InvalidCodec); + void Open(); }; } diff --git a/include/FFmpegWriter.h b/include/FFmpegWriter.h index ddb6aa01..28519bda 100644 --- a/include/FFmpegWriter.h +++ b/include/FFmpegWriter.h @@ -241,13 +241,13 @@ namespace openshot bool write_video_packet(std::shared_ptr frame, AVFrame* frame_final); /// write all queued frames - void write_queued_frames() throw (ErrorEncodingVideo); + void write_queued_frames(); public: /// @brief Constructor for FFmpegWriter. Throws one of the following exceptions. /// @param path The file path of the video file you want to open and read - FFmpegWriter(string path) throw(InvalidFile, InvalidFormat, InvalidCodec, InvalidOptions, OutOfMemory); + FFmpegWriter(string path); /// Close the writer void Close(); @@ -259,7 +259,7 @@ namespace openshot bool IsOpen() { return is_open; }; /// Open writer - void Open() throw(InvalidFile, InvalidFormat, InvalidCodec, InvalidOptions, OutOfMemory, InvalidChannels, InvalidSampleRate); + void Open(); /// Output the ffmpeg info about this format, streams, and codecs (i.e. dump format) void OutputStreamInfo(); @@ -283,8 +283,7 @@ namespace openshot /// @param channels The number of audio channels needed in this file /// @param channel_layout The 'layout' of audio channels (i.e. mono, stereo, surround, etc...) /// @param bit_rate The audio bit rate used during encoding - void SetAudioOptions(bool has_audio, string codec, int sample_rate, int channels, ChannelLayout channel_layout, int bit_rate) - throw(InvalidFile, InvalidFormat, InvalidCodec, InvalidOptions, OutOfMemory, InvalidChannels); + void SetAudioOptions(bool has_audio, string codec, int sample_rate, int channels, ChannelLayout channel_layout, int bit_rate); /// @brief Set the cache size /// @param new_size The number of frames to queue before writing to the file @@ -300,15 +299,14 @@ namespace openshot /// @param interlaced Does this video need to be interlaced? /// @param top_field_first Which frame should be used as the top field? /// @param bit_rate The video bit rate used during encoding - void SetVideoOptions(bool has_video, string codec, Fraction fps, int width, int height,Fraction pixel_ratio, bool interlaced, bool top_field_first, int bit_rate) - throw(InvalidFile, InvalidFormat, InvalidCodec, InvalidOptions, OutOfMemory, InvalidChannels); + void SetVideoOptions(bool has_video, string codec, Fraction fps, int width, int height,Fraction pixel_ratio, bool interlaced, bool top_field_first, int bit_rate); /// @brief Set custom options (some codecs accept additional params). This must be called after the /// PrepareStreams() method, otherwise the streams have not been initialized yet. /// @param stream The stream (openshot::StreamType) this option should apply to /// @param name The name of the option you want to set (i.e. qmin, qmax, etc...) /// @param value The new value of this option - void SetOption(StreamType stream, string name, string value) throw(NoStreamsFound, InvalidOptions); + void SetOption(StreamType stream, string name, string value); /// @brief Write the file header (after the options are set). This method is called automatically /// by the Open() method if this method has not yet been called. @@ -316,13 +314,13 @@ namespace openshot /// @brief Add a frame to the stack waiting to be encoded. /// @param frame The openshot::Frame object to write to this image - void WriteFrame(std::shared_ptr frame) throw(ErrorEncodingVideo, WriterClosed); + void WriteFrame(std::shared_ptr frame); /// @brief Write a block of frames from a reader /// @param reader A openshot::ReaderBase object which will provide frames to be written /// @param start The starting frame number of the reader /// @param length The number of frames to write - void WriteFrame(ReaderBase* reader, int64_t start, int64_t length) throw(ErrorEncodingVideo, WriterClosed); + void WriteFrame(ReaderBase* reader, int64_t start, int64_t length); /// @brief Write the file trailer (after all frames are written). This is called automatically /// by the Close() method if this method has not yet been called. diff --git a/include/Frame.h b/include/Frame.h index 599bbffb..76b4c5d8 100644 --- a/include/Frame.h +++ b/include/Frame.h @@ -285,7 +285,7 @@ namespace openshot /// Thumbnail the frame image with tons of options to the specified path. The image format is determined from the extension (i.e. image.PNG, image.JPEG). /// This method allows for masks, overlays, background color, and much more accurate resizing (including padding and centering) void Thumbnail(string path, int new_width, int new_height, string mask_path, string overlay_path, - string background_color, bool ignore_aspect, string format="png", int quality=100) throw(InvalidFile); + string background_color, bool ignore_aspect, string format="png", int quality=100); /// Play audio samples for this frame void Play(); diff --git a/include/FrameMapper.h b/include/FrameMapper.h index 3e0d2c8d..dc756bd5 100644 --- a/include/FrameMapper.h +++ b/include/FrameMapper.h @@ -183,7 +183,7 @@ namespace openshot void Close(); /// Get a frame based on the target frame rate and the new frame number of a frame - MappedFrame GetMappedFrame(int64_t TargetFrameNumber) throw(OutOfBoundsFrame); + MappedFrame GetMappedFrame(int64_t TargetFrameNumber); /// Get the cache object used by this reader CacheMemory* GetCache() { return &final_cache; }; @@ -194,7 +194,7 @@ namespace openshot /// /// @returns The requested frame of video /// @param requested_frame The frame number that is requested. - std::shared_ptr GetFrame(int64_t requested_frame) throw(ReaderClosed); + std::shared_ptr GetFrame(int64_t requested_frame); /// Determine if reader is open or closed bool IsOpen(); @@ -204,18 +204,18 @@ namespace openshot /// Get and Set JSON methods string Json(); ///< Generate JSON string of this object - void SetJson(string value) throw(InvalidJSON); ///< Load JSON string into this object + void SetJson(string value); ///< Load JSON string into this object Json::Value JsonValue(); ///< Generate Json::JsonValue for this object - void SetJsonValue(Json::Value root) throw(InvalidFile); ///< Load Json::JsonValue into this object + void SetJsonValue(Json::Value root); ///< Load Json::JsonValue into this object /// Open the internal reader - void Open() throw(InvalidFile); + void Open(); /// Print all of the original frames and which new frames they map to void PrintMapping(); /// Get the current reader - ReaderBase* Reader() throw(ReaderClosed); + ReaderBase* Reader(); /// Resample audio and map channels (if needed) void ResampleMappedAudio(std::shared_ptr frame, int64_t original_frame_number); diff --git a/include/ImageReader.h b/include/ImageReader.h index 2c336599..e698e0c1 100644 --- a/include/ImageReader.h +++ b/include/ImageReader.h @@ -75,12 +75,12 @@ namespace openshot /// Constructor for ImageReader. This automatically opens the media file and loads /// frame 1, or it throws one of the following exceptions. - ImageReader(string path) throw(InvalidFile); + ImageReader(string path); /// Constructor for ImageReader. This only opens the media file to inspect it's 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) throw(InvalidFile); + ImageReader(string path, bool inspect_reader); /// Close File void Close(); @@ -93,7 +93,7 @@ namespace openshot /// /// @returns The requested frame (containing the image) /// @param requested_frame The frame number that is requested. - std::shared_ptr GetFrame(int64_t requested_frame) throw(ReaderClosed); + std::shared_ptr GetFrame(int64_t requested_frame); /// Determine if reader is open or closed bool IsOpen() { return is_open; }; @@ -103,12 +103,12 @@ namespace openshot /// Get and Set JSON methods string Json(); ///< Generate JSON string of this object - void SetJson(string value) throw(InvalidJSON); ///< Load JSON string into this object + void SetJson(string value); ///< Load JSON string into this object Json::Value JsonValue(); ///< Generate Json::JsonValue for this object - void SetJsonValue(Json::Value root) throw(InvalidFile); ///< Load Json::JsonValue into this object + void SetJsonValue(Json::Value root); ///< Load Json::JsonValue into this object /// Open File - which is called by the constructor automatically - void Open() throw(InvalidFile); + void Open(); }; } diff --git a/include/ImageWriter.h b/include/ImageWriter.h index 9274220b..25177134 100644 --- a/include/ImageWriter.h +++ b/include/ImageWriter.h @@ -101,7 +101,7 @@ namespace openshot /// @brief Constructor for ImageWriter. Throws one of the following exceptions. /// @param path The path of the file you want to create - ImageWriter(string path) throw(InvalidFile, InvalidFormat, InvalidCodec, InvalidOptions, OutOfMemory); + ImageWriter(string path); /// @brief Close the writer and encode/output final image to the disk. This is a requirement of ImageMagick, /// which writes all frames of a multi-frame image at one time. @@ -114,7 +114,7 @@ namespace openshot bool IsOpen() { return is_open; }; /// Open writer - void Open() throw(InvalidFile, InvalidCodec); + void Open(); /// @brief Set the cache size (number of frames to queue before writing) /// @param new_size Number of frames to queue before writing @@ -133,13 +133,13 @@ namespace openshot /// @brief Add a frame to the stack waiting to be encoded. /// @param frame The openshot::Frame object to write to this image - void WriteFrame(std::shared_ptr frame) throw(WriterClosed); + void WriteFrame(std::shared_ptr frame); /// @brief Write a block of frames from a reader /// @param reader A openshot::ReaderBase object which will provide frames to be written /// @param start The starting frame number of the reader /// @param length The number of frames to write - void WriteFrame(ReaderBase* reader, int64_t start, int64_t length) throw(WriterClosed); + void WriteFrame(ReaderBase* reader, int64_t start, int64_t length); }; diff --git a/include/KeyFrame.h b/include/KeyFrame.h index f04528c7..bab87f7c 100644 --- a/include/KeyFrame.h +++ b/include/KeyFrame.h @@ -114,7 +114,7 @@ namespace openshot { void FlipPoints(); /// Get the index of a point by matching a coordinate - int64_t FindIndex(Point p) throw(OutOfBoundsPoint); + int64_t FindIndex(Point p); /// Get the value at a specific index double GetValue(int64_t index); @@ -132,7 +132,7 @@ namespace openshot { double GetDelta(int64_t index); /// Get a point at a specific index - Point& GetPoint(int64_t index) throw(OutOfBoundsPoint); + Point& GetPoint(int64_t index); /// Get current point (or closest point to the right) from the X coordinate (i.e. the frame number) Point GetClosestPoint(Point p); @@ -159,7 +159,7 @@ namespace openshot { /// Get and Set JSON methods string Json(); ///< Generate JSON string of this object Json::Value JsonValue(); ///< Generate Json::JsonValue for this object - void SetJson(string value) throw(InvalidJSON); ///< Load JSON string into this object + void SetJson(string value); ///< Load JSON string into this object void SetJsonValue(Json::Value root); ///< Load Json::JsonValue into this object /** @@ -171,10 +171,10 @@ namespace openshot { void Process(); /// Remove a point by matching a coordinate - void RemovePoint(Point p) throw(OutOfBoundsPoint); + void RemovePoint(Point p); /// Remove a point by index - void RemovePoint(int64_t index) throw(OutOfBoundsPoint); + void RemovePoint(int64_t index); /// Scale all points by a percentage (good for evenly lengthening or shortening an openshot::Keyframe) /// 1.0 = same size, 1.05 = 5% increase, etc... diff --git a/include/Point.h b/include/Point.h index ffa0d6d4..139aa64d 100644 --- a/include/Point.h +++ b/include/Point.h @@ -120,7 +120,7 @@ namespace openshot /// Get and Set JSON methods string Json(); ///< Generate JSON string of this object Json::Value JsonValue(); ///< Generate Json::JsonValue for this object - void SetJson(string value) throw(InvalidJSON); ///< Load JSON string into this object + void SetJson(string value); ///< Load JSON string into this object void SetJsonValue(Json::Value root); ///< Load Json::JsonValue into this object }; diff --git a/include/Profiles.h b/include/Profiles.h index 57bf70da..fa279d57 100644 --- a/include/Profiles.h +++ b/include/Profiles.h @@ -86,12 +86,12 @@ namespace openshot /// @brief Constructor for Profile. /// @param path The folder path / location of a profile file - Profile(string path) throw(InvalidFile, InvalidJSON); + Profile(string path); /// Get and Set JSON methods string Json(); ///< Generate JSON string of this object Json::Value JsonValue(); ///< Generate Json::JsonValue for this object - void SetJson(string value) throw(InvalidJSON); ///< Load JSON string into this object + void SetJson(string value); ///< Load JSON string into this object void SetJsonValue(Json::Value root); ///< Load Json::JsonValue into this object }; diff --git a/include/QtImageReader.h b/include/QtImageReader.h index c2180f90..772a879e 100644 --- a/include/QtImageReader.h +++ b/include/QtImageReader.h @@ -78,12 +78,12 @@ namespace openshot /// Constructor for QtImageReader. This automatically opens the media file and loads /// frame 1, or it throws one of the following exceptions. - QtImageReader(string path) throw(InvalidFile); + QtImageReader(string path); /// Constructor for QtImageReader. This only opens the media file to inspect it's 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) throw(InvalidFile); + QtImageReader(string path, bool inspect_reader); /// Close File void Close(); @@ -96,7 +96,7 @@ namespace openshot /// /// @returns The requested frame (containing the image) /// @param requested_frame The frame number that is requested. - std::shared_ptr GetFrame(int64_t requested_frame) throw(ReaderClosed); + std::shared_ptr GetFrame(int64_t requested_frame); /// Determine if reader is open or closed bool IsOpen() { return is_open; }; @@ -106,15 +106,15 @@ namespace openshot /// Get and Set JSON methods string Json(); ///< Generate JSON string of this object - void SetJson(string value) throw(InvalidJSON); ///< Load JSON string into this object + void SetJson(string value); ///< Load JSON string into this object Json::Value JsonValue(); ///< Generate Json::JsonValue for this object - void SetJsonValue(Json::Value root) throw(InvalidFile); ///< Load Json::JsonValue into this object + void SetJsonValue(Json::Value root); ///< Load Json::JsonValue into this object /// Set Max Image Size (used for performance optimization) void SetMaxSize(int width, int height); /// Open File - which is called by the constructor automatically - void Open() throw(InvalidFile); + void Open(); }; } diff --git a/include/ReaderBase.h b/include/ReaderBase.h index 5e26a29c..cbb6b57b 100644 --- a/include/ReaderBase.h +++ b/include/ReaderBase.h @@ -135,7 +135,7 @@ namespace openshot /// Get and Set JSON methods virtual string Json() = 0; ///< Generate JSON string of this object - virtual void SetJson(string value) throw(InvalidJSON) = 0; ///< Load JSON string into this object + 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 diff --git a/include/TextReader.h b/include/TextReader.h index de1f5a18..d7d653d2 100644 --- a/include/TextReader.h +++ b/include/TextReader.h @@ -124,7 +124,7 @@ namespace openshot /// /// @returns The requested frame (containing the image) /// @param requested_frame The frame number that is requested. - std::shared_ptr GetFrame(int64_t requested_frame) throw(ReaderClosed); + std::shared_ptr GetFrame(int64_t requested_frame); /// Determine if reader is open or closed bool IsOpen() { return is_open; }; @@ -134,9 +134,9 @@ namespace openshot /// Get and Set JSON methods string Json(); ///< Generate JSON string of this object - void SetJson(string value) throw(InvalidJSON); ///< Load JSON string into this object + void SetJson(string value); ///< Load JSON string into this object Json::Value JsonValue(); ///< Generate Json::JsonValue for this object - void SetJsonValue(Json::Value root) throw(InvalidFile); ///< Load Json::JsonValue into this object + void SetJsonValue(Json::Value root); ///< Load Json::JsonValue into this object /// Open Reader - which is called by the constructor automatically void Open(); diff --git a/include/Timeline.h b/include/Timeline.h index 64752e41..55adc3cd 100644 --- a/include/Timeline.h +++ b/include/Timeline.h @@ -159,10 +159,10 @@ namespace openshot { void apply_mapper_to_clip(Clip* clip); /// Apply JSON Diffs to various objects contained in this timeline - void apply_json_to_clips(Json::Value change) throw(InvalidJSONKey); /// GetFrame(int64_t requested_frame) throw(ReaderClosed, OutOfBoundsFrame); + std::shared_ptr GetFrame(int64_t requested_frame); // Curves for the viewport Keyframe viewport_scale; /// frame) throw(ErrorEncodingVideo, WriterClosed) = 0; + virtual void WriteFrame(std::shared_ptr frame) = 0; /// This method is required for all derived classes of WriterBase. Write a block of frames from a reader. - virtual void WriteFrame(ReaderBase* reader, int64_t start, int64_t length) throw(ErrorEncodingVideo, WriterClosed) = 0; + virtual void WriteFrame(ReaderBase* reader, int64_t start, int64_t length) = 0; /// Get and Set JSON methods string Json(); ///< Generate JSON string of this object Json::Value JsonValue(); ///< Generate Json::JsonValue for this object - void SetJson(string value) throw(InvalidJSON); ///< Load JSON string into this object + void SetJson(string value); ///< Load JSON string into this object void SetJsonValue(Json::Value root); ///< Load Json::JsonValue into this object /// Display file information in the standard output stream (stdout) diff --git a/include/effects/Blur.h b/include/effects/Blur.h index 910d3845..314dabbe 100644 --- a/include/effects/Blur.h +++ b/include/effects/Blur.h @@ -102,7 +102,7 @@ namespace openshot /// Get and Set JSON methods string Json(); ///< Generate JSON string of this object - void SetJson(string value) throw(InvalidJSON); ///< Load JSON string into this object + void SetJson(string value); ///< Load JSON string into this object Json::Value JsonValue(); ///< Generate Json::JsonValue for this object void SetJsonValue(Json::Value root); ///< Load Json::JsonValue into this object diff --git a/include/effects/Brightness.h b/include/effects/Brightness.h index 023e1c2e..3f13e97a 100644 --- a/include/effects/Brightness.h +++ b/include/effects/Brightness.h @@ -92,7 +92,7 @@ namespace openshot /// Get and Set JSON methods string Json(); ///< Generate JSON string of this object - void SetJson(string value) throw(InvalidJSON); ///< Load JSON string into this object + void SetJson(string value); ///< Load JSON string into this object Json::Value JsonValue(); ///< Generate Json::JsonValue for this object void SetJsonValue(Json::Value root); ///< Load Json::JsonValue into this object diff --git a/include/effects/ChromaKey.h b/include/effects/ChromaKey.h index d6c9d62f..58cd3b7a 100644 --- a/include/effects/ChromaKey.h +++ b/include/effects/ChromaKey.h @@ -86,7 +86,7 @@ namespace openshot /// Get and Set JSON methods string Json(); ///< Generate JSON string of this object - void SetJson(string value) throw(InvalidJSON); ///< Load JSON string into this object + void SetJson(string value); ///< Load JSON string into this object Json::Value JsonValue(); ///< Generate Json::JsonValue for this object void SetJsonValue(Json::Value root); ///< Load Json::JsonValue into this object diff --git a/include/effects/Deinterlace.h b/include/effects/Deinterlace.h index 22832805..c1fb7227 100644 --- a/include/effects/Deinterlace.h +++ b/include/effects/Deinterlace.h @@ -82,7 +82,7 @@ namespace openshot /// Get and Set JSON methods string Json(); ///< Generate JSON string of this object - void SetJson(string value) throw(InvalidJSON); ///< Load JSON string into this object + void SetJson(string value); ///< Load JSON string into this object Json::Value JsonValue(); ///< Generate Json::JsonValue for this object void SetJsonValue(Json::Value root); ///< Load Json::JsonValue into this object diff --git a/include/effects/Mask.h b/include/effects/Mask.h index 35147c0b..bb42743e 100644 --- a/include/effects/Mask.h +++ b/include/effects/Mask.h @@ -90,7 +90,7 @@ namespace openshot /// @param mask_reader The reader of a grayscale mask image or video, to be used by the wipe transition /// @param mask_brightness The curve to adjust the brightness of the wipe's mask (between 100 and -100) /// @param mask_contrast The curve to adjust the contrast of the wipe's mask (3 is typical, 20 is a lot, 0 is invalid) - Mask(ReaderBase *mask_reader, Keyframe mask_brightness, Keyframe mask_contrast) throw(InvalidFile, ReaderClosed); + Mask(ReaderBase *mask_reader, Keyframe mask_brightness, Keyframe mask_contrast); /// @brief This method is required for all derived classes of EffectBase, and returns a /// modified openshot::Frame object @@ -105,7 +105,7 @@ namespace openshot /// Get and Set JSON methods string Json(); ///< Generate JSON string of this object - void SetJson(string value) throw(InvalidJSON); ///< Load JSON string into this object + void SetJson(string value); ///< Load JSON string into this object Json::Value JsonValue(); ///< Generate Json::JsonValue for this object void SetJsonValue(Json::Value root); ///< Load Json::JsonValue into this object diff --git a/include/effects/Negate.h b/include/effects/Negate.h index e6b9b1ac..84621132 100644 --- a/include/effects/Negate.h +++ b/include/effects/Negate.h @@ -70,7 +70,7 @@ namespace openshot /// Get and Set JSON methods string Json(); ///< Generate JSON string of this object - void SetJson(string value) throw(InvalidJSON); ///< Load JSON string into this object + void SetJson(string value); ///< Load JSON string into this object Json::Value JsonValue(); ///< Generate Json::JsonValue for this object void SetJsonValue(Json::Value root); ///< Load Json::JsonValue into this object diff --git a/include/effects/Saturation.h b/include/effects/Saturation.h index b0c7f6d6..1512c0a2 100644 --- a/include/effects/Saturation.h +++ b/include/effects/Saturation.h @@ -89,7 +89,7 @@ namespace openshot /// Get and Set JSON methods string Json(); ///< Generate JSON string of this object - void SetJson(string value) throw(InvalidJSON); ///< Load JSON string into this object + void SetJson(string value); ///< Load JSON string into this object Json::Value JsonValue(); ///< Generate Json::JsonValue for this object void SetJsonValue(Json::Value root); ///< Load Json::JsonValue into this object diff --git a/src/CacheDisk.cpp b/src/CacheDisk.cpp index 4175f42d..076c01be 100644 --- a/src/CacheDisk.cpp +++ b/src/CacheDisk.cpp @@ -496,7 +496,7 @@ Json::Value CacheDisk::JsonValue() { } // Load JSON string into this object -void CacheDisk::SetJson(string value) throw(InvalidJSON) { +void CacheDisk::SetJson(string value) { // Parse JSON string into JSON objects Json::Value root; @@ -519,7 +519,7 @@ void CacheDisk::SetJson(string value) throw(InvalidJSON) { } // Load Json::JsonValue into this object -void CacheDisk::SetJsonValue(Json::Value root) throw(InvalidFile, ReaderClosed) { +void CacheDisk::SetJsonValue(Json::Value root) { // Close timeline before we do anything (this also removes all open and closing clips) Clear(); @@ -532,4 +532,4 @@ void CacheDisk::SetJsonValue(Json::Value root) throw(InvalidFile, ReaderClosed) if (!root["path"].isNull()) // Update duration of timeline InitPath(root["path"].asString()); -} \ No newline at end of file +} diff --git a/src/CacheMemory.cpp b/src/CacheMemory.cpp index d1674fc5..6600d9b7 100644 --- a/src/CacheMemory.cpp +++ b/src/CacheMemory.cpp @@ -350,7 +350,7 @@ Json::Value CacheMemory::JsonValue() { } // Load JSON string into this object -void CacheMemory::SetJson(string value) throw(InvalidJSON) { +void CacheMemory::SetJson(string value) { // Parse JSON string into JSON objects Json::Value root; @@ -373,7 +373,7 @@ void CacheMemory::SetJson(string value) throw(InvalidJSON) { } // Load Json::JsonValue into this object -void CacheMemory::SetJsonValue(Json::Value root) throw(InvalidFile, ReaderClosed) { +void CacheMemory::SetJsonValue(Json::Value root) { // Close timeline before we do anything (this also removes all open and closing clips) Clear(); @@ -383,4 +383,4 @@ void CacheMemory::SetJsonValue(Json::Value root) throw(InvalidFile, ReaderClosed if (!root["type"].isNull()) cache_type = root["type"].asString(); -} \ No newline at end of file +} diff --git a/src/ChunkReader.cpp b/src/ChunkReader.cpp index f3160bd8..8308a0c9 100644 --- a/src/ChunkReader.cpp +++ b/src/ChunkReader.cpp @@ -29,7 +29,7 @@ using namespace openshot; -ChunkReader::ChunkReader(string path, ChunkVersion chunk_version) throw(InvalidFile, InvalidJSON) +ChunkReader::ChunkReader(string path, ChunkVersion chunk_version) : path(path), chunk_size(24 * 3), is_open(false), version(chunk_version), local_reader(NULL) { // Check if folder exists? @@ -139,7 +139,7 @@ ChunkLocation ChunkReader::find_chunk_frame(int64_t requested_frame) } // Open chunk folder or file -void ChunkReader::Open() throw(InvalidFile) +void ChunkReader::Open() { // Open reader if not already open if (!is_open) @@ -187,7 +187,7 @@ string ChunkReader::get_chunk_path(int64_t chunk_number, string folder, string e } // Get an openshot::Frame object for a specific frame number of this reader. -std::shared_ptr ChunkReader::GetFrame(int64_t requested_frame) throw(ReaderClosed, ChunkNotFound) +std::shared_ptr ChunkReader::GetFrame(int64_t requested_frame) { // Determine what chunk contains this frame ChunkLocation location = find_chunk_frame(requested_frame); @@ -274,7 +274,7 @@ Json::Value ChunkReader::JsonValue() { } // Load JSON string into this object -void ChunkReader::SetJson(string value) throw(InvalidJSON) { +void ChunkReader::SetJson(string value) { // Parse JSON string into JSON objects Json::Value root; @@ -297,7 +297,7 @@ void ChunkReader::SetJson(string value) throw(InvalidJSON) { } // Load Json::JsonValue into this object -void ChunkReader::SetJsonValue(Json::Value root) throw(InvalidFile) { +void ChunkReader::SetJsonValue(Json::Value root) { // Set parent data ReaderBase::SetJsonValue(root); diff --git a/src/ChunkWriter.cpp b/src/ChunkWriter.cpp index 8ebcff04..958fecb7 100644 --- a/src/ChunkWriter.cpp +++ b/src/ChunkWriter.cpp @@ -29,7 +29,7 @@ using namespace openshot; -ChunkWriter::ChunkWriter(string path, ReaderBase *reader) throw (InvalidFile, InvalidFormat, InvalidCodec, InvalidOptions, OutOfMemory) : +ChunkWriter::ChunkWriter(string path, ReaderBase *reader) : local_reader(reader), path(path), chunk_size(24*3), chunk_count(1), frame_count(1), is_writing(false), default_extension(".webm"), default_vcodec("libvpx"), default_acodec("libvorbis"), last_frame_needed(false), is_open(false) { @@ -74,7 +74,7 @@ string ChunkWriter::get_chunk_path(int64_t chunk_number, string folder, string e } // Add a frame to the queue waiting to be encoded. -void ChunkWriter::WriteFrame(std::shared_ptr frame) throw(WriterClosed) +void ChunkWriter::WriteFrame(std::shared_ptr frame) { // Check for open reader (or throw exception) if (!is_open) @@ -193,7 +193,7 @@ void ChunkWriter::WriteFrame(std::shared_ptr frame) throw(WriterClosed) // Write a block of frames from a reader -void ChunkWriter::WriteFrame(ReaderBase* reader, int64_t start, int64_t length) throw(WriterClosed) +void ChunkWriter::WriteFrame(ReaderBase* reader, int64_t start, int64_t length) { // Loop through each frame (and encoded it) for (int64_t number = start; number <= length; number++) @@ -207,7 +207,7 @@ void ChunkWriter::WriteFrame(ReaderBase* reader, int64_t start, int64_t length) } // Write a block of frames from the local cached reader -void ChunkWriter::WriteFrame(int64_t start, int64_t length) throw(WriterClosed) +void ChunkWriter::WriteFrame(int64_t start, int64_t length) { // Loop through each frame (and encoded it) for (int64_t number = start; number <= length; number++) @@ -296,7 +296,7 @@ bool ChunkWriter::is_chunk_valid() } // Open the writer -void ChunkWriter::Open() throw(InvalidFile, InvalidCodec) +void ChunkWriter::Open() { is_open = true; } diff --git a/src/Clip.cpp b/src/Clip.cpp index 5951bfaa..c2d1d2fe 100644 --- a/src/Clip.cpp +++ b/src/Clip.cpp @@ -192,7 +192,7 @@ void Clip::Reader(ReaderBase* new_reader) } /// Get the current reader -ReaderBase* Clip::Reader() throw(ReaderClosed) +ReaderBase* Clip::Reader() { if (reader) return reader; @@ -202,7 +202,7 @@ ReaderBase* Clip::Reader() throw(ReaderClosed) } // Open the internal reader -void Clip::Open() throw(InvalidFile, ReaderClosed) +void Clip::Open() { if (reader) { @@ -219,7 +219,7 @@ void Clip::Open() throw(InvalidFile, ReaderClosed) } // Close the internal reader -void Clip::Close() throw(ReaderClosed) +void Clip::Close() { if (reader) { ZmqLogger::Instance()->AppendDebugMethod("Clip::Close", "", -1, "", -1, "", -1, "", -1, "", -1, "", -1); @@ -233,7 +233,7 @@ void Clip::Close() throw(ReaderClosed) } // Get end position of clip (trim end of video), which can be affected by the time curve. -float Clip::End() throw(ReaderClosed) +float Clip::End() { // if a time curve is present, use it's length if (time.Points.size() > 1) @@ -255,7 +255,7 @@ float Clip::End() throw(ReaderClosed) } // Get an openshot::Frame object for a specific frame number of this reader. -std::shared_ptr Clip::GetFrame(int64_t requested_frame) throw(ReaderClosed) +std::shared_ptr Clip::GetFrame(int64_t requested_frame) { if (reader) { @@ -347,7 +347,7 @@ void Clip::reverse_buffer(juce::AudioSampleBuffer* buffer) } // Adjust the audio and image of a time mapped frame -std::shared_ptr Clip::get_time_mapped_frame(std::shared_ptr frame, int64_t frame_number) throw(ReaderClosed) +std::shared_ptr Clip::get_time_mapped_frame(std::shared_ptr frame, int64_t frame_number) { // Check for valid reader if (!reader) @@ -784,7 +784,7 @@ Json::Value Clip::JsonValue() { } // Load JSON string into this object -void Clip::SetJson(string value) throw(InvalidJSON) { +void Clip::SetJson(string value) { // Parse JSON string into JSON objects Json::Value root; diff --git a/src/Color.cpp b/src/Color.cpp index 1bb322cf..df2cf097 100644 --- a/src/Color.cpp +++ b/src/Color.cpp @@ -103,7 +103,7 @@ Json::Value Color::JsonValue() { } // Load JSON string into this object -void Color::SetJson(string value) throw(InvalidJSON) { +void Color::SetJson(string value) { // Parse JSON string into JSON objects Json::Value root; diff --git a/src/Coordinate.cpp b/src/Coordinate.cpp index c73e0fab..41ee420a 100644 --- a/src/Coordinate.cpp +++ b/src/Coordinate.cpp @@ -66,7 +66,7 @@ Json::Value Coordinate::JsonValue() { } // Load JSON string into this object -void Coordinate::SetJson(string value) throw(InvalidJSON) { +void Coordinate::SetJson(string value) { // Parse JSON string into JSON objects Json::Value root; diff --git a/src/DecklinkReader.cpp b/src/DecklinkReader.cpp index 6df2fc1c..1d9b70b9 100644 --- a/src/DecklinkReader.cpp +++ b/src/DecklinkReader.cpp @@ -29,7 +29,7 @@ using namespace openshot; -DecklinkReader::DecklinkReader(int device, int video_mode, int pixel_format, int channels, int sample_depth) throw(DecklinkError) +DecklinkReader::DecklinkReader(int device, int video_mode, int pixel_format, int channels, int sample_depth) : device(device), is_open(false), g_videoModeIndex(video_mode), g_audioChannels(channels), g_audioSampleDepth(sample_depth) { // Init decklink variables @@ -166,7 +166,7 @@ DecklinkReader::~DecklinkReader() } // Open image file -void DecklinkReader::Open() throw(DecklinkError) +void DecklinkReader::Open() { // Open reader if not already open if (!is_open) @@ -231,7 +231,7 @@ unsigned long DecklinkReader::GetCurrentFrameNumber() } // Get an openshot::Frame object for the next available LIVE frame -std::shared_ptr DecklinkReader::GetFrame(int64_t requested_frame) throw(ReaderClosed) +std::shared_ptr DecklinkReader::GetFrame(int64_t requested_frame) { // Get a frame from the delegate decklink class (which is collecting them on another thread) std::shared_ptr f = delegate->GetFrame(requested_frame); @@ -261,7 +261,7 @@ Json::Value DecklinkReader::JsonValue() { } // Load JSON string into this object -void DecklinkReader::SetJson(string value) throw(InvalidJSON) { +void DecklinkReader::SetJson(string value) { // Parse JSON string into JSON objects Json::Value root; @@ -284,7 +284,7 @@ void DecklinkReader::SetJson(string value) throw(InvalidJSON) { } // Load Json::JsonValue into this object -void DecklinkReader::SetJsonValue(Json::Value root) throw(InvalidFile) { +void DecklinkReader::SetJsonValue(Json::Value root) { // Set parent data ReaderBase::SetJsonValue(root); diff --git a/src/DecklinkWriter.cpp b/src/DecklinkWriter.cpp index ae684565..dd0de9c5 100644 --- a/src/DecklinkWriter.cpp +++ b/src/DecklinkWriter.cpp @@ -29,7 +29,7 @@ using namespace openshot; -DecklinkWriter::DecklinkWriter(int device, int video_mode, int pixel_format, int channels, int sample_depth) throw(DecklinkError) +DecklinkWriter::DecklinkWriter(int device, int video_mode, int pixel_format, int channels, int sample_depth) : device(device), is_open(false), g_videoModeIndex(video_mode), g_audioChannels(channels), g_audioSampleDepth(sample_depth) { // Init decklink variables @@ -54,7 +54,7 @@ DecklinkWriter::DecklinkWriter(int device, int video_mode, int pixel_format, int } // Open decklink writer -void DecklinkWriter::Open() throw(DecklinkError) +void DecklinkWriter::Open() { // Open reader if not already open if (!is_open) @@ -227,7 +227,7 @@ void DecklinkWriter::Close() } // This method is required for all derived classes of WriterBase. Write a Frame to the video file. -void DecklinkWriter::WriteFrame(std::shared_ptr frame) throw(WriterClosed) +void DecklinkWriter::WriteFrame(std::shared_ptr frame) { // Check for open reader (or throw exception) if (!is_open) @@ -237,7 +237,7 @@ void DecklinkWriter::WriteFrame(std::shared_ptr frame) throw(WriterClosed } // This method is required for all derived classes of WriterBase. Write a block of frames from a reader. -void DecklinkWriter::WriteFrame(ReaderBase* reader, int start, int length) throw(WriterClosed) +void DecklinkWriter::WriteFrame(ReaderBase* reader, int start, int length) { // Loop through each frame (and encoded it) for (int number = start; number <= length; number++) diff --git a/src/DummyReader.cpp b/src/DummyReader.cpp index 83c5617b..8fe039ab 100644 --- a/src/DummyReader.cpp +++ b/src/DummyReader.cpp @@ -72,7 +72,7 @@ DummyReader::DummyReader(Fraction fps, int width, int height, int sample_rate, i } // Open image file -void DummyReader::Open() throw(InvalidFile) +void DummyReader::Open() { // Open reader if not already open if (!is_open) @@ -97,7 +97,7 @@ void DummyReader::Close() } // Get an openshot::Frame object for a specific frame number of this reader. -std::shared_ptr DummyReader::GetFrame(int64_t requested_frame) throw(ReaderClosed) +std::shared_ptr DummyReader::GetFrame(int64_t requested_frame) { // Check for open reader (or throw exception) if (!is_open) @@ -136,7 +136,7 @@ Json::Value DummyReader::JsonValue() { } // Load JSON string into this object -void DummyReader::SetJson(string value) throw(InvalidJSON) { +void DummyReader::SetJson(string value) { // Parse JSON string into JSON objects Json::Value root; @@ -159,7 +159,7 @@ void DummyReader::SetJson(string value) throw(InvalidJSON) { } // Load Json::JsonValue into this object -void DummyReader::SetJsonValue(Json::Value root) throw(InvalidFile) { +void DummyReader::SetJsonValue(Json::Value root) { // Set parent data ReaderBase::SetJsonValue(root); diff --git a/src/EffectBase.cpp b/src/EffectBase.cpp index 13117ab5..f522d7c4 100644 --- a/src/EffectBase.cpp +++ b/src/EffectBase.cpp @@ -83,7 +83,7 @@ Json::Value EffectBase::JsonValue() { } // Load JSON string into this object -void EffectBase::SetJson(string value) throw(InvalidJSON) { +void EffectBase::SetJson(string value) { // Parse JSON string into JSON objects Json::Value root; @@ -130,4 +130,4 @@ Json::Value EffectBase::JsonInfo() { // return JsonValue return root; -} \ No newline at end of file +} diff --git a/src/FFmpegReader.cpp b/src/FFmpegReader.cpp index 899aabfe..b87539eb 100644 --- a/src/FFmpegReader.cpp +++ b/src/FFmpegReader.cpp @@ -32,7 +32,7 @@ using namespace openshot; -FFmpegReader::FFmpegReader(string path) throw(InvalidFile, NoStreamsFound, InvalidCodec) +FFmpegReader::FFmpegReader(string path) : last_frame(0), is_seeking(0), seeking_pts(0), seeking_frame(0), seek_count(0), audio_pts_offset(99999), video_pts_offset(99999), path(path), is_video_seek(true), check_interlace(false), check_fps(false), enable_seek(true), is_open(false), seek_audio_frame_found(0), seek_video_frame_found(0), @@ -53,7 +53,7 @@ FFmpegReader::FFmpegReader(string path) throw(InvalidFile, NoStreamsFound, Inval Close(); } -FFmpegReader::FFmpegReader(string path, bool inspect_reader) throw(InvalidFile, NoStreamsFound, InvalidCodec) +FFmpegReader::FFmpegReader(string path, bool inspect_reader) : last_frame(0), is_seeking(0), seeking_pts(0), seeking_frame(0), seek_count(0), audio_pts_offset(99999), video_pts_offset(99999), path(path), is_video_seek(true), check_interlace(false), check_fps(false), enable_seek(true), is_open(false), seek_audio_frame_found(0), seek_video_frame_found(0), @@ -101,7 +101,7 @@ bool AudioLocation::is_near(AudioLocation location, int samples_per_frame, int64 return false; } -void FFmpegReader::Open() throw(InvalidFile, NoStreamsFound, InvalidCodec) +void FFmpegReader::Open() { // Open reader if not already open if (!is_open) @@ -393,7 +393,7 @@ void FFmpegReader::UpdateVideoInfo() } -std::shared_ptr FFmpegReader::GetFrame(int64_t requested_frame) throw(OutOfBoundsFrame, ReaderClosed, TooManySeeks) +std::shared_ptr FFmpegReader::GetFrame(int64_t requested_frame) { // Check for open reader (or throw exception) if (!is_open) @@ -1150,7 +1150,7 @@ void FFmpegReader::ProcessAudioPacket(int64_t requested_frame, int64_t target_fr // Seek to a specific frame. This is not always frame accurate, it's more of an estimation on many codecs. -void FFmpegReader::Seek(int64_t requested_frame) throw(TooManySeeks) +void FFmpegReader::Seek(int64_t requested_frame) { // Adjust for a requested frame that is too small or too large if (requested_frame < 1) @@ -1930,7 +1930,7 @@ Json::Value FFmpegReader::JsonValue() { } // Load JSON string into this object -void FFmpegReader::SetJson(string value) throw(InvalidJSON) { +void FFmpegReader::SetJson(string value) { // Parse JSON string into JSON objects Json::Value root; @@ -1953,7 +1953,7 @@ void FFmpegReader::SetJson(string value) throw(InvalidJSON) { } // Load Json::JsonValue into this object -void FFmpegReader::SetJsonValue(Json::Value root) throw(InvalidFile) { +void FFmpegReader::SetJsonValue(Json::Value root) { // Set parent data ReaderBase::SetJsonValue(root); diff --git a/src/FFmpegWriter.cpp b/src/FFmpegWriter.cpp index 7ab27916..15d2303a 100644 --- a/src/FFmpegWriter.cpp +++ b/src/FFmpegWriter.cpp @@ -32,7 +32,7 @@ using namespace openshot; -FFmpegWriter::FFmpegWriter(string path) throw (InvalidFile, InvalidFormat, InvalidCodec, InvalidOptions, OutOfMemory): +FFmpegWriter::FFmpegWriter(string path) : path(path), fmt(NULL), oc(NULL), audio_st(NULL), video_st(NULL), audio_pts(0), video_pts(0), samples(NULL), audio_outbuf(NULL), audio_outbuf_size(0), audio_input_frame_size(0), audio_input_position(0), initial_audio_input_frame_size(0), img_convert_ctx(NULL), cache_size(8), num_of_rescalers(32), @@ -53,7 +53,7 @@ FFmpegWriter::FFmpegWriter(string path) throw (InvalidFile, InvalidFormat, Inval } // Open the writer -void FFmpegWriter::Open() throw(InvalidFile, InvalidFormat, InvalidCodec, InvalidOptions, OutOfMemory, InvalidChannels, InvalidSampleRate) +void FFmpegWriter::Open() { // Open the writer is_open = true; @@ -112,7 +112,6 @@ void FFmpegWriter::initialize_streams() // Set video export options void FFmpegWriter::SetVideoOptions(bool has_video, string codec, Fraction fps, int width, int height, Fraction pixel_ratio, bool interlaced, bool top_field_first, int bit_rate) - throw(InvalidFile, InvalidFormat, InvalidCodec, InvalidOptions, OutOfMemory, InvalidChannels) { // Set the video options if (codec.length() > 0) @@ -171,7 +170,6 @@ void FFmpegWriter::SetVideoOptions(bool has_video, string codec, Fraction fps, i // Set audio export options void FFmpegWriter::SetAudioOptions(bool has_audio, string codec, int sample_rate, int channels, ChannelLayout channel_layout, int bit_rate) - throw(InvalidFile, InvalidFormat, InvalidCodec, InvalidOptions, OutOfMemory, InvalidChannels) { // Set audio options if (codec.length() > 0) @@ -209,7 +207,7 @@ void FFmpegWriter::SetAudioOptions(bool has_audio, string codec, int sample_rate } // Set custom options (some codecs accept additional params) -void FFmpegWriter::SetOption(StreamType stream, string name, string value) throw(NoStreamsFound, InvalidOptions) +void FFmpegWriter::SetOption(StreamType stream, string name, string value) { // Declare codec context AVCodecContext *c = NULL; @@ -346,7 +344,7 @@ void FFmpegWriter::WriteHeader() } // Add a frame to the queue waiting to be encoded. -void FFmpegWriter::WriteFrame(std::shared_ptr frame) throw(ErrorEncodingVideo, WriterClosed) +void FFmpegWriter::WriteFrame(std::shared_ptr frame) { // Check for open reader (or throw exception) if (!is_open) @@ -386,7 +384,7 @@ void FFmpegWriter::WriteFrame(std::shared_ptr frame) throw(ErrorEncodingV } // Write all frames in the queue to the video file. -void FFmpegWriter::write_queued_frames() throw (ErrorEncodingVideo) +void FFmpegWriter::write_queued_frames() { ZmqLogger::Instance()->AppendDebugMethod("FFmpegWriter::write_queued_frames", "spooled_video_frames.size()", spooled_video_frames.size(), "spooled_audio_frames.size()", spooled_audio_frames.size(), "", -1, "", -1, "", -1, "", -1); @@ -500,7 +498,7 @@ void FFmpegWriter::write_queued_frames() throw (ErrorEncodingVideo) } // Write a block of frames from a reader -void FFmpegWriter::WriteFrame(ReaderBase* reader, int64_t start, int64_t length) throw(ErrorEncodingVideo, WriterClosed) +void FFmpegWriter::WriteFrame(ReaderBase* reader, int64_t start, int64_t length) { ZmqLogger::Instance()->AppendDebugMethod("FFmpegWriter::WriteFrame (from Reader)", "start", start, "length", length, "", -1, "", -1, "", -1, "", -1); diff --git a/src/Frame.cpp b/src/Frame.cpp index 3d6bf324..f54c9505 100644 --- a/src/Frame.cpp +++ b/src/Frame.cpp @@ -565,7 +565,7 @@ void Frame::Save(string path, float scale, string format, int quality) // Thumbnail the frame image to the specified path. The image format is determined from the extension (i.e. image.PNG, image.JPEG) void Frame::Thumbnail(string path, int new_width, int new_height, string mask_path, string overlay_path, - string background_color, bool ignore_aspect, string format, int quality) throw(InvalidFile) { + string background_color, bool ignore_aspect, string format, int quality) { // Create blank thumbnail image & fill background color std::shared_ptr thumbnail = std::shared_ptr(new QImage(new_width, new_height, QImage::Format_RGBA8888)); diff --git a/src/FrameMapper.cpp b/src/FrameMapper.cpp index 7557e14c..db71b9c0 100644 --- a/src/FrameMapper.cpp +++ b/src/FrameMapper.cpp @@ -67,7 +67,7 @@ FrameMapper::~FrameMapper() { } /// Get the current reader -ReaderBase* FrameMapper::Reader() throw(ReaderClosed) +ReaderBase* FrameMapper::Reader() { if (reader) return reader; @@ -308,7 +308,7 @@ void FrameMapper::Init() fields.clear(); } -MappedFrame FrameMapper::GetMappedFrame(int64_t TargetFrameNumber) throw(OutOfBoundsFrame) +MappedFrame FrameMapper::GetMappedFrame(int64_t TargetFrameNumber) { // Ignore mapping on single image readers if (info.has_video and !info.has_audio and info.has_single_image) { @@ -380,7 +380,7 @@ std::shared_ptr FrameMapper::GetOrCreateFrame(int64_t number) } // Get an openshot::Frame object for a specific frame number of this reader. -std::shared_ptr FrameMapper::GetFrame(int64_t requested_frame) throw(ReaderClosed) +std::shared_ptr FrameMapper::GetFrame(int64_t requested_frame) { // Check final cache, and just return the frame (if it's available) std::shared_ptr final_frame = final_cache.GetFrame(requested_frame); @@ -624,7 +624,7 @@ bool FrameMapper::IsOpen() { // Open the internal reader -void FrameMapper::Open() throw(InvalidFile) +void FrameMapper::Open() { if (reader) { @@ -677,7 +677,7 @@ Json::Value FrameMapper::JsonValue() { } // Load JSON string into this object -void FrameMapper::SetJson(string value) throw(InvalidJSON) { +void FrameMapper::SetJson(string value) { // Parse JSON string into JSON objects Json::Value root; @@ -700,7 +700,7 @@ void FrameMapper::SetJson(string value) throw(InvalidJSON) { } // Load Json::JsonValue into this object -void FrameMapper::SetJsonValue(Json::Value root) throw(InvalidFile) { +void FrameMapper::SetJsonValue(Json::Value root) { // Set parent data ReaderBase::SetJsonValue(root); diff --git a/src/ImageReader.cpp b/src/ImageReader.cpp index 30ff54f2..f535666a 100644 --- a/src/ImageReader.cpp +++ b/src/ImageReader.cpp @@ -29,14 +29,14 @@ using namespace openshot; -ImageReader::ImageReader(string path) throw(InvalidFile) : path(path), is_open(false) +ImageReader::ImageReader(string path) : path(path), is_open(false) { // Open and Close the reader, to populate it's attributes (such as height, width, etc...) Open(); Close(); } -ImageReader::ImageReader(string path, bool inspect_reader) throw(InvalidFile) : path(path), is_open(false) +ImageReader::ImageReader(string path, bool inspect_reader) : path(path), is_open(false) { // Open and Close the reader, to populate it's attributes (such as height, width, etc...) if (inspect_reader) { @@ -46,7 +46,7 @@ ImageReader::ImageReader(string path, bool inspect_reader) throw(InvalidFile) : } // Open image file -void ImageReader::Open() throw(InvalidFile) +void ImageReader::Open() { // Open reader if not already open if (!is_open) @@ -113,7 +113,7 @@ void ImageReader::Close() } // Get an openshot::Frame object for a specific frame number of this reader. -std::shared_ptr ImageReader::GetFrame(int64_t requested_frame) throw(ReaderClosed) +std::shared_ptr ImageReader::GetFrame(int64_t requested_frame) { // Check for open reader (or throw exception) if (!is_open) @@ -149,7 +149,7 @@ Json::Value ImageReader::JsonValue() { } // Load JSON string into this object -void ImageReader::SetJson(string value) throw(InvalidJSON) { +void ImageReader::SetJson(string value) { // Parse JSON string into JSON objects Json::Value root; @@ -172,7 +172,7 @@ void ImageReader::SetJson(string value) throw(InvalidJSON) { } // Load Json::JsonValue into this object -void ImageReader::SetJsonValue(Json::Value root) throw(InvalidFile) { +void ImageReader::SetJsonValue(Json::Value root) { // Set parent data ReaderBase::SetJsonValue(root); diff --git a/src/ImageWriter.cpp b/src/ImageWriter.cpp index 4d7aa6bb..41626b09 100644 --- a/src/ImageWriter.cpp +++ b/src/ImageWriter.cpp @@ -32,7 +32,7 @@ using namespace openshot; -ImageWriter::ImageWriter(string path) throw (InvalidFile, InvalidFormat, InvalidCodec, InvalidOptions, OutOfMemory) : +ImageWriter::ImageWriter(string path) : path(path), cache_size(8), is_writing(false), write_video_count(0), image_quality(75), number_of_loops(1), combine_frames(true), is_open(false) { @@ -80,13 +80,13 @@ void ImageWriter::SetVideoOptions(string format, Fraction fps, int width, int he } // Open the writer -void ImageWriter::Open() throw(InvalidFile, InvalidCodec) +void ImageWriter::Open() { is_open = true; } // Add a frame to the queue waiting to be encoded. -void ImageWriter::WriteFrame(std::shared_ptr frame) throw(WriterClosed) +void ImageWriter::WriteFrame(std::shared_ptr frame) { // Check for open reader (or throw exception) if (!is_open) @@ -120,7 +120,7 @@ void ImageWriter::WriteFrame(std::shared_ptr frame) throw(WriterClosed) } // Write a block of frames from a reader -void ImageWriter::WriteFrame(ReaderBase* reader, int64_t start, int64_t length) throw(WriterClosed) +void ImageWriter::WriteFrame(ReaderBase* reader, int64_t start, int64_t length) { ZmqLogger::Instance()->AppendDebugMethod("ImageWriter::WriteFrame (from Reader)", "start", start, "length", length, "", -1, "", -1, "", -1, "", -1); diff --git a/src/KeyFrame.cpp b/src/KeyFrame.cpp index dd1cc963..05a8a769 100644 --- a/src/KeyFrame.cpp +++ b/src/KeyFrame.cpp @@ -107,7 +107,7 @@ void Keyframe::AddPoint(double x, double y, InterpolationType interpolate) } // Get the index of a point by matching a coordinate -int64_t Keyframe::FindIndex(Point p) throw(OutOfBoundsPoint) { +int64_t Keyframe::FindIndex(Point p) { // loop through points, and find a matching coordinate for (int64_t x = 0; x < Points.size(); x++) { // Get each point @@ -336,7 +336,7 @@ Json::Value Keyframe::JsonValue() { } // Load JSON string into this object -void Keyframe::SetJson(string value) throw(InvalidJSON) { +void Keyframe::SetJson(string value) { // Parse JSON string into JSON objects Json::Value root; @@ -429,7 +429,7 @@ double Keyframe::GetDelta(int64_t index) } // Get a point at a specific index -Point& Keyframe::GetPoint(int64_t index) throw(OutOfBoundsPoint) { +Point& Keyframe::GetPoint(int64_t index) { // Is index a valid point? if (index >= 0 && index < Points.size()) return Points[index]; @@ -456,7 +456,7 @@ int64_t Keyframe::GetCount() { } // Remove a point by matching a coordinate -void Keyframe::RemovePoint(Point p) throw(OutOfBoundsPoint) { +void Keyframe::RemovePoint(Point p) { // mark as dirty needs_update = true; @@ -478,7 +478,7 @@ void Keyframe::RemovePoint(Point p) throw(OutOfBoundsPoint) { } // Remove a point by index -void Keyframe::RemovePoint(int64_t index) throw(OutOfBoundsPoint) { +void Keyframe::RemovePoint(int64_t index) { // mark as dirty needs_update = true; diff --git a/src/Point.cpp b/src/Point.cpp index b4646df8..e55e6453 100644 --- a/src/Point.cpp +++ b/src/Point.cpp @@ -129,7 +129,7 @@ Json::Value Point::JsonValue() { } // Load JSON string into this object -void Point::SetJson(string value) throw(InvalidJSON) { +void Point::SetJson(string value) { // Parse JSON string into JSON objects Json::Value root; diff --git a/src/Profiles.cpp b/src/Profiles.cpp index bfbfeaa0..390e5765 100644 --- a/src/Profiles.cpp +++ b/src/Profiles.cpp @@ -32,7 +32,7 @@ using namespace openshot; // @brief Constructor for Profile. // @param path The folder path / location of a profile file -Profile::Profile(string path) throw(InvalidFile, InvalidJSON) { +Profile::Profile(string path) { bool read_file = false; @@ -160,7 +160,7 @@ Json::Value Profile::JsonValue() { } // Load JSON string into this object -void Profile::SetJson(string value) throw(InvalidJSON) { +void Profile::SetJson(string value) { // Parse JSON string into JSON objects Json::Value root; diff --git a/src/QtImageReader.cpp b/src/QtImageReader.cpp index c59e4b85..bbfae20b 100644 --- a/src/QtImageReader.cpp +++ b/src/QtImageReader.cpp @@ -29,14 +29,14 @@ using namespace openshot; -QtImageReader::QtImageReader(string path) throw(InvalidFile) : path(path), is_open(false) +QtImageReader::QtImageReader(string path) : path(path), is_open(false) { // Open and Close the reader, to populate it's attributes (such as height, width, etc...) Open(); Close(); } -QtImageReader::QtImageReader(string path, bool inspect_reader) throw(InvalidFile) : path(path), is_open(false) +QtImageReader::QtImageReader(string path, bool inspect_reader) : path(path), is_open(false) { // Open and Close the reader, to populate it's attributes (such as height, width, etc...) if (inspect_reader) { @@ -46,7 +46,7 @@ QtImageReader::QtImageReader(string path, bool inspect_reader) throw(InvalidFile } // Open image file -void QtImageReader::Open() throw(InvalidFile) +void QtImageReader::Open() { // Open reader if not already open if (!is_open) @@ -127,7 +127,7 @@ void QtImageReader::SetMaxSize(int width, int height) } // Get an openshot::Frame object for a specific frame number of this reader. -std::shared_ptr QtImageReader::GetFrame(int64_t requested_frame) throw(ReaderClosed) +std::shared_ptr QtImageReader::GetFrame(int64_t requested_frame) { // Check for open reader (or throw exception) if (!is_open) @@ -188,7 +188,7 @@ Json::Value QtImageReader::JsonValue() { } // Load JSON string into this object -void QtImageReader::SetJson(string value) throw(InvalidJSON) { +void QtImageReader::SetJson(string value) { // Parse JSON string into JSON objects Json::Value root; @@ -211,7 +211,7 @@ void QtImageReader::SetJson(string value) throw(InvalidJSON) { } // Load Json::JsonValue into this object -void QtImageReader::SetJsonValue(Json::Value root) throw(InvalidFile) { +void QtImageReader::SetJsonValue(Json::Value root) { // Set parent data ReaderBase::SetJsonValue(root); diff --git a/src/TextReader.cpp b/src/TextReader.cpp index dcaef865..b4135524 100644 --- a/src/TextReader.cpp +++ b/src/TextReader.cpp @@ -143,7 +143,7 @@ void TextReader::Close() } // Get an openshot::Frame object for a specific frame number of this reader. -std::shared_ptr TextReader::GetFrame(int64_t requested_frame) throw(ReaderClosed) +std::shared_ptr TextReader::GetFrame(int64_t requested_frame) { if (image) { @@ -197,7 +197,7 @@ Json::Value TextReader::JsonValue() { } // Load JSON string into this object -void TextReader::SetJson(string value) throw(InvalidJSON) { +void TextReader::SetJson(string value) { // Parse JSON string into JSON objects Json::Value root; @@ -220,7 +220,7 @@ void TextReader::SetJson(string value) throw(InvalidJSON) { } // Load Json::JsonValue into this object -void TextReader::SetJsonValue(Json::Value root) throw(InvalidFile) { +void TextReader::SetJsonValue(Json::Value root) { // Set parent data ReaderBase::SetJsonValue(root); diff --git a/src/Timeline.cpp b/src/Timeline.cpp index 9dcc9f1c..711c2e39 100644 --- a/src/Timeline.cpp +++ b/src/Timeline.cpp @@ -68,7 +68,7 @@ Timeline::Timeline(int width, int height, Fraction fps, int sample_rate, int cha } // Add an openshot::Clip to the timeline -void Timeline::AddClip(Clip* clip) throw(ReaderClosed) +void Timeline::AddClip(Clip* clip) { // All clips should be converted to the frame rate of this timeline if (auto_map_clips) @@ -626,7 +626,7 @@ bool Timeline::isEqual(double a, double b) } // Get an openshot::Frame object for a specific frame number of this reader. -std::shared_ptr Timeline::GetFrame(int64_t requested_frame) throw(ReaderClosed, OutOfBoundsFrame) +std::shared_ptr Timeline::GetFrame(int64_t requested_frame) { // Adjust out of bounds frame number if (requested_frame < 1) @@ -899,7 +899,7 @@ Json::Value Timeline::JsonValue() { } // Load JSON string into this object -void Timeline::SetJson(string value) throw(InvalidJSON) { +void Timeline::SetJson(string value) { // Get lock (prevent getting frames while this happens) const GenericScopedLock lock(getFrameCriticalSection); @@ -925,7 +925,7 @@ void Timeline::SetJson(string value) throw(InvalidJSON) { } // Load Json::JsonValue into this object -void Timeline::SetJsonValue(Json::Value root) throw(InvalidFile, ReaderClosed) { +void Timeline::SetJsonValue(Json::Value root) { // Close timeline before we do anything (this also removes all open and closing clips) bool was_open = is_open; @@ -991,7 +991,7 @@ void Timeline::SetJsonValue(Json::Value root) throw(InvalidFile, ReaderClosed) { } // Apply a special formatted JSON object, which represents a change to the timeline (insert, update, delete) -void Timeline::ApplyJsonDiff(string value) throw(InvalidJSON, InvalidJSONKey) { +void Timeline::ApplyJsonDiff(string value) { // Get lock (prevent getting frames while this happens) const GenericScopedLock lock(getFrameCriticalSection); @@ -1035,7 +1035,7 @@ void Timeline::ApplyJsonDiff(string value) throw(InvalidJSON, InvalidJSONKey) { } // Apply JSON diff to clips -void Timeline::apply_json_to_clips(Json::Value change) throw(InvalidJSONKey) { +void Timeline::apply_json_to_clips(Json::Value change) { // Get key and type of change string change_type = change["type"].asString(); @@ -1169,7 +1169,7 @@ void Timeline::apply_json_to_clips(Json::Value change) throw(InvalidJSONKey) { } // Apply JSON diff to effects -void Timeline::apply_json_to_effects(Json::Value change) throw(InvalidJSONKey) { +void Timeline::apply_json_to_effects(Json::Value change) { // Get key and type of change string change_type = change["type"].asString(); @@ -1210,7 +1210,7 @@ void Timeline::apply_json_to_effects(Json::Value change) throw(InvalidJSONKey) { } // Apply JSON diff to effects (if you already know which effect needs to be updated) -void Timeline::apply_json_to_effects(Json::Value change, EffectBase* existing_effect) throw(InvalidJSONKey) { +void Timeline::apply_json_to_effects(Json::Value change, EffectBase* existing_effect) { // Get key and type of change string change_type = change["type"].asString(); @@ -1272,7 +1272,7 @@ void Timeline::apply_json_to_effects(Json::Value change, EffectBase* existing_ef } // Apply JSON diff to timeline properties -void Timeline::apply_json_to_timeline(Json::Value change) throw(InvalidJSONKey) { +void Timeline::apply_json_to_timeline(Json::Value change) { // Get key and type of change string change_type = change["type"].asString(); diff --git a/src/WriterBase.cpp b/src/WriterBase.cpp index 0778c94f..3697c52a 100644 --- a/src/WriterBase.cpp +++ b/src/WriterBase.cpp @@ -192,7 +192,7 @@ Json::Value WriterBase::JsonValue() { } // Load JSON string into this object -void WriterBase::SetJson(string value) throw(InvalidJSON) { +void WriterBase::SetJson(string value) { // Parse JSON string into JSON objects Json::Value root; diff --git a/src/effects/Blur.cpp b/src/effects/Blur.cpp index d9ee6549..d7910230 100644 --- a/src/effects/Blur.cpp +++ b/src/effects/Blur.cpp @@ -259,7 +259,7 @@ Json::Value Blur::JsonValue() { } // Load JSON string into this object -void Blur::SetJson(string value) throw(InvalidJSON) { +void Blur::SetJson(string value) { // Parse JSON string into JSON objects Json::Value root; diff --git a/src/effects/Brightness.cpp b/src/effects/Brightness.cpp index 49329460..497667e1 100644 --- a/src/effects/Brightness.cpp +++ b/src/effects/Brightness.cpp @@ -138,7 +138,7 @@ Json::Value Brightness::JsonValue() { } // Load JSON string into this object -void Brightness::SetJson(string value) throw(InvalidJSON) { +void Brightness::SetJson(string value) { // Parse JSON string into JSON objects Json::Value root; diff --git a/src/effects/ChromaKey.cpp b/src/effects/ChromaKey.cpp index 7a8ae4d5..2c3008f2 100644 --- a/src/effects/ChromaKey.cpp +++ b/src/effects/ChromaKey.cpp @@ -118,7 +118,7 @@ Json::Value ChromaKey::JsonValue() { } // Load JSON string into this object -void ChromaKey::SetJson(string value) throw(InvalidJSON) { +void ChromaKey::SetJson(string value) { // Parse JSON string into JSON objects Json::Value root; diff --git a/src/effects/Deinterlace.cpp b/src/effects/Deinterlace.cpp index 764e6fda..bf34d13f 100644 --- a/src/effects/Deinterlace.cpp +++ b/src/effects/Deinterlace.cpp @@ -112,7 +112,7 @@ Json::Value Deinterlace::JsonValue() { } // Load JSON string into this object -void Deinterlace::SetJson(string value) throw(InvalidJSON) { +void Deinterlace::SetJson(string value) { // Parse JSON string into JSON objects Json::Value root; diff --git a/src/effects/Mask.cpp b/src/effects/Mask.cpp index a73ff9db..d0fed124 100644 --- a/src/effects/Mask.cpp +++ b/src/effects/Mask.cpp @@ -36,7 +36,7 @@ Mask::Mask() : reader(NULL), replace_image(false) { } // Default constructor -Mask::Mask(ReaderBase *mask_reader, Keyframe mask_brightness, Keyframe mask_contrast) throw(InvalidFile, ReaderClosed) : +Mask::Mask(ReaderBase *mask_reader, Keyframe mask_brightness, Keyframe mask_contrast) : reader(mask_reader), brightness(mask_brightness), contrast(mask_contrast), replace_image(false) { // Init effect properties @@ -190,7 +190,7 @@ Json::Value Mask::JsonValue() { } // Load JSON string into this object -void Mask::SetJson(string value) throw(InvalidJSON) { +void Mask::SetJson(string value) { // Parse JSON string into JSON objects Json::Value root; diff --git a/src/effects/Negate.cpp b/src/effects/Negate.cpp index 420c7add..8ff6e0d6 100644 --- a/src/effects/Negate.cpp +++ b/src/effects/Negate.cpp @@ -73,7 +73,7 @@ Json::Value Negate::JsonValue() { } // Load JSON string into this object -void Negate::SetJson(string value) throw(InvalidJSON) { +void Negate::SetJson(string value) { // Parse JSON string into JSON objects Json::Value root; diff --git a/src/effects/Saturation.cpp b/src/effects/Saturation.cpp index 815606c2..582c1e91 100644 --- a/src/effects/Saturation.cpp +++ b/src/effects/Saturation.cpp @@ -142,7 +142,7 @@ Json::Value Saturation::JsonValue() { } // Load JSON string into this object -void Saturation::SetJson(string value) throw(InvalidJSON) { +void Saturation::SetJson(string value) { // Parse JSON string into JSON objects Json::Value root; diff --git a/tests/ReaderBase_Tests.cpp b/tests/ReaderBase_Tests.cpp index afa4ccab..9d435304 100644 --- a/tests/ReaderBase_Tests.cpp +++ b/tests/ReaderBase_Tests.cpp @@ -45,7 +45,7 @@ TEST(ReaderBase_Derived_Class) void Close() { }; void Open() { }; string Json() { }; - void SetJson(string value) throw(InvalidJSON) { }; + void SetJson(string value) { }; Json::Value JsonValue() { }; void SetJsonValue(Json::Value root) { }; bool IsOpen() { return true; };