* #include <FBase.h>
* #include <FMedia.h>
* #include <FApp.h>
- *
+ * using namespace Tizen::Base;
* using namespace Tizen::Media;
*
* class AudioFrameSample
* return r;
* }
*
- * r = __recorder.AddAudioStreamListener(*this);
+ * r = __recorder.AddAudioStreamFilter(*this);
* if (IsFailed(r))
* {
* return r;
* {
* return;
* }
- * short* pSampleData = (short*)(frame.GetPlaneData(0)->GetPointer())
+ * short* pSampleData = (short*)(frame.GetPlaneData(0)->GetPointer());
* int minPeakValue = 0;
* int maxPeakValue = 0;
* int sampleCount = frame.GetPlaneData(0)->GetCapacity() / 2;
* @param[in] index The index at which the value is read
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified @c index is out of range.
- * @remarks
+ * @remarks
* - The @c index should be less than the plane count.
* - The buffer in Tizen::Base::ByteBuffer is shared with the %AudioFrame instance.
* - The specific error code can be accessed using the GetLastResult() method.
* @param[in] r The cause of the error
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_DATA The ByteBuffer contains invalid data.
- * @remarks
+ * @remarks
* - This method is called only if the @c previewedData flag of
* Camera::StartPreview() is @c true.
* - This method can be delayed or dropped depending on system performance.
* The following example demonstrates how to use the %OnCameraPreviewed() method to rotate the preview data in the portrait mode.
*
* @code
- // Rotates the preview data to use it
- int rotation = (int)CAMERA_ROTATION_NONE;
- MediaCapability::GetValue(CAMERA_SECONDARY_ROTATION, rotation);
-
- ByteBuffer rotatedData;
- rotatedData.Construct(previewedData.GetLimit());
-
- switch ((CameraRotation) rotation)
- {
- case CAMERA_ROTATION_90:
- ImageUtil::Rotate(previewedData, rotatedData,
- Dimension(__previewWidth, __previewHeight), IMAGE_ROTATION_90, MEDIA_PIXEL_FORMAT_YUV420P);
- break;
-
- case CAMERA_ROTATION_180:
- ImageUtil::Rotate(previewedData, rotatedData,
- Dimension(__previewWidth, __previewHeight), IMAGE_ROTATION_180, MEDIA_PIXEL_FORMAT_YUV420P);
- break;
-
- case CAMERA_ROTATION_270:
- ImageUtil::Rotate(previewedData, rotatedData,
- Dimension(__previewWidth, __previewHeight), IMAGE_ROTATION_270, MEDIA_PIXEL_FORMAT_YUV420P);
- break;
-
- default:
- break;
- }
+ * #include <FMedia.h>
+ *
+ * using namespace Tizen::Base;
+ * using namespace Tizen::Media;
+ * using namespace Tizen::Graphics;
+ *
+ * class MyCamera
+ * : public Tizen::Media::ICameraEventListener
+ * {
+ * protected:
+ * virtual void OnCameraPreviewed(Tizen::Base::ByteBuffer& previewedData, result r) {
+ * // Rotates the preview data to use it
+ * int rotation = (int)CAMERA_ROTATION_NONE;
+ * MediaCapability::GetValue(CAMERA_SECONDARY_ROTATION, rotation);
+ *
+ * ByteBuffer rotatedData;
+ * rotatedData.Construct(previewedData.GetLimit());
+ *
+ * switch ((CameraRotation) rotation)
+ * {
+ * case CAMERA_ROTATION_90:
+ * ImageUtil::Rotate(previewedData, rotatedData,
+ * Dimension(__previewWidth, __previewHeight), IMAGE_ROTATION_90, MEDIA_PIXEL_FORMAT_YUV420P);
+ * break;
+ *
+ * case CAMERA_ROTATION_180:
+ * ImageUtil::Rotate(previewedData, rotatedData,
+ * Dimension(__previewWidth, __previewHeight), IMAGE_ROTATION_180, MEDIA_PIXEL_FORMAT_YUV420P);
+ * break;
+ *
+ * case CAMERA_ROTATION_270:
+ * ImageUtil::Rotate(previewedData, rotatedData,
+ * Dimension(__previewWidth, __previewHeight), IMAGE_ROTATION_270, MEDIA_PIXEL_FORMAT_YUV420P);
+ * break;
+ *
+ * default:
+ * break;
+ * }
+ * }
+ *
+ * private:
+ * int __previewWidth;
+ * int __previewHeight;
+ * };
// Normally Camera::SetFlip(CAMERA_FLIP_VERTICAL) is used when using the front camera.
// Remember that the OverlayRegion method rotates the visible region internally corresponding to the form's orientation.
// An application does not need to rotate the visible region explicitly.
*
* @param[in] r A camera error @n
* This is one of the ::CameraErrorReason values.
- * @remarks
+ * @remarks
* - The ::CAMERA_ERROR_DEVICE_FAILED error occurs when the camera device
* has a problem, such as damaged shape or hardware malfunction.
* - The ::CAMERA_ERROR_DEVICE_INTERRUPTED error occurs when the camera
* @code
* #include <FBase.h>
* #include <FMedia.h>
+ * #include <FUi.h>
*
* using namespace Tizen::Graphics;
* using namespace Tizen::Ui;
* break;
* default:
* break;
+ * }
* }
* }
*
* @param[in] index The index at which the value is read
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is out of range.
- * @remarks
+ * @remarks
* - The index should be less than the plane count.
* - The specific error code can be accessed using the GetLastResult() method.
*
* @param[in] index The index at which the value is read
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is out of range.
- * @remarks
+ * @remarks
* - The index should be less than the plane count.
* - The buffer in ByteBuffer is shared with VideoFrame instance.
* - The specific error code can be accessed using the GetLastResult() method.
* @param[in] index The index at which the value is read
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_RANGE The specified index is out of range.
- * @remarks
+ * @remarks
* - The index should be less than the plane count.
* - The specific error code can be accessed using the GetLastResult() method.
*