Add push_video_packet for i420 format 83/204183/2 accepted/tizen/unified/20190423.113409 submit/tizen/20190422.072607
authorSeokHoon LEE <andy.shlee@samsung.com>
Mon, 22 Apr 2019 05:25:58 +0000 (14:25 +0900)
committerSeokHoon LEE <andy.shlee@samsung.com>
Mon, 22 Apr 2019 05:30:15 +0000 (14:30 +0900)
- add new function to process video packet
  that have separate plane in I420 format

Change-Id: Ie4b5ccf8473695b286156d4b27aba32c311e71b3
Signed-off-by: SeokHoon LEE <andy.shlee@samsung.com>
packaging/capi-media-streamrecorder.spec
src/streamrecorder.c

index 9018c1a..a3425b5 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-streamrecorder
 Summary:    A Streamrecorder library in Tizen Native API
-Version:    0.0.21
+Version:    0.0.22
 Release:    0
 Group:      Multimedia/Other
 License:    Apache-2.0
index f3c335e..d4d0dc3 100644 (file)
@@ -172,13 +172,8 @@ int streamrecorder_push_stream_buffer(streamrecorder_h recorder, media_packet_h
                        ret = mm_streamrecorder_push_stream_buffer(handle->mm_handle, MM_STREAM_TYPE_VIDEO, pts, video_buf, video_buf->size[0]);
                } else if (mimetype == MEDIA_FORMAT_I420) {
                        void *buf_data = NULL;
-                       uint64_t buf_size = 0;
-                       ret = media_packet_get_buffer_size(packet, &buf_size);
-                       if (ret != MEDIA_PACKET_ERROR_NONE) {
-                               LOGW("buffer size get fail");
-                               return STREAMRECORDER_ERROR_INVALID_PARAMETER;
-                       }
-                       ret = media_packet_get_buffer_data_ptr(packet, (void **)&buf_data);
+
+                       ret = media_packet_get_video_plane_data_ptr(packet, 0, (void **)&buf_data);
                        if (ret != MEDIA_PACKET_ERROR_NONE) {
                                LOGW("buffer size get fail");
                                return STREAMRECORDER_ERROR_INVALID_PARAMETER;
@@ -195,7 +190,7 @@ int streamrecorder_push_stream_buffer(streamrecorder_h recorder, media_packet_h
                                                return STREAMRECORDER_ERROR_OUT_OF_MEMORY;
                                }
                        }
-                       ret = mm_streamrecorder_push_stream_buffer(handle->mm_handle, MM_STREAM_TYPE_VIDEO, pts, buf_data, buf_size);
+                       ret = mm_streamrecorder_push_video_packet(handle->mm_handle, packet, pts, buf_data);
                }
        } else {
                media_packet_is_audio(packet, &flag);