Revert "Revert "Fix the use of invalid function to set the video frame rate"" 20/254520/2 accepted/tizen_6.0_unified_hotfix tizen_6.0_hotfix accepted/tizen/6.0/unified/hotfix/20210305.013601 submit/tizen_6.0_hotfix/20210304.064103
authorHyunil Park <hyunil46.park@samsung.com>
Thu, 4 Mar 2021 06:21:00 +0000 (06:21 +0000)
committerHyunil <hyunil46.park@samsung.com>
Thu, 4 Mar 2021 06:31:17 +0000 (15:31 +0900)
[Issue Type] Revert
[Version] 0.1.130

This reverts commit 54dec2588ca9ac93ac59800980acc6956721df93.

Change-Id: Iea859d1ecb88c76b2ed249e965fc08e1a021ea03

packaging/capi-media-streamer.spec
src/media_streamer_gst.c

index d2e88920a153ea516597448dc7e2077c5a5bf6b5..7481fd7f0a9d9525d6ff9974de7898126511da4c 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-streamer
 Summary:    A Media Streamer API
-Version:    0.1.129
+Version:    0.1.130
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index f2100344cebedfc9c4c2ad7c32a92d6f60e7bfc2..c7cf9975b539eea790a8480a5dfd5a957d8aba0d 100644 (file)
@@ -2554,8 +2554,12 @@ static media_format_h __ms_create_fmt_from_caps(GstCaps *caps)
        int fmt_ret = MEDIA_FORMAT_ERROR_NONE;
        const gchar *pad_type = NULL;
        const gchar *pad_format = NULL;
-       int channels = 0, bps = 0;
-       int width = 0, height = 0, avg_bps = 0, max_bps = 0;
+       int channels = 0;
+       int bps = 0;
+       int width = 0;
+       int height = 0;
+       int fps_n = 0;
+       int fps_d = 0;
 
        ms_debug_fenter();
 
@@ -2581,14 +2585,13 @@ static media_format_h __ms_create_fmt_from_caps(GstCaps *caps)
 
        if (MS_ELEMENT_IS_VIDEO(pad_type)) {
                gst_structure_get_int(pad_struct, "width", &width);
-               gst_structure_get_fraction(pad_struct, "framerate", &max_bps, &avg_bps);
                gst_structure_get_int(pad_struct, "height", &height);
+               gst_structure_get_fraction(pad_struct, "framerate", &fps_n, &fps_d);
 
                media_format_set_video_mime(fmt, ms_convert_video_string_format_to_media_format(pad_format));
                media_format_set_video_width(fmt, width);
                media_format_set_video_height(fmt, height);
-               media_format_set_video_avg_bps(fmt, avg_bps);
-               media_format_set_video_max_bps(fmt, max_bps);
+               media_format_set_video_frame_rate(fmt, fps_n / fps_d);
        } else if (MS_ELEMENT_IS_AUDIO(pad_type)) {
                media_format_set_audio_mime(fmt, ms_convert_audio_string_format_to_media_format(pad_format));
                gst_structure_get_int(pad_struct, "channels", &channels);