Fix failure to record video results in testsuites 68/196168/1
authorTae-Young Chung <ty83.chung@samsung.com>
Mon, 24 Dec 2018 07:59:53 +0000 (16:59 +0900)
committerTae-Young Chung <ty83.chung@samsung.com>
Mon, 24 Dec 2018 07:59:57 +0000 (16:59 +0900)
Change avmux_avi to avimux in video_helper in testsuite.

Change-Id: I565c8f59f6bd1ac42eaa4fde57cf023faff25d37
Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
packaging/capi-media-vision.spec
test/testsuites/common/testsuite_common/mv_testsuite_common.h
test/testsuites/common/video_helper/mv_video_helper.c

index e177ddfea6ad801dd1987e838110e9c86bd5820c..b7e5d1d9d11d38e9e39ea91a904457602ea24639 100644 (file)
@@ -1,7 +1,7 @@
 Name:        capi-media-vision
 Summary:     Media Vision library for Tizen Native API
-Version:     0.4.4
-Release:     6
+Version:     0.4.5
+Release:     7
 Group:       Multimedia/Framework
 License:     Apache-2.0 and BSD-3-Clause
 Source0:     %{name}-%{version}.tar.gz
index 903f3134d3b84928992562d64f1dde15c7b724b3..1a5c2cd9950ee5a6cdc8723896b342458b65353d 100644 (file)
@@ -67,7 +67,7 @@ void print_action_result(
                notification_type_e notification_type_e);
 
 /**
- * @brief Gets srting from console.
+ * @brief Gets string from console.
  *
  * @since_tizen 3.0
  * @param [in] prompt     The prompt before getting string value
@@ -82,7 +82,7 @@ int input_string(const char *prompt, size_t max_len, char **string);
  *
  * @since_tizen 3.0
  * @param [in] prompt      The prompt before getting unsigned integer value
- * @param [in] max_size    The thresold for maximum possible value
+ * @param [in] max_size    The threshold for maximum possible value
  * @param [out] size       The output unsigned integer which was got from console
  * @return @c 0 on success, otherwise a negative error value
  */
@@ -93,8 +93,8 @@ int input_size(const char *prompt, size_t max_size, size_t *size);
  *
  * @since_tizen 3.0
  * @param [in] prompt       The prompt before getting integer value
- * @param [in] min_value    The thresold for minimum possible value
- * @param [in] max_value    The thresold for maximum possible value
+ * @param [in] min_value    The threshold for minimum possible value
+ * @param [in] max_value    The threshold for maximum possible value
  * @param [out] value       The output integer which was got from console
  * @return @c 0 on success, otherwise a negative error value
  */
@@ -105,8 +105,8 @@ int input_int(const char *prompt, int min_value, int max_value, int *value);
  *
  * @since_tizen 3.0
  * @param [in] prompt       The prompt before getting double value
- * @param [in] min_value    The thresold for minimum possible value
- * @param [in] max_value    The thresold for maximum possible value
+ * @param [in] min_value    The threshold for minimum possible value
+ * @param [in] max_value    The threshold for maximum possible value
  * @param [out] value       The output double which was got from console
  * @return @c 0 on success, otherwise a negative error value
  */
@@ -147,7 +147,7 @@ int show_menu(
  *
  * @since_tizen 3.0
  * @param [in] path_to_image    The path to JPEG image which will be loaded
- * @param [in/out] source       The hadler to media source which will be filled
+ * @param [in/out] source       The handler to media source which will be filled
  * @return @c 0 on success, otherwise a negative error value
  */
 int load_mv_source_from_file(
index c5f8f4a349cedcd4c593d72afb888bbc4da241aa..67719486bf237b4b4e6f6e73f7e438b2c2aa903a 100644 (file)
@@ -24,6 +24,7 @@
 
 #include <gst/gst.h>
 #include <gst/app/gstappsink.h>
+#include <gst/app/gstappsrc.h>
 #include <gst/video/video.h>
 
 #include <pthread.h>
@@ -121,7 +122,7 @@ int mv_create_video_reader(
                return err;
        }
 
-       *reader = (mv_video_reader_s *) handle;
+       *reader = (mv_video_reader_h *) handle;
 
        return err;
 }
@@ -356,7 +357,7 @@ int mv_create_video_writer(
                return err;
        }
 
-       *writer = (mv_video_writer_s *) handle;
+       *writer = (mv_video_writer_h *) handle;
 
        return err;
 }
@@ -449,7 +450,7 @@ int mv_video_writer_write_frame(
        gst_buffer_unmap(buffer, &info);
 
        if (GST_FLOW_OK !=
-                       gst_app_src_push_buffer(handle->appsrc, buffer)) {
+                       gst_app_src_push_buffer((GstAppSrc*)(handle->appsrc), buffer)) {
                LOGE("Failed to push buffer to appsrc");
                return MEDIA_VISION_ERROR_INVALID_OPERATION;
        }
@@ -595,7 +596,7 @@ static int _mv_video_writer_create_internals(
        writer->videoconvert = gst_element_factory_make("videoconvert", "videoconvert");
        writer->encoder = gst_element_factory_make("avenc_mpeg4", "encoder");
        writer->queue = gst_element_factory_make("queue", "queue");
-       writer->muxer = gst_element_factory_make("avmux_avi", "muxer");
+       writer->muxer = gst_element_factory_make("avimux", "muxer");
        writer->filesink = gst_element_factory_make("filesink", "filesink");
 
        if ((!writer->pl) ||
@@ -684,15 +685,17 @@ static int _mv_video_writer_link_internals(
                return MEDIA_VISION_ERROR_INVALID_OPERATION;
        }
 
+       writer->buffer_size = vinfo.size;
+
        g_object_set(G_OBJECT(writer->appsrc),
                        "max-bytes", 0,
                        "blocksize", writer->buffer_size,
                        "stream-type", 0,
                        "format", GST_FORMAT_BYTES,
+                       "do-timestamp", true,
+                       "is-live", true,
                        NULL);
 
-       writer->buffer_size = vinfo.size;
-
        /* link appsrc and capsfilter */
        if ((!gst_element_link_filtered(writer->appsrc,
                                        writer->capsfilter,
@@ -856,7 +859,6 @@ static void appsink_eos(
 
        pthread_spin_unlock(&(handle->eos_cb_guard));
 
-
        gst_pad_remove_probe(gst_element_get_static_pad(handle->queue, "src"), handle->pad_probe_id);
 }