From 309b9fee596451a2c850efed975a24260d6bfecc Mon Sep 17 00:00:00 2001 From: "sejong123.park" Date: Mon, 5 Oct 2015 13:48:08 +0900 Subject: [PATCH] Clean up the Makefiles, Add some descriptions Change-Id:I1ae78b4a5ef5be17e75204821c590871b9f0b59c Signed-off-by: sejong123.park --- CMakeLists.txt | 63 +--- legacy/CMakeLists.txt | 60 ++++ .../include/legacy_recorder.h | 208 ++++++------- .../include/legacy_recorder_private.h | 3 +- .../src/legacy_recorder.c | 126 ++++---- muse/CMakeLists.txt | 11 +- muse/include/muse_recorder.h | 67 ++++- muse/include/muse_recorder_msg.h | 323 ++++++++++++++------- muse/muse-recorder.pc.in | 15 - muse/src/muse_recorder_dispatcher.c | 158 +++++----- packaging/mmsvc-recorder.spec | 8 +- 11 files changed, 600 insertions(+), 442 deletions(-) create mode 100644 legacy/CMakeLists.txt rename include/mmsvc_recorder.h => legacy/include/legacy_recorder.h (88%) rename include/mmsvc_recorder_private.h => legacy/include/legacy_recorder_private.h (97%) rename src/mmsvc_recorder.c => legacy/src/legacy_recorder.c (90%) delete mode 100644 muse/muse-recorder.pc.in mode change 100755 => 100644 packaging/mmsvc-recorder.spec diff --git a/CMakeLists.txt b/CMakeLists.txt index 876e696..f008cd0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,50 +1,20 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6) -SET(Services - "application" - "base" - "content" - "location" - "media" - "messaging" - "network" - "social" - "telephony" - "system" - ) - # project SET(prefix "/usr") -SET(version "0.0.1") -SET(maintainer "Jeongmo Yang, Hyuntae Kim, Sejong Park") +SET(maintainer "Jeongmo Yang, Hyuntae Kim, Seokhoon Lee, Taeyoung Chung , Sejong Park") SET(description "A Camera library in Tizen Native API") SET(service "mmsvc") SET(submodule "recorder") - -# for package file -SET(dependents "dlog mm-camcorder mmsvc-camera capi-media-audio-io audio-session-mgr") -SET(pc_dependents "capi-base-common mmsvc-camera capi-media-audio-io") - SET(fw_name "${service}-${submodule}") PROJECT(${fw_name}) SET(CMAKE_INSTALL_PREFIX ${prefix}) SET(PREFIX ${CMAKE_INSTALL_PREFIX}) -SET(VERSION ${version}) -SET(INC_DIR include) +SET(INC_DIR legacy/include) INCLUDE_DIRECTORIES(${INC_DIR}) - -SET(MUSED_INC_DIR muse/include) -INCLUDE_DIRECTORIES(${MUSED_INC_DIR}) - -INCLUDE(FindPkgConfig) -pkg_check_modules(${fw_name} REQUIRED ${dependents}) -FOREACH(flag ${${fw_name}_CFLAGS}) - SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") -ENDFOREACH(flag) - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall -Wextra -Wno-array-bounds -Wno-empty-body -Wno-ignored-qualifiers -Wno-unused-parameter -Wshadow -Wwrite-strings -Wswitch-default -Wno-unused-but-set-parameter -Wno-unused-but-set-variable") SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") @@ -53,33 +23,6 @@ IF("${ARCH}" STREQUAL "arm") ENDIF("${ARCH}" STREQUAL "arm") ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") -ADD_DEFINITIONS("-DTIZEN_DEBUG") - -SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=${LIB_INSTALL_DIR}") - -aux_source_directory(src SOURCES) -ADD_LIBRARY(${fw_name} SHARED ${SOURCES}) - -TARGET_LINK_LIBRARIES(${fw_name} ${${fw_name}_LDFLAGS}) - -SET_TARGET_PROPERTIES(${fw_name} - PROPERTIES - VERSION ${FULLVER} - SOVERSION ${MAJORVER} - CLEAN_DIRECT_OUTPUT 1 -) - -INSTALL(TARGETS ${fw_name} DESTINATION ${LIB_INSTALL_DIR}) -INSTALL( - DIRECTORY ${INC_DIR}/ DESTINATION include/media - FILES_MATCHING - PATTERN "*_private.h" EXCLUDE - PATTERN "${INC_DIR}/*.h" - ) - -SET(PC_NAME ${fw_name}) -SET(PC_REQUIRED ${pc_dependents}) -SET(PC_LDFLAGS -l${fw_name}) CONFIGURE_FILE( ${fw_name}.pc.in @@ -88,7 +31,7 @@ CONFIGURE_FILE( ) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) -#ADD_SUBDIRECTORY(test) +ADD_SUBDIRECTORY(legacy) ADD_SUBDIRECTORY(muse) IF(UNIX) diff --git a/legacy/CMakeLists.txt b/legacy/CMakeLists.txt new file mode 100644 index 0000000..39b8ea5 --- /dev/null +++ b/legacy/CMakeLists.txt @@ -0,0 +1,60 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.6) + +SET(service "legacy") +SET(submodule "recorder") + +# for package file +SET(dependents "dlog mm-camcorder capi-media-audio-io audio-session-mgr") +SET(pc_dependents "capi-base-common capi-media-audio-io") + +SET(fw_name "${service}-${submodule}") + +PROJECT(${fw_name}) + +SET(CMAKE_INSTALL_PREFIX /usr) +SET(PREFIX ${CMAKE_INSTALL_PREFIX}) + +SET(INC_DIR include) +INCLUDE_DIRECTORIES(${INC_DIR}) + +INCLUDE(FindPkgConfig) +pkg_check_modules(${fw_name} REQUIRED ${dependents}) +FOREACH(flag ${${fw_name}_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall -Wextra -Wno-array-bounds -Wno-empty-body -Wno-ignored-qualifiers -Wno-unused-parameter -Wshadow -Wwrite-strings -Wswitch-default -Wno-unused-but-set-parameter -Wno-unused-but-set-variable") +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") + +IF("${ARCH}" STREQUAL "arm") + ADD_DEFINITIONS("-DTARGET") +ENDIF("${ARCH}" STREQUAL "arm") + +ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") +ADD_DEFINITIONS("-DTIZEN_DEBUG") + +SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=${LIB_INSTALL_DIR}") + +aux_source_directory(src LEGACY_SOURCES) +ADD_LIBRARY(${fw_name} SHARED ${LEGACY_SOURCES}) + +TARGET_LINK_LIBRARIES(${fw_name} ${${fw_name}_LDFLAGS}) + +SET_TARGET_PROPERTIES(${fw_name} + PROPERTIES + VERSION ${FULLVER} + SOVERSION ${MAJORVER} + CLEAN_DIRECT_OUTPUT 1 +) + +INSTALL(TARGETS ${fw_name} DESTINATION ${LIB_INSTALL_DIR}) +INSTALL( + DIRECTORY ${INC_DIR}/ DESTINATION include/media + FILES_MATCHING + PATTERN "*_private.h" EXCLUDE + PATTERN "${INC_DIR}/*.h" + ) + +SET(PC_NAME ${fw_name}) +SET(PC_REQUIRED ${pc_dependents}) +SET(PC_LDFLAGS -l${fw_name}) diff --git a/include/mmsvc_recorder.h b/legacy/include/legacy_recorder.h similarity index 88% rename from include/mmsvc_recorder.h rename to legacy/include/legacy_recorder.h index dff65d4..e603008 100644 --- a/include/mmsvc_recorder.h +++ b/legacy/include/legacy_recorder.h @@ -17,7 +17,7 @@ #ifndef __TIZEN_MULTIMEDIA_RECORDER_H__ #define __TIZEN_MULTIMEDIA_RECORDER_H__ #include -#include +#include #include #ifdef __cplusplus @@ -352,7 +352,7 @@ typedef bool (*recorder_supported_video_encoder_cb)(recorder_video_codec_e codec * @see camera_stop_preview() * @see recorder_destroy() */ -int mmsvc_recorder_create_videorecorder(camera_h camera, recorder_h *recorder); +int legacy_recorder_create_videorecorder(camera_h camera, recorder_h *recorder); /** * @brief Creates a recorder handle to record an audio. @@ -372,7 +372,7 @@ int mmsvc_recorder_create_videorecorder(camera_h camera, recorder_h *recorder); * @post The recorder state will be #RECORDER_STATE_CREATED. * @see recorder_destroy() */ -int mmsvc_recorder_create_audiorecorder(recorder_h *recorder); +int legacy_recorder_create_audiorecorder(recorder_h *recorder); /** @@ -395,7 +395,7 @@ int mmsvc_recorder_create_audiorecorder(recorder_h *recorder); * @see recorder_create_videorecorder() * @see recorder_create_audiorecorder() */ -int mmsvc_recorder_destroy(recorder_h recorder); +int legacy_recorder_destroy(recorder_h recorder); /** * @brief Prepares the media recorder for recording. @@ -413,9 +413,9 @@ int mmsvc_recorder_destroy(recorder_h recorder); * @retval #RECORDER_ERROR_INVALID_STATE Invalid state * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - * @pre The recorder state should be #RECORDER_STATE_CREATED by mmsvc_recorder_create_videorecorder(), mmsvc_recorder_create_audiorecorder() or mmsvc_recorder_unprepare(). + * @pre The recorder state should be #RECORDER_STATE_CREATED by legacy_recorder_create_videorecorder(), legacy_recorder_create_audiorecorder() or legacy_recorder_unprepare(). * @post The recorder state will be #RECORDER_STATE_READY. - * @post If recorder handle is created by mmsvc_recorder_create_videorecorder(), the camera state will be changed to #CAMERA_STATE_PREVIEW. + * @post If recorder handle is created by legacy_recorder_create_videorecorder(), the camera state will be changed to #CAMERA_STATE_PREVIEW. * @see recorder_create_videorecorder() * @see recorder_create_audiorecorder() * @see recorder_unprepare() @@ -423,7 +423,7 @@ int mmsvc_recorder_destroy(recorder_h recorder); * @see recorder_set_video_encoder() * @see recorder_set_file_format() */ -int mmsvc_recorder_prepare(recorder_h recorder); +int legacy_recorder_prepare(recorder_h recorder); /** * @brief Resets the media recorder. @@ -438,14 +438,14 @@ int mmsvc_recorder_prepare(recorder_h recorder); * @retval #RECORDER_ERROR_INVALID_STATE Invalid state * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - * @pre The recorder state should be #RECORDER_STATE_READY set by mmsvc_recorder_prepare(), mmsvc_recorder_cancel() or mmsvc_recorder_commit(). + * @pre The recorder state should be #RECORDER_STATE_READY set by legacy_recorder_prepare(), legacy_recorder_cancel() or legacy_recorder_commit(). * @post The recorder state will be #RECORDER_STATE_CREATED. - * @post If the recorder handle is created by mmsvc_recorder_create_videorecorder(), camera state will be changed to #CAMERA_STATE_CREATED. + * @post If the recorder handle is created by legacy_recorder_create_videorecorder(), camera state will be changed to #CAMERA_STATE_CREATED. * @see recorder_prepare() * @see recorder_cancel() * @see recorder_commit() */ -int mmsvc_recorder_unprepare(recorder_h recorder); +int legacy_recorder_unprepare(recorder_h recorder); /** * @brief Starts the recording. @@ -467,8 +467,8 @@ int mmsvc_recorder_unprepare(recorder_h recorder); * @retval #RECORDER_ERROR_INVALID_STATE Invalid state * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - * @pre The recorder state must be #RECORDER_STATE_READY by mmsvc_recorder_prepare() or #RECORDER_STATE_PAUSED by mmsvc_recorder_pause(). \n - * The filename should be set by mmsvc_recorder_set_filename(). + * @pre The recorder state must be #RECORDER_STATE_READY by legacy_recorder_prepare() or #RECORDER_STATE_PAUSED by legacy_recorder_pause(). \n + * The filename should be set by legacy_recorder_set_filename(). * @post The recorder state will be #RECORDER_STATE_RECORDING. * @see recorder_pause() * @see recorder_commit() @@ -479,14 +479,14 @@ int mmsvc_recorder_unprepare(recorder_h recorder); * @see recorder_recording_status_cb() * @see recorder_set_filename() */ -int mmsvc_recorder_start(recorder_h recorder); +int legacy_recorder_start(recorder_h recorder); /** * @brief Pauses the recording. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * @remarks Recording can be resumed with mmsvc_recorder_start(). + * @remarks Recording can be resumed with legacy_recorder_start(). * @param[in] recorder The handle to the media recorder * @return @c 0 on success, otherwise a negative error value * @retval #RECORDER_ERROR_NONE Successful @@ -497,11 +497,11 @@ int mmsvc_recorder_start(recorder_h recorder); * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported * @pre The recorder state must be #RECORDER_STATE_RECORDING. * @post The recorder state will be #RECORDER_STATE_PAUSED. - * @see mmsvc_recorder_pause() - * @see mmsvc_recorder_commit() - * @see mmsvc_recorder_cancel() + * @see legacy_recorder_pause() + * @see legacy_recorder_commit() + * @see legacy_recorder_cancel() */ -int mmsvc_recorder_pause(recorder_h recorder); +int legacy_recorder_pause(recorder_h recorder); /** * @brief Stops recording and saves the result. @@ -519,14 +519,14 @@ int mmsvc_recorder_pause(recorder_h recorder); * @retval #RECORDER_ERROR_INVALID_STATE Invalid state * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - * @pre The recorder state must be #RECORDER_STATE_RECORDING set by mmsvc_recorder_start() or #RECORDER_STATE_PAUSED by mmsvc_recorder_pause(). + * @pre The recorder state must be #RECORDER_STATE_RECORDING set by legacy_recorder_start() or #RECORDER_STATE_PAUSED by legacy_recorder_pause(). * @post The recorder state will be #RECORDER_STATE_READY. - * @see mmsvc_recorder_pause() - * @see mmsvc_recorder_cancel() - * @see mmsvc_recorder_set_filename() + * @see legacy_recorder_pause() + * @see legacy_recorder_cancel() + * @see legacy_recorder_set_filename() * @see recorder_start() */ -int mmsvc_recorder_commit(recorder_h recorder); +int legacy_recorder_commit(recorder_h recorder); /** * @brief Cancels the recording. @@ -545,14 +545,14 @@ int mmsvc_recorder_commit(recorder_h recorder); * @retval #RECORDER_ERROR_INVALID_STATE Invalid state * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - * @pre The recorder state must be #RECORDER_STATE_RECORDING set by mmsvc_recorder_start() or #RECORDER_STATE_PAUSED by mmsvc_recorder_pause(). + * @pre The recorder state must be #RECORDER_STATE_RECORDING set by legacy_recorder_start() or #RECORDER_STATE_PAUSED by legacy_recorder_pause(). * @post The recorder state will be #RECORDER_STATE_READY. - * @see mmsvc_recorder_pause() - * @see mmsvc_recorder_commit() - * @see mmsvc_recorder_cancel() - * @see mmsvc_recorder_start() + * @see legacy_recorder_pause() + * @see legacy_recorder_commit() + * @see legacy_recorder_cancel() + * @see legacy_recorder_start() */ -int mmsvc_recorder_cancel(recorder_h recorder); +int legacy_recorder_cancel(recorder_h recorder); /** * @brief Gets the recorder's current state. @@ -565,7 +565,7 @@ int mmsvc_recorder_cancel(recorder_h recorder); * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported */ -int mmsvc_recorder_get_state(recorder_h recorder, recorder_state_e *state); +int legacy_recorder_get_state(recorder_h recorder, recorder_state_e *state); /** * @brief Gets the peak audio input level that was sampled since the last call to this function. @@ -581,7 +581,7 @@ int mmsvc_recorder_get_state(recorder_h recorder, recorder_state_e *state); * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported * @pre The recorder state must be #RECORDER_STATE_RECORDING or #RECORDER_STATE_PAUSED. */ -int mmsvc_recorder_get_audio_level(recorder_h recorder, double *dB); +int legacy_recorder_get_audio_level(recorder_h recorder, double *dB); /** * @brief Sets the file path to record. @@ -599,7 +599,7 @@ int mmsvc_recorder_get_audio_level(recorder_h recorder, double *dB); * @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY. * @see recorder_get_filename() */ -int mmsvc_recorder_set_filename(recorder_h recorder, const char *path); +int legacy_recorder_set_filename(recorder_h recorder, const char *path); /** * @brief Gets the file path to record. @@ -614,7 +614,7 @@ int mmsvc_recorder_set_filename(recorder_h recorder, const char *path); * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported * @see recorder_set_filename() */ -int mmsvc_recorder_get_filename(recorder_h recorder, char **path); +int legacy_recorder_get_filename(recorder_h recorder, char **path); /** * @brief Sets the file format for recording media stream. @@ -633,10 +633,10 @@ int mmsvc_recorder_get_filename(recorder_h recorder, char **path); * @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation (Since 2.3.1) * @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY (for video recorder only).\n * Since 2.3.1, this API also works for audio recorder when its state is #RECORDER_STATE_READY. - * @see mmsvc_recorder_get_file_format() - * @see mmsvc_recorder_foreach_supported_file_format() + * @see legacy_recorder_get_file_format() + * @see legacy_recorder_foreach_supported_file_format() */ -int mmsvc_recorder_set_file_format(recorder_h recorder, recorder_file_format_e format); +int legacy_recorder_set_file_format(recorder_h recorder, recorder_file_format_e format); /** @@ -649,10 +649,10 @@ int mmsvc_recorder_set_file_format(recorder_h recorder, recorder_file_format_e f * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - * @see mmsvc_recorder_set_file_format() - * @see mmsvc_recorder_foreach_supported_file_format() + * @see legacy_recorder_set_file_format() + * @see legacy_recorder_foreach_supported_file_format() */ -int mmsvc_recorder_get_file_format(recorder_h recorder, recorder_file_format_e *format); +int legacy_recorder_get_file_format(recorder_h recorder, recorder_file_format_e *format); /** @@ -675,12 +675,12 @@ int mmsvc_recorder_get_file_format(recorder_h recorder, recorder_file_format_e * * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - * @post mmsvc_recorder_supported_file_format_cb() will be invoked. - * @see mmsvc_recorder_get_file_format() - * @see mmsvc_recorder_set_file_format() - * @see mmsvc_recorder_supported_file_format_cb() + * @post legacy_recorder_supported_file_format_cb() will be invoked. + * @see legacy_recorder_get_file_format() + * @see legacy_recorder_set_file_format() + * @see legacy_recorder_supported_file_format_cb() */ -int mmsvc_recorder_foreach_supported_file_format(recorder_h recorder, recorder_supported_file_format_cb callback, void *user_data); +int legacy_recorder_foreach_supported_file_format(recorder_h recorder, recorder_supported_file_format_cb callback, void *user_data); /** * @} @@ -710,9 +710,9 @@ int mmsvc_recorder_foreach_supported_file_format(recorder_h recorder, recorder_s * @retval #RECORDER_ERROR_INVALID_OPERATION Invalid operation (Since 2.3.1) * @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY. * @see recorder_get_audio_encoder() - * @see mmsvc_recorder_foreach_supported_audio_encoder() + * @see legacy_recorder_foreach_supported_audio_encoder() */ -int mmsvc_recorder_set_audio_encoder(recorder_h recorder, recorder_audio_codec_e codec); +int legacy_recorder_set_audio_encoder(recorder_h recorder, recorder_audio_codec_e codec); /** * @brief Gets the audio codec for encoding an audio stream. @@ -725,9 +725,9 @@ int mmsvc_recorder_set_audio_encoder(recorder_h recorder, recorder_audio_codec_e * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported * @see recorder_set_audio_encoder() - * @see mmsvc_recorder_foreach_supported_audio_encoder() + * @see legacy_recorder_foreach_supported_audio_encoder() */ -int mmsvc_recorder_get_audio_encoder(recorder_h recorder, recorder_audio_codec_e *codec); +int legacy_recorder_get_audio_encoder(recorder_h recorder, recorder_audio_codec_e *codec); /** * @} @@ -749,12 +749,12 @@ int mmsvc_recorder_get_audio_encoder(recorder_h recorder, recorder_audio_codec_e * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - * @post mmsvc_recorder_supported_audio_encoder_cb() will be invoked. + * @post legacy_recorder_supported_audio_encoder_cb() will be invoked. * @see recorder_set_audio_encoder() * @see recorder_get_audio_encoder() * @see recorder_supported_audio_encoder_cb() */ -int mmsvc_recorder_foreach_supported_audio_encoder(recorder_h recorder, recorder_supported_audio_encoder_cb callback, void *user_data); +int legacy_recorder_foreach_supported_audio_encoder(recorder_h recorder, recorder_supported_audio_encoder_cb callback, void *user_data); /** * @} @@ -783,7 +783,7 @@ int mmsvc_recorder_foreach_supported_audio_encoder(recorder_h recorder, recorder * @see recorder_get_video_resolution() * @see recorder_foreach_supported_video_resolution() */ -int mmsvc_recorder_set_video_resolution(recorder_h recorder, int width, int height); +int legacy_recorder_set_video_resolution(recorder_h recorder, int width, int height); /** * @brief Gets the resolution of the video recording. @@ -799,7 +799,7 @@ int mmsvc_recorder_set_video_resolution(recorder_h recorder, int width, int heig * @see recorder_set_video_resolution() * @see recorder_foreach_supported_video_resolution() */ -int mmsvc_recorder_get_video_resolution(recorder_h recorder, int *width, int *height); +int legacy_recorder_get_video_resolution(recorder_h recorder, int *width, int *height); /** * @} @@ -821,12 +821,12 @@ int mmsvc_recorder_get_video_resolution(recorder_h recorder, int *width, int *he * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - * @post This function invokes mmsvc_recorder_supported_video_resolution_cb() repeatedly to retrieve each supported video resolution. + * @post This function invokes legacy_recorder_supported_video_resolution_cb() repeatedly to retrieve each supported video resolution. * @see recorder_set_video_resolution() * @see recorder_get_video_resolution() * @see recorder_supported_video_resolution_cb() */ -int mmsvc_recorder_foreach_supported_video_resolution(recorder_h recorder, +int legacy_recorder_foreach_supported_video_resolution(recorder_h recorder, recorder_supported_video_resolution_cb foreach_cb, void *user_data); /** @@ -852,9 +852,9 @@ int mmsvc_recorder_foreach_supported_video_resolution(recorder_h recorder, * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported * @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY. * @see recorder_get_video_encoder() - * @see mmsvc_recorder_foreach_supported_video_encoder() + * @see legacy_recorder_foreach_supported_video_encoder() */ -int mmsvc_recorder_set_video_encoder(recorder_h recorder, recorder_video_codec_e codec); +int legacy_recorder_set_video_encoder(recorder_h recorder, recorder_video_codec_e codec); /** * @brief Gets the video codec for encoding video stream. @@ -866,10 +866,10 @@ int mmsvc_recorder_set_video_encoder(recorder_h recorder, recorder_video_codec_e * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - * @see mmsvc_recorder_set_video_encoder() - * @see mmsvc_recorder_foreach_supported_video_encoder() + * @see legacy_recorder_set_video_encoder() + * @see legacy_recorder_foreach_supported_video_encoder() */ -int mmsvc_recorder_get_video_encoder(recorder_h recorder, recorder_video_codec_e *codec); +int legacy_recorder_get_video_encoder(recorder_h recorder, recorder_video_codec_e *codec); /** * @} @@ -891,12 +891,12 @@ int mmsvc_recorder_get_video_encoder(recorder_h recorder, recorder_video_codec_e * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - * @post mmsvc_recorder_supported_video_encoder_cb() will be invoked. - * @see mmsvc_recorder_set_video_encoder() - * @see mmsvc_recorder_get_video_encoder() + * @post legacy_recorder_supported_video_encoder_cb() will be invoked. + * @see legacy_recorder_set_video_encoder() + * @see legacy_recorder_get_video_encoder() * @see recorder_supported_video_encoder_cb() */ -int mmsvc_recorder_foreach_supported_video_encoder(recorder_h recorder, recorder_supported_video_encoder_cb callback, void *user_data); +int legacy_recorder_foreach_supported_video_encoder(recorder_h recorder, recorder_supported_video_encoder_cb callback, void *user_data); /** * @} @@ -918,11 +918,11 @@ int mmsvc_recorder_foreach_supported_video_encoder(recorder_h recorder, recorder * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - * @post mmsvc_recorder_state_changed_cb() will be invoked. - * @see mmsvc_recorder_unset_state_changed_cb() - * @see mmsvc_recorder_state_changed_cb() + * @post legacy_recorder_state_changed_cb() will be invoked. + * @see legacy_recorder_unset_state_changed_cb() + * @see legacy_recorder_state_changed_cb() */ -int mmsvc_recorder_set_state_changed_cb(recorder_h recorder, recorder_state_changed_cb callback, void *user_data); +int legacy_recorder_set_state_changed_cb(recorder_h recorder, recorder_state_changed_cb callback, void *user_data); /** * @brief Unregisters the callback function. @@ -933,9 +933,9 @@ int mmsvc_recorder_set_state_changed_cb(recorder_h recorder, recorder_state_chan * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - * @see mmsvc_recorder_set_state_changed_cb() + * @see legacy_recorder_set_state_changed_cb() */ -int mmsvc_recorder_unset_state_changed_cb(recorder_h recorder); +int legacy_recorder_unset_state_changed_cb(recorder_h recorder); /** * @brief Registers a callback function to be called when the media recorder is interrupted according to a policy. @@ -951,7 +951,7 @@ int mmsvc_recorder_unset_state_changed_cb(recorder_h recorder); * @see recorder_unset_interrupted_cb() * @see recorder_interrupted_cb() */ -int mmsvc_recorder_set_interrupted_cb(recorder_h recorder, recorder_interrupted_cb callback, +int legacy_recorder_set_interrupted_cb(recorder_h recorder, recorder_interrupted_cb callback, void *user_data); /** @@ -965,14 +965,14 @@ int mmsvc_recorder_set_interrupted_cb(recorder_h recorder, recorder_interrupted_ * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported * @see recorder_set_interrupted_cb() */ -int mmsvc_recorder_unset_interrupted_cb(recorder_h recorder); +int legacy_recorder_unset_interrupted_cb(recorder_h recorder); /** * @brief Registers a callback function to be called when audio stream data is being delivered. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * @remarks This callback function holds the same buffer that will be recorded. \n * Therefore if an user changes the buffer, the result file will have the buffer. \n - * @remarks The callback is called via internal thread of Frameworks. Therefore do not invoke UI API, mmsvc_recorder_unprepare(), mmsvc_recorder_commit() and mmsvc_recorder_cancel() in callback.\n + * @remarks The callback is called via internal thread of Frameworks. Therefore do not invoke UI API, legacy_recorder_unprepare(), legacy_recorder_commit() and legacy_recorder_cancel() in callback.\n * This callback function to be called in #RECORDER_STATE_RECORDING and #RECORDER_STATE_PAUSED state. * * @param[in] recorder The handle to the recorder @@ -987,7 +987,7 @@ int mmsvc_recorder_unset_interrupted_cb(recorder_h recorder); * @see recorder_unset_audio_stream_cb() * @see recorder_audio_stream_cb() */ -int mmsvc_recorder_set_audio_stream_cb(recorder_h recorder, recorder_audio_stream_cb callback, void* user_data); +int legacy_recorder_set_audio_stream_cb(recorder_h recorder, recorder_audio_stream_cb callback, void* user_data); /** * @brief Unregisters the callback function. @@ -998,9 +998,9 @@ int mmsvc_recorder_set_audio_stream_cb(recorder_h recorder, recorder_audio_strea * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - * @see mmsvc_recorder_set_audio_stream_cb() + * @see legacy_recorder_set_audio_stream_cb() */ -int mmsvc_recorder_unset_audio_stream_cb(recorder_h recorder); +int legacy_recorder_unset_audio_stream_cb(recorder_h recorder); /** * @brief Registers a callback function to be invoked when the recording information changes. @@ -1013,11 +1013,11 @@ int mmsvc_recorder_unset_audio_stream_cb(recorder_h recorder); * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - * @post mmsvc_recorder_recording_status_cb() will be invoked. + * @post legacy_recorder_recording_status_cb() will be invoked. * @see recorder_unset_recording_status_cb() * @see recorder_recording_status_cb() */ -int mmsvc_recorder_set_recording_status_cb(recorder_h recorder, recorder_recording_status_cb callback, void *user_data); +int legacy_recorder_set_recording_status_cb(recorder_h recorder, recorder_recording_status_cb callback, void *user_data); /** * @brief Unregisters the callback function. @@ -1030,7 +1030,7 @@ int mmsvc_recorder_set_recording_status_cb(recorder_h recorder, recorder_recordi * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported * @see recorder_set_recording_status_cb() */ -int mmsvc_recorder_unset_recording_status_cb(recorder_h recorder); +int legacy_recorder_unset_recording_status_cb(recorder_h recorder); /** * @brief Registers the callback function to be run when reached the recording limit. @@ -1043,13 +1043,13 @@ int mmsvc_recorder_unset_recording_status_cb(recorder_h recorder); * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - * @post mmsvc_recorder_recording_limit_reached_cb() will be invoked. + * @post legacy_recorder_recording_limit_reached_cb() will be invoked. * @see recorder_unset_recording_limit_reached_cb() * @see recorder_attr_set_size_limit() * @see recorder_attr_set_time_limit() * @see recorder_recording_limit_reached_cb() */ -int mmsvc_recorder_set_recording_limit_reached_cb(recorder_h recorder, recorder_recording_limit_reached_cb callback, void *user_data); +int legacy_recorder_set_recording_limit_reached_cb(recorder_h recorder, recorder_recording_limit_reached_cb callback, void *user_data); /** * @brief Unregisters the callback function. @@ -1062,7 +1062,7 @@ int mmsvc_recorder_set_recording_limit_reached_cb(recorder_h recorder, recorder_ * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported * @see recorder_set_recording_limit_reached_cb() */ -int mmsvc_recorder_unset_recording_limit_reached_cb(recorder_h recorder); +int legacy_recorder_unset_recording_limit_reached_cb(recorder_h recorder); /** * @brief Registers a callback function to be called when an asynchronous operation error occurred. @@ -1081,11 +1081,11 @@ int mmsvc_recorder_unset_recording_limit_reached_cb(recorder_h recorder); * @retval #RECORDER_ERROR_INVALID_PARAMETER Invalid parameter * @retval #RECORDER_ERROR_PERMISSION_DENIED The access to the resources can not be granted * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported - * @post This function will invoke mmsvc_recorder_error_cb() when an asynchronous operation error occur. + * @post This function will invoke legacy_recorder_error_cb() when an asynchronous operation error occur. * @see recorder_unset_error_cb() * @see recorder_error_cb() */ -int mmsvc_recorder_set_error_cb(recorder_h recorder, recorder_error_cb callback, void *user_data); +int legacy_recorder_set_error_cb(recorder_h recorder, recorder_error_cb callback, void *user_data); /** @@ -1099,7 +1099,7 @@ int mmsvc_recorder_set_error_cb(recorder_h recorder, recorder_error_cb callback, * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported * @see recorder_set_error_cb() */ -int mmsvc_recorder_unset_error_cb(recorder_h recorder); +int legacy_recorder_unset_error_cb(recorder_h recorder); /** @@ -1129,7 +1129,7 @@ int mmsvc_recorder_unset_error_cb(recorder_h recorder); * @see recorder_attr_get_size_limit() * @see recorder_attr_set_time_limit() */ -int mmsvc_recorder_attr_set_size_limit(recorder_h recorder, int kbyte); +int legacy_recorder_attr_set_size_limit(recorder_h recorder, int kbyte); /** * @brief Gets the maximum size of a recording file. @@ -1145,7 +1145,7 @@ int mmsvc_recorder_attr_set_size_limit(recorder_h recorder, int kbyte); * @see recorder_attr_set_size_limit() * @see recorder_attr_get_time_limit() */ -int mmsvc_recorder_attr_get_size_limit(recorder_h recorder, int *kbyte); +int legacy_recorder_attr_get_size_limit(recorder_h recorder, int *kbyte); /** * @brief Sets the time limit of a recording file. @@ -1164,7 +1164,7 @@ int mmsvc_recorder_attr_get_size_limit(recorder_h recorder, int *kbyte); * @see recorder_attr_get_time_limit() * @see recorder_attr_set_size_limit() */ -int mmsvc_recorder_attr_set_time_limit(recorder_h recorder, int second); +int legacy_recorder_attr_set_time_limit(recorder_h recorder, int second); /** @@ -1181,7 +1181,7 @@ int mmsvc_recorder_attr_set_time_limit(recorder_h recorder, int second); * @see recorder_attr_set_time_limit() * @see recorder_attr_get_size_limit() */ -int mmsvc_recorder_attr_get_time_limit(recorder_h recorder, int *second); +int legacy_recorder_attr_get_time_limit(recorder_h recorder, int *second); /** * @brief Sets the audio device for recording. @@ -1198,7 +1198,7 @@ int mmsvc_recorder_attr_get_time_limit(recorder_h recorder, int *second); * Since 2.3.1, this API also works for audio recorder when its state is #RECORDER_STATE_READY. * @see recorder_attr_get_audio_device() */ -int mmsvc_recorder_attr_set_audio_device(recorder_h recorder, recorder_audio_device_e device); +int legacy_recorder_attr_set_audio_device(recorder_h recorder, recorder_audio_device_e device); /** * @brief Gets the audio device for recording. @@ -1212,7 +1212,7 @@ int mmsvc_recorder_attr_set_audio_device(recorder_h recorder, recorder_audio_dev * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported * @see recorder_attr_set_audio_device() */ -int mmsvc_recorder_attr_get_audio_device(recorder_h recorder, recorder_audio_device_e *device); +int legacy_recorder_attr_get_audio_device(recorder_h recorder, recorder_audio_device_e *device); /** * @brief Sets the sampling rate of an audio stream. @@ -1229,7 +1229,7 @@ int mmsvc_recorder_attr_get_audio_device(recorder_h recorder, recorder_audio_dev * Since 2.3.1, this API also works for audio recorder when its state is #RECORDER_STATE_READY. * @see recorder_attr_get_audio_samplerate() */ -int mmsvc_recorder_attr_set_audio_samplerate(recorder_h recorder, int samplerate); +int legacy_recorder_attr_set_audio_samplerate(recorder_h recorder, int samplerate); /** * @brief Gets the sampling rate of an audio stream. @@ -1243,7 +1243,7 @@ int mmsvc_recorder_attr_set_audio_samplerate(recorder_h recorder, int samplerate * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported * @see recorder_attr_set_audio_samplerate() */ -int mmsvc_recorder_attr_get_audio_samplerate(recorder_h recorder, int *samplerate); +int legacy_recorder_attr_get_audio_samplerate(recorder_h recorder, int *samplerate); /** * @brief Sets the bitrate of an audio encoder. @@ -1259,7 +1259,7 @@ int mmsvc_recorder_attr_get_audio_samplerate(recorder_h recorder, int *samplerat * @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY. * @see recorder_attr_get_audio_encoder_bitrate() */ -int mmsvc_recorder_attr_set_audio_encoder_bitrate(recorder_h recorder, int bitrate); +int legacy_recorder_attr_set_audio_encoder_bitrate(recorder_h recorder, int bitrate); /** * @brief Sets the bitrate of a video encoder. @@ -1275,7 +1275,7 @@ int mmsvc_recorder_attr_set_audio_encoder_bitrate(recorder_h recorder, int bitra * @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY. * @see recorder_attr_get_video_encoder_bitrate() */ -int mmsvc_recorder_attr_set_video_encoder_bitrate(recorder_h recorder, int bitrate); +int legacy_recorder_attr_set_video_encoder_bitrate(recorder_h recorder, int bitrate); /** * @brief Gets the bitrate of an audio encoder. @@ -1289,7 +1289,7 @@ int mmsvc_recorder_attr_set_video_encoder_bitrate(recorder_h recorder, int bitra * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported * @see recorder_attr_set_audio_encoder_bitrate() */ -int mmsvc_recorder_attr_get_audio_encoder_bitrate(recorder_h recorder, int *bitrate); +int legacy_recorder_attr_get_audio_encoder_bitrate(recorder_h recorder, int *bitrate); /** * @brief Gets the bitrate of a video encoder. @@ -1303,7 +1303,7 @@ int mmsvc_recorder_attr_get_audio_encoder_bitrate(recorder_h recorder, int *bitr * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported * @see recorder_attr_set_audio_encoder_bitrate() */ -int mmsvc_recorder_attr_get_video_encoder_bitrate(recorder_h recorder, int *bitrate); +int legacy_recorder_attr_get_video_encoder_bitrate(recorder_h recorder, int *bitrate); /** * @brief Sets the mute state of a recorder. @@ -1317,7 +1317,7 @@ int mmsvc_recorder_attr_get_video_encoder_bitrate(recorder_h recorder, int *bitr * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported * @see recorder_attr_is_muted() */ -int mmsvc_recorder_attr_set_mute(recorder_h recorder, bool enable); +int legacy_recorder_attr_set_mute(recorder_h recorder, bool enable); /** * @brief Gets the mute state of a recorder. @@ -1332,7 +1332,7 @@ int mmsvc_recorder_attr_set_mute(recorder_h recorder, bool enable); * @exception #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported * @see recorder_attr_set_mute() */ -bool mmsvc_recorder_attr_is_muted(recorder_h recorder); +bool legacy_recorder_attr_is_muted(recorder_h recorder); /** * @brief Sets the recording motion rate. @@ -1353,7 +1353,7 @@ bool mmsvc_recorder_attr_is_muted(recorder_h recorder); * @pre The recorder state must be #RECORDER_STATE_CREATED or #RECORDER_STATE_READY. * @see recorder_attr_get_recording_motion_rate() */ -int mmsvc_recorder_attr_set_recording_motion_rate(recorder_h recorder , double rate); +int legacy_recorder_attr_set_recording_motion_rate(recorder_h recorder , double rate); /** * @brief Gets the recording motion rate. @@ -1373,7 +1373,7 @@ int mmsvc_recorder_attr_set_recording_motion_rate(recorder_h recorder , double r * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported * @see recorder_attr_set_recording_motion_rate() */ -int mmsvc_recorder_attr_get_recording_motion_rate(recorder_h recorder , double *rate); +int legacy_recorder_attr_get_recording_motion_rate(recorder_h recorder , double *rate); /** * @brief Sets the number of the audio channel. @@ -1392,7 +1392,7 @@ int mmsvc_recorder_attr_get_recording_motion_rate(recorder_h recorder , double * * Since 2.3.1, this API also works for audio recorder when its state is #RECORDER_STATE_READY. * @see recorder_attr_get_audio_channel() */ -int mmsvc_recorder_attr_set_audio_channel(recorder_h recorder, int channel_count); +int legacy_recorder_attr_set_audio_channel(recorder_h recorder, int channel_count); /** * @brief Gets the number of the audio channel. @@ -1406,7 +1406,7 @@ int mmsvc_recorder_attr_set_audio_channel(recorder_h recorder, int channel_count * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported * @see recorder_attr_set_audio_channel() */ -int mmsvc_recorder_attr_get_audio_channel(recorder_h recorder, int *channel_count); +int legacy_recorder_attr_get_audio_channel(recorder_h recorder, int *channel_count); /** @@ -1421,7 +1421,7 @@ int mmsvc_recorder_attr_get_audio_channel(recorder_h recorder, int *channel_coun * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported * @see recorder_attr_get_orientation_tag() */ -int mmsvc_recorder_attr_set_orientation_tag(recorder_h recorder, recorder_rotation_e orientation); +int legacy_recorder_attr_set_orientation_tag(recorder_h recorder, recorder_rotation_e orientation); /** * @brief Gets the video orientation in a video metadata tag. @@ -1435,7 +1435,7 @@ int mmsvc_recorder_attr_set_orientation_tag(recorder_h recorder, recorder_rotat * @retval #RECORDER_ERROR_NOT_SUPPORTED The feature is not supported * @see recorder_attr_set_orientation_tag() */ -int mmsvc_recorder_attr_get_orientation_tag(recorder_h recorder, recorder_rotation_e *orientation); +int legacy_recorder_attr_get_orientation_tag(recorder_h recorder, recorder_rotation_e *orientation); /** * @} diff --git a/include/mmsvc_recorder_private.h b/legacy/include/legacy_recorder_private.h similarity index 97% rename from include/mmsvc_recorder_private.h rename to legacy/include/legacy_recorder_private.h index 9630754..37a2b00 100644 --- a/include/mmsvc_recorder_private.h +++ b/legacy/include/legacy_recorder_private.h @@ -18,9 +18,8 @@ #ifndef __TIZEN_MULTIMEDIA_RECORDER_PRIVATE_H__ #define __TIZEN_MULTIMEDIA_RECORDER_PRIVATE_H__ -#include #include -#include +#include #ifdef __cplusplus extern "C" { diff --git a/src/mmsvc_recorder.c b/legacy/src/legacy_recorder.c similarity index 90% rename from src/mmsvc_recorder.c rename to legacy/src/legacy_recorder.c index 36a891b..1fff8e1 100644 --- a/src/mmsvc_recorder.c +++ b/legacy/src/legacy_recorder.c @@ -24,8 +24,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -491,7 +491,7 @@ static int _recorder_check_and_set_attribute(recorder_h recorder, const char *at } -int mmsvc_recorder_create_videorecorder(camera_h camera, recorder_h *recorder) +int legacy_recorder_create_videorecorder(camera_h camera, recorder_h *recorder) { int ret = MM_ERROR_NONE; int resource_fd = -1; @@ -546,7 +546,7 @@ int mmsvc_recorder_create_videorecorder(camera_h camera, recorder_h *recorder) _camera_get_mm_handle(camera, &handle->mm_handle); _camera_set_relay_mm_message_callback(camera, __mm_recorder_msg_cb , (void*)handle); handle->type = _RECORDER_TYPE_VIDEO; - mmsvc_recorder_get_state((recorder_h)handle, (recorder_state_e*)&handle->state); + legacy_recorder_get_state((recorder_h)handle, (recorder_state_e*)&handle->state); mm_camcorder_get_attributes(handle->mm_handle, NULL, MMCAM_CAMERA_FORMAT, &preview_format, @@ -588,7 +588,7 @@ int mmsvc_recorder_create_videorecorder(camera_h camera, recorder_h *recorder) } -int mmsvc_recorder_create_audiorecorder(recorder_h *recorder) +int legacy_recorder_create_audiorecorder(recorder_h *recorder) { int ret = MM_ERROR_NONE; recorder_s *handle = NULL; @@ -654,7 +654,7 @@ int mmsvc_recorder_create_audiorecorder(recorder_h *recorder) } -int mmsvc_recorder_get_state(recorder_h recorder, recorder_state_e *state) +int legacy_recorder_get_state(recorder_h recorder, recorder_state_e *state) { int ret = MM_ERROR_NONE; MMCamcorderStateType mmstate; @@ -681,7 +681,7 @@ int mmsvc_recorder_get_state(recorder_h recorder, recorder_state_e *state) } -int mmsvc_recorder_destroy(recorder_h recorder) +int legacy_recorder_destroy(recorder_h recorder) { recorder_s *handle = NULL; int ret = MM_ERROR_NONE; @@ -723,7 +723,7 @@ int mmsvc_recorder_destroy(recorder_h recorder) } -int mmsvc_recorder_prepare(recorder_h recorder) +int legacy_recorder_prepare(recorder_h recorder) { int ret = MM_ERROR_NONE; recorder_s *handle = (recorder_s *)recorder; @@ -735,7 +735,7 @@ int mmsvc_recorder_prepare(recorder_h recorder) } if (handle->type == _RECORDER_TYPE_VIDEO) { - return __convert_error_code_camera_to_recorder(mmsvc_camera_start_preview(handle->mm_source.camera)); + return __convert_error_code_camera_to_recorder(legacy_camera_start_preview(handle->mm_source.camera)); } ret = mm_camcorder_get_state(handle->mm_handle, &mmstate); @@ -759,7 +759,7 @@ int mmsvc_recorder_prepare(recorder_h recorder) } -int mmsvc_recorder_unprepare(recorder_h recorder) +int legacy_recorder_unprepare(recorder_h recorder) { int ret = MM_ERROR_NONE; recorder_s *handle = (recorder_s *)recorder; @@ -790,7 +790,7 @@ int mmsvc_recorder_unprepare(recorder_h recorder) } -int mmsvc_recorder_start(recorder_h recorder) +int legacy_recorder_start(recorder_h recorder) { recorder_s *handle = (recorder_s *)recorder; @@ -803,7 +803,7 @@ int mmsvc_recorder_start(recorder_h recorder) } -int mmsvc_recorder_pause(recorder_h recorder) +int legacy_recorder_pause(recorder_h recorder) { recorder_s *handle = (recorder_s *)recorder; @@ -816,7 +816,7 @@ int mmsvc_recorder_pause(recorder_h recorder) } -int mmsvc_recorder_commit(recorder_h recorder) +int legacy_recorder_commit(recorder_h recorder) { recorder_s *handle = (recorder_s *)recorder; @@ -829,7 +829,7 @@ int mmsvc_recorder_commit(recorder_h recorder) } -int mmsvc_recorder_cancel(recorder_h recorder) +int legacy_recorder_cancel(recorder_h recorder) { recorder_s *handle = (recorder_s *)recorder; @@ -842,7 +842,7 @@ int mmsvc_recorder_cancel(recorder_h recorder) } -int mmsvc_recorder_set_video_resolution(recorder_h recorder, int width, int height) +int legacy_recorder_set_video_resolution(recorder_h recorder, int width, int height) { int ret = MM_ERROR_NONE; recorder_s *handle = (recorder_s*)recorder; @@ -856,7 +856,7 @@ int mmsvc_recorder_set_video_resolution(recorder_h recorder, int width, int heig LOGE("RECORDER_ERROR_NOT_SUPPORTED"); return RECORDER_ERROR_NOT_SUPPORTED; } - mmsvc_recorder_get_state(recorder, &state); + legacy_recorder_get_state(recorder, &state); if (state > RECORDER_STATE_READY) { LOGE("RECORDER_ERROR_INVALID_STATE (state:%d)", state); return RECORDER_ERROR_INVALID_STATE; @@ -871,7 +871,7 @@ int mmsvc_recorder_set_video_resolution(recorder_h recorder, int width, int heig } -int mmsvc_recorder_get_video_resolution(recorder_h recorder, int *width, int *height) +int legacy_recorder_get_video_resolution(recorder_h recorder, int *width, int *height) { int ret = MM_ERROR_NONE; recorder_s *handle = (recorder_s*)recorder; @@ -900,7 +900,7 @@ int mmsvc_recorder_get_video_resolution(recorder_h recorder, int *width, int *he } -int mmsvc_recorder_foreach_supported_video_resolution(recorder_h recorder, +int legacy_recorder_foreach_supported_video_resolution(recorder_h recorder, recorder_supported_video_resolution_cb foreach_cb, void *user_data) { int i = 0; @@ -941,7 +941,7 @@ int mmsvc_recorder_foreach_supported_video_resolution(recorder_h recorder, } -int mmsvc_recorder_get_audio_level(recorder_h recorder, double *level) +int legacy_recorder_get_audio_level(recorder_h recorder, double *level) { recorder_s *handle = (recorder_s *)recorder; recorder_state_e state; @@ -951,7 +951,7 @@ int mmsvc_recorder_get_audio_level(recorder_h recorder, double *level) return RECORDER_ERROR_INVALID_PARAMETER; } - mmsvc_recorder_get_state(recorder, &state); + legacy_recorder_get_state(recorder, &state); if (state < RECORDER_STATE_RECORDING) { LOGE("RECORDER_ERROR_INVALID_STATE(0x%08x)", RECORDER_ERROR_INVALID_STATE); return RECORDER_ERROR_INVALID_STATE; @@ -964,7 +964,7 @@ int mmsvc_recorder_get_audio_level(recorder_h recorder, double *level) } -int mmsvc_recorder_set_filename(recorder_h recorder, const char *filename) +int legacy_recorder_set_filename(recorder_h recorder, const char *filename) { int ret = MM_ERROR_NONE; recorder_s *handle = (recorder_s *)recorder; @@ -994,7 +994,7 @@ int mmsvc_recorder_set_filename(recorder_h recorder, const char *filename) } -int mmsvc_recorder_get_filename(recorder_h recorder, char **filename) +int legacy_recorder_get_filename(recorder_h recorder, char **filename) { int ret = MM_ERROR_NONE; char *record_filename = NULL; @@ -1025,7 +1025,7 @@ int mmsvc_recorder_get_filename(recorder_h recorder, char **filename) } -int mmsvc_recorder_set_file_format(recorder_h recorder, recorder_file_format_e format) +int legacy_recorder_set_file_format(recorder_h recorder, recorder_file_format_e format) { int format_table[6] = { MM_FILE_FORMAT_3GP, /* RECORDER_FILE_FORMAT_3GP */ MM_FILE_FORMAT_MP4, /* RECORDER_FILE_FORMAT_MP4 */ @@ -1044,7 +1044,7 @@ int mmsvc_recorder_set_file_format(recorder_h recorder, recorder_file_format_e f } -int mmsvc_recorder_get_file_format(recorder_h recorder, recorder_file_format_e *format) +int legacy_recorder_get_file_format(recorder_h recorder, recorder_file_format_e *format) { int ret = MM_ERROR_NONE; recorder_s *handle = (recorder_s *)recorder; @@ -1093,7 +1093,7 @@ int mmsvc_recorder_get_file_format(recorder_h recorder, recorder_file_format_e * } -int mmsvc_recorder_set_state_changed_cb(recorder_h recorder, recorder_state_changed_cb callback, void* user_data) +int legacy_recorder_set_state_changed_cb(recorder_h recorder, recorder_state_changed_cb callback, void* user_data) { recorder_s *handle = (recorder_s *)recorder; @@ -1114,7 +1114,7 @@ int mmsvc_recorder_set_state_changed_cb(recorder_h recorder, recorder_state_chan } -int mmsvc_recorder_unset_state_changed_cb(recorder_h recorder) +int legacy_recorder_unset_state_changed_cb(recorder_h recorder) { recorder_s *handle = (recorder_s *)recorder; @@ -1130,7 +1130,7 @@ int mmsvc_recorder_unset_state_changed_cb(recorder_h recorder) } -int mmsvc_recorder_set_interrupted_cb(recorder_h recorder, recorder_interrupted_cb callback, void *user_data) +int legacy_recorder_set_interrupted_cb(recorder_h recorder, recorder_interrupted_cb callback, void *user_data) { recorder_s *handle = (recorder_s *)recorder; @@ -1150,7 +1150,7 @@ int mmsvc_recorder_set_interrupted_cb(recorder_h recorder, recorder_interrupted_ } -int mmsvc_recorder_unset_interrupted_cb(recorder_h recorder) +int legacy_recorder_unset_interrupted_cb(recorder_h recorder) { recorder_s *handle = (recorder_s *)recorder; @@ -1166,7 +1166,7 @@ int mmsvc_recorder_unset_interrupted_cb(recorder_h recorder) } -int mmsvc_recorder_set_audio_stream_cb(recorder_h recorder, recorder_audio_stream_cb callback, void* user_data) +int legacy_recorder_set_audio_stream_cb(recorder_h recorder, recorder_audio_stream_cb callback, void* user_data) { int ret = MM_ERROR_NONE; recorder_s *handle = (recorder_s *)recorder; @@ -1190,7 +1190,7 @@ int mmsvc_recorder_set_audio_stream_cb(recorder_h recorder, recorder_audio_strea } -int mmsvc_recorder_unset_audio_stream_cb(recorder_h recorder) +int legacy_recorder_unset_audio_stream_cb(recorder_h recorder) { int ret = MM_ERROR_NONE; recorder_s *handle = (recorder_s *)recorder; @@ -1209,7 +1209,7 @@ int mmsvc_recorder_unset_audio_stream_cb(recorder_h recorder) } -int mmsvc_recorder_set_error_cb(recorder_h recorder, recorder_error_cb callback, void *user_data) +int legacy_recorder_set_error_cb(recorder_h recorder, recorder_error_cb callback, void *user_data) { recorder_s *handle = (recorder_s *)recorder; @@ -1229,7 +1229,7 @@ int mmsvc_recorder_set_error_cb(recorder_h recorder, recorder_error_cb callback, } -int mmsvc_recorder_unset_error_cb(recorder_h recorder) +int legacy_recorder_unset_error_cb(recorder_h recorder) { recorder_s *handle = (recorder_s *)recorder; @@ -1245,7 +1245,7 @@ int mmsvc_recorder_unset_error_cb(recorder_h recorder) } -int mmsvc_recorder_set_recording_status_cb(recorder_h recorder, recorder_recording_status_cb callback, void* user_data) +int legacy_recorder_set_recording_status_cb(recorder_h recorder, recorder_recording_status_cb callback, void* user_data) { recorder_s *handle = (recorder_s *)recorder; @@ -1265,7 +1265,7 @@ int mmsvc_recorder_set_recording_status_cb(recorder_h recorder, recorder_recordi } -int mmsvc_recorder_unset_recording_status_cb(recorder_h recorder) +int legacy_recorder_unset_recording_status_cb(recorder_h recorder) { recorder_s *handle = (recorder_s *)recorder; @@ -1281,7 +1281,7 @@ int mmsvc_recorder_unset_recording_status_cb(recorder_h recorder) } -int mmsvc_recorder_set_recording_limit_reached_cb(recorder_h recorder, recorder_recording_limit_reached_cb callback, void* user_data) +int legacy_recorder_set_recording_limit_reached_cb(recorder_h recorder, recorder_recording_limit_reached_cb callback, void* user_data) { recorder_s *handle = (recorder_s *)recorder; @@ -1301,7 +1301,7 @@ int mmsvc_recorder_set_recording_limit_reached_cb(recorder_h recorder, recorder_ } -int mmsvc_recorder_unset_recording_limit_reached_cb(recorder_h recorder) +int legacy_recorder_unset_recording_limit_reached_cb(recorder_h recorder) { recorder_s *handle = (recorder_s *)recorder; @@ -1317,7 +1317,7 @@ int mmsvc_recorder_unset_recording_limit_reached_cb(recorder_h recorder) } -int mmsvc_recorder_foreach_supported_file_format(recorder_h recorder, recorder_supported_file_format_cb foreach_cb, void *user_data) +int legacy_recorder_foreach_supported_file_format(recorder_h recorder, recorder_supported_file_format_cb foreach_cb, void *user_data) { int i = 0; int ret = MM_ERROR_NONE; @@ -1371,7 +1371,7 @@ int mmsvc_recorder_foreach_supported_file_format(recorder_h recorder, recorder_s } -int mmsvc_recorder_attr_set_size_limit(recorder_h recorder, int kbyte) +int legacy_recorder_attr_set_size_limit(recorder_h recorder, int kbyte) { int ret = MM_ERROR_NONE; recorder_s *handle = (recorder_s *)recorder; @@ -1389,7 +1389,7 @@ int mmsvc_recorder_attr_set_size_limit(recorder_h recorder, int kbyte) } -int mmsvc_recorder_attr_set_time_limit(recorder_h recorder, int second) +int legacy_recorder_attr_set_time_limit(recorder_h recorder, int second) { int ret = MM_ERROR_NONE; recorder_s *handle = (recorder_s *)recorder; @@ -1407,7 +1407,7 @@ int mmsvc_recorder_attr_set_time_limit(recorder_h recorder, int second) } -int mmsvc_recorder_attr_set_audio_device(recorder_h recorder, recorder_audio_device_e device) +int legacy_recorder_attr_set_audio_device(recorder_h recorder, recorder_audio_device_e device) { if (device < RECORDER_AUDIO_DEVICE_MIC || device > RECORDER_AUDIO_DEVICE_MODEM) { LOGE("invalid device %d", device); @@ -1418,7 +1418,7 @@ int mmsvc_recorder_attr_set_audio_device(recorder_h recorder, recorder_audio_dev } -int mmsvc_recorder_set_audio_encoder(recorder_h recorder, recorder_audio_codec_e codec) +int legacy_recorder_set_audio_encoder(recorder_h recorder, recorder_audio_codec_e codec) { recorder_s *handle = (recorder_s *)recorder; int audio_table[4] = { MM_AUDIO_CODEC_AMR, /* RECORDER_AUDIO_CODEC_AMR */ @@ -1447,7 +1447,7 @@ int mmsvc_recorder_set_audio_encoder(recorder_h recorder, recorder_audio_codec_e } -int mmsvc_recorder_get_audio_encoder(recorder_h recorder, recorder_audio_codec_e *codec) +int legacy_recorder_get_audio_encoder(recorder_h recorder, recorder_audio_codec_e *codec) { int ret = MM_ERROR_NONE; int mm_codec = 0; @@ -1495,7 +1495,7 @@ int mmsvc_recorder_get_audio_encoder(recorder_h recorder, recorder_audio_codec_e } -int mmsvc_recorder_set_video_encoder(recorder_h recorder, recorder_video_codec_e codec) +int legacy_recorder_set_video_encoder(recorder_h recorder, recorder_video_codec_e codec) { int ret = MM_ERROR_NONE; int video_table[4] = { MM_VIDEO_CODEC_H263, /* RECORDER_VIDEO_CODEC_H263 */ @@ -1528,7 +1528,7 @@ int mmsvc_recorder_set_video_encoder(recorder_h recorder, recorder_video_codec_e } -int mmsvc_recorder_get_video_encoder(recorder_h recorder, recorder_video_codec_e *codec) +int legacy_recorder_get_video_encoder(recorder_h recorder, recorder_video_codec_e *codec) { int ret = MM_ERROR_NONE; int mm_codec = 0; @@ -1574,7 +1574,7 @@ int mmsvc_recorder_get_video_encoder(recorder_h recorder, recorder_video_codec_e } -int mmsvc_recorder_attr_set_audio_samplerate(recorder_h recorder, int samplerate) +int legacy_recorder_attr_set_audio_samplerate(recorder_h recorder, int samplerate) { if (samplerate < 1) { LOGE("invalid samplerate %d", samplerate); @@ -1585,7 +1585,7 @@ int mmsvc_recorder_attr_set_audio_samplerate(recorder_h recorder, int samplerate } -int mmsvc_recorder_attr_set_audio_encoder_bitrate(recorder_h recorder, int bitrate) +int legacy_recorder_attr_set_audio_encoder_bitrate(recorder_h recorder, int bitrate) { if (bitrate < 1) { LOGE("invalid bitrate %d", bitrate); @@ -1596,7 +1596,7 @@ int mmsvc_recorder_attr_set_audio_encoder_bitrate(recorder_h recorder, int bitra } -int mmsvc_recorder_attr_set_video_encoder_bitrate(recorder_h recorder, int bitrate) +int legacy_recorder_attr_set_video_encoder_bitrate(recorder_h recorder, int bitrate) { int ret = MM_ERROR_NONE; recorder_s *handle = (recorder_s *)recorder; @@ -1618,7 +1618,7 @@ int mmsvc_recorder_attr_set_video_encoder_bitrate(recorder_h recorder, int bitra } -int mmsvc_recorder_attr_get_size_limit(recorder_h recorder, int *kbyte) +int legacy_recorder_attr_get_size_limit(recorder_h recorder, int *kbyte) { int ret = MM_ERROR_NONE; recorder_s *handle = (recorder_s *)recorder; @@ -1636,7 +1636,7 @@ int mmsvc_recorder_attr_get_size_limit(recorder_h recorder, int *kbyte) } -int mmsvc_recorder_attr_get_time_limit(recorder_h recorder, int *second) +int legacy_recorder_attr_get_time_limit(recorder_h recorder, int *second) { int ret = MM_ERROR_NONE; recorder_s *handle = (recorder_s *)recorder; @@ -1654,7 +1654,7 @@ int mmsvc_recorder_attr_get_time_limit(recorder_h recorder, int *second) } -int mmsvc_recorder_attr_get_audio_device(recorder_h recorder, recorder_audio_device_e *device) +int legacy_recorder_attr_get_audio_device(recorder_h recorder, recorder_audio_device_e *device) { int ret = MM_ERROR_NONE; recorder_s *handle = (recorder_s *)recorder; @@ -1672,7 +1672,7 @@ int mmsvc_recorder_attr_get_audio_device(recorder_h recorder, recorder_audio_dev } -int mmsvc_recorder_attr_get_audio_samplerate(recorder_h recorder, int *samplerate) +int legacy_recorder_attr_get_audio_samplerate(recorder_h recorder, int *samplerate) { int ret = MM_ERROR_NONE; recorder_s *handle = (recorder_s *)recorder; @@ -1690,7 +1690,7 @@ int mmsvc_recorder_attr_get_audio_samplerate(recorder_h recorder, int *samplerat } -int mmsvc_recorder_attr_get_audio_encoder_bitrate(recorder_h recorder, int *bitrate) +int legacy_recorder_attr_get_audio_encoder_bitrate(recorder_h recorder, int *bitrate) { int ret = MM_ERROR_NONE; recorder_s *handle = (recorder_s *)recorder; @@ -1708,7 +1708,7 @@ int mmsvc_recorder_attr_get_audio_encoder_bitrate(recorder_h recorder, int *bitr } -int mmsvc_recorder_attr_get_video_encoder_bitrate(recorder_h recorder, int *bitrate) +int legacy_recorder_attr_get_video_encoder_bitrate(recorder_h recorder, int *bitrate) { int ret = MM_ERROR_NONE; recorder_s *handle = (recorder_s *)recorder; @@ -1729,7 +1729,7 @@ int mmsvc_recorder_attr_get_video_encoder_bitrate(recorder_h recorder, int *bitr } -int mmsvc_recorder_foreach_supported_audio_encoder(recorder_h recorder, recorder_supported_audio_encoder_cb foreach_cb, void *user_data) +int legacy_recorder_foreach_supported_audio_encoder(recorder_h recorder, recorder_supported_audio_encoder_cb foreach_cb, void *user_data) { int i = 0; int ret = MM_ERROR_NONE; @@ -1778,7 +1778,7 @@ int mmsvc_recorder_foreach_supported_audio_encoder(recorder_h recorder, recorder } -int mmsvc_recorder_foreach_supported_video_encoder(recorder_h recorder, recorder_supported_video_encoder_cb foreach_cb, void *user_data) +int legacy_recorder_foreach_supported_video_encoder(recorder_h recorder, recorder_supported_video_encoder_cb foreach_cb, void *user_data) { int i = 0; int ret = MM_ERROR_NONE; @@ -1832,7 +1832,7 @@ int mmsvc_recorder_foreach_supported_video_encoder(recorder_h recorder, recorder } -int mmsvc_recorder_attr_set_mute(recorder_h recorder, bool enable) +int legacy_recorder_attr_set_mute(recorder_h recorder, bool enable) { int ret = MM_ERROR_NONE; recorder_s *handle = (recorder_s *)recorder; @@ -1850,7 +1850,7 @@ int mmsvc_recorder_attr_set_mute(recorder_h recorder, bool enable) } -bool mmsvc_recorder_attr_is_muted(recorder_h recorder) +bool legacy_recorder_attr_is_muted(recorder_h recorder) { int ret = MM_ERROR_NONE; double volume = 1.0; @@ -1875,7 +1875,7 @@ bool mmsvc_recorder_attr_is_muted(recorder_h recorder) } -int mmsvc_recorder_attr_set_recording_motion_rate(recorder_h recorder, double rate) +int legacy_recorder_attr_set_recording_motion_rate(recorder_h recorder, double rate) { int ret = MM_ERROR_NONE; recorder_s *handle = (recorder_s *)recorder; @@ -1896,7 +1896,7 @@ int mmsvc_recorder_attr_set_recording_motion_rate(recorder_h recorder, double ra } -int mmsvc_recorder_attr_get_recording_motion_rate(recorder_h recorder, double *rate) +int legacy_recorder_attr_get_recording_motion_rate(recorder_h recorder, double *rate) { int ret = MM_ERROR_NONE; recorder_s *handle = (recorder_s *)recorder; @@ -1922,7 +1922,7 @@ int mmsvc_recorder_attr_get_recording_motion_rate(recorder_h recorder, double *r } -int mmsvc_recorder_attr_set_audio_channel(recorder_h recorder, int channel_count) +int legacy_recorder_attr_set_audio_channel(recorder_h recorder, int channel_count) { if (channel_count < 1) { LOGE("invalid channel %d", channel_count); @@ -1933,7 +1933,7 @@ int mmsvc_recorder_attr_set_audio_channel(recorder_h recorder, int channel_count } -int mmsvc_recorder_attr_get_audio_channel(recorder_h recorder, int *channel_count) +int legacy_recorder_attr_get_audio_channel(recorder_h recorder, int *channel_count) { int ret = MM_ERROR_NONE; recorder_s *handle = (recorder_s *)recorder; @@ -1955,7 +1955,7 @@ int mmsvc_recorder_attr_get_audio_channel(recorder_h recorder, int *channel_coun } -int mmsvc_recorder_attr_set_orientation_tag(recorder_h recorder, recorder_rotation_e orientation) +int legacy_recorder_attr_set_orientation_tag(recorder_h recorder, recorder_rotation_e orientation) { int ret = MM_ERROR_NONE; recorder_s *handle = (recorder_s *)recorder; @@ -1982,7 +1982,7 @@ int mmsvc_recorder_attr_set_orientation_tag(recorder_h recorder, recorder_rotati } -int mmsvc_recorder_attr_get_orientation_tag(recorder_h recorder, recorder_rotation_e *orientation) +int legacy_recorder_attr_get_orientation_tag(recorder_h recorder, recorder_rotation_e *orientation) { int ret = MM_ERROR_NONE; recorder_s *handle = (recorder_s *)recorder; diff --git a/muse/CMakeLists.txt b/muse/CMakeLists.txt index 616b183..f138452 100644 --- a/muse/CMakeLists.txt +++ b/muse/CMakeLists.txt @@ -2,7 +2,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6) SET(service "muse") SET(submodule "recorder") -SET(dependents "dlog mused mm-common glib-2.0 mmsvc-camera capi-media-audio-io audio-session-mgr") +SET(dependents "dlog mused mm-common glib-2.0 capi-media-audio-io audio-session-mgr") SET(pc_dependents "dlog capi-media-audio-io") SET(fw_name "${service}-${submodule}") PROJECT(${fw_name}) @@ -35,7 +35,7 @@ aux_source_directory(src MUSED_SOURCES) ADD_LIBRARY(${fw_name} SHARED ${MUSED_SOURCES}) -TARGET_LINK_LIBRARIES(${fw_name} mmsvc-recorder ${${fw_name}_LDFLAGS}) +TARGET_LINK_LIBRARIES(${fw_name} legacy-recorder ${${fw_name}_LDFLAGS}) SET_TARGET_PROPERTIES(${fw_name} PROPERTIES @@ -56,10 +56,3 @@ SET(PC_NAME ${fw_name}) SET(PC_REQUIRED ${pc_dependents}) SET(PC_LDFLAGS -l${fw_name}) SET(PC_CFLAGS -I\${includedir}/media) - -CONFIGURE_FILE( - ${fw_name}.pc.in - ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc - @ONLY -) -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) diff --git a/muse/include/muse_recorder.h b/muse/include/muse_recorder.h index d1784c2..8b57b1e 100644 --- a/muse/include/muse_recorder.h +++ b/muse/include/muse_recorder.h @@ -21,10 +21,18 @@ extern "C" { #endif +/** + * @file muse_recorder.h + * @brief This file contains the muse recorder API for framework, related structures and enumerations. + */ + #include "tbm_bufmgr.h" #include #include +/** + * @brief Enumeration for the muse recorder apis. + */ typedef enum { MUSE_RECORDER_API_CREATE, //0 MUSE_RECORDER_API_DESTROY, @@ -85,6 +93,9 @@ typedef enum { MUSE_RECORDER_API_MAX //56 } muse_recorder_api_e; +/** + * @brief Enumeration for the muse recorder events. + */ typedef enum { MUSE_RECORDER_EVENT_TYPE_STATE_CHANGE, MUSE_RECORDER_EVENT_TYPE_RECORDING_LIMITED, @@ -99,23 +110,32 @@ typedef enum { MUSE_RECORDER_EVENT_TYPE_NUM }muse_recorder_event_e; +/** + * @brief The structure type for muse camera errors. + */ typedef enum { MUSE_RECORDER_ERROR_INVALID = -1, MUSE_RECORDER_ERROR_NONE = 1, } muse_recorder_error_e; +/** + * @brief The structure type for muse recorder type. + */ typedef enum { MUSE_RECORDER_TYPE_AUDIO = 0, MUSE_RECORDER_TYPE_VIDEO }muse_recorder_type_e; +/** + * @brief The structure type for muse recorder source type. + */ typedef enum { MUSE_RECORDER_SOURCE_TYPE_UNKNOWN, MUSE_RECORDER_SOURCE_TYPE_CAMERA, }muse_recorder_source_type_e; /** - * @brief The structure type for data transport + * @brief The structure type for data transport for the muse recorder. */ typedef struct { int data_size; @@ -125,18 +145,61 @@ typedef struct { tbm_bufmgr bufmgr; } muse_recorder_transport_info_s; +/** + * @brief The structure type for the userdata, registering into the daemon core. + */ typedef struct { tbm_bufmgr bufmgr; } muse_recorder_info_s; +/** + * @brief Definition for the callback event id. + */ #define MUSE_RECORDER_CB_EVENT MUSE_RECORDER_API_MAX + 1 + +/** + * @brief Definition for the max message length. + */ #define MUSE_RECORDER_MSG_MAX_LENGTH 256 -#define MUSE_RECORDER_PARSE_STRING_SIZE 200 +/** + * @brief Definition for the wait time of the ipc callback. + */ +#define CALLBACK_TIME_OUT 3 + +/* + * @brief Makes the tbm buffer object, and set to the muse recorder structure. + * @param[out] transport_info The allocated structure, tbm bo will be set in here. + * @return TRUE on success, otherwise a FALSE value + */ bool muse_recorder_ipc_make_tbm(muse_recorder_transport_info_s *transport_info); + +/** + * @brief Exports the tbm buffer object, another process can import this bo. + * @param[in] transport_info Using transport_info.bo to export. + * @return TBM gem name on success, otherwise a negative error value + */ int muse_recorder_ipc_export_tbm(muse_recorder_transport_info_s transport_info); + +/** + * @brief Initialize the tbm buffer manager, mainly at the client side. + * @param[out] transport_info The allocated structure, tbm bufmgr will be set in here. + * @return TRUE on success, otherwise a FALSE value + */ bool muse_recorder_ipc_init_tbm(muse_recorder_transport_info_s *transport_info); + +/** + * @brief Imports the tbm buffer object. + * @param[out] transport_info Set the transport_info.bo. + * @return TRUE on success, otherwise a FALSE value + */ int muse_recorder_ipc_import_tbm(muse_recorder_transport_info_s *transport_info); + +/** + * @brief Unreference the tbm buffer object. + * @param[in] transport_info Using the transport_info.bo. + * @return TRUE on success, otherwise a FALSE value + */ void muse_recorder_ipc_unref_tbm(muse_recorder_transport_info_s *transport_info); #ifdef __cplusplus diff --git a/muse/include/muse_recorder_msg.h b/muse/include/muse_recorder_msg.h index a159fba..7e87b2d 100644 --- a/muse/include/muse_recorder_msg.h +++ b/muse/include/muse_recorder_msg.h @@ -23,39 +23,130 @@ extern "C" { #include "muse_core_msg_json.h" +/** + * @file muse_recorder_msg.h + * @brief This file contains the muse_camera message APIs, related structures, defines and macros. + */ + +/** + * @brief Definition for the handle parameter. + */ #define PARAM_HANDLE "handle" + +/** + * @brief Definition for the ret parameter. + */ #define PARAM_RET "ret" + +/** + * @brief Definition for the event parameter. + */ #define PARAM_EVENT "event" + +/** + * @brief Definition for the error parameter. + */ #define PARAM_ERROR "error" + +/** + * @brief Definition for the tbm key parameter. + */ #define PARAM_TBM_KEY "t_key" + +/** + * @brief Definition for the display mode parameter. + */ #define PARAM_DISPLAY_MODE "display_mode" + +/** + * @brief Definition for the device type parameter. + */ #define PARAM_DEVICE_TYPE "device_type" -#define PARAM_RECORDER_TYPE "recorder_type" -#define PARAM_CAMERA_HANDLE "camera_handle" -#define CALLBACK_TIME_OUT 3 +/** + * @brief Definition for the recorder type parameter audio/video + */ + #define PARAM_RECORDER_TYPE "recorder_type" +/** + * @brief Definition for the camera handle ipc parameter + */ +#define PARAM_CAMERA_HANDLE "camera_handle" + +/** + * @brief Definition for the INTEGER type. + */ typedef int32_t INT; + +/** + * @brief Definition for the 64 bit INTEGER type. + */ typedef int64_t INT64; + +/** + * @brief Definition for the 64 bit integer pointer type. + */ typedef intptr_t POINTER; + +/** + * @brief Definition for the 64 bit DOUBLE type. + */ typedef double DOUBLE; + +/** + * @brief Definition for the 64 bit STRING type. + */ typedef const char* STRING; +/** + * @brief Query the specific value from the input message via ipc. + * @param[in] param The key to query, the variable name should be matched to the message's one. + * @param[out] buf The string of message buffer. + */ #define muse_recorder_msg_get(param, buf) \ muse_core_msg_json_deserialize(#param, buf, NULL, ¶m, NULL, MUSE_TYPE_ANY) +/** + * @brief Query the specific string type value from the input message via ipc. + * @param[in] param The key to query, the variable name should be matched to the message's one. + * @param[out] buf The string of message buffer. + */ #define muse_recorder_msg_get_string(param, buf) \ muse_core_msg_json_deserialize(#param, buf, NULL, param, NULL, MUSE_TYPE_STRING) +/** + * @brief Query the specific array type value from the input message via ipc. + * @param[in] param The key to query, the variable name should be matched to the message's one. + * @param[out] buf The string of message buffer. + */ #define muse_recorder_msg_get_array(param, buf) \ muse_core_msg_json_deserialize(#param, buf, NULL, param, NULL, MUSE_TYPE_ARRAY) +/** + * @brief Query the specific pointer type value from the input message via ipc. + * @param[in] param The key to query, the variable name should be matched to the message's one. + * @param[out] buf The string of message buffer. + */ #define muse_recorder_msg_get_pointer(param, buf) \ muse_core_msg_json_deserialize(#param, buf, NULL, ¶m, NULL, MUSE_TYPE_POINTER) + +/** + * @brief Query the specific value with error return from the input message via ipc. + * @param[in] param The key to query, the variable name should be matched to the message's one. + * @param[out] buf The string of message buffer. + * @param[out] e The error return from the core api. + */ #define muse_recorder_msg_get_error_e(param, buf, e) \ muse_core_msg_json_deserialize(#param, buf, NULL, ¶m, &e, MUSE_TYPE_ANY) +/** + * @brief Send the message from proxy to module via ipc. + * @param[in] api The enumeration of the corresponding api. + * @param[in] fd The socket fd that connected to the module via ipc. + * @param[in] cb_info The callback information, waiting for the ack from the module. + * @param[out] ret The delivered return value from the module to proxy side. + */ #define muse_recorder_msg_send(api, fd, cb_info, ret) \ do{ \ char *__sndMsg__; \ @@ -73,6 +164,16 @@ typedef const char* STRING; muse_core_msg_json_factory_free(__sndMsg__); \ }while(0) + +/** + * @brief Send the message from proxy to module via ipc, adding 1 more parameter. + * @param[in] api The enumeration of the corresponding api. + * @param[in] fd The socket fd that connected to the module via ipc. + * @param[in] cb_info The callback information, waiting for the ack from the module. + * @param[out] ret The delivered return value from the module to proxy side. + * @param[in] type The data type of the parameter. + * @param[in] param A single parameter to be included in the message. + */ #define muse_recorder_msg_send1(api, fd, cb_info, ret, type, param) \ do{ \ char *__sndMsg__; \ @@ -90,6 +191,17 @@ typedef const char* STRING; muse_core_msg_json_factory_free(__sndMsg__); \ }while(0) +/** + * @brief Send the message from proxy to module via ipc, adding 2 more parameters. + * @param[in] api The enumeration of the corresponding api. + * @param[in] fd The socket fd that connected to the module via ipc. + * @param[in] cb_info The callback information, waiting for the ack from the module. + * @param[out] ret The delivered return value from the module to proxy side. + * @param[in] type1 The data type of the parameter. + * @param[in] param1 The first parameter to be included in the message. + * @param[in] type2 The data type of the parameter. + * @param[in] param2 The 2nd parameter to be included in the message. + */ #define muse_recorder_msg_send2(api, fd, cb_info, ret, type1, param1, type2, param2) \ do{ \ char *__sndMsg__; \ @@ -109,6 +221,17 @@ typedef const char* STRING; muse_core_msg_json_factory_free(__sndMsg__); \ }while(0) + +/** + * @brief Send the message from proxy to module via ipc, adding an array data. + * @param[in] api The enumeration of the corresponding api. + * @param[in] fd The socket fd that connected to the module via ipc. + * @param[in] cb_info The callback information, waiting for the ack from the module. + * @param[out] ret The delivered return value from the module to proxy side. + * @param[in] param The array data parameter to be included in the message. + * @param[in] length The length of the array. + * @param[in] datum_size The size of the array. + */ #define muse_recorder_msg_send_array(api, fd, cb_info, ret, param, length, datum_size) \ do{ \ char *__sndMsg__; \ @@ -130,40 +253,12 @@ typedef const char* STRING; muse_core_msg_json_factory_free(__sndMsg__); \ }while(0) -#define muse_recorder_msg_send1_async(api, fd, type, param) \ - do{ \ - char *__sndMsg__; \ - int __len__; \ - type __value__ = (type)param; \ - __sndMsg__ = muse_core_msg_json_factory_new(api, \ - MUSE_TYPE_##type, #param, __value__, \ - 0); \ - __len__ = muse_core_ipc_send_msg(fd, __sndMsg__); \ - muse_core_msg_json_factory_free(__sndMsg__); \ - if (__len__ <= 0) { \ - LOGE("sending message failed"); \ - return RECORDER_ERROR_INVALID_OPERATION; \ - } \ - }while(0) - -#define muse_recorder_msg_send2_async(api, fd, type1, param1, type2, param2) \ - do{ \ - char *__sndMsg__; \ - int __len__; \ - type1 __value1__ = (type1)param1; \ - type2 __value2__ = (type2)param2; \ - __sndMsg__ = muse_core_msg_json_factory_new(api, \ - MUSE_TYPE_##type1, #param1, __value1__, \ - MUSE_TYPE_##type2, #param2, __value2__, \ - 0); \ - __len__ = muse_core_ipc_send_msg(fd, __sndMsg__); \ - muse_core_msg_json_factory_free(__sndMsg__); \ - if (__len__ <= 0) { \ - LOGE("sending message failed"); \ - return RECORDER_ERROR_INVALID_OPERATION; \ - } \ - }while(0) - +/** + * @brief Returning the ack message from the server to client side. + * @param[in] api The enumeration of the corresponding api. + * @param[out] ret The delivered return value from the module to proxy side. + * @param[in] module The module info for the ipc transportation. + */ #define muse_recorder_msg_return(api, ret, module) \ do{ \ char *__sndMsg__; \ @@ -179,6 +274,14 @@ typedef const char* STRING; muse_core_msg_json_factory_free(__sndMsg__); \ }while(0) +/** + * @brief Returning the ack message from the server to client side. + * @param[in] api The enumeration of the corresponding api. + * @param[out] ret The delivered return value from the module to proxy side. + * @param[in] module The module info for the ipc transportation. + * @param[in] type The data type of the parameter. + * @param[in] param A parameter to be included in the message. + */ #define muse_recorder_msg_return1(api, ret, module, type, param) \ do{ \ char *__sndMsg__; \ @@ -196,6 +299,16 @@ typedef const char* STRING; muse_core_msg_json_factory_free(__sndMsg__); \ }while(0) +/** + * @brief Returning the ack message from the server to client side, adding 2 parameters. + * @param[in] api The enumeration of the corresponding api. + * @param[out] ret The delivered return value from the module to proxy side. + * @param[in] module The module info for the ipc transportation. + * @param[in] type1 The data type of the parameter. + * @param[in] param1 The 1st parameter to be included in the message. + * @param[in] type2 The data type of the parameter. + * @param[in] param2 The 2nd parameter to be included in the message. + */ #define muse_recorder_msg_return2(api, ret, module, type1, param1, type2, param2) \ do{ \ char *__sndMsg__; \ @@ -215,6 +328,18 @@ typedef const char* STRING; muse_core_msg_json_factory_free(__sndMsg__); \ }while(0) +/** + * @brief Returning the ack message from the server to client side, adding 3 parameters. + * @param[in] api The enumeration of the corresponding api. + * @param[out] ret The delivered return value from the module to proxy side. + * @param[in] module The module info for the ipc transportation. + * @param[in] type1 The data type of the parameter. + * @param[in] param1 The 1st parameter to be included in the message. + * @param[in] type2 The data type of the parameter. + * @param[in] param2 The 2nd parameter to be included in the message. + * @param[in] type3 The data type of the parameter. + * @param[in] param3 The 3rd parameter to be included in the message. + */ #define muse_recorder_msg_return3(api, ret, module, type1, param1, type2, param2, type3, param3) \ do{ \ char *__sndMsg__; \ @@ -236,6 +361,15 @@ typedef const char* STRING; muse_core_msg_json_factory_free(__sndMsg__); \ }while(0) +/** + * @brief Returning the ack message from the server to client side, adding array parameter. + * @param[in] api The enumeration of the corresponding api. + * @param[out] ret The delivered return value from the module to proxy side. + * @param[in] module The module info for the ipc transportation. + * @param[in] param The array data parameter to be included in the message. + * @param[in] length The length of the array. + * @param[in] datum_size The size of the array. + */ #define muse_recorder_msg_return_array(api, ret, module, param, length, datum_size) \ do{ \ char *__sndMsg__; \ @@ -257,6 +391,12 @@ typedef const char* STRING; muse_core_msg_json_factory_free(__sndMsg__); \ }while(0) +/** + * @brief Returning the event ack message from the server to client side. + * @param[in] api The enumeration of the corresponding api. + * @param[out] ret The delivered return value from the module to proxy side. + * @param[in] module The module info for the ipc transportation. + */ #define muse_recorder_msg_event(api, event, fd) \ do{ \ char *__sndMsg__; \ @@ -267,6 +407,14 @@ typedef const char* STRING; muse_core_msg_json_factory_free(__sndMsg__); \ }while(0) +/** + * @brief Returning the event ack message from the server to client side, adding a parameter. + * @param[in] api The enumeration of the corresponding api. + * @param[out] ret The delivered return value from the module to proxy side. + * @param[in] module The module info for the ipc transportation. + * @param[in] type The data type of the parameter. + * @param[in] param A parameter to be included in the message. + */ #define muse_recorder_msg_event1(api, event, module, type, param) \ do{ \ char *__sndMsg__; \ @@ -279,6 +427,15 @@ typedef const char* STRING; muse_core_msg_json_factory_free(__sndMsg__); \ }while(0) +/** + * @brief Returning the event ack message from the server to client side, adding 2 parameters. + * @param[in] api The enumeration of the corresponding api. + * @param[out] ret The delivered return value from the module to proxy side. + * @param[in] module The module info for the ipc transportation. + * @param[in] param1 The 1st parameter to be included in the message. + * @param[in] type2 The data type of the parameter. + * @param[in] param2 The 2nd parameter to be included in the message. + */ #define muse_recorder_msg_event2(api, event, module, type1, param1, type2, param2) \ do{ \ char *__sndMsg__; \ @@ -293,6 +450,17 @@ typedef const char* STRING; muse_core_msg_json_factory_free(__sndMsg__); \ }while(0) +/** + * @brief Returning the event ack message from the server to client side, adding 3 parameters. + * @param[in] api The enumeration of the corresponding api. + * @param[out] ret The delivered return value from the module to proxy side. + * @param[in] module The module info for the ipc transportation. + * @param[in] param1 The 1st parameter to be included in the message. + * @param[in] type2 The data type of the parameter. + * @param[in] param2 The 2nd parameter to be included in the message. + * @param[in] type3 The data type of the parameter. + * @param[in] param3 The 3rd parameter to be included in the message. + */ #define muse_recorder_msg_event3(api, event, module, type1, param1, type2, param2, type3, param3) \ do{ \ char *__sndMsg__; \ @@ -309,24 +477,21 @@ typedef const char* STRING; muse_core_msg_json_factory_free(__sndMsg__); \ }while(0) -#define muse_recorder_msg_event4(api, event, module, type1, param1, type2, param2, type3, param3, type4, param4) \ - do{ \ - char *__sndMsg__; \ - type1 __value1__ = (type1)param1; \ - type2 __value2__ = (type2)param2; \ - type3 __value3__ = (type3)param3; \ - type4 __value4__ = (type4)param4; \ - __sndMsg__ = muse_core_msg_json_factory_new(api, \ - MUSE_TYPE_INT, PARAM_EVENT, event, \ - MUSE_TYPE_##type1, #param1, __value1__, \ - MUSE_TYPE_##type2, #param2, __value2__, \ - MUSE_TYPE_##type3, #param3, __value3__, \ - MUSE_TYPE_##type4, #param4, __value4__, \ - 0); \ - muse_core_ipc_send_msg(muse_core_client_get_msg_fd(module), __sndMsg__); \ - muse_core_msg_json_factory_free(__sndMsg__); \ - }while(0) - +/** + * @brief Returning the event ack message from the server to client side, adding 5 parameters. + * @param[in] api The enumeration of the corresponding api. + * @param[out] ret The delivered return value from the module to proxy side. + * @param[in] module The module info for the ipc transportation. + * @param[in] param1 The 1st parameter to be included in the message. + * @param[in] type2 The data type of the parameter. + * @param[in] param2 The 2nd parameter to be included in the message. + * @param[in] type3 The data type of the parameter. + * @param[in] param3 The 3rd parameter to be included in the message. + * @param[in] type4 The data type of the parameter. + * @param[in] param4 The 4th parameter to be included in the message. + * @param[in] type5 The data type of the parameter. + * @param[in] param5 The 5th parameter to be included in the message. + */ #define muse_recorder_msg_event5(api, event, module, type1, param1, type2, param2, type3, param3, type4, param4, type5, param5) \ do{ \ char *__sndMsg__; \ @@ -347,54 +512,6 @@ typedef const char* STRING; muse_core_msg_json_factory_free(__sndMsg__); \ }while(0) -#define muse_recorder_msg_event2_array(api, event, module, type1, param1, type2, param2, arr_param, length, datum_size) \ - do{ \ - char *__sndMsg__; \ - type1 __value1__ = (type1)param1; \ - type2 __value2__ = (type2)param2; \ - int *__arr_value__ = (int *)arr_param; \ - __sndMsg__ = muse_core_msg_json_factory_new(api, \ - MUSE_TYPE_INT, PARAM_EVENT, event, \ - MUSE_TYPE_##type1, #param1, __value1__, \ - MUSE_TYPE_##type2, #param2, __value2__, \ - MUSE_TYPE_INT, #length, length, \ - MUSE_TYPE_ARRAY, #arr_param, \ - datum_size == sizeof(int)? length : \ - length / sizeof(int) + (length % sizeof(int)?1:0), \ - __arr_value__, \ - 0); \ - muse_core_ipc_send_msg(muse_core_client_get_msg_fd(module), __sndMsg__); \ - muse_core_msg_json_factory_free(__sndMsg__); \ - }while(0) - -#define muse_recorder_msg_event6_array(api, event, client, type1, param1, type2, param2, type3, param3, type4, param4, type5, param5, type6, param6, arr_param, length, datum_size) \ - do{ \ - char *__sndMsg__; \ - type1 __value1__ = (type1)param1; \ - type2 __value2__ = (type2)param2; \ - type3 __value3__ = (type3)param3; \ - type4 __value4__ = (type4)param4; \ - type5 __value5__ = (type5)param5; \ - type6 __value6__ = (type6)param6; \ - int *__arr_value__ = (int *)arr_param; \ - __sndMsg__ = muse_core_msg_json_factory_new(api, \ - MUSE_TYPE_INT, PARAM_EVENT, event, \ - MUSE_TYPE_##type1, #param1, __value1__, \ - MUSE_TYPE_##type2, #param2, __value2__, \ - MUSE_TYPE_##type3, #param3, __value3__, \ - MUSE_TYPE_##type4, #param4, __value4__, \ - MUSE_TYPE_##type5, #param5, __value5__, \ - MUSE_TYPE_##type6, #param6, __value6__, \ - MUSE_TYPE_INT, #length, length, \ - MUSE_TYPE_ARRAY, #arr_param, \ - datum_size == sizeof(int)? length : \ - length / sizeof(int) + (length % sizeof(int)?1:0), \ - __arr_value__, \ - 0); \ - muse_core_ipc_send_msg(muse_core_client_get_msg_fd(module), __sndMsg__); \ - muse_core_msg_json_factory_free(__sndMsg__); \ - }while(0) - #ifdef __cplusplus } #endif diff --git a/muse/muse-recorder.pc.in b/muse/muse-recorder.pc.in deleted file mode 100644 index 1508489..0000000 --- a/muse/muse-recorder.pc.in +++ /dev/null @@ -1,15 +0,0 @@ - -# Package Information for pkg-config - -prefix=@PREFIX@ -exec_prefix=/usr -libdir=@LIB_INSTALL_DIR@ -includedir=/usr/include/media - -Name: @PC_NAME@ -Description: @PACKAGE_DESCRIPTION@ -Version: @VERSION@ -Requires: @PC_REQUIRED@ -Libs: -L${libdir} @PC_LDFLAGS@ -Cflags: -I${includedir} - diff --git a/muse/src/muse_recorder_dispatcher.c b/muse/src/muse_recorder_dispatcher.c index b8c0809..5338291 100644 --- a/muse/src/muse_recorder_dispatcher.c +++ b/muse/src/muse_recorder_dispatcher.c @@ -26,7 +26,7 @@ #include "muse_core.h" #include "muse_core_ipc.h" #include "mm_types.h" -#include "mmsvc_recorder.h" +#include "legacy_recorder.h" #include #ifdef LOG_TAG @@ -34,7 +34,7 @@ #endif #define LOG_TAG "MMSVC_RECORDER" -void _mmsvc_recorder_disp_recording_limit_reached_cb(recorder_recording_limit_type_e type, void *user_data) +void _recorder_disp_recording_limit_reached_cb(recorder_recording_limit_type_e type, void *user_data) { muse_module_h module = (muse_module_h)user_data; @@ -47,7 +47,7 @@ void _mmsvc_recorder_disp_recording_limit_reached_cb(recorder_recording_limit_ty return; } -void _mmsvc_recorder_disp_recording_status_cb(unsigned long long elapsed_time, unsigned long long file_size, void *user_data) +void _recorder_disp_recording_status_cb(unsigned long long elapsed_time, unsigned long long file_size, void *user_data) { muse_module_h module = (muse_module_h)user_data; @@ -62,7 +62,7 @@ void _mmsvc_recorder_disp_recording_status_cb(unsigned long long elapsed_time, u return; } -void _mmsvc_recorder_disp_state_changed_cb(recorder_state_e previous , recorder_state_e current , bool by_policy, void *user_data) +void _recorder_disp_state_changed_cb(recorder_state_e previous , recorder_state_e current , bool by_policy, void *user_data) { muse_module_h module = (muse_module_h)user_data; @@ -79,7 +79,7 @@ void _mmsvc_recorder_disp_state_changed_cb(recorder_state_e previous , recorder_ return; } -void _mmsvc_recorder_disp_interrupted_cb(recorder_policy_e policy, recorder_state_e previous, recorder_state_e current, void *user_data) +void _recorder_disp_interrupted_cb(recorder_policy_e policy, recorder_state_e previous, recorder_state_e current, void *user_data) { muse_module_h module = (muse_module_h)user_data; @@ -96,7 +96,7 @@ void _mmsvc_recorder_disp_interrupted_cb(recorder_policy_e policy, recorder_stat return; } -void _mmsvc_recorder_disp_error_cb(recorder_error_e error, recorder_state_e current_state, void *user_data) +void _recorder_disp_error_cb(recorder_error_e error, recorder_state_e current_state, void *user_data) { muse_module_h module = (muse_module_h)user_data; int cb_error = (int)error; @@ -111,7 +111,7 @@ void _mmsvc_recorder_disp_error_cb(recorder_error_e error, recorder_state_e curr return; } -void _mmsvc_recorder_disp_audio_stream_cb(void* stream, int size, audio_sample_type_e format, int channel, unsigned int timestamp, void *user_data) +void _recorder_disp_audio_stream_cb(void* stream, int size, audio_sample_type_e format, int channel, unsigned int timestamp, void *user_data) { muse_module_h module = (muse_module_h)user_data; int cb_size = size; @@ -156,7 +156,7 @@ void _mmsvc_recorder_disp_audio_stream_cb(void* stream, int size, audio_sample_t return; } -void _mmsvc_recorder_disp_foreach_supported_video_resolution_cb(int width, int height, void *user_data) +void _recorder_disp_foreach_supported_video_resolution_cb(int width, int height, void *user_data) { muse_module_h module = (muse_module_h)user_data; LOGD("Enter"); @@ -169,7 +169,7 @@ void _mmsvc_recorder_disp_foreach_supported_video_resolution_cb(int width, int h return; } -void _mmsvc_recorder_disp_foreach_supported_file_format_cb(recorder_file_format_e format, void *user_data) +void _recorder_disp_foreach_supported_file_format_cb(recorder_file_format_e format, void *user_data) { muse_module_h module = (muse_module_h)user_data; int cb_format = (int)format; @@ -182,7 +182,7 @@ void _mmsvc_recorder_disp_foreach_supported_file_format_cb(recorder_file_format_ return; } -void _mmsvc_recorder_disp_foreach_supported_audio_encoder_cb(recorder_audio_codec_e codec, void *user_data) +void _recorder_disp_foreach_supported_audio_encoder_cb(recorder_audio_codec_e codec, void *user_data) { muse_module_h module = (muse_module_h)user_data; int cb_codec = (int)codec; @@ -195,7 +195,7 @@ void _mmsvc_recorder_disp_foreach_supported_audio_encoder_cb(recorder_audio_code return; } -void _mmsvc_recorder_disp_foreach_supported_video_encoder_cb(recorder_video_codec_e codec, void *user_data) +void _recorder_disp_foreach_supported_video_encoder_cb(recorder_video_codec_e codec, void *user_data) { muse_module_h module = (muse_module_h)user_data; int cb_codec = (int)codec; @@ -223,10 +223,10 @@ int recorder_dispatcher_create(muse_module_h module) if (recorder_type == MUSE_RECORDER_TYPE_VIDEO) { muse_recorder_msg_get_pointer(camera_handle, muse_core_client_get_msg(module)); LOGD("video type, camera handle : 0x%x", camera_handle); - ret = mmsvc_recorder_create_videorecorder((camera_h)camera_handle, &recorder); + ret = legacy_recorder_create_videorecorder((camera_h)camera_handle, &recorder); } else if (recorder_type == MUSE_RECORDER_TYPE_AUDIO) { LOGD("audio type"); - ret = mmsvc_recorder_create_audiorecorder(&recorder); + ret = legacy_recorder_create_audiorecorder(&recorder); } if (ret == RECORDER_ERROR_NONE) { @@ -241,7 +241,7 @@ int recorder_dispatcher_create(muse_module_h module) recorder_data->bufmgr = bufmgr; muse_core_client_set_cust_data(module, (void *)recorder_data); } else { - LOGE("TBM bufmgr is NULL => check the mmsvc_core."); + LOGE("TBM bufmgr is NULL => check the legacy_core."); } muse_recorder_msg_return1(api, ret, module, POINTER, handle); } else { @@ -258,7 +258,7 @@ int recorder_dispatcher_destroy(muse_module_h module) muse_recorder_api_e api = MUSE_RECORDER_API_DESTROY; muse_recorder_info_s *recorder_data; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_destroy((recorder_h)handle); + ret = legacy_recorder_destroy((recorder_h)handle); LOGD("handle : 0x%x", handle); muse_recorder_msg_return(api, ret, module); @@ -280,7 +280,7 @@ int recorder_dispatcher_get_state(muse_module_h module) int get_state; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_get_state((recorder_h)handle, &state); + ret = legacy_recorder_get_state((recorder_h)handle, &state); get_state = (int)state; LOGD("handle : 0x%x", handle); muse_recorder_msg_return1(api, ret, module, INT, get_state); @@ -294,7 +294,7 @@ int recorder_dispatcher_prepare(muse_module_h module) intptr_t handle; muse_recorder_api_e api = MUSE_RECORDER_API_PREPARE; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_prepare((recorder_h)handle); + ret = legacy_recorder_prepare((recorder_h)handle); LOGD("handle : 0x%x", handle); muse_recorder_msg_return(api, ret, module); @@ -307,7 +307,7 @@ int recorder_dispatcher_unprepare(muse_module_h module) intptr_t handle; muse_recorder_api_e api = MUSE_RECORDER_API_UNPREPARE; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_unprepare((recorder_h)handle); + ret = legacy_recorder_unprepare((recorder_h)handle); LOGD("handle : 0x%x", handle); muse_recorder_msg_return(api, ret, module); @@ -320,7 +320,7 @@ int recorder_dispatcher_start(muse_module_h module) intptr_t handle; muse_recorder_api_e api = MUSE_RECORDER_API_START; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_start((recorder_h)handle); + ret = legacy_recorder_start((recorder_h)handle); LOGD("handle : 0x%x", handle); muse_recorder_msg_return(api, ret, module); @@ -333,7 +333,7 @@ int recorder_dispatcher_pause(muse_module_h module) intptr_t handle; muse_recorder_api_e api = MUSE_RECORDER_API_PAUSE; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_pause((recorder_h)handle); + ret = legacy_recorder_pause((recorder_h)handle); LOGD("handle : 0x%x", handle); muse_recorder_msg_return(api, ret, module); @@ -346,7 +346,7 @@ int recorder_dispatcher_commit(muse_module_h module) intptr_t handle; muse_recorder_api_e api = MUSE_RECORDER_API_COMMIT; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_commit((recorder_h)handle); + ret = legacy_recorder_commit((recorder_h)handle); LOGD("handle : 0x%x", handle); muse_recorder_msg_return(api, ret, module); @@ -359,7 +359,7 @@ int recorder_dispatcher_cancel(muse_module_h module) intptr_t handle; muse_recorder_api_e api = MUSE_RECORDER_API_CANCEL; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_cancel((recorder_h)handle); + ret = legacy_recorder_cancel((recorder_h)handle); LOGD("handle : 0x%x", handle); muse_recorder_msg_return(api, ret, module); @@ -376,7 +376,7 @@ int recorder_dispatcher_set_video_resolution(muse_module_h module) handle = muse_core_ipc_get_handle(module); muse_recorder_msg_get(width, muse_core_client_get_msg(module)); muse_recorder_msg_get(height, muse_core_client_get_msg(module)); - ret = mmsvc_recorder_set_video_resolution((recorder_h)handle, width, height); + ret = legacy_recorder_set_video_resolution((recorder_h)handle, width, height); LOGD("handle : 0x%x", handle); muse_recorder_msg_return(api, ret, module); @@ -391,7 +391,7 @@ int recorder_dispatcher_get_video_resolution(muse_module_h module) int get_height; muse_recorder_api_e api = MUSE_RECORDER_API_GET_VIDEO_RESOLUTION; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_get_video_resolution((recorder_h)handle, &get_width, &get_height); + ret = legacy_recorder_get_video_resolution((recorder_h)handle, &get_width, &get_height); LOGD("handle : 0x%x", handle); muse_recorder_msg_return2(api, ret, @@ -408,8 +408,8 @@ int recorder_dispatcher_foreach_supported_video_resolution(muse_module_h module) intptr_t handle; muse_recorder_api_e api = MUSE_RECORDER_API_FOREACH_SUPPORTED_VIDEO_RESOLUTION; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_foreach_supported_video_resolution((recorder_h)handle, - (recorder_supported_video_resolution_cb)_mmsvc_recorder_disp_foreach_supported_video_resolution_cb, + ret = legacy_recorder_foreach_supported_video_resolution((recorder_h)handle, + (recorder_supported_video_resolution_cb)_recorder_disp_foreach_supported_video_resolution_cb, (void *)module); LOGD("handle : 0x%x", handle); muse_recorder_msg_return(api, ret, module); @@ -424,7 +424,7 @@ int recorder_dispatcher_get_audio_level(muse_module_h module) double get_level; muse_recorder_api_e api = MUSE_RECORDER_API_GET_AUDIO_LEVEL; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_get_audio_level((recorder_h)handle, &get_level); + ret = legacy_recorder_get_audio_level((recorder_h)handle, &get_level); LOGD("handle : 0x%x", handle); muse_recorder_msg_return1(api, ret, @@ -442,7 +442,7 @@ int recorder_dispatcher_set_filename(muse_module_h module) muse_recorder_api_e api = MUSE_RECORDER_API_SET_FILENAME; handle = muse_core_ipc_get_handle(module); muse_recorder_msg_get_string(filename, muse_core_client_get_msg(module)); - ret = mmsvc_recorder_set_filename((recorder_h)handle, filename); + ret = legacy_recorder_set_filename((recorder_h)handle, filename); LOGD("handle : 0x%x, filename : %s", handle, filename); muse_recorder_msg_return(api, ret, module); @@ -456,7 +456,7 @@ int recorder_dispatcher_get_filename(muse_module_h module) char *get_filename; muse_recorder_api_e api = MUSE_RECORDER_API_GET_FILENAME; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_get_filename((recorder_h)handle, &get_filename); + ret = legacy_recorder_get_filename((recorder_h)handle, &get_filename); LOGD("handle : 0x%x, filename : %s", handle, get_filename); muse_recorder_msg_return1(api, ret, module, STRING, get_filename); @@ -471,7 +471,7 @@ int recorder_dispatcher_set_file_format(muse_module_h module) muse_recorder_api_e api = MUSE_RECORDER_API_SET_FILE_FORMAT; handle = muse_core_ipc_get_handle(module); muse_recorder_msg_get(set_format, muse_core_client_get_msg(module)); - ret = mmsvc_recorder_set_file_format((recorder_h)handle, (recorder_file_format_e)set_format); + ret = legacy_recorder_set_file_format((recorder_h)handle, (recorder_file_format_e)set_format); LOGD("handle : 0x%x, set_format : %d", handle, set_format); muse_recorder_msg_return(api, ret, module); @@ -486,7 +486,7 @@ int recorder_dispatcher_get_file_format(muse_module_h module) int get_format; muse_recorder_api_e api = MUSE_RECORDER_API_GET_FILE_FORMAT; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_get_file_format((recorder_h)handle, &format); + ret = legacy_recorder_get_file_format((recorder_h)handle, &format); get_format = (int)format; LOGD("handle : 0x%x, get_format : %d", handle, get_format); muse_recorder_msg_return1(api, ret, module, INT, get_format); @@ -500,8 +500,8 @@ int recorder_dispatcher_set_state_changed_cb(muse_module_h module) intptr_t handle; muse_recorder_api_e api = MUSE_RECORDER_API_SET_STATE_CHANGED_CB; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_set_state_changed_cb((recorder_h)handle, - (recorder_state_changed_cb)_mmsvc_recorder_disp_state_changed_cb, + ret = legacy_recorder_set_state_changed_cb((recorder_h)handle, + (recorder_state_changed_cb)_recorder_disp_state_changed_cb, (void *)module); LOGD("handle : 0x%x", handle); muse_recorder_msg_return(api, ret, module); @@ -515,7 +515,7 @@ int recorder_dispatcher_unset_state_changed_cb(muse_module_h module) intptr_t handle; muse_recorder_api_e api = MUSE_RECORDER_API_UNSET_STATE_CHANGED_CB; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_unset_state_changed_cb((recorder_h)handle); + ret = legacy_recorder_unset_state_changed_cb((recorder_h)handle); LOGD("handle : 0x%x", handle); muse_recorder_msg_return(api, ret, module); @@ -528,8 +528,8 @@ int recorder_dispatcher_set_interrupted_cb(muse_module_h module) intptr_t handle; muse_recorder_api_e api = MUSE_RECORDER_API_SET_INTERRUPTED_CB; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_set_interrupted_cb((recorder_h)handle, - (recorder_interrupted_cb)_mmsvc_recorder_disp_interrupted_cb, + ret = legacy_recorder_set_interrupted_cb((recorder_h)handle, + (recorder_interrupted_cb)_recorder_disp_interrupted_cb, (void *)module); LOGD("handle : 0x%x", handle); muse_recorder_msg_return(api, ret, module); @@ -543,7 +543,7 @@ int recorder_dispatcher_unset_interrupted_cb(muse_module_h module) intptr_t handle; muse_recorder_api_e api = MUSE_RECORDER_API_UNSET_INTERRUPTED_CB; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_unset_interrupted_cb((recorder_h)handle); + ret = legacy_recorder_unset_interrupted_cb((recorder_h)handle); LOGD("handle : 0x%x", handle); muse_recorder_msg_return(api, ret, module); @@ -556,8 +556,8 @@ int recorder_dispatcher_set_audio_stream_cb(muse_module_h module) intptr_t handle; muse_recorder_api_e api = MUSE_RECORDER_API_SET_AUDIO_STREAM_CB; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_set_audio_stream_cb((recorder_h)handle, - (recorder_audio_stream_cb)_mmsvc_recorder_disp_audio_stream_cb, + ret = legacy_recorder_set_audio_stream_cb((recorder_h)handle, + (recorder_audio_stream_cb)_recorder_disp_audio_stream_cb, (void *)module); LOGD("handle : 0x%x", handle); muse_recorder_msg_return(api, ret, module); @@ -571,7 +571,7 @@ int recorder_dispatcher_unset_audio_stream_cb(muse_module_h module) intptr_t handle; muse_recorder_api_e api = MUSE_RECORDER_API_UNSET_AUDIO_STREAM_CB; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_unset_audio_stream_cb((recorder_h)handle); + ret = legacy_recorder_unset_audio_stream_cb((recorder_h)handle); LOGD("handle : 0x%x", handle); muse_recorder_msg_return(api, ret, module); @@ -584,8 +584,8 @@ int recorder_dispatcher_set_error_cb(muse_module_h module) intptr_t handle; muse_recorder_api_e api = MUSE_RECORDER_API_SET_ERROR_CB; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_set_error_cb((recorder_h)handle, - (recorder_error_cb)_mmsvc_recorder_disp_error_cb, + ret = legacy_recorder_set_error_cb((recorder_h)handle, + (recorder_error_cb)_recorder_disp_error_cb, (void *)module); LOGD("handle : 0x%x", handle); muse_recorder_msg_return(api, ret, module); @@ -599,7 +599,7 @@ int recorder_dispatcher_unset_error_cb(muse_module_h module) intptr_t handle; muse_recorder_api_e api = MUSE_RECORDER_API_UNSET_ERROR_CB; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_unset_error_cb((recorder_h)handle); + ret = legacy_recorder_unset_error_cb((recorder_h)handle); LOGD("handle : 0x%x", handle); muse_recorder_msg_return(api, ret, module); @@ -612,8 +612,8 @@ int recorder_dispatcher_set_recording_status_cb(muse_module_h module) intptr_t handle; muse_recorder_api_e api = MUSE_RECORDER_API_SET_RECORDING_STATUS_CB; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_set_recording_status_cb((recorder_h)handle, - (recorder_recording_status_cb)_mmsvc_recorder_disp_recording_status_cb, + ret = legacy_recorder_set_recording_status_cb((recorder_h)handle, + (recorder_recording_status_cb)_recorder_disp_recording_status_cb, (void *)module); LOGD("handle : 0x%x", handle); muse_recorder_msg_return(api, ret, module); @@ -627,7 +627,7 @@ int recorder_dispatcher_unset_recording_status_cb(muse_module_h module) intptr_t handle; muse_recorder_api_e api = MUSE_RECORDER_API_UNSET_RECORDING_STATUS_CB; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_unset_recording_status_cb((recorder_h)handle); + ret = legacy_recorder_unset_recording_status_cb((recorder_h)handle); LOGD("handle : 0x%x", handle); muse_recorder_msg_return(api, ret, module); @@ -640,8 +640,8 @@ int recorder_dispatcher_set_recording_limit_reached_cb(muse_module_h module) intptr_t handle; muse_recorder_api_e api = MUSE_RECORDER_API_SET_RECORDING_LIMIT_REACHED_CB; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_set_recording_limit_reached_cb((recorder_h)handle, - (recorder_recording_limit_reached_cb)_mmsvc_recorder_disp_recording_limit_reached_cb, + ret = legacy_recorder_set_recording_limit_reached_cb((recorder_h)handle, + (recorder_recording_limit_reached_cb)_recorder_disp_recording_limit_reached_cb, (void *)module); LOGD("handle : 0x%x", handle); muse_recorder_msg_return(api, ret, module); @@ -655,7 +655,7 @@ int recorder_dispatcher_unset_recording_limit_reached_cb(muse_module_h module) intptr_t handle; muse_recorder_api_e api = MUSE_RECORDER_API_UNSET_RECORDING_LIMIT_REACHED_CB; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_unset_recording_limit_reached_cb((recorder_h)handle); + ret = legacy_recorder_unset_recording_limit_reached_cb((recorder_h)handle); LOGD("handle : 0x%x", handle); muse_recorder_msg_return(api, ret, module); @@ -668,8 +668,8 @@ int recorder_dispatcher_foreach_supported_file_format(muse_module_h module) intptr_t handle; muse_recorder_api_e api = MUSE_RECORDER_API_FOREACH_SUPPORTED_FILE_FORMAT; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_foreach_supported_file_format((recorder_h)handle, - (recorder_supported_file_format_cb)_mmsvc_recorder_disp_foreach_supported_file_format_cb, + ret = legacy_recorder_foreach_supported_file_format((recorder_h)handle, + (recorder_supported_file_format_cb)_recorder_disp_foreach_supported_file_format_cb, (void *)module); LOGD("handle : 0x%x", handle); muse_recorder_msg_return(api, ret, module); @@ -685,7 +685,7 @@ int recorder_dispatcher_attr_set_size_limit(muse_module_h module) muse_recorder_api_e api = MUSE_RECORDER_API_ATTR_SET_SIZE_LIMIT; handle = muse_core_ipc_get_handle(module); muse_recorder_msg_get(kbyte, muse_core_client_get_msg(module)); - ret = mmsvc_recorder_attr_set_size_limit((recorder_h)handle, kbyte); + ret = legacy_recorder_attr_set_size_limit((recorder_h)handle, kbyte); LOGD("handle : 0x%x", handle); muse_recorder_msg_return(api, ret, module); @@ -700,7 +700,7 @@ int recorder_dispatcher_attr_set_time_limit(muse_module_h module) muse_recorder_api_e api = MUSE_RECORDER_API_ATTR_SET_TIME_LIMIT; handle = muse_core_ipc_get_handle(module); muse_recorder_msg_get(second, muse_core_client_get_msg(module)); - ret = mmsvc_recorder_attr_set_time_limit((recorder_h)handle, second); + ret = legacy_recorder_attr_set_time_limit((recorder_h)handle, second); LOGD("handle : 0x%x", handle); muse_recorder_msg_return(api, ret, module); @@ -715,7 +715,7 @@ int recorder_dispatcher_attr_set_audio_device(muse_module_h module) muse_recorder_api_e api = MUSE_RECORDER_API_ATTR_SET_AUDIO_DEVICE; handle = muse_core_ipc_get_handle(module); muse_recorder_msg_get(set_device, muse_core_client_get_msg(module)); - ret = mmsvc_recorder_attr_set_audio_device((recorder_h)handle, (recorder_audio_device_e)set_device); + ret = legacy_recorder_attr_set_audio_device((recorder_h)handle, (recorder_audio_device_e)set_device); LOGD("handle : 0x%x", handle); muse_recorder_msg_return(api, ret, module); @@ -730,7 +730,7 @@ int recorder_dispatcher_set_audio_encoder(muse_module_h module) muse_recorder_api_e api = MUSE_RECORDER_API_SET_AUDIO_ENCODER; handle = muse_core_ipc_get_handle(module); muse_recorder_msg_get(set_codec, muse_core_client_get_msg(module)); - ret = mmsvc_recorder_set_audio_encoder((recorder_h)handle, (recorder_audio_codec_e)set_codec); + ret = legacy_recorder_set_audio_encoder((recorder_h)handle, (recorder_audio_codec_e)set_codec); LOGD("handle : 0x%x", handle); muse_recorder_msg_return(api, ret, module); @@ -745,7 +745,7 @@ int recorder_dispatcher_get_audio_encoder(muse_module_h module) int get_codec; muse_recorder_api_e api = MUSE_RECORDER_API_GET_AUDIO_ENCODER; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_get_audio_encoder((recorder_h)handle, &codec); + ret = legacy_recorder_get_audio_encoder((recorder_h)handle, &codec); get_codec = (int)codec; LOGD("handle : 0x%x", handle); muse_recorder_msg_return1(api, ret, module, INT, get_codec); @@ -761,7 +761,7 @@ int recorder_dispatcher_set_video_encoder(muse_module_h module) muse_recorder_api_e api = MUSE_RECORDER_API_SET_VIDEO_ENCODER; handle = muse_core_ipc_get_handle(module); muse_recorder_msg_get(set_codec, muse_core_client_get_msg(module)); - ret = mmsvc_recorder_set_video_encoder((recorder_h)handle, (recorder_video_codec_e)set_codec); + ret = legacy_recorder_set_video_encoder((recorder_h)handle, (recorder_video_codec_e)set_codec); LOGD("handle : 0x%x", handle); muse_recorder_msg_return(api, ret, module); @@ -776,7 +776,7 @@ int recorder_dispatcher_get_video_encoder(muse_module_h module) int get_codec; muse_recorder_api_e api = MUSE_RECORDER_API_GET_VIDEO_ENCODER; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_get_video_encoder((recorder_h)handle, &codec); + ret = legacy_recorder_get_video_encoder((recorder_h)handle, &codec); get_codec = (int)codec; LOGD("handle : 0x%x", handle); muse_recorder_msg_return1(api, ret, module, INT, get_codec); @@ -792,7 +792,7 @@ int recorder_dispatcher_attr_set_audio_samplerate(muse_module_h module) muse_recorder_api_e api = MUSE_RECORDER_API_ATTR_SET_AUDIO_SAMPLERATE; handle = muse_core_ipc_get_handle(module); muse_recorder_msg_get(samplerate, muse_core_client_get_msg(module)); - ret = mmsvc_recorder_attr_set_audio_samplerate((recorder_h)handle, samplerate); + ret = legacy_recorder_attr_set_audio_samplerate((recorder_h)handle, samplerate); LOGD("handle : 0x%x samplerate : %d", handle, samplerate); muse_recorder_msg_return(api, ret, module); @@ -807,7 +807,7 @@ int recorder_dispatcher_attr_set_audio_encoder_bitrate(muse_module_h module) muse_recorder_api_e api = MUSE_RECORDER_API_ATTR_SET_AUDIO_ENCODER_BITRATE; handle = muse_core_ipc_get_handle(module); muse_recorder_msg_get(bitrate, muse_core_client_get_msg(module)); - ret = mmsvc_recorder_attr_set_audio_encoder_bitrate((recorder_h)handle, bitrate); + ret = legacy_recorder_attr_set_audio_encoder_bitrate((recorder_h)handle, bitrate); LOGD("handle : 0x%x", handle); muse_recorder_msg_return(api, ret, module); @@ -822,7 +822,7 @@ int recorder_dispatcher_attr_set_video_encoder_bitrate(muse_module_h module) muse_recorder_api_e api = MUSE_RECORDER_API_ATTR_SET_VIDEO_ENCODER_BITRATE; handle = muse_core_ipc_get_handle(module); muse_recorder_msg_get(bitrate, muse_core_client_get_msg(module)); - ret = mmsvc_recorder_attr_set_video_encoder_bitrate((recorder_h)handle, bitrate); + ret = legacy_recorder_attr_set_video_encoder_bitrate((recorder_h)handle, bitrate); LOGD("handle : 0x%x", handle); muse_recorder_msg_return(api, ret, module); @@ -836,7 +836,7 @@ int recorder_dispatcher_attr_get_size_limit(muse_module_h module) int get_kbyte; muse_recorder_api_e api = MUSE_RECORDER_API_ATTR_GET_SIZE_LIMIT; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_attr_get_size_limit((recorder_h)handle, &get_kbyte); + ret = legacy_recorder_attr_get_size_limit((recorder_h)handle, &get_kbyte); LOGD("handle : 0x%x", handle); muse_recorder_msg_return1(api, ret, module, INT, get_kbyte); @@ -850,7 +850,7 @@ int recorder_dispatcher_attr_get_time_limit(muse_module_h module) int get_second; muse_recorder_api_e api = MUSE_RECORDER_API_ATTR_GET_TIME_LIMIT; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_attr_get_time_limit((recorder_h)handle, &get_second); + ret = legacy_recorder_attr_get_time_limit((recorder_h)handle, &get_second); LOGD("handle : 0x%x", handle); muse_recorder_msg_return1(api, ret, module, INT, get_second); @@ -865,7 +865,7 @@ int recorder_dispatcher_attr_get_audio_device(muse_module_h module) int get_device; muse_recorder_api_e api = MUSE_RECORDER_API_ATTR_GET_AUDIO_DEVICE; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_attr_get_audio_device((recorder_h)handle, &device); + ret = legacy_recorder_attr_get_audio_device((recorder_h)handle, &device); get_device = (int)device; LOGD("handle : 0x%x", handle); muse_recorder_msg_return1(api, ret, module, INT, get_device); @@ -880,7 +880,7 @@ int recorder_dispatcher_attr_get_audio_samplerate(muse_module_h module) int get_samplerate; muse_recorder_api_e api = MUSE_RECORDER_API_ATTR_GET_AUDIO_SAMPLERATE; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_attr_get_audio_samplerate((recorder_h)handle, &get_samplerate); + ret = legacy_recorder_attr_get_audio_samplerate((recorder_h)handle, &get_samplerate); LOGD("handle : 0x%x, get_samplerate : %d", handle, get_samplerate); muse_recorder_msg_return1(api, ret, module, INT, get_samplerate); @@ -894,7 +894,7 @@ int recorder_dispatcher_attr_get_audio_encoder_bitrate(muse_module_h module) int get_bitrate; muse_recorder_api_e api = MUSE_RECORDER_API_ATTR_GET_AUDIO_ENCODER_BITRATE; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_attr_get_audio_encoder_bitrate((recorder_h)handle, &get_bitrate); + ret = legacy_recorder_attr_get_audio_encoder_bitrate((recorder_h)handle, &get_bitrate); LOGD("handle : 0x%x", handle); muse_recorder_msg_return1(api, ret, module, INT, get_bitrate); @@ -908,7 +908,7 @@ int recorder_dispatcher_attr_get_video_encoder_bitrate(muse_module_h module) int get_bitrate; muse_recorder_api_e api = MUSE_RECORDER_API_ATTR_GET_VIDEO_ENCODER_BITRATE; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_attr_get_video_encoder_bitrate((recorder_h)handle, &get_bitrate); + ret = legacy_recorder_attr_get_video_encoder_bitrate((recorder_h)handle, &get_bitrate); LOGD("handle : 0x%x", handle); muse_recorder_msg_return1(api, ret, module, INT, get_bitrate); @@ -921,8 +921,8 @@ int recorder_dispatcher_foreach_supported_audio_encoder(muse_module_h module) intptr_t handle; muse_recorder_api_e api = MUSE_RECORDER_API_FOREACH_SUPPORTED_AUDIO_ENCODER; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_foreach_supported_audio_encoder((recorder_h)handle, - (recorder_supported_audio_encoder_cb)_mmsvc_recorder_disp_foreach_supported_audio_encoder_cb, + ret = legacy_recorder_foreach_supported_audio_encoder((recorder_h)handle, + (recorder_supported_audio_encoder_cb)_recorder_disp_foreach_supported_audio_encoder_cb, (void *)module); LOGD("handle : 0x%x", handle); muse_recorder_msg_return(api, ret, module); @@ -936,8 +936,8 @@ int recorder_dispatcher_foreach_supported_video_encoder(muse_module_h module) intptr_t handle; muse_recorder_api_e api = MUSE_RECORDER_API_FOREACH_SUPPORTED_VIDEO_ENCODER; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_foreach_supported_video_encoder((recorder_h)handle, - (recorder_supported_video_encoder_cb)_mmsvc_recorder_disp_foreach_supported_video_encoder_cb, + ret = legacy_recorder_foreach_supported_video_encoder((recorder_h)handle, + (recorder_supported_video_encoder_cb)_recorder_disp_foreach_supported_video_encoder_cb, (void *)module); LOGD("handle : 0x%x", handle); muse_recorder_msg_return(api, ret, module); @@ -953,7 +953,7 @@ int recorder_dispatcher_attr_set_mute(muse_module_h module) muse_recorder_api_e api = MUSE_RECORDER_API_ATTR_SET_MUTE; handle = muse_core_ipc_get_handle(module); muse_recorder_msg_get(set_enable, muse_core_client_get_msg(module)); - ret = mmsvc_recorder_attr_set_mute((recorder_h)handle, (bool)set_enable); + ret = legacy_recorder_attr_set_mute((recorder_h)handle, (bool)set_enable); LOGD("handle : 0x%x", handle); muse_recorder_msg_return(api, ret, module); @@ -966,7 +966,7 @@ int recorder_dispatcher_attr_is_muted(muse_module_h module) intptr_t handle; muse_recorder_api_e api = MUSE_RECORDER_API_ATTR_IS_MUTED; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_attr_is_muted((recorder_h)handle); + ret = legacy_recorder_attr_is_muted((recorder_h)handle); LOGD("handle : 0x%x", handle); muse_recorder_msg_return(api, ret, module); @@ -981,7 +981,7 @@ int recorder_dispatcher_attr_set_recording_motion_rate(muse_module_h module) muse_recorder_api_e api = MUSE_RECORDER_API_ATTR_SET_RECORDING_MOTION_RATE; handle = muse_core_ipc_get_handle(module); muse_recorder_msg_get(rate, muse_core_client_get_msg(module)); - ret = mmsvc_recorder_attr_set_recording_motion_rate((recorder_h)handle, rate); + ret = legacy_recorder_attr_set_recording_motion_rate((recorder_h)handle, rate); LOGD("handle : 0x%x", handle); muse_recorder_msg_return(api, ret, module); @@ -995,7 +995,7 @@ int recorder_dispatcher_attr_get_recording_motion_rate(muse_module_h module) double get_rate; muse_recorder_api_e api = MUSE_RECORDER_API_ATTR_GET_RECORDING_MOTION_RATE; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_attr_get_recording_motion_rate((recorder_h)handle, &get_rate); + ret = legacy_recorder_attr_get_recording_motion_rate((recorder_h)handle, &get_rate); LOGD("handle : 0x%x", handle); muse_recorder_msg_return1(api, ret, module, DOUBLE, get_rate); @@ -1011,7 +1011,7 @@ int recorder_dispatcher_attr_set_audio_channel(muse_module_h module) handle = muse_core_ipc_get_handle(module); muse_recorder_msg_get(channel_count, muse_core_client_get_msg(module)); LOGD("channel_count : %d", channel_count); - ret = mmsvc_recorder_attr_set_audio_channel((recorder_h)handle, channel_count); + ret = legacy_recorder_attr_set_audio_channel((recorder_h)handle, channel_count); LOGD("handle : 0x%x", handle); muse_recorder_msg_return(api, ret, module); @@ -1025,7 +1025,7 @@ int recorder_dispatcher_attr_get_audio_channel(muse_module_h module) int get_channel_count; muse_recorder_api_e api = MUSE_RECORDER_API_ATTR_GET_AUDIO_CHANNEL; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_attr_get_audio_channel((recorder_h)handle, &get_channel_count); + ret = legacy_recorder_attr_get_audio_channel((recorder_h)handle, &get_channel_count); LOGD("handle : 0x%x", handle); muse_recorder_msg_return1(api, ret, module, INT, get_channel_count); @@ -1040,7 +1040,7 @@ int recorder_dispatcher_attr_set_orientation_tag(muse_module_h module) muse_recorder_api_e api = MUSE_RECORDER_API_ATTR_SET_ORIENTATION_TAG; handle = muse_core_ipc_get_handle(module); muse_recorder_msg_get(set_orientation, muse_core_client_get_msg(module)); - ret = mmsvc_recorder_attr_set_orientation_tag((recorder_h)handle, (recorder_rotation_e)set_orientation); + ret = legacy_recorder_attr_set_orientation_tag((recorder_h)handle, (recorder_rotation_e)set_orientation); LOGD("handle : 0x%x", handle); muse_recorder_msg_return(api, ret, module); @@ -1055,7 +1055,7 @@ int recorder_dispatcher_attr_get_orientation_tag(muse_module_h module) int get_orientation; muse_recorder_api_e api = MUSE_RECORDER_API_ATTR_GET_ORIENTATION_TAG; handle = muse_core_ipc_get_handle(module); - ret = mmsvc_recorder_attr_get_orientation_tag((recorder_h)handle, &orientation); + ret = legacy_recorder_attr_get_orientation_tag((recorder_h)handle, &orientation); get_orientation = (int)orientation; LOGD("handle : 0x%x", handle); muse_recorder_msg_return1(api, ret, module, INT, get_orientation); diff --git a/packaging/mmsvc-recorder.spec b/packaging/mmsvc-recorder.spec old mode 100755 new mode 100644 index 21af0b5..c990731 --- a/packaging/mmsvc-recorder.spec +++ b/packaging/mmsvc-recorder.spec @@ -4,7 +4,7 @@ Version: 0.2.2 Release: 0 Group: Multimedia/API License: Apache-2.0 -Source0: %{service}-%{name}-%{version}.tar.gz +Source0: %{name}-%{version}.tar.gz BuildRequires: cmake BuildRequires: pkgconfig(dlog) BuildRequires: pkgconfig(mm-camcorder) @@ -59,14 +59,12 @@ cp LICENSE.APLv2 %{buildroot}/usr/share/license/%{name} %files %manifest mmsvc-recorder.manifest -%{_libdir}/libmmsvc-recorder.so.* +%{_libdir}/liblegacy-recorder.so* %{_libdir}/libmuse-recorder.so* %{_datadir}/license/%{name} -%{_includedir}/media/mmsvc_recorder.h +%{_includedir}/media/legacy_recorder.h %files devel %{_includedir}/media/muse_recorder.h %{_includedir}/media/muse_recorder_msg.h %{_libdir}/pkgconfig/*.pc -%{_libdir}/libmmsvc-recorder.so -%{_libdir}/libmuse-recorder.so -- 2.7.4