@@ -75,15 +75,19 @@ namespace openshot {
7575 * @code SIMPLE EXAMPLE
7676 *
7777 * // Create a reader for a video
78- * FFmpegReader r("MyAwesomeVideo.webm");
79- * r.Open(); // Open thetarget_ reader
78+ * openshot:: FFmpegReader r("MyAwesomeVideo.webm");
79+ * r.Open(); // Open the target reader
8080 *
8181 * // Create a writer (which will create a WebM video)
82- * FFmpegWriter w("/home/jonathan/NewVideo.webm");
82+ * openshot:: FFmpegWriter w("/home/jonathan/NewVideo.webm");
8383 *
8484 * // Set options
85- * w.SetAudioOptions(true, "libvorbis", 44100, 2, ChannelLayout::LAYOUT_STEREO, 128000); // Sample Rate: 44100, Channels: 2, Bitrate: 128000
86- * 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
85+ *
86+ * // Sample Rate: 44100, Channels: 2, Bitrate: 128000
87+ * w.SetAudioOptions(true, "libvorbis", 44100, 2, openshot::ChannelLayout::LAYOUT_STEREO, 128000);
88+ *
89+ * // FPS: 24, Size: 720x480, Pixel Ratio: 1/1, Bitrate: 300000
90+ * w.SetVideoOptions(true, "libvpx", openshot::Fraction(24,1), 720, 480, openshot::Fraction(1,1), false, false, 300000);
8791 *
8892 * // Open the writer
8993 * w.Open();
@@ -102,15 +106,19 @@ namespace openshot {
102106 * @code ADVANCED WRITER EXAMPLE
103107 *
104108 * // Create a reader for a video
105- * FFmpegReader r("MyAwesomeVideo.webm");
109+ * openshot:: FFmpegReader r("MyAwesomeVideo.webm");
106110 * r.Open(); // Open the reader
107111 *
108112 * // Create a writer (which will create a WebM video)
109- * FFmpegWriter w("/home/jonathan/NewVideo.webm");
113+ * openshot:: FFmpegWriter w("/home/jonathan/NewVideo.webm");
110114 *
111115 * // Set options
112- * w.SetAudioOptions(true, "libvorbis", 44100, 2, ChannelLayout::LAYOUT_STEREO, 128000); // Sample Rate: 44100, Channels: 2, Bitrate: 128000
113- * 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
116+ *
117+ * // Sample Rate: 44100, Channels: 2, Bitrate: 128000
118+ * w.SetAudioOptions(true, "libvorbis", 44100, 2, openshot::ChannelLayout::LAYOUT_STEREO, 128000);
119+ *
120+ * // FPS: 24, Size: 720x480, Pixel Ratio: 1/1, Bitrate: 300000
121+ * w.SetVideoOptions(true, "libvpx", openshot::Fraction(24,1), 720, 480, openshot::Fraction(1,1), false, false, 300000);
114122 *
115123 * // Prepare Streams (Optional method that must be called before any SetOption calls)
116124 * w.PrepareStreams();
@@ -285,8 +293,21 @@ namespace openshot {
285293 // / @param channels The number of audio channels needed in this file
286294 // / @param channel_layout The 'layout' of audio channels (i.e. mono, stereo, surround, etc...)
287295 // / @param bit_rate The audio bit rate used during encoding
296+ // /
297+ // / \note This is an overloaded function.
288298 void SetAudioOptions (bool has_audio, std::string codec, int sample_rate, int channels, openshot::ChannelLayout channel_layout, int bit_rate);
289299
300+ // / @brief Set audio export options.
301+ // /
302+ // / Enables the stream and configures a default 2-channel stereo layout.
303+ // /
304+ // / @param codec The codec used to encode the audio for this file
305+ // / @param sample_rate The number of audio samples needed in this file
306+ // / @param bit_rate The audio bit rate used during encoding
307+ // /
308+ // / \note This is an overloaded function.
309+ void SetAudioOptions (std::string codec, int sample_rate, int bit_rate);
310+
290311 // / @brief Set the cache size
291312 // / @param new_size The number of frames to queue before writing to the file
292313 void SetCacheSize (int new_size) { cache_size = new_size; };
@@ -301,10 +322,27 @@ namespace openshot {
301322 // / @param interlaced Does this video need to be interlaced?
302323 // / @param top_field_first Which frame should be used as the top field?
303324 // / @param bit_rate The video bit rate used during encoding
325+ // /
326+ // / \note This is an overloaded function.
304327 void SetVideoOptions (bool has_video, std::string codec, openshot::Fraction fps, int width, int height, openshot::Fraction pixel_ratio, bool interlaced, bool top_field_first, int bit_rate);
305328
329+ // / @brief Set video export options.
330+ // /
331+ // / Enables the stream and configures non-interlaced video with a 1:1 pixel aspect ratio.
332+ // /
333+ // / @param codec The codec used to encode the images in this video
334+ // / @param width The width in pixels of this video
335+ // / @param height The height in pixels of this video
336+ // / @param fps The number of frames per second
337+ // / @param bit_rate The video bit rate used during encoding
338+ // /
339+ // / \note This is an overloaded function.
340+ // / \warning Observe the argument order, which is consistent with the openshot::Timeline constructor, but differs from the other signature.
341+ void SetVideoOptions (std::string codec, int width, int height, openshot::Fraction fps, int bit_rate);
342+
306343 // / @brief Set custom options (some codecs accept additional params). This must be called after the
307344 // / PrepareStreams() method, otherwise the streams have not been initialized yet.
345+ // /
308346 // / @param stream The stream (openshot::StreamType) this option should apply to
309347 // / @param name The name of the option you want to set (i.e. qmin, qmax, etc...)
310348 // / @param value The new value of this option
@@ -316,12 +354,16 @@ namespace openshot {
316354
317355 // / @brief Add a frame to the stack waiting to be encoded.
318356 // / @param frame The openshot::Frame object to write to this image
357+ // /
358+ // / \note This is an overloaded function.
319359 void WriteFrame (std::shared_ptr<openshot::Frame> frame);
320360
321361 // / @brief Write a block of frames from a reader
322362 // / @param reader A openshot::ReaderBase object which will provide frames to be written
323363 // / @param start The starting frame number of the reader
324364 // / @param length The number of frames to write
365+ // /
366+ // / \note This is an overloaded function.
325367 void WriteFrame (openshot::ReaderBase *reader, int64_t start, int64_t length);
326368
327369 // / @brief Write the file trailer (after all frames are written). This is called automatically
0 commit comments