Fix bug when audio clip is added 99/276999/2 accepted/tizen/unified/20220630.211954 submit/tizen/20220629.080628
authorHaesu Gwon <haesu.gwon@samsung.com>
Wed, 29 Jun 2022 04:36:48 +0000 (13:36 +0900)
committerHaesu Gwon <haesu.gwon@samsung.com>
Wed, 29 Jun 2022 05:28:49 +0000 (14:28 +0900)
- When video clip is added, we set its position as top-left(0,0).
  But, currently, position is set even if it's audio clip.
  So we need to check clip type and set position only if clip is video.

[Version] 0.0.13
[Issue Type] Bug fix

Change-Id: Ib7d3568314be448ef98d503ddce34f1d9d2c6976

packaging/capi-media-editor.spec
src/media_editor_clip.c

index 4aae0ec..0fc3185 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-editor
 Summary:    A Tizen Media Editor API
-Version:    0.0.12
+Version:    0.0.13
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index 721d36f..4e566d2 100644 (file)
@@ -281,8 +281,8 @@ int _mediaeditor_add_clip(mediaeditor_s *editor, const char *path, unsigned int
     ret = _mediaeditor_create_clip_common(editor, clip, MEDIAEDITOR_EFFECT_TYPE_NONE, clip_id);
     RET_VAL_IF(ret != MEDIAEDITOR_ERROR_NONE, ret, "failed to create clip common");
 
-    ret = _mediaeditor_set_clip_position(editor, *clip_id, 0, 0);
-    RET_VAL_IF(ret != MEDIAEDITOR_ERROR_NONE, ret, "failed to set initial position");
+    if (__has_video_track(clip))
+        ges_timeline_element_set_child_properties(GES_TIMELINE_ELEMENT(clip), "posx", 0, "posy", 0, NULL);
 
     return MEDIAEDITOR_ERROR_NONE;
 }