2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FMediaVideoRecorder.h
20 * @brief This is the header file for the %VideoRecorder class.
22 * This header file contains the declarations of the %VideoRecorder class.
25 #ifndef _FMEDIA_VIDEO_RECORDER_H_
26 #define _FMEDIA_VIDEO_RECORDER_H_
28 #include <FMediaVideoRecorderTypes.h>
29 #include <FMediaIVideoRecorderEventListener.h>
30 #include <FMediaCamera.h>
31 #include <FMediaTypes.h>
33 namespace Tizen { namespace Media
36 class _VideoRecorderImpl;
37 class IAudioStreamFilter;
40 * @class VideoRecorder
41 * @brief This class records a video.
45 * The %VideoRecorder class provides video recording from the camera device. All the input sources must be
46 * controlled independently from the video recording operation. The supported codecs and resolutions are
47 * device-dependent and the available list can be retrieved using the methods available in this class.
48 * The recording operation is limited by the maximum time or size.
50 * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/media/recording_video.htm">Recording Video</a>.
52 * The following example demonstrates how to use the %VideoRecorder class.
56 * #include <FGraphics.h>
61 * using namespace Tizen::Base;
62 * using namespace Tizen::Graphics;
63 * using namespace Tizen::Ui;
64 * using namespace Tizen::Ui::Controls;
65 * using namespace Tizen::Media;
67 * class VideoRecorderSample
68 * : public Tizen::Ui::Controls::Form
69 * , public Tizen::Media::ICameraEventListener
70 * , public Tizen::Media::IVideoRecorderEventListener
73 * VideoRecorderSample(void);
78 * // ICameraEventListener
79 * virtual void OnCameraAutoFocused(bool completeCondition) {}
80 * virtual void OnCameraCaptured(Tizen::Base::ByteBuffer &capturedData, result r) {}
81 * virtual void OnCameraErrorOccurred(CameraErrorReason err) {}
82 * virtual void OnCameraPreviewed(Tizen::Base::ByteBuffer &previewedData, result r) {}
84 * // IVideoRecorderEventListener
85 * virtual void OnVideoRecorderCanceled(result r) {}
86 * virtual void OnVideoRecorderClosed(result r) {}
87 * virtual void OnVideoRecorderEndReached(RecordingEndCondition endCondition) {}
88 * virtual void OnVideoRecorderErrorOccurred( RecorderErrorReason r) {}
89 * virtual void OnVideoRecorderPaused(result r) {}
90 * virtual void OnVideoRecorderStarted(result r) {}
91 * virtual void OnVideoRecorderStopped(result r) {}
95 * VideoRecorder __recorder;
96 * OverlayRegion *__pOverlay;
100 * VideoRecorderSample::VideoRecorderSample(void)
106 * VideoRecorderSample::Start(void)
108 * result r = E_SUCCESS;
109 * Tizen::Graphics::Rectangle rect(0, 0, 320, 240);
110 * BufferInfo bufferInfo;
111 * String filePath = Tizen::App::App::GetInstance()->GetAppRootPath() + L"data/test.mp4";
113 * __pOverlay = GetOverlayRegionN(rect, OVERLAY_REGION_TYPE_PRIMARY_CAMERA);
114 * if (__pOverlay == null)
116 * return GetLastResult();
119 * __pOverlay->GetBackgroundBufferInfo(bufferInfo);
121 * r = __camera.Construct(*this);
127 * r = __camera.PowerOn();
133 * r = __recorder.Construct(*this, __camera);
139 * r = __camera.StartPreview(&bufferInfo, false);
145 * r = __recorder.CreateVideoFile(filePath, true);
151 * r = __recorder.Record();
169 * VideoRecorderSample::Stop(void)
172 * __camera.StopPreview();
173 * __camera.PowerOff();
185 class _OSP_EXPORT_ VideoRecorder
186 : public Tizen::Base::Object
190 * This is the default constructor for this class.
194 * @remarks The object is not fully constructed after this constructor is called. For full construction,
195 * the Construct() method must be called right after calling this constructor.
200 * This is the destructor for this class. @n
201 * All allocated resources are deallocated by this method. This method must be called in the same thread in
202 * which the Construct() method is called.This polymorphic destructor should be overridden if required. This way,
203 * the destructors of the derived classes are called when the destructor of this interface is called.
208 virtual ~VideoRecorder(void);
211 * Initializes this instance of %VideoRecorder with an associated listener and an input source.
215 * @return An error code
216 * @param[in] listener An event listener object
217 * @param[in] camera A Camera object for the input source
218 * @exception E_SUCCESS The method is successful.
219 * @exception E_SYSTEM A system error has occurred.
220 * @exception E_OUT_OF_MEMORY The memory is insufficient.
221 * @exception E_DEVICE_BUSY The recorder is under use by other application or already used in this application.
222 * @exception E_UNSUPPORTED_OPERATION This video recorder usage is not supported.
224 result Construct(IVideoRecorderEventListener& listener, const Camera& camera);
227 * Creates a video file for a recording.
230 * @brief <i> [Compatibility] </i>
234 * @compatibility This method has compatibility issues with OSP compatible applications. @n
235 * For more information, see @ref CompIoPathPage "here".
238 * @privilege %http://tizen.org/privilege/videorecorder
240 * @return An error code
241 * @param[in] destMediaPath The destination for the file that is written @n
242 * The available paths start with prefixes retrieved from the functions such as: @n
243 * Tizen::App::App::GetInstance()->GetAppRootPath() @n
244 * Tizen::System::Environment::GetMediaPath() @n
245 * Tizen::System::Environment::GetExternalStoragePath()
246 * @param[in] overwrite Set to @c true to overwrite the file, @n
248 * @exception E_SUCCESS The method is successful.
249 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
250 * @exception E_RESOURCE_UNAVAILABLE The required file path is unavailable.
251 * @exception E_FILE_ALREADY_EXIST The specified file already exists.
252 * @exception E_STORAGE_FULL The storage is full.
253 * @exception E_OUT_OF_MEMORY The memory is insufficient.
254 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
255 * @remarks The application can register newly created files into the Contents database using Tizen::Content::ContentManager::CreateContent().
258 result CreateVideoFile(const Tizen::Base::String& destMediaPath, bool overwrite);
261 * Closes the video file. @n
262 * The %Close() method is a synchronous method.
266 * @privilege %http://tizen.org/privilege/videorecorder
268 * @return An error code
269 * @exception E_SUCCESS The method is successful.
270 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
271 * @exception E_SYSTEM A system error has occurred.
272 * @exception E_OUT_OF_MEMORY The memory is insufficient.
273 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
274 * @see CreateVideoFile()
279 * Records the video file. @n
280 * Resumes the recording if Pause() has been called.
284 * @privilege %http://tizen.org/privilege/videorecorder
286 * @return An error code
287 * @exception E_SUCCESS The method is successful.
288 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
289 * @exception E_SYSTEM A system error has occurred.
290 * @exception E_DEVICE_BUSY The recorder is under use by other application.
291 * @exception E_OUT_OF_MEMORY The memory is insufficient.
292 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
293 * @remarks This method must be called after the input media source is started (for example, Camera::StartPreview()).
299 * Stops the recording.
303 * @privilege %http://tizen.org/privilege/videorecorder
305 * @return An error code
306 * @exception E_SUCCESS The method is successful.
307 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
308 * @exception E_SYSTEM A system error has occurred.
309 * @exception E_OUT_OF_MEMORY The memory is insufficient.
310 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
317 * Pauses the recording. @n
318 * To resume the recording after the %Pause() method is called, Record() must be called.
322 * @privilege %http://tizen.org/privilege/videorecorder
324 * @return An error code
325 * @exception E_SUCCESS The method is successful.
326 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
327 * @exception E_SYSTEM A system error has occurred.
328 * @exception E_OUT_OF_MEMORY The memory is insufficient.
329 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
335 * Cancels the recording operation without saving the data.
339 * @privilege %http://tizen.org/privilege/videorecorder
341 * @return An error code
342 * @exception E_SUCCESS The method is successful.
343 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
344 * @exception E_SYSTEM A system error has occurred.
345 * @exception E_OUT_OF_MEMORY The memory is insufficient.
346 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
347 * @remarks When this method is called, the state is changed to ::RECORDER_STATE_STOPPING. @n
348 * After IVideoRecorderEventListener::OnVideoRecorderCanceled() is called, the state is changed to
349 * @c RECORDER_STATE_STOPPED.
356 * Gets the state of a recorder.
360 * @return The current state of the video recorder
361 * @see CreateVideoFile()
368 RecorderState GetState(void) const;
371 * Gets the current recording time.
375 * @return The current recording time in milliseconds, @n
376 * else @c -1 if the recording has not started as yet
378 long GetRecordingTime(void) const;
381 * Gets the current recording size.
385 * @return A @c long value indicating the current recording size in bytes, @n
386 * else @c -1 if the recording has not started as yet
388 long GetRecordingSize(void) const;
391 * Sets the time limit for the recording in milliseconds.
395 * @privilege %http://tizen.org/privilege/videorecorder
397 * @return An error code
398 * @param[in] msTime The maximum recording time in milliseconds @n
399 * The time must be greater than @c 0.
400 * @exception E_SUCCESS The method is successful.
401 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
402 * @exception E_OUT_OF_RANGE The specified time is out of range.
403 * @exception E_OUT_OF_MEMORY The memory is insufficient.
404 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
405 * @remarks The default time is @c 60 seconds.
406 * @see GetMaxRecordingTime()
408 result SetMaxRecordingTime(long msTime);
411 * Gets the time limit of the recording in milliseconds.
415 * @return A @c long value indicating the maximum recording time in milliseconds, @n
416 * else @c -1 if the recording has not started as yet
417 * @see SetMaxRecordingTime()
419 long GetMaxRecordingTime(void) const;
423 * Sets the codec for the recorder. @n
424 * Initially, the default codec from the internal configuration is set.
426 * @brief <i> [Deprecated] </i>
427 * @deprecated This method is deprecated. @n
428 * Instead of using this method, use the SetFormat(CodecType audioCodec, CodecType videoCodec, MediaContainerType container) method that
429 * sets the audio/video codec and container together.
432 * @privilege %http://tizen.org/privilege/videorecorder
434 * @return An error code
435 * @param[in] codec The codec name @n
436 * It must be one of the strings listed by GetSupportedCodecListN(). @n
437 * GetSupportedCodecListN() returns the list of strings in the following formats: @n
438 * - "VIDEO_CODEC_H263" @n
439 * - "VIDEO_CODEC_MPEG4SP" @n
440 * The returned strings are different depending on each device. @n
441 * The following string is always operated upon. This value is different
442 * for each device. @n
443 * "VIDEO_CODEC_DEFAULT": the default codec
444 * @exception E_SUCCESS The method is successful.
445 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
446 * @exception E_UNSUPPORTED_CODEC The specified codec is not supported.
447 * @exception E_SYSTEM A system error has occurred.
448 * @exception E_OUT_OF_MEMORY The memory is insufficient.
449 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
453 result SetCodec(const Tizen::Base::String& codec);
457 * Gets the codec for the recorder.
459 * @brief <i> [Deprecated] </i>
460 * @deprecated This method is deprecated. @n
461 * Instead of using this method, use the GetFormat(CodecType& audioCodec, CodecType& videoCodec, MediaContainerType& container) const
462 * method that gets the audio/video codec and container together.
465 * @return The current codec
467 * @see GetSupportedCodecListN()
470 Tizen::Base::String GetCodec(void) const;
474 * Gets the list of supported video recorder codecs. @n
475 * Each item in the list is a Tizen::Base::String value.
477 * @brief <i> [Deprecated] </i>
478 * @deprecated This method is deprecated. @n
479 * Instead of using this method, use the GetSupportedAudioCodecListN() and GetSupportedVideoCodecListN() methods.
482 * @return The list of strings that represents the supported video recorder codecs, @n
483 * else @c null if no codec is supported or if an exception occurs
484 * @exception E_SUCCESS The method is successful.
485 * @exception E_SYSTEM A system error has occurred.
486 * @exception E_OUT_OF_MEMORY The memory is insufficient.
487 * @remarks The specific error code can be accessed using the GetLastResult() method. @n
488 * The return value must be released by the caller. @n
489 * All items in the list must be released by the caller.
494 Tizen::Base::Collection::IList* GetSupportedCodecListN(void) const;
497 * Gets the list of supported audio codecs. @n
498 * Each item in the list has a ::CodecType value.
502 * @return A list of supported audio codecs, @n
503 * else @c null if no codec is supported or if an exception occurs
504 * @exception E_SUCCESS The method is successful.
505 * @exception E_SYSTEM A system error has occurred.
506 * @exception E_OUT_OF_MEMORY The memory is insufficient.
507 * @remarks The specific error code can be accessed using the GetLastResult() method. @n
508 * The return value must be released by the caller.
509 * @see SetFormat( CodecType audioCodec, CodecType videoCodec, MediaContainerType container )
510 * @see GetFormat( CodecType& audioCodec, CodecType& videoCodec, MediaContainerType& container ) const
512 Tizen::Base::Collection::IListT <CodecType>* GetSupportedAudioCodecListN(void) const;
515 * Gets the list of supported video codecs. @n
516 * Each item in the list has a ::CodecType value.
520 * @return A list of supported video codecs, @n
521 * else @c null if no codec is supported or if an exception occurs
522 * @exception E_SUCCESS The method is successful.
523 * @exception E_SYSTEM A system error has occurred.
524 * @exception E_OUT_OF_MEMORY The memory is insufficient.
525 * @remarks The specific error code can be accessed using the GetLastResult() method. @n
526 * The return value must be released by the caller.
527 * @see SetFormat( CodecType audioCodec, CodecType videoCodec, MediaContainerType container )
528 * @see GetFormat( CodecType& audioCodec, CodecType& videoCodec, MediaContainerType& container ) const
530 Tizen::Base::Collection::IListT <CodecType>* GetSupportedVideoCodecListN(void) const;
533 * Gets the list of supported containers. @n
534 * Each item in the list has a ::MediaContainerType value.
538 * @return A list of supported containers, @n
539 * else @c null if no container is supported or if an exception occurs
540 * @exception E_SUCCESS The method is successful.
541 * @exception E_SYSTEM A system error has occurred.
542 * @exception E_OUT_OF_MEMORY The memory is insufficient.
543 * @remarks The specific error code can be accessed using the GetLastResult() method. @n
544 * The return value must be released by the caller.
545 * @see SetFormat( CodecType audioCodec, CodecType videoCodec, MediaContainerType container )
546 * @see GetFormat( CodecType& audioCodec, CodecType& videoCodec, MediaContainerType& container ) const
548 Tizen::Base::Collection::IListT <MediaContainerType>* GetSupportedContainerListN(void) const;
552 * Sets the video format of the recorder. @n
553 * Initially, the default format from internal configuration is set.
555 * @brief <i> [Deprecated] </i>
556 * @deprecated This method is deprecated. @n
557 * Instead of using this method, use the SetFormat(CodecType audioCodec, CodecType videoCodec, MediaContainerType container) method that sets
558 * the audio/video codec and container together.
561 * @privilege %http://tizen.org/privilege/videorecorder
563 * @return An error code
564 * @param[in] format The video format @n
565 * ::VIDEORECORDING_FORMAT_DEFAULT sets the system's default recording format.
566 * @exception E_SUCCESS The method is successful.
567 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
568 * @exception E_UNSUPPORTED_FORMAT The specified format is not supported.
569 * @exception E_OUT_OF_MEMORY The memory is insufficient.
570 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
574 result SetFormat(VideoRecordingFormat format);
578 * Gets the current format that has been set for the recorder.
580 * @brief <i> [Deprecated] </i>
581 * @deprecated This method is deprecated. @n
582 * Instead of using this method, use the GetFormat(CodecType& audioCodec, CodecType& videoCodec, MediaContainerType& container) const method
583 * that gets the audio/video codec and container together.
586 * @return The current video format, @n
587 * else the default format if SetFormat() is not called before this method
591 VideoRecordingFormat GetFormat(void) const;
595 * Sets the mode of the recorder.
597 * @brief <i> [Deprecated] </i>
598 * @deprecated This method is deprecated. @n
599 * Instead of using this method, use the SetFormat(CodecType audioCodec, CodecType videoCodec, MediaContainerType container) method that
600 * determines whether the video recorder includes the audio codec.
603 * @privilege %http://tizen.org/privilege/videorecorder
605 * @return An error code
606 * @param[in] mode The mode for the recording @n
607 * The default mode is ::VIDEORECORDER_MODE_VIDEO_WITH_AUDIO.
608 * @exception E_SUCCESS The method is successful.
609 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
610 * @exception E_INVALID_ARG The specified @c mode is not supported.
611 * @exception E_OUT_OF_MEMORY The memory is insufficient.
612 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
616 result SetMode(VideoRecorderMode mode);
620 * Gets the mode of the recorder.
622 * @brief <i> [Deprecated] </i>
623 * @deprecated This method is deprecated. @n
624 * Instead of using this method, use the GetFormat(CodecType& audioCodec, CodecType& videoCodec, MediaContainerType& container) const
625 * method that determines whether the video recorder includes the audio codec.
628 * @return The current mode
632 VideoRecorderMode GetMode(void) const;
635 * Sets the audio and video codecs, and the container of the recorder. @n
636 * Initially, the default codec and container format are set with the internal configuration.
640 * @privilege %http://tizen.org/privilege/videorecorder
642 * @return An error code
643 * @param[in] audioCodec The audio codec to set @n
644 * ::CODEC_NONE makes the audio stream empty.
645 * @param[in] videoCodec The video codec to set @n
646 * ::CODEC_NONE cannot be set.
647 * @param[in] container The media container to set
648 * @exception E_SUCCESS The method is successful.
649 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
650 * @exception E_UNSUPPORTED_CODEC The specified codec is not supported.
651 * @exception E_UNSUPPORTED_FORMAT The specified container format is not supported.
652 * @exception E_SYSTEM A system error has occurred.
653 * @exception E_OUT_OF_MEMORY The memory is insufficient.
654 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
655 * @remarks If the audio codec is ::CODEC_NONE, the audio will be ignored, and only the video stream will be recorded. @n
656 * If the specified container does not support the specified codec, @c E_UNSUPPORTED_FORMAT may be returned.
657 * @see GetFormat( CodecType& audioCodec, CodecType& videoCodec, MediaContainerType& container ) const
659 result SetFormat(CodecType audioCodec, CodecType videoCodec, MediaContainerType container);
662 * Gets the audio and video codecs, and the container of the recorder.
666 * @return An error code
667 * @param[out] audioCodec The retrieved audio codec
668 * @param[out] videoCodec The retrieved video codec
669 * @param[out] container The retrieved container
670 * @exception E_SUCCESS The method is successful.
671 * @remarks The default codecs and container are retrieved, if SetFormat( CodecType audioCodec, CodecType
672 * videoCodec, MediaContainerType container) is not called before calling this method. @n
673 * This method always returns E_SUCCESS.
674 * @see SetFormat( CodecType audioCodec, CodecType videoCodec, MediaContainerType container )
676 result GetFormat(CodecType& audioCodec, CodecType& videoCodec, MediaContainerType& container) const;
679 * Sets the quality of the recorder.
683 * @privilege %http://tizen.org/privilege/videorecorder
685 * @return An error code
686 * @param[in] quality The quality of the recorder @n
687 * The default quality is ::RECORDING_QUALITY_MEDIUM.
688 * @exception E_SUCCESS The method is successful.
689 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
690 * @exception E_INVALID_ARG The specified @c quality is not supported.
691 * @exception E_OUT_OF_MEMORY The memory is insufficient.
692 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
695 result SetQuality(RecordingQuality quality);
698 * Gets the quality of the recorder.
702 * @return The current quality
705 RecordingQuality GetQuality(void) const;
708 * Sets the recording resolution of the recorder. @n
709 * Initially, the default resolution from the internal configuration is set.
713 * @privilege %http://tizen.org/privilege/videorecorder
715 * @return An error code
716 * @param[in] resolution The recording resolution @n
717 * It must be one of the listed strings extracted from
718 * GetSupportedRecordingResolutionListN().
719 * @exception E_SUCCESS The method is successful.
720 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
721 * @exception E_OUT_OF_RANGE The specified resolution is out of range.
722 * @exception E_SYSTEM A system error has occurred.
723 * @exception E_OUT_OF_MEMORY The memory is insufficient.
724 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
725 * @remarks If the input source is Tizen::Media::Camera, its preview resolution value must be same as that
726 * of this recording resolution.
727 * @see GetRecordingResolution()
729 result SetRecordingResolution(const Tizen::Graphics::Dimension& resolution);
732 * Gets the recording resolution.
736 * @return The recording resolution
737 * @see GetSupportedRecordingResolutionListN()
739 Tizen::Graphics::Dimension GetRecordingResolution(void) const;
742 * Gets a list of the supported video recorder resolutions. @n
743 * Each list item is a Tizen::Graphics::Dimension value.
747 * @return A list of strings representing the supported video recorder resolutions, @n
748 * else an empty list if no recording resolution is supported or if an exception occurs
749 * @exception E_SUCCESS The method is successful.
750 * @exception E_SYSTEM A system error has occurred.
751 * @exception E_OUT_OF_MEMORY The memory is insufficient.
752 * @remarks The specific error code can be accessed using the GetLastResult() method. @n
753 * The return value must be released by the calling method. @n
754 * All items in the list must be released by the calling method.
755 * @see SetRecordingResolution()
756 * @see GetRecordingResolution()
758 Tizen::Base::Collection::IList* GetSupportedRecordingResolutionListN(void) const;
761 * Gets the maximum supported frame rate of the input resolution.
765 * @return The maximum frame rate of the input recording resolution
766 * @param[in] dim The preview resolution of the source
767 * @exception E_SUCCESS The method is successful.
768 * @exception E_INVALID_ARG The specified input resolution is invalid.
769 * @exception E_SYSTEM A system error has occurred.
770 * @remarks The specific error code can be accessed using the GetLastResult method.
771 * @see Camera::SetPreviewFrameRate()
773 int GetSupportedMaxFrameRate(const Tizen::Graphics::Dimension& dim) const;
776 * Sets the mute state of a recorder.
780 * @privilege %http://tizen.org/privilege/videorecorder
782 * @return An error code
783 * @param[in] mute Set to @c true to enable the mute state of the recorder, @n
785 * By default, the mute state is disabled.
786 * @exception E_SUCCESS The method is successful.
787 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
788 * @exception E_OUT_OF_MEMORY The memory is insufficient.
789 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
790 * @remarks The recording continues even in the mute state.
793 result SetMute(bool mute);
796 * Checks whether the mute state of the recorder is enabled.
800 * @return The mute state of the recorder
803 bool IsMuted(void) const;
806 * Sets the recording rotation of the recorder.
810 * @privilege %http://tizen.org/privilege/videorecorder
812 * @return An error code
813 * @param[in] rotation The rotation of the recorder
814 * @exception E_SUCCESS The method is successful.
815 * @exception E_INVALID_STATE This method is invalid for the current state of this instance.
816 * @exception E_INVALID_ARG The specified @c rotation is not supported.
817 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
818 * @remarks This method add the rotation information to the video file.
819 * A video player can rotate the surface or the stream using this information to display correctly.
820 * @see GetRecordingRotation()
822 result SetRecordingRotation(RecordingRotation rotation);
825 * Gets the rotation of the recorder.
829 * @return The current recording rotation
830 * @see SetRecordingRotation()
832 RecordingRotation GetRecordingRotation(void) const;
835 * Adds a stream filter to process the audio stream data while recording.
839 * @privilege %http://tizen.org/privilege/videorecorder
841 * @return An error code
842 * @param[in] filter An instance of IAudioStreamFilter
843 * @exception E_SUCCESS The method is successful.
844 * @exception E_OBJ_ALREADY_EXIST The filter already exists.
845 * @exception E_OUT_OF_MEMORY The memory is insufficient.
846 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
847 * @remarks IAudioStreamFilter::ProcessAudioStream() is called when the audio frame is ready.
849 result AddAudioStreamFilter(IAudioStreamFilter& filter);
852 * Removes a stream filter to stop processing the audio stream data.
856 * @privilege %http://tizen.org/privilege/videorecorder
858 * @return An error code
859 * @param[in] filter An instance of IAudioStreamFilter
860 * @exception E_SUCCESS The method is successful.
861 * @exception E_OBJ_NOT_FOUND The filter is not found.
862 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
864 result RemoveAudioStreamFilter(IAudioStreamFilter& filter);
868 * This is the copy constructor for this class.
872 * @remarks The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
875 VideoRecorder(const VideoRecorder& videoRecorder);
877 * This is the copy assignment operator for this class.
881 * @remarks The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
884 VideoRecorder& operator =(const VideoRecorder& videoRecorder);
886 friend class _VideoRecorderImpl;
887 _VideoRecorderImpl* __pImpl;