Revert "Fix the use of invalid function to set the video frame rate" 52/253052/3
authorHyunil Park <hyunil46.park@samsung.com>
Thu, 4 Feb 2021 05:04:02 +0000 (05:04 +0000)
committerHyunil <hyunil46.park@samsung.com>
Thu, 4 Feb 2021 06:24:47 +0000 (15:24 +0900)
This reverts commit 43a3ea2a9a3ad98ebdd57ee9fac9c1331f4947ac.

[Issue Type] Revert
[Version] 0.1.125

Change-Id: I28280f87b1fce696e1a388e65dead97415097075

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

index 59c51dcdf4a4ec5badd428d36839ab91938c343d..65795262d02ea2fe19641bd517f1fcfe041a8df2 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-streamer
 Summary:    A Media Streamer API
-Version:    0.1.124
+Version:    0.1.125
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index c7cf9975b539eea790a8480a5dfd5a957d8aba0d..f2100344cebedfc9c4c2ad7c32a92d6f60e7bfc2 100644 (file)
@@ -2554,12 +2554,8 @@ 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;
-       int bps = 0;
-       int width = 0;
-       int height = 0;
-       int fps_n = 0;
-       int fps_d = 0;
+       int channels = 0, bps = 0;
+       int width = 0, height = 0, avg_bps = 0, max_bps = 0;
 
        ms_debug_fenter();
 
@@ -2585,13 +2581,14 @@ 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_frame_rate(fmt, fps_n / fps_d);
+               media_format_set_video_avg_bps(fmt, avg_bps);
+               media_format_set_video_max_bps(fmt, max_bps);
        } 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);