summaryrefslogtreecommitdiffstats
path: root/extras/recipes-ti/gstreamer-ti/gstreamer-ti/0003-Support-setting-the-display-framerate-directly-when-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'extras/recipes-ti/gstreamer-ti/gstreamer-ti/0003-Support-setting-the-display-framerate-directly-when-.patch')
-rw-r--r--extras/recipes-ti/gstreamer-ti/gstreamer-ti/0003-Support-setting-the-display-framerate-directly-when-.patch86
1 files changed, 86 insertions, 0 deletions
diff --git a/extras/recipes-ti/gstreamer-ti/gstreamer-ti/0003-Support-setting-the-display-framerate-directly-when-.patch b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/0003-Support-setting-the-display-framerate-directly-when-.patch
new file mode 100644
index 00000000..eb7181be
--- /dev/null
+++ b/extras/recipes-ti/gstreamer-ti/gstreamer-ti/0003-Support-setting-the-display-framerate-directly-when-.patch
@@ -0,0 +1,86 @@
1From fb4dabcac144fcf1a7e9b1eba0114b2eed594d05 Mon Sep 17 00:00:00 2001
2From: Don Darling <don.osc2@gmail.com>
3Date: Thu, 26 Aug 2010 11:12:39 -0500
4Subject: [PATCH 3/8] Support setting the display framerate directly when possible.
5
6If can_set_display_framerate is set to true, TIDmaiVideoSink will attempt to
7set the display framerate directly in DMAI, instead of trying to simulate the
8desired framerate by occasionally repeating frames.
9
10Platforms that support this will need to enable it explicitly.
11---
12 .../ticodecplugin/src/gsttidmaivideosink.c | 24 ++++++++++++++++++++
13 .../ticodecplugin/src/gsttidmaivideosink.h | 1 +
14 2 files changed, 25 insertions(+), 0 deletions(-)
15
16diff --git a/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.c b/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.c
17index c87b89c..4e327ae 100644
18--- a/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.c
19+++ b/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.c
20@@ -442,6 +442,7 @@ static void gst_tidmaivideosink_init(GstTIDmaiVideoSink * dmaisink,
21 dmaisink->numBufs = -1;
22 dmaisink->framerepeat = 0;
23 dmaisink->repeat_with_refresh = FALSE;
24+ dmaisink->can_set_display_framerate = FALSE;
25 dmaisink->rotation = -1;
26 dmaisink->tempDmaiBuf = NULL;
27 dmaisink->accelFrameCopy = TRUE;
28@@ -952,6 +953,9 @@ static void gst_tidmaivideosink_check_set_framerate(GstTIDmaiVideoSink * sink)
29 * then 1 is returned to indicate that there will be no frame
30 * repeating.
31 *
32+ * If the driver supports explicit configuration of the framerate, we
33+ * don't ever need to repeat frames, and 1 is returned.
34+ *
35 ******************************************************************************/
36 static int gst_tidmaivideosink_get_framerepeat(GstTIDmaiVideoSink * sink)
37 {
38@@ -959,6 +963,13 @@ static int gst_tidmaivideosink_get_framerepeat(GstTIDmaiVideoSink * sink)
39
40 GST_DEBUG("Begin\n");
41
42+ /* If the display allows you to configure the frame rate, we never need
43+ * to repeat a frame.
44+ */
45+ if (sink->can_set_display_framerate) {
46+ return 1;
47+ }
48+
49 /* Divide the native framerate by the desired framerate. If the result
50 * is a whole number, return it. Otherwise return 1 -- we don't support
51 * fractional repeat rates. */
52@@ -1151,6 +1162,19 @@ static gboolean gst_tidmaivideosink_set_display_attrs(GstTIDmaiVideoSink *sink,
53 sink->dAttrs.displayDevice = sink->displayDevice == NULL ?
54 sink->dAttrs.displayDevice : sink->displayDevice;
55
56+ /* Specify framerate if supported by DMAI and the display driver */
57+ if (sink->can_set_display_framerate) {
58+ #if defined (Platform_dm365)
59+ sink->dAttrs.forceFrameRateNum =
60+ gst_value_get_fraction_numerator(&sink->iattrs.framerate);
61+ sink->dAttrs.forceFrameRateDen =
62+ gst_value_get_fraction_denominator(&sink->iattrs.framerate);
63+ #else
64+ GST_ERROR("setting driver framerate is not supported\n");
65+ return FALSE;
66+ #endif
67+ }
68+
69 /* Set rotation on OMAP35xx */
70 if (sink->cpu_dev == Cpu_Device_OMAP3530) {
71 sink->dAttrs.rotation = sink->rotation == -1 ?
72diff --git a/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.h b/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.h
73index 5d13e08..4800fcd 100644
74--- a/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.h
75+++ b/gstreamer_ti/ti_build/ticodecplugin/src/gsttidmaivideosink.h
76@@ -124,6 +124,7 @@ struct _GstTIDmaiVideoSink {
77 */
78 int framerepeat;
79 gboolean repeat_with_refresh;
80+ gboolean can_set_display_framerate;
81 gboolean signal_handoffs;
82
83 /* Hardware accelerated copy */
84--
851.7.0.4
86