fix build error of smaple code
authorjs1002.kim <js1002.kim@samsung.com>
Thu, 30 May 2013 04:10:49 +0000 (13:10 +0900)
committerjs1002.kim <js1002.kim@samsung.com>
Thu, 30 May 2013 04:10:49 +0000 (13:10 +0900)
Change-Id: I3c7d7f32c2781093d954240c54fe7bc814f160ba
Signed-off-by: js1002.kim <js1002.kim@samsung.com>
inc/FMediaAudioFrame.h
inc/FMediaICameraEventListener.h
inc/FMediaVideoFrame.h

index 91cd94e..c92ac57 100755 (executable)
@@ -49,7 +49,7 @@ namespace Tizen { namespace Media
  * #include <FBase.h>
  * #include <FMedia.h>
  * #include <FApp.h>
- *
+ * using namespace Tizen::Base;
  * using namespace Tizen::Media;
  *
  * class AudioFrameSample
@@ -97,7 +97,7 @@ namespace Tizen { namespace Media
  *         return r;
  *     }
  *
- *     r = __recorder.AddAudioStreamListener(*this);
+ *     r = __recorder.AddAudioStreamFilter(*this);
  *     if (IsFailed(r))
  *     {
  *         return r;
@@ -129,7 +129,7 @@ namespace Tizen { namespace Media
  *   {
  *      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;
@@ -205,7 +205,7 @@ public:
         * @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.
index 74f0519..6e985de 100755 (executable)
@@ -79,7 +79,7 @@ public:
        * @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.
@@ -92,33 +92,50 @@ public:
        * 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.
@@ -151,7 +168,7 @@ public:
        *
        *       @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
index d38a419..7f69516 100755 (executable)
@@ -48,6 +48,7 @@ namespace Tizen { namespace Media
  * @code
  * #include <FBase.h>
  * #include <FMedia.h>
+ * #include <FUi.h>
  *
  * using namespace Tizen::Graphics;
  * using namespace Tizen::Ui;
@@ -180,6 +181,7 @@ namespace Tizen { namespace Media
  *           break;
  *        default:
  *           break;
+ *          }
  *     }
  * }
  *
@@ -213,7 +215,7 @@ public:
         * @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.
         *
@@ -231,7 +233,7 @@ public:
         * @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.
@@ -250,7 +252,7 @@ public:
         * @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.
         *