public:
MediaeditorClipTest() {}
+ void SetUp() override {
+ LOGD("Enter");
+
+ int ret = MEDIAEDITOR_ERROR_NONE;
+ unsigned int layer_priority = 0;
+
+ ret = mediaeditor_create(&_editor);
+ ASSERT_EQ(ret, MEDIAEDITOR_ERROR_NONE);
+
+ ret = mediaeditor_add_layer(GetHandle(), &layer_id, &layer_priority);
+ ASSERT_EQ(ret, MEDIAEDITOR_ERROR_NONE);
+
+ ret = mediaeditor_add_clip(GetHandle(), GetMp4Path(0).c_str(), layer_id, 0, duration, 0, &clip_id);
+ ASSERT_EQ(ret, MEDIAEDITOR_ERROR_NONE);
+
+ LOGD("Leave");
+ }
+
+ void TearDown() override {
+ LOGD("Enter");
+
+ if (_editor) {
+ int ret = mediaeditor_destroy(_editor);
+ ASSERT_EQ(ret, MEDIAEDITOR_ERROR_NONE);
+ }
+
+ LOGD("Leave");
+ }
+
static void RenderCompletedCb(void *user_data)
{
LOGD("Render completed");
g_main_loop_unref(mainloop);
mainloop = NULL;
}
-};
-TEST_F(MediaeditorClipTest, DISABLED_clip_create)
-{
- int ret = MEDIAEDITOR_ERROR_NONE;
- unsigned int layer_id = 0;
- unsigned int layer_priority = 0;
+public:
unsigned int clip_id = 0;
- unsigned int start = 0;
- unsigned int duration = 100;
- unsigned int in_point = 0;
-
- ret = mediaeditor_add_layer(GetHandle(), &layer_id, &layer_priority);
- ASSERT_EQ(ret, MEDIAEDITOR_ERROR_NONE);
-
- ret = mediaeditor_add_clip(GetHandle(), GetMp4Path(0).c_str(), layer_id, start, duration, in_point, &clip_id);
- ASSERT_EQ(ret, MEDIAEDITOR_ERROR_NONE);
-}
-
-TEST_F(MediaeditorClipTest, DISABLED_clip_delete)
-{
- int ret = MEDIAEDITOR_ERROR_NONE;
unsigned int layer_id = 0;
- unsigned int layer_priority = 0;
- unsigned int clip_id = 0;
- unsigned int start = 0;
- unsigned int duration = 100;
- unsigned int in_point = 0;
-
- ret = mediaeditor_add_layer(GetHandle(), &layer_id, &layer_priority);
- ASSERT_EQ(ret, MEDIAEDITOR_ERROR_NONE);
+ const unsigned int duration = 100;
+};
- ret = mediaeditor_add_clip(GetHandle(), GetMp4Path(0).c_str(), layer_id, start, duration, in_point, &clip_id);
+TEST_F(MediaeditorClipTest, DISABLED_clip_add_move_remove)
+{
+ int ret = mediaeditor_move_clip_layer(GetHandle(), clip_id, 0);
ASSERT_EQ(ret, MEDIAEDITOR_ERROR_NONE);
ret = mediaeditor_remove_clip(GetHandle(), clip_id);
TEST_F(MediaeditorClipTest, DISABLED_clip_split)
{
- int ret = MEDIAEDITOR_ERROR_NONE;
- unsigned int layer_id = 0;
- unsigned int layer_priority = 0;
- unsigned int clip_id = 0;
unsigned int new_clip_id = 0;
unsigned int start = 0;
- unsigned int duration = 100;
- unsigned int in_point = 0;
- ret = mediaeditor_add_layer(GetHandle(), &layer_id, &layer_priority);
- ASSERT_EQ(ret, MEDIAEDITOR_ERROR_NONE);
-
- ret = mediaeditor_add_clip(GetHandle(), GetMp4Path(0).c_str(), layer_id, start, duration, in_point, &clip_id);
- ASSERT_EQ(ret, MEDIAEDITOR_ERROR_NONE);
-
- ret = mediaeditor_split_clip(GetHandle(), clip_id, (start + duration) / 2, &new_clip_id);
+ int ret = mediaeditor_split_clip(GetHandle(), clip_id, (start + duration) / 2, &new_clip_id);
ASSERT_EQ(ret, MEDIAEDITOR_ERROR_NONE);
}
TEST_F(MediaeditorClipTest, DISABLED_clip_group_ungroup)
{
int ret = MEDIAEDITOR_ERROR_NONE;
- unsigned int layer_id = 0;
- unsigned int layer_priority = 0;
unsigned int src_ids[5] = { 0 };
g_autofree unsigned int *dst_ids = NULL;
unsigned int group_id = 0;
unsigned int ungroup_size = 0;
- unsigned int start = 0;
- unsigned int duration = 100;
-
- ret = mediaeditor_add_layer(GetHandle(), &layer_id, &layer_priority);
- ASSERT_EQ(ret, MEDIAEDITOR_ERROR_NONE);
+ unsigned int start = 100;
for (int i = 0; i < 5; i++) {
ret = mediaeditor_add_clip(GetHandle(), GetMp4Path(0).c_str(), layer_id, start, duration, i * 100, &src_ids[i]);
}
}
-TEST_F(MediaeditorClipTest, DISABLED_clip_move)
-{
- int ret = MEDIAEDITOR_ERROR_NONE;
- unsigned int layer_id = 0;
- unsigned int layer_priority = 0;
- unsigned int clip_id = 0;
- unsigned int start = 0;
- unsigned int duration = 100;
- unsigned int in_point = 0;
-
- ret = mediaeditor_add_layer(GetHandle(), &layer_id, &layer_priority);
- ASSERT_EQ(ret, MEDIAEDITOR_ERROR_NONE);
-
- ret = mediaeditor_add_clip(GetHandle(), GetMp4Path(0).c_str(), layer_id, start, duration, in_point, &clip_id);
- ASSERT_EQ(ret, MEDIAEDITOR_ERROR_NONE);
- LOGD("clip id : %d", clip_id);
-
- ret = mediaeditor_move_clip_layer(GetHandle(), clip_id, 0);
- ASSERT_EQ(ret, MEDIAEDITOR_ERROR_NONE);
-}
-
TEST_F(MediaeditorClipTest, DISABLED_clip_set_duration)
{
int ret = MEDIAEDITOR_ERROR_NONE;
- unsigned int layer_id = 0;
- unsigned int layer_priority = 0;
- unsigned int clip_id = 0;
- unsigned int start = 0;
- unsigned int duration = 100;
- unsigned int in_point = 0;
- unsigned int set_duration = 200;
unsigned int get_duration = 0;
- ret = mediaeditor_add_layer(GetHandle(), &layer_id, &layer_priority);
- ASSERT_EQ(ret, MEDIAEDITOR_ERROR_NONE);
-
- ret = mediaeditor_add_clip(GetHandle(), GetMp4Path(0).c_str(), layer_id, start, duration, in_point, &clip_id);
- ASSERT_EQ(ret, MEDIAEDITOR_ERROR_NONE);
LOGD("original duration : %d", duration);
- ret = mediaeditor_set_clip_duration(GetHandle(), clip_id, set_duration);
+ ret = mediaeditor_set_clip_duration(GetHandle(), clip_id, 200);
ASSERT_EQ(ret, MEDIAEDITOR_ERROR_NONE);
- LOGD("set_duration : %d", set_duration);
+ LOGD("set_duration : %d", 200);
ret = mediaeditor_get_clip_duration(GetHandle(), clip_id, &get_duration);
- ASSERT_EQ(set_duration, get_duration);
+ ASSERT_EQ(200, get_duration);
LOGD("get_duration : %d", get_duration);
}
TEST_F(MediaeditorClipTest, DISABLED_clip_position)
{
int ret = MEDIAEDITOR_ERROR_NONE;
- unsigned int layer_id = 0;
- unsigned int layer_priority = 0;
- unsigned int clip_id = 0;
- unsigned int start = 0;
- unsigned int duration = 1000;
- unsigned int in_point = 0;
unsigned int pos_x = 0;
unsigned int pos_y = 0;
- ret = mediaeditor_add_layer(GetHandle(), &layer_id, &layer_priority);
- ASSERT_EQ(ret, MEDIAEDITOR_ERROR_NONE);
-
- ret = mediaeditor_add_clip(GetHandle(), GetJpgPath().c_str(), layer_id, start, duration, in_point, &clip_id);
+ ret = mediaeditor_add_clip(GetHandle(), GetJpgPath().c_str(), layer_id, duration, duration, 0, &clip_id);
ASSERT_EQ(ret, MEDIAEDITOR_ERROR_NONE);
ret = mediaeditor_get_clip_position(GetHandle(), clip_id, &pos_x, &pos_y);
TEST_F(MediaeditorClipTest, DISABLED_audio_clip_set_get_resolution)
{
int ret = MEDIAEDITOR_ERROR_NONE;
- unsigned int layer_id = 0;
- unsigned int layer_priority = 0;
- unsigned int clip_id = 0;
- unsigned int start = 0;
- unsigned int duration = 100;
- unsigned int in_point = 0;
unsigned int width = 0;
unsigned int height = 0;
- ret = mediaeditor_add_layer(GetHandle(), &layer_id, &layer_priority);
- ASSERT_EQ(ret, MEDIAEDITOR_ERROR_NONE);
-
- ret = mediaeditor_add_clip(GetHandle(), GetMp3Path().c_str(), layer_id, start, duration, in_point, &clip_id);
+ ret = mediaeditor_add_clip(GetHandle(), GetMp3Path().c_str(), layer_id, duration, duration, 0, &clip_id);
ASSERT_EQ(ret, MEDIAEDITOR_ERROR_NONE);
ret = mediaeditor_get_clip_resolution(GetHandle(), clip_id, &width, &height);
TEST_F(MediaeditorClipTest, DISABLED_volume)
{
int ret = MEDIAEDITOR_ERROR_NONE;
- unsigned int layer_id = 0;
- unsigned int layer_priority = 0;
- unsigned int clip_id = 0;
- unsigned int start = 0;
- unsigned int duration = 100;
- unsigned int in_point = 0;
double volume = 0.0;
- ret = mediaeditor_add_layer(GetHandle(), &layer_id, &layer_priority);
- ASSERT_EQ(ret, MEDIAEDITOR_ERROR_NONE);
-
- ret = mediaeditor_add_clip(GetHandle(), GetMp4Path(0).c_str(), layer_id, start, duration, in_point, &clip_id);
- ASSERT_EQ(ret, MEDIAEDITOR_ERROR_NONE);
-
ret = mediaeditor_get_clip_volume(GetHandle(), clip_id, &volume);
ASSERT_EQ(ret, MEDIAEDITOR_ERROR_NONE);
ASSERT_EQ(volume, 1.0);
TEST_F(MediaeditorClipTest, DISABLED_transition)
{
- int ret = MEDIAEDITOR_ERROR_NONE;
- unsigned int layer_id = 0;
- unsigned int layer_priority = 0;
- unsigned int clip_id = 0;
- unsigned int start = 0;
- unsigned int duration = 100;
- unsigned int in_point = 0;
-
- ret = mediaeditor_add_layer(GetHandle(), &layer_id, &layer_priority);
- ASSERT_EQ(ret, MEDIAEDITOR_ERROR_NONE);
+ // A clip is already added int SetUp
- ret = mediaeditor_add_clip(GetHandle(), GetMp4Path(0).c_str(), layer_id, start, duration, in_point, &clip_id);
+ int ret = mediaeditor_add_clip(GetHandle(), GetMp4Path(1).c_str(), layer_id, duration / 2, duration, 0, &clip_id);
ASSERT_EQ(ret, MEDIAEDITOR_ERROR_NONE);
- ret = mediaeditor_add_clip(GetHandle(), GetMp4Path(1).c_str(), layer_id, start + (duration / 2), duration, in_point, &clip_id);
- ASSERT_EQ(ret, MEDIAEDITOR_ERROR_NONE);
-
- ret = mediaeditor_add_transition(GetHandle(), MEDIAEDITOR_TRANSITION_TYPE_CROSSFADE, layer_id, start + (duration / 2), duration / 2);
+ ret = mediaeditor_add_transition(GetHandle(), MEDIAEDITOR_TRANSITION_TYPE_CROSSFADE, layer_id, duration / 2, duration / 2);
ASSERT_EQ(ret, MEDIAEDITOR_ERROR_NONE);
}
TEST_F(MediaeditorClipTest, DISABLED_transition_n)
{
int ret = MEDIAEDITOR_ERROR_NONE;
- unsigned int layer_id = 0;
- unsigned int layer_priority = 0;
- unsigned int clip_id = 0;
- unsigned int start = 0;
- unsigned int duration = 1000;
- unsigned int in_point = 0;
-
- ret = mediaeditor_add_layer(GetHandle(), &layer_id, &layer_priority);
- ASSERT_EQ(ret, MEDIAEDITOR_ERROR_NONE);
ret = mediaeditor_set_error_cb(GetHandle(), ErrorCb, GetHandle());
ASSERT_EQ(ret, MEDIAEDITOR_ERROR_NONE);
- /* Test for no overlapped area */
- ret = mediaeditor_add_clip(GetHandle(), GetMp4Path(0).c_str(), layer_id, start, duration, in_point, &clip_id);
- ASSERT_EQ(ret, MEDIAEDITOR_ERROR_NONE);
-
- ret = mediaeditor_add_clip(GetHandle(), GetMp4Path(1).c_str(), layer_id, start + (duration * 2), duration, in_point, &clip_id);
+ // Test for no overlapped area between clips. Error callback should be occurred.
+ // A clip1 is already added int SetUp.
+ // 0 100 150 200 300
+ // |<---Clip1--->| | |
+ // | | |<---Clip2--->|
+ // | |<Trans> | |
+ ret = mediaeditor_add_clip(GetHandle(), GetMp4Path(1).c_str(), layer_id, duration * 2, duration, 0, &clip_id);
ASSERT_EQ(ret, MEDIAEDITOR_ERROR_NONE);
- ret = mediaeditor_add_transition(GetHandle(), MEDIAEDITOR_TRANSITION_TYPE_CROSSFADE, layer_id, start + duration, duration / 2);
+ ret = mediaeditor_add_transition(GetHandle(), MEDIAEDITOR_TRANSITION_TYPE_CROSSFADE, layer_id, duration, duration / 2);
ASSERT_EQ(ret, MEDIAEDITOR_ERROR_NONE);
ret = mediaeditor_start_render(GetHandle(), GetOutputPath().c_str(), RenderCompletedCb, GetHandle());
TEST_F(MediaeditorClipTest, DISABLED_cancel_render)
{
int ret = MEDIAEDITOR_ERROR_NONE;
- unsigned int layer_id = 0;
- unsigned int layer_priority = 0;
- unsigned int clip_id = 0;
- unsigned int start = 0;
- unsigned int duration = 10000;
- unsigned int in_point = 0;
-
- ret = mediaeditor_add_layer(GetHandle(), &layer_id, &layer_priority);
- ASSERT_EQ(ret, MEDIAEDITOR_ERROR_NONE);
ret = mediaeditor_set_state_changed_cb(GetHandle(), StateChangedCb, GetHandle());
ASSERT_EQ(ret, MEDIAEDITOR_ERROR_NONE);
- /* Test for no overlapped area */
- ret = mediaeditor_add_clip(GetHandle(), GetMp4Path(0).c_str(), layer_id, start, duration, in_point, &clip_id);
- ASSERT_EQ(ret, MEDIAEDITOR_ERROR_NONE);
-
ret = mediaeditor_start_render(GetHandle(), GetOutputPath().c_str(), RenderCompletedCb, GetHandle());
ASSERT_EQ(ret, MEDIAEDITOR_ERROR_NONE);
RET_VAL_IF(editor == NULL, MEDIAEDITOR_ERROR_INVALID_PARAMETER, "editor is NULL");
- LOG_DEBUG("Enter editor[%p]", editor);
-
_editor = g_new0(mediaeditor_s, 1);
g_mutex_init(&_editor->mutex);
locker = g_mutex_locker_new(&_editor->mutex);
- LOG_DEBUG("Enter editor[%p]", _editor);
-
_remove_remained_event_sources(_editor);
ret = _gst_pipeline_set_state(_editor, GST_STATE_NULL);
SAFE_G_FREE(_editor);
- LOG_DEBUG("Leave");
-
return MEDIAEDITOR_ERROR_NONE;
}
int mediaeditor_set_display(mediaeditor_h editor, mediaeditor_display_type_e type, mediaeditor_display_h display)
{
- int ret = MEDIAEDITOR_ERROR_NONE;
g_autoptr(GMutexLocker) locker = NULL;
mediaeditor_s *_editor = (mediaeditor_s *)editor;
locker = g_mutex_locker_new(&_editor->mutex);
- LOG_DEBUG("Enter editor[%p], type[%d], display[%p]", editor, type, display);
+ LOG_DEBUG("editor[%p], type[%d], display[%p]", editor, type, display);
RET_VAL_IF(_editor->state != MEDIAEDITOR_STATE_IDLE, MEDIAEDITOR_ERROR_INVALID_STATE,
"the state should be IDLE");
- ret = _mediaeditor_set_display(_editor, type, display);
-
- LOG_DEBUG("Leave editor[%p]", editor);
-
- return ret;
+ return _mediaeditor_set_display(_editor, type, display);
}
int mediaeditor_get_state(mediaeditor_h editor, mediaeditor_state_e *state)
RET_VAL_IF(_editor == NULL, MEDIAEDITOR_ERROR_INVALID_PARAMETER, "editor is NULL");
RET_VAL_IF(state == NULL, MEDIAEDITOR_ERROR_INVALID_PARAMETER, "state is NULL");
- LOG_DEBUG("Enter editor[%p]", editor);
-
locker = g_mutex_locker_new(&_editor->mutex);
*state = _editor->state;
- LOG_DEBUG("Leave editor[%p], state[%d]", editor, *state);
+ LOG_DEBUG("editor[%p], state[%d]", editor, *state);
return MEDIAEDITOR_ERROR_NONE;
}
locker = g_mutex_locker_new(&_editor->mutex);
- LOG_DEBUG("Enter editor[%p]", editor);
-
RET_VAL_IF(_editor->state != MEDIAEDITOR_STATE_IDLE, MEDIAEDITOR_ERROR_INVALID_STATE,
"the state should be IDLE");
_editor->render_completed_cb.callback = callback;
_editor->render_completed_cb.user_data = user_data;
- ret = _mediaeditor_start_render(_editor, path);
-
- LOG_DEBUG("Leave editor[%p]", editor);
-
- return ret;
+ return _mediaeditor_start_render(_editor, path);
}
int mediaeditor_cancel_render(mediaeditor_h editor)
{
- int ret = MEDIAEDITOR_ERROR_NONE;
g_autoptr(GMutexLocker) locker = NULL;
mediaeditor_s *_editor = (mediaeditor_s *)editor;
locker = g_mutex_locker_new(&_editor->mutex);
- LOG_DEBUG("Enter editor[%p]", editor);
-
RET_VAL_IF(_editor->state != MEDIAEDITOR_STATE_RENDERING, MEDIAEDITOR_ERROR_INVALID_STATE,
"the state should be RENDERING");
- ret = _mediaeditor_cancel_render(_editor);
-
- LOG_DEBUG("Leave editor[%p]", editor);
-
- return ret;
+ return _mediaeditor_cancel_render(_editor);
}
int mediaeditor_start_preview(mediaeditor_h editor)
{
- int ret = MEDIAEDITOR_ERROR_NONE;
g_autoptr(GMutexLocker) locker = NULL;
mediaeditor_s *_editor = (mediaeditor_s *)editor;
locker = g_mutex_locker_new(&_editor->mutex);
- LOG_DEBUG("Enter editor[%p]", editor);
-
RET_VAL_IF(_editor->state != MEDIAEDITOR_STATE_IDLE, MEDIAEDITOR_ERROR_INVALID_STATE,
"the state should be IDLE");
- ret = _mediaeditor_start_preview(_editor);
-
- LOG_DEBUG("Leave editor[%p]", editor);
-
- return ret;
+ return _mediaeditor_start_preview(_editor);
}
int mediaeditor_stop_preview(mediaeditor_h editor)
{
- int ret = MEDIAEDITOR_ERROR_NONE;
g_autoptr(GMutexLocker) locker = NULL;
mediaeditor_s *_editor = (mediaeditor_s *)editor;
locker = g_mutex_locker_new(&_editor->mutex);
- LOG_DEBUG("Enter editor[%p], state [%d], pend_state[%d]", editor, _editor->state, _editor->pend_state);
-
RET_VAL_IF(_editor->state != MEDIAEDITOR_STATE_PREVIEW, MEDIAEDITOR_ERROR_INVALID_STATE,
"the state should be PREVIEW");
- ret = _mediaeditor_stop_preview(_editor);
-
- LOG_DEBUG("Leave editor[%p]", editor);
-
- return ret;
+ return _mediaeditor_stop_preview(_editor);
}
int mediaeditor_add_layer(mediaeditor_h editor, unsigned int *layer_id, unsigned int *layer_priority)
{
- int ret = MEDIAEDITOR_ERROR_NONE;
g_autoptr(GMutexLocker) locker = NULL;
mediaeditor_s *_editor = (mediaeditor_s *)editor;
locker = g_mutex_locker_new(&_editor->mutex);
- LOG_DEBUG("Enter editor[%p]", editor);
-
RET_VAL_IF(_editor->state != MEDIAEDITOR_STATE_IDLE, MEDIAEDITOR_ERROR_INVALID_STATE,
"the state should be IDLE");
- ret = _mediaeditor_add_layer(_editor, layer_id, layer_priority);
-
- LOG_DEBUG("Leave editor[%p]", editor);
-
- return ret;
+ return _mediaeditor_add_layer(_editor, layer_id, layer_priority);
}
int mediaeditor_remove_layer(mediaeditor_h editor, unsigned int layer_id)
{
- int ret = MEDIAEDITOR_ERROR_NONE;
g_autoptr(GMutexLocker) locker = NULL;
mediaeditor_s *_editor = (mediaeditor_s *)editor;
locker = g_mutex_locker_new(&_editor->mutex);
- LOG_DEBUG("Enter editor[%p]", editor);
-
RET_VAL_IF(_editor->state != MEDIAEDITOR_STATE_IDLE, MEDIAEDITOR_ERROR_INVALID_STATE,
"the state should be IDLE");
- ret = _mediaeditor_remove_layer(_editor, layer_id);
-
- LOG_DEBUG("Leave editor[%p]", editor);
-
- return ret;
+ return _mediaeditor_remove_layer(_editor, layer_id);
}
int mediaeditor_move_layer(mediaeditor_h editor, unsigned int layer_id, unsigned int layer_priority)
{
- int ret = MEDIAEDITOR_ERROR_NONE;
g_autoptr(GMutexLocker) locker = NULL;
mediaeditor_s *_editor = (mediaeditor_s *)editor;
locker = g_mutex_locker_new(&_editor->mutex);
- LOG_DEBUG("Enter editor[%p]", editor);
-
RET_VAL_IF(_editor->state != MEDIAEDITOR_STATE_IDLE, MEDIAEDITOR_ERROR_INVALID_STATE,
"the state should be IDLE");
- ret = _mediaeditor_move_layer(_editor, layer_id, layer_priority);
-
- LOG_DEBUG("Leave editor[%p]", editor);
-
- return ret;
+ return _mediaeditor_move_layer(_editor, layer_id, layer_priority);
}
int mediaeditor_activate_layer(mediaeditor_h editor, unsigned int layer_id)
{
- int ret = MEDIAEDITOR_ERROR_NONE;
g_autoptr(GMutexLocker) locker = NULL;
mediaeditor_s *_editor = (mediaeditor_s *)editor;
locker = g_mutex_locker_new(&_editor->mutex);
- LOG_DEBUG("Enter editor[%p]", editor);
-
RET_VAL_IF(_editor->state != MEDIAEDITOR_STATE_IDLE, MEDIAEDITOR_ERROR_INVALID_STATE,
"the state should be IDLE");
- ret = _mediaeditor_activate_layer(_editor, layer_id);
-
- LOG_DEBUG("Leave editor[%p]", editor);
-
- return ret;
+ return _mediaeditor_set_layer_activation(_editor, layer_id, true);
}
int mediaeditor_deactivate_layer(mediaeditor_h editor, unsigned int layer_id)
{
- int ret = MEDIAEDITOR_ERROR_NONE;
g_autoptr(GMutexLocker) locker = NULL;
mediaeditor_s *_editor = (mediaeditor_s *)editor;
locker = g_mutex_locker_new(&_editor->mutex);
- LOG_DEBUG("Enter editor[%p]", editor);
-
RET_VAL_IF(_editor->state != MEDIAEDITOR_STATE_IDLE, MEDIAEDITOR_ERROR_INVALID_STATE,
"the state should be IDLE");
- ret = _mediaeditor_deactivate_layer(_editor, layer_id);
-
- LOG_DEBUG("Leave editor[%p]", editor);
-
- return ret;
+ return _mediaeditor_set_layer_activation(_editor, layer_id, false);
}
int mediaeditor_get_layer_priority(mediaeditor_h editor, unsigned int layer_id, unsigned int *layer_priority)
locker = g_mutex_locker_new(&_editor->mutex);
- LOG_DEBUG("Enter editor[%p]", editor);
-
ret = _mediaeditor_get_layer_priority(_editor, layer_id, layer_priority);
- LOG_DEBUG("Leave editor[%p], layer_id[%d], priority[%d]", editor, layer_id, *layer_priority);
+ LOG_DEBUG("editor[%p], layer_id[%d], priority[%d]", editor, layer_id, *layer_priority);
return ret;
}
locker = g_mutex_locker_new(&_editor->mutex);
- LOG_DEBUG("Enter editor[%p]", editor);
-
ret = _mediaeditor_get_layer_lowest_priority(_editor, layer_priority);
- LOG_DEBUG("Leave editor[%p], priority[%d]", editor, *layer_priority);
+ LOG_DEBUG("editor[%p], priority[%d]", editor, *layer_priority);
return ret;
}
locker = g_mutex_locker_new(&_editor->mutex);
- LOG_DEBUG("Enter editor[%p]", editor);
-
ret = _mediaeditor_get_layer_id(_editor, layer_priority, layer_id);
- LOG_DEBUG("Leave editor[%p], priority[%d], layer_id[%d]", editor, layer_priority, *layer_id);
+ LOG_DEBUG("editor[%p], priority[%d], layer_id[%d]", editor, layer_priority, *layer_id);
return ret;
}
locker = g_mutex_locker_new(&_editor->mutex);
- LOG_DEBUG("Enter editor[%p]", editor);
-
RET_VAL_IF(_editor->state != MEDIAEDITOR_STATE_IDLE, MEDIAEDITOR_ERROR_INVALID_STATE,
"the state should be IDLE");
- ret = _mediaeditor_add_clip(_editor, path, layer_id, start, duration, in_point, clip_id);
-
- LOG_DEBUG("Leave editor[%p]", editor);
-
- return ret;
+ return _mediaeditor_add_clip(_editor, path, layer_id, start, duration, in_point, clip_id);
}
int mediaeditor_remove_clip(mediaeditor_h editor, unsigned int clip_id)
{
- int ret = MEDIAEDITOR_ERROR_NONE;
g_autoptr(GMutexLocker) locker = NULL;
mediaeditor_s *_editor = (mediaeditor_s *)editor;
locker = g_mutex_locker_new(&_editor->mutex);
- LOG_DEBUG("Enter editor[%p]", editor);
-
RET_VAL_IF(_editor->state != MEDIAEDITOR_STATE_IDLE, MEDIAEDITOR_ERROR_INVALID_STATE,
"the state should be IDLE");
- ret = _mediaeditor_remove_clip(_editor, clip_id);
-
- LOG_DEBUG("Leave editor[%p]", editor);
-
- return ret;
+ return _mediaeditor_remove_clip(_editor, clip_id);
}
int mediaeditor_split_clip(mediaeditor_h editor, unsigned int src_clip_id, unsigned int position,
unsigned int *new_clip_id)
{
- int ret = MEDIAEDITOR_ERROR_NONE;
g_autoptr(GMutexLocker) locker = NULL;
mediaeditor_s *_editor = (mediaeditor_s *)editor;
locker = g_mutex_locker_new(&_editor->mutex);
- LOG_DEBUG("Enter editor[%p]", editor);
-
RET_VAL_IF(_editor->state != MEDIAEDITOR_STATE_IDLE, MEDIAEDITOR_ERROR_INVALID_STATE,
"the state should be IDLE");
- ret = _mediaeditor_split_clip(_editor, src_clip_id, position, new_clip_id);
-
- LOG_DEBUG("Leave editor[%p]", editor);
-
- return ret;
+ return _mediaeditor_split_clip(_editor, src_clip_id, position, new_clip_id);
}
int mediaeditor_group_clip(mediaeditor_h editor, unsigned int *clip_ids, unsigned int size, unsigned int *group_id)
{
- int ret = MEDIAEDITOR_ERROR_NONE;
g_autoptr(GMutexLocker) locker = NULL;
mediaeditor_s *_editor = (mediaeditor_s *)editor;
locker = g_mutex_locker_new(&_editor->mutex);
- LOG_DEBUG("Enter editor[%p]", editor);
-
RET_VAL_IF(_editor->state != MEDIAEDITOR_STATE_IDLE, MEDIAEDITOR_ERROR_INVALID_STATE,
"the state should be IDLE");
- ret = _mediaeditor_group_clip(_editor, clip_ids, size, group_id);
-
- LOG_DEBUG("Leave editor[%p]", editor);
-
- return ret;
+ return _mediaeditor_group_clip(_editor, clip_ids, size, group_id);
}
int mediaeditor_ungroup_clip(mediaeditor_h editor, unsigned int group_id, unsigned int **clip_ids, unsigned int *size)
{
- int ret = MEDIAEDITOR_ERROR_NONE;
g_autoptr(GMutexLocker) locker = NULL;
mediaeditor_s *_editor = (mediaeditor_s *)editor;
locker = g_mutex_locker_new(&_editor->mutex);
- LOG_DEBUG("Enter editor[%p]", editor);
-
RET_VAL_IF(_editor->state != MEDIAEDITOR_STATE_IDLE, MEDIAEDITOR_ERROR_INVALID_STATE,
"the state should be IDLE");
- ret = _mediaeditor_ungroup_clip(_editor, group_id, clip_ids, size);
-
- LOG_DEBUG("Leave editor[%p]", editor);
-
- return ret;
+ return _mediaeditor_ungroup_clip(_editor, group_id, clip_ids, size);
}
int mediaeditor_move_clip_layer(mediaeditor_h editor, unsigned int clip_id, unsigned int layer_priority)
{
- int ret = MEDIAEDITOR_ERROR_NONE;
g_autoptr(GMutexLocker) locker = NULL;
mediaeditor_s *_editor = (mediaeditor_s *)editor;
locker = g_mutex_locker_new(&_editor->mutex);
- LOG_DEBUG("Enter editor[%p]", editor);
-
RET_VAL_IF(_editor->state != MEDIAEDITOR_STATE_IDLE, MEDIAEDITOR_ERROR_INVALID_STATE,
"the state should be IDLE");
- ret = _mediaeditor_move_clip_layer(_editor, clip_id, layer_priority);
-
- LOG_DEBUG("Leave editor[%p]", editor);
-
- return ret;
+ return _mediaeditor_move_clip_layer(_editor, clip_id, layer_priority);
}
int mediaeditor_get_clip_start(mediaeditor_h editor, unsigned int clip_id, unsigned int *start)
RET_VAL_IF(_editor == NULL, MEDIAEDITOR_ERROR_INVALID_PARAMETER, "editor is NULL");
RET_VAL_IF(start == NULL, MEDIAEDITOR_ERROR_INVALID_PARAMETER, "start is NULL");
- LOG_DEBUG("Enter editor[%p]", editor);
-
locker = g_mutex_locker_new(&_editor->mutex);
ret = _mediaeditor_get_clip_start(_editor, clip_id, start);
- g_mutex_unlock(&_editor->mutex);
-
- LOG_DEBUG("Leave editor[%p], clip_id[%d], start[%d]", editor, clip_id, *start);
+ LOG_DEBUG("editor[%p], clip_id[%d], start[%d]", editor, clip_id, *start);
return ret;
}
int mediaeditor_set_clip_start(mediaeditor_h editor, unsigned int clip_id, unsigned int start)
{
- int ret = MEDIAEDITOR_ERROR_NONE;
g_autoptr(GMutexLocker) locker = NULL;
mediaeditor_s *_editor = (mediaeditor_s *)editor;
locker = g_mutex_locker_new(&_editor->mutex);
- LOG_DEBUG("Enter editor[%p], clip_id[%d], start[%d]", editor, clip_id, start);
+ LOG_DEBUG("editor[%p], clip_id[%d], start[%d]", editor, clip_id, start);
RET_VAL_IF(_editor->state != MEDIAEDITOR_STATE_IDLE, MEDIAEDITOR_ERROR_INVALID_STATE,
"the state should be IDLE");
- ret = _mediaeditor_set_clip_start(_editor, clip_id, start);
-
- LOG_DEBUG("Leave editor[%p]", editor);
-
- return ret;
+ return _mediaeditor_set_clip_start(_editor, clip_id, start);
}
int mediaeditor_get_clip_duration(mediaeditor_h editor, unsigned int clip_id, unsigned int *duration)
RET_VAL_IF(_editor == NULL, MEDIAEDITOR_ERROR_INVALID_PARAMETER, "editor is NULL");
RET_VAL_IF(duration == NULL, MEDIAEDITOR_ERROR_INVALID_PARAMETER, "duration is NULL");
- LOG_DEBUG("Enter editor[%p]", editor);
-
locker = g_mutex_locker_new(&_editor->mutex);
ret = _mediaeditor_get_clip_duration(_editor, clip_id, duration);
- LOG_DEBUG("Leave editor[%p], clip_id[%d], duration[%d]", editor, clip_id, *duration);
+ LOG_DEBUG("editor[%p], clip_id[%d], duration[%d]", editor, clip_id, *duration);
return ret;
}
int mediaeditor_set_clip_duration(mediaeditor_h editor, unsigned int clip_id, unsigned int duration)
{
- int ret = MEDIAEDITOR_ERROR_NONE;
g_autoptr(GMutexLocker) locker = NULL;
mediaeditor_s *_editor = (mediaeditor_s *)editor;
locker = g_mutex_locker_new(&_editor->mutex);
- LOG_DEBUG("Enter editor[%p], clip_id[%d], duration[%d]", editor, clip_id, duration);
+ LOG_DEBUG("editor[%p], clip_id[%d], duration[%d]", editor, clip_id, duration);
RET_VAL_IF(_editor->state != MEDIAEDITOR_STATE_IDLE, MEDIAEDITOR_ERROR_INVALID_STATE,
"the state should be IDLE");
- ret = _mediaeditor_set_clip_duration(_editor, clip_id, duration);
-
- LOG_DEBUG("Leave editor[%p]", editor);
-
- return ret;
+ return _mediaeditor_set_clip_duration(_editor, clip_id, duration);
}
int mediaeditor_get_clip_in_point(mediaeditor_h editor, unsigned int clip_id, unsigned int *in_point)
RET_VAL_IF(_editor == NULL, MEDIAEDITOR_ERROR_INVALID_PARAMETER, "editor is NULL");
RET_VAL_IF(in_point == NULL, MEDIAEDITOR_ERROR_INVALID_PARAMETER, "in_point is NULL");
- LOG_DEBUG("Enter editor[%p]", editor);
-
locker = g_mutex_locker_new(&_editor->mutex);
ret = _mediaeditor_get_clip_in_point(_editor, clip_id, in_point);
- LOG_DEBUG("Leave editor[%p], clip_id[%d], in_point[%d]", editor, clip_id, *in_point);
+ LOG_DEBUG("editor[%p], clip_id[%d], in_point[%d]", editor, clip_id, *in_point);
return ret;
}
int mediaeditor_set_clip_in_point(mediaeditor_h editor, unsigned int clip_id, unsigned int in_point)
{
- int ret = MEDIAEDITOR_ERROR_NONE;
g_autoptr(GMutexLocker) locker = NULL;
mediaeditor_s *_editor = (mediaeditor_s *)editor;
locker = g_mutex_locker_new(&_editor->mutex);
- LOG_DEBUG("Enter editor[%p], clip_id[%d], in_point[%d]", editor, clip_id, in_point);
+ LOG_DEBUG("editor[%p], clip_id[%d], in_point[%d]", editor, clip_id, in_point);
RET_VAL_IF(_editor->state != MEDIAEDITOR_STATE_IDLE, MEDIAEDITOR_ERROR_INVALID_STATE,
"the state should be IDLE");
- ret = _mediaeditor_set_clip_in_point(_editor, clip_id, in_point);
-
- LOG_DEBUG("Leave editor[%p]", editor);
-
- return ret;
+ return _mediaeditor_set_clip_in_point(_editor, clip_id, in_point);
}
int mediaeditor_get_clip_resolution(mediaeditor_h editor, unsigned int clip_id, unsigned int *width, unsigned int *height)
RET_VAL_IF(width == NULL, MEDIAEDITOR_ERROR_INVALID_PARAMETER, "width is NULL");
RET_VAL_IF(height == NULL, MEDIAEDITOR_ERROR_INVALID_PARAMETER, "height is NULL");
- LOG_DEBUG("Enter editor[%p]", editor);
-
locker = g_mutex_locker_new(&_editor->mutex);
ret = _mediaeditor_get_clip_resolution(_editor, clip_id, width, height);
- LOG_DEBUG("Leave editor[%p], clip_id[%d], width[%d], height[%d]", editor, clip_id, *width, *height);
+ LOG_DEBUG("editor[%p], clip_id[%d], width[%d], height[%d]", editor, clip_id, *width, *height);
return ret;
}
int mediaeditor_set_clip_resolution(mediaeditor_h editor, unsigned int clip_id, unsigned int width, unsigned int height)
{
- int ret = MEDIAEDITOR_ERROR_NONE;
g_autoptr(GMutexLocker) locker = NULL;
mediaeditor_s *_editor = (mediaeditor_s *)editor;
locker = g_mutex_locker_new(&_editor->mutex);
- LOG_DEBUG("Enter editor[%p], clip_id[%d], width[%d], height[%d]", editor, clip_id, width, height);
+ LOG_DEBUG("editor[%p], clip_id[%d], width[%d], height[%d]", editor, clip_id, width, height);
RET_VAL_IF(_editor->state != MEDIAEDITOR_STATE_IDLE, MEDIAEDITOR_ERROR_INVALID_STATE,
"the state should be IDLE");
- ret = _mediaeditor_set_clip_resolution(_editor, clip_id, width, height);
-
- LOG_DEBUG("Leave editor[%p]", editor);
-
- return ret;
+ return _mediaeditor_set_clip_resolution(_editor, clip_id, width, height);
}
int mediaeditor_get_clip_position(mediaeditor_h editor, unsigned int clip_id, unsigned int *pos_x, unsigned int *pos_y)
RET_VAL_IF(pos_x == NULL, MEDIAEDITOR_ERROR_INVALID_PARAMETER, "pos_x is NULL");
RET_VAL_IF(pos_y == NULL, MEDIAEDITOR_ERROR_INVALID_PARAMETER, "pos_y is NULL");
- LOG_DEBUG("Enter editor[%p]", editor);
-
locker = g_mutex_locker_new(&_editor->mutex);
ret = _mediaeditor_get_clip_position(_editor, clip_id, pos_x, pos_y);
- LOG_DEBUG("Leave editor[%p], clip_id[%d], pos_x[%d], pos_x[%d]", editor, clip_id, *pos_x, *pos_y);
+ LOG_DEBUG("editor[%p], clip_id[%d], pos_x[%d], pos_x[%d]", editor, clip_id, *pos_x, *pos_y);
return ret;
}
int mediaeditor_set_clip_position(mediaeditor_h editor, unsigned int clip_id, unsigned int pos_x, unsigned int pos_y)
{
- int ret = MEDIAEDITOR_ERROR_NONE;
g_autoptr(GMutexLocker) locker = NULL;
mediaeditor_s *_editor = (mediaeditor_s *)editor;
locker = g_mutex_locker_new(&_editor->mutex);
- LOG_DEBUG("Enter editor[%p], clip_id[%d], pos_x[%d], pos_y[%d]", editor, clip_id, pos_x, pos_y);
+ LOG_DEBUG("editor[%p], clip_id[%d], pos_x[%d], pos_y[%d]", editor, clip_id, pos_x, pos_y);
RET_VAL_IF(_editor->state != MEDIAEDITOR_STATE_IDLE, MEDIAEDITOR_ERROR_INVALID_STATE,
"the state should be IDLE");
- ret = _mediaeditor_set_clip_position(_editor, clip_id, pos_x, pos_y);
-
- LOG_DEBUG("Leave editor[%p]", editor);
-
- return ret;
+ return _mediaeditor_set_clip_position(_editor, clip_id, pos_x, pos_y);
}
int mediaeditor_get_clip_volume(mediaeditor_h editor, unsigned int clip_id, double *volume)
RET_VAL_IF(_editor == NULL, MEDIAEDITOR_ERROR_INVALID_PARAMETER, "editor is NULL");
RET_VAL_IF(volume == NULL, MEDIAEDITOR_ERROR_INVALID_PARAMETER, "volume is NULL");
- LOG_DEBUG("Enter editor[%p]", editor);
-
locker = g_mutex_locker_new(&_editor->mutex);
ret = _mediaeditor_get_clip_volume(_editor, clip_id, volume);
- LOG_DEBUG("Leave editor[%p], clip_id[%d], volumd[%f]", editor, clip_id, *volume);
+ LOG_DEBUG("editor[%p], clip_id[%d], volumd[%f]", editor, clip_id, *volume);
return ret;
}
int mediaeditor_set_clip_volume(mediaeditor_h editor, unsigned int clip_id, double volume)
{
- int ret = MEDIAEDITOR_ERROR_NONE;
g_autoptr(GMutexLocker) locker = NULL;
mediaeditor_s *_editor = (mediaeditor_s *)editor;
locker = g_mutex_locker_new(&_editor->mutex);
- LOG_DEBUG("Enter editor[%p], clip_id[%d], volume[%f]", editor, clip_id, volume);
+ LOG_DEBUG("editor[%p], clip_id[%d], volume[%f]", editor, clip_id, volume);
RET_VAL_IF(_editor->state != MEDIAEDITOR_STATE_IDLE, MEDIAEDITOR_ERROR_INVALID_STATE,
"the state should be IDLE");
- ret = _mediaeditor_set_clip_volume(_editor, clip_id, volume);
-
- LOG_DEBUG("Leave editor[%p]", editor);
-
- return ret;
+ return _mediaeditor_set_clip_volume(_editor, clip_id, volume);
}
int mediaeditor_add_transition(mediaeditor_h editor, mediaeditor_transition_type_e type, unsigned int layer_id,
unsigned int start, unsigned int duration)
{
- int ret = MEDIAEDITOR_ERROR_NONE;
g_autoptr(GMutexLocker) locker = NULL;
mediaeditor_s *_editor = (mediaeditor_s *)editor;
locker = g_mutex_locker_new(&_editor->mutex);
- LOG_DEBUG("Enter editor[%p]", editor);
-
RET_VAL_IF(_editor->state != MEDIAEDITOR_STATE_IDLE, MEDIAEDITOR_ERROR_INVALID_STATE,
"the state should be IDLE");
- ret = _mediaeditor_add_transition(_editor, type, layer_id, start, duration);
-
- LOG_DEBUG("Leave editor[%p]", editor);
-
- return ret;
+ return _mediaeditor_add_transition(_editor, type, layer_id, start, duration);
}
int mediaeditor_add_effect(mediaeditor_h editor, mediaeditor_effect_type_e type, unsigned int layer_id,
unsigned int start, unsigned int duration, unsigned int *effect_id)
{
- int ret = MEDIAEDITOR_ERROR_NONE;
g_autoptr(GMutexLocker) locker = NULL;
mediaeditor_s *_editor = (mediaeditor_s *)editor;
locker = g_mutex_locker_new(&_editor->mutex);
- LOG_DEBUG("Enter editor[%p]", editor);
-
RET_VAL_IF(_editor->state != MEDIAEDITOR_STATE_IDLE, MEDIAEDITOR_ERROR_INVALID_STATE,
"the state should be IDLE");
- ret = _mediaeditor_add_effect(_editor, type, layer_id, start, duration, effect_id);
-
- LOG_DEBUG("Leave editor[%p]", editor);
-
- return ret;
+ return _mediaeditor_add_effect(_editor, type, layer_id, start, duration, effect_id);
}
int mediaeditor_remove_effect(mediaeditor_h editor, unsigned int effect_id)
{
- int ret = MEDIAEDITOR_ERROR_NONE;
g_autoptr(GMutexLocker) locker = NULL;
mediaeditor_s *_editor = (mediaeditor_s *)editor;
locker = g_mutex_locker_new(&_editor->mutex);
- LOG_DEBUG("Enter editor[%p]", editor);
-
RET_VAL_IF(_editor->state != MEDIAEDITOR_STATE_IDLE, MEDIAEDITOR_ERROR_INVALID_STATE,
"the state should be IDLE");
- ret = _mediaeditor_remove_effect(_editor, effect_id);
-
- LOG_DEBUG("Leave editor[%p]", editor);
-
- return ret;
+ return _mediaeditor_remove_effect(_editor, effect_id);
}
int mediaeditor_create_project(mediaeditor_h editor, const char *path)
locker = g_mutex_locker_new(&_editor->mutex);
- LOG_DEBUG("Enter editor[%p]", editor);
-
RET_VAL_IF(_editor->state != MEDIAEDITOR_STATE_IDLE, MEDIAEDITOR_ERROR_INVALID_STATE,
"the state should be IDLE");
- ret = _mediaeditor_create_project(_editor, path);
-
- LOG_DEBUG("Leave editor[%p]", editor);
-
- return ret;
+ return _mediaeditor_create_project(_editor, path);
}
int mediaeditor_load_project(mediaeditor_h editor, const char *path, mediaeditor_project_loaded_cb callback, void *user_data)
locker = g_mutex_locker_new(&_editor->mutex);
- LOG_DEBUG("Enter editor[%p]", editor);
-
RET_VAL_IF(_editor->state != MEDIAEDITOR_STATE_IDLE, MEDIAEDITOR_ERROR_INVALID_STATE,
"the state should be IDLE");
_editor->project_loaded_cb.callback = callback;
_editor->project_loaded_cb.user_data = user_data;
- ret = _mediaeditor_load_project(_editor, path);
-
- LOG_DEBUG("Leave editor[%p]", editor);
-
- return ret;
+ return _mediaeditor_load_project(_editor, path);
}
int mediaeditor_save_project(mediaeditor_h editor)
locker = g_mutex_locker_new(&_editor->mutex);
- LOG_DEBUG("Enter editor[%p]", editor);
-
RET_VAL_IF(_editor->state != MEDIAEDITOR_STATE_IDLE, MEDIAEDITOR_ERROR_INVALID_STATE,
"the state should be IDLE");
- ret = _mediaeditor_save_project(_editor, uri);
-
- LOG_DEBUG("Leave editor[%p]", editor);
-
- return ret;
+ return _mediaeditor_save_project(_editor, uri);
}
int mediaeditor_set_error_cb(mediaeditor_h editor, mediaeditor_error_cb callback, void *user_data)
locker = g_mutex_locker_new(&_editor->mutex);
- LOG_DEBUG("Enter editor[%p], callback[%p]", editor, callback);
-
RET_VAL_IF(_editor->state != MEDIAEDITOR_STATE_IDLE, MEDIAEDITOR_ERROR_INVALID_STATE,
"the state should be IDLE");
_editor->error_cb.callback = callback;
_editor->error_cb.user_data = user_data;
- LOG_DEBUG("Leave editor[%p], callback[%p], user_data[%p]", editor, callback, user_data);
+ LOG_DEBUG("editor[%p], callback[%p], user_data[%p]", editor, callback, user_data);
return MEDIAEDITOR_ERROR_NONE;
}
locker = g_mutex_locker_new(&_editor->mutex);
- LOG_DEBUG("Enter editor[%p]", editor);
-
RET_VAL_IF(_editor->state != MEDIAEDITOR_STATE_IDLE, MEDIAEDITOR_ERROR_INVALID_STATE,
"the state should be IDLE");
RET_VAL_IF(_editor->error_cb.callback == NULL, MEDIAEDITOR_ERROR_INVALID_OPERATION,
_editor->error_cb.callback = NULL;
_editor->error_cb.user_data = NULL;
- LOG_DEBUG("Leave editor[%p]", editor);
-
return MEDIAEDITOR_ERROR_NONE;
}
locker = g_mutex_locker_new(&_editor->mutex);
- LOG_DEBUG("Enter editor[%p], callback[%p]", editor, callback);
-
RET_VAL_IF(_editor->state != MEDIAEDITOR_STATE_IDLE, MEDIAEDITOR_ERROR_INVALID_STATE,
"the state should be IDLE");
_editor->state_changed_cb.callback = callback;
_editor->state_changed_cb.user_data = user_data;
- LOG_DEBUG("Leave editor[%p], callback[%p], user_data[%p]", editor, callback, user_data);
+ LOG_DEBUG("editor[%p], callback[%p], user_data[%p]", editor, callback, user_data);
return MEDIAEDITOR_ERROR_NONE;
}
locker = g_mutex_locker_new(&_editor->mutex);
- LOG_DEBUG("Enter editor[%p]", editor);
-
RET_VAL_IF(_editor->state != MEDIAEDITOR_STATE_IDLE, MEDIAEDITOR_ERROR_INVALID_STATE,
"the state should be IDLE");
RET_VAL_IF(_editor->state_changed_cb.callback == NULL, MEDIAEDITOR_ERROR_INVALID_OPERATION,
_editor->state_changed_cb.callback = NULL;
_editor->state_changed_cb.user_data = NULL;
- LOG_DEBUG("Leave editor[%p]", editor);
-
return MEDIAEDITOR_ERROR_NONE;
}
locker = g_mutex_locker_new(&_editor->mutex);
- LOG_DEBUG("Enter editor[%p], callback[%p]", editor, callback);
-
RET_VAL_IF(_editor->state != MEDIAEDITOR_STATE_IDLE, MEDIAEDITOR_ERROR_INVALID_STATE,
"the state should be IDLE");
_editor->layer_priority_changed_cb.callback = callback;
_editor->layer_priority_changed_cb.user_data = user_data;
- LOG_DEBUG("Leave editor[%p], callback[%p], user_data[%p]", editor, callback, user_data);
+ LOG_DEBUG("editor[%p], callback[%p], user_data[%p]", editor, callback, user_data);
return MEDIAEDITOR_ERROR_NONE;
}
locker = g_mutex_locker_new(&_editor->mutex);
- LOG_DEBUG("Enter editor[%p]", editor);
-
RET_VAL_IF(_editor->state != MEDIAEDITOR_STATE_IDLE, MEDIAEDITOR_ERROR_INVALID_STATE,
"the state should be IDLE");
RET_VAL_IF(_editor->layer_priority_changed_cb.callback == NULL, MEDIAEDITOR_ERROR_INVALID_OPERATION,
_editor->layer_priority_changed_cb.callback = NULL;
_editor->layer_priority_changed_cb.user_data = NULL;
- LOG_DEBUG("Leave editor[%p]", editor);
-
return MEDIAEDITOR_ERROR_NONE;
}
\ No newline at end of file