encodebin - Fix video recording resume failure 44/97944/1
authorJeongmo Yang <jm80.yang@samsung.com>
Tue, 15 Nov 2016 11:21:49 +0000 (20:21 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Tue, 15 Nov 2016 11:25:36 +0000 (20:25 +0900)
Since GStreamer 1.0, GST_BUFFER_DTS is used with GST_BUFFER_PTS(GST_BUFFER_TIMESTAMP),
but, GST_BUFFER_DTS is not updated in encodebin.
It causes the failure on muxer when resume recording.

[Version] 1.0.0-29
[Profile] Common
[Issue Type] Bug fix
[Dependency module] N/A
[Test] [M(T) - Boot=(OK), sdb=(OK), Home=(OK), Touch=(OK), Version=tizen-3.0-mobile_20161114.3]

Change-Id: Ia58f53a7215162d739845d5368275c77595a67c4
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
encodebin/src/gstencodebin.c
packaging/gst-plugins-tizen.spec

index 77050f3..84a359d 100644 (file)
@@ -2836,7 +2836,8 @@ gst_encode_bin_video_probe(GstPad *pad, GstPadProbeInfo *info, GstEncodeBin *enc
        }
 
        //Adjusting timestamp of video source
-       GST_BUFFER_TIMESTAMP(gst_pad_probe_info_get_buffer(info)) -= encodebin->total_offset_time;
+       GST_BUFFER_PTS(gst_pad_probe_info_get_buffer(info)) -= encodebin->total_offset_time;
+       GST_BUFFER_DTS(gst_pad_probe_info_get_buffer(info)) = GST_BUFFER_PTS(gst_pad_probe_info_get_buffer(info));
 
        return GST_PAD_PROBE_OK;
 }
@@ -2850,7 +2851,9 @@ gst_encode_bin_video_probe_hs(GstPad *pad, GstPadProbeInfo *info, GstEncodeBin *
                return GST_PAD_PROBE_OK;
        }
 
-       GST_BUFFER_TIMESTAMP(gst_pad_probe_info_get_buffer(info))       *= encodebin->multiple;
+       GST_BUFFER_PTS(gst_pad_probe_info_get_buffer(info)) *= encodebin->multiple;
+       GST_BUFFER_DTS(gst_pad_probe_info_get_buffer(info)) = GST_BUFFER_PTS(gst_pad_probe_info_get_buffer(info));
+
        return GST_PAD_PROBE_OK;
 }
 
@@ -2864,7 +2867,8 @@ gst_encode_bin_audio_probe(GstPad *pad, GstPadProbeInfo *info, GstEncodeBin *enc
        }
 
        //Adjusting timestamp of video source
-       GST_BUFFER_TIMESTAMP(gst_pad_probe_info_get_buffer(info)) -= encodebin->total_offset_time;
+       GST_BUFFER_PTS(gst_pad_probe_info_get_buffer(info)) -= encodebin->total_offset_time;
+       GST_BUFFER_DTS(gst_pad_probe_info_get_buffer(info)) = GST_BUFFER_PTS(gst_pad_probe_info_get_buffer(info));
 
        return GST_PAD_PROBE_OK;
 }
index dfa3ba5..8504c6d 100755 (executable)
@@ -5,7 +5,7 @@
 Name:       gst-plugins-tizen
 Version:    1.0.0
 Summary:    GStreamer tizen plugins (common)
-Release:    28
+Release:    29
 Group:      Multimedia/Framework
 Url:        http://gstreamer.freedesktop.org/
 License:    LGPL-2.1+