X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Finclude%2Fmm_camcorder.h;h=9ad8416eee6b5cee40e6a28334a1684b34a947c5;hb=refs%2Fchanges%2F81%2F188781%2F2;hp=a762d53e379b1c162ce28c49fb7e73ed18013e19;hpb=3a3fbbd9dcbb5ac740495265b7688a3ba5d2cd45;p=platform%2Fcore%2Fmultimedia%2Flibmm-camcorder.git diff --git a/src/include/mm_camcorder.h b/src/include/mm_camcorder.h index a762d53..9ad8416 100644 --- a/src/include/mm_camcorder.h +++ b/src/include/mm_camcorder.h @@ -1202,6 +1202,11 @@ extern "C" { #define MMCAM_RECOMMEND_CAMERA_HEIGHT "recommend-camera-height" /** + * Enable to play capture sound + */ +#define MMCAM_CAPTURE_SOUND_ENABLE "capture-sound-enable" + +/** * Flip of video input stream. * @see MMFlipType (in mm_types.h) */ @@ -1233,9 +1238,9 @@ extern "C" { #define MMCAM_DISPLAY_SOCKET_PATH "display-socket-path" /** - * PID for sound focus + * Client PID */ -#define MMCAM_PID_FOR_SOUND_FOCUS "pid-for-sound-focus" +#define MMCAM_CLIENT_PID "client-pid" /** * Root directory of application @@ -1289,6 +1294,21 @@ extern "C" { #define MMCAM_DISPLAY_REUSE_HINT "display-reuse-hint" #define MMCAM_DISPLAY_REUSE_ELEMENT "display-reuse-element" +/** + * The GBbus connection from outside + */ +#define MMCAM_GDBUS_CONNECTION "gdbus-connection" + +/** + * Replay gain enable + */ +#define MMCAM_AUDIO_REPLAY_GAIN_ENABLE "audio-replay-gain-enable" + +/** + * Reference level for replay gain + */ +#define MMCAM_AUDIO_REPLAY_GAIN_REFERENCE_LEVEL "audio-replay-gain-reference-level" + /*======================================================================================= | ENUM DEFINITIONS | ========================================================================================*/ @@ -1661,7 +1681,9 @@ typedef enum { MM_CAM_STREAM_DATA_YUV420SP, /**< YUV420 SemiPlannar type - 2 planes */ MM_CAM_STREAM_DATA_YUV420P, /**< YUV420 Plannar type - 3 planes */ MM_CAM_STREAM_DATA_YUV422P, /**< YUV422 Plannar type - 3 planes */ - MM_CAM_STREAM_DATA_ENCODED /**< Encoded data type - 1 plane */ + MM_CAM_STREAM_DATA_ENCODED, /**< Encoded data type - 1 plane */ + MM_CAM_STREAM_DATA_DEPTH, /**< Depth data type - 1 plane */ + MM_CAM_STREAM_DATA_RGB /**< RGB data type - 1 plane */ } MMCamStreamData; @@ -1763,7 +1785,7 @@ typedef struct { struct { unsigned char *data; unsigned int length_data; - } encoded; + } encoded, depth, rgb; } data; /**< pointer of captured stream */ MMCamStreamData data_type; /**< data type */ unsigned int length_total; /**< total length of stream buffer (in byte)*/ @@ -1793,6 +1815,16 @@ typedef struct { /** + * Structure for muxed stream data. + */ +typedef struct { + void *data; /**< pointer of muxed stream */ + unsigned int length; /**< length of stream buffer (in byte) */ + unsigned long long offset; /**< current offset for data */ +} MMCamcorderMuxedStreamDataType; + + +/** * Prerequisite information for mm_camcorder_create() * The information to set prior to create. */ @@ -1828,18 +1860,6 @@ typedef struct _MMCamFaceDetectInfo { MMCamFaceInfo *face_info; /**< face information, this should be freed after use it. */ } MMCamFaceDetectInfo; -/** - * Wayland information - */ -typedef struct _MMCamWaylandInfo { - int global_surface_id; - int window_x; - int window_y; - int window_width; - int window_height; - void *evas_obj; -} MMCamWaylandInfo; - /*======================================================================================= | TYPE DEFINITIONS | @@ -1876,6 +1896,21 @@ typedef gboolean (*mm_camcorder_audio_stream_callback)(MMCamcorderAudioStreamDat /** + * Function definition for muxed stream callback. + * Be careful! In this function, you can't call functions that change the state of camcorder such as mm_camcorder_stop(), + * mm_camcorder_unrealize(), mm_camcorder_record(), mm_camcorder_commit(), and mm_camcorder_cancel(), etc. + * Please don't hang this function long. It may cause low performance of camcorder or occur timeout error from encoding pipeline. + * I recommend to you releasing this function ASAP. + * + * @param[in] stream Reference pointer to muxed stream data + * @param[in] user_param User parameter which is received from user when callback function was set + * @return This function returns true on success, or false on failure. + * @remarks + */ +typedef gboolean (*mm_camcorder_muxed_stream_callback)(MMCamcorderMuxedStreamDataType *stream, void *user_param); + + +/** * Function definition for video capture callback. * Like '#mm_camcorder_video_stream_callback', you can't call mm_camcorder_stop() while you are hanging this function. * @@ -2190,8 +2225,6 @@ int mm_camcorder_realize(MMHandleType camcorder); * Most important resource that is released here is gstreamer pipeline of mm_camcorder. * Because most of resources, such as camera device, video display device, and audio I/O device, are operating on the gstreamer pipeline, * this function should be called to release its resources. - * Moreover, mm_camcorder is controlled by audio session manager. If an user doesn't call this function when he want to release mm_camcorder, - * other multimedia frameworks may face session problem. For more detail information, please refer mm_session module. * * @param[in] camcorder A handle of camcorder. * @return This function returns zero(MM_ERROR_NONE) on success, or negative value with error code.\n @@ -2905,6 +2938,38 @@ int mm_camcorder_set_audio_stream_callback(MMHandleType camcorder, mm_camcorder_ /** + * mm_camcorder_set_muxed_stream_callback:\n + * Set callback for user defined muxed stream callback function. + * Users can retrieve muxed data using registered callback. + * The callback function holds the same buffer that will be recorded. + * + * @param[in] camcorder A handle of camcorder. + * @param[in] callback Function pointer of callback function. + * @param[in] user_data User parameter for passing to callback function. + * @return This function returns zero(MM_ERROR_NONE) on success, or negative value with error code.\n + * Please refer 'mm_error.h' to know the exact meaning of the error. + * @see mm_camcorder_muxed_stream_callback + * @pre None + * @post None + * @remarks registered 'callback' is called on internal thread of camcorder. Regardless of the status of main loop, this function will be called. + * @par example + * @code + +#include + +gboolean setting_muxed_stream_callback() +{ + //set callback + mm_camcorder_set_muxed_stream_callback(hcam, (mm_camcorder_muxed_stream_callback)camcordertest_muxed_stream_cb, (void*)hcam); + + return TRUE; +} + * @endcode + */ +int mm_camcorder_set_muxed_stream_callback(MMHandleType camcorder, mm_camcorder_muxed_stream_callback callback, void *user_data); + + +/** * mm_camcorder_get_state:\n * Get the current state of camcorder. * mm_camcorder is working on the base of its state. An user should check the state of mm_camcorder before calling its functions. @@ -2937,6 +3002,7 @@ gboolean get_state_of_camcorder() * @endcode */ int mm_camcorder_get_state(MMHandleType camcorder, MMCamcorderStateType *state); +int mm_camcorder_get_state2(MMHandleType camcorder, MMCamcorderStateType *state, MMCamcorderStateType *old_state); /** @@ -3285,6 +3351,9 @@ void mm_camcorder_emit_signal(MMHandleType camcorder, const char *object_name, /* check compatability between codec and file format */ int mm_camcorder_check_codec_fileformat_compatibility(const char *codec_type, int codec, int file_format); +/* external storage state management */ +int mm_camcorder_manage_external_storage_state(MMHandleType camcorder, int storage_state); + /** @} */