summaryrefslogtreecommitdiff
path: root/recipes/ti/gstreamer-ti/0006-gstreamer-ti-tracker-462.patch
blob: 3fd1ac272a37f9221677da75f6aeae58ac23872e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
From e227c83e6b857c7b87758741e0ab7a8b8c424a50 Mon Sep 17 00:00:00 2001
From: Brijesh Singh <bksingh@ti.com>
Date: Sun, 9 May 2010 05:34:03 -0500
Subject: [PATCH] gstreamer ti tracker 462

---
 src/gsttividdec.c  |   10 ++++++++--
 src/gsttividdec2.c |   10 ++++++++--
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/src/gsttividdec.c b/src/gsttividdec.c
index e3714d6..51da81d 100644
--- a/src/gsttividdec.c
+++ b/src/gsttividdec.c
@@ -83,7 +83,7 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE(
     GST_PAD_ALWAYS,
     GST_STATIC_CAPS
     ("video/mpeg, " 
-     "mpegversion=(int){ 2, 4 }, "  /* MPEG versions 2 and 4 */
+     "mpegversion=(int){ 2, 4 }, "                /* MPEG versions 2 and 4 */
          "systemstream=(boolean)false, "
          "framerate=(fraction)[ 0, MAX ], "
          "width=(int)[ 1, MAX ], "
@@ -91,7 +91,8 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE(
      "video/x-h264, "                             /* H264                  */
          "framerate=(fraction)[ 0, MAX ], "
          "width=(int)[ 1, MAX ], "
-         "height=(int)[ 1, MAX ]"
+         "height=(int)[ 1, MAX ] ;"
+     "video/x-xvid"                               /* XVID                  */
     )
 );
 
@@ -606,6 +607,11 @@ static gboolean gst_tividdec_set_sink_caps(GstPad *pad, GstCaps *caps)
         codec = gst_ticodec_get_codec("H.264 Video Decoder");
     }
 
+    /* XVID Decode */
+    else if (!strcmp(mime, "video/x-xvid")) {
+        codec = gst_ticodec_get_codec("MPEG4 Video Decoder");
+    }
+
     /* Mime type not supported */
     else {
         GST_ELEMENT_ERROR(viddec, STREAM, NOT_IMPLEMENTED,
diff --git a/src/gsttividdec2.c b/src/gsttividdec2.c
index 79b28a5..6bf421b 100644
--- a/src/gsttividdec2.c
+++ b/src/gsttividdec2.c
@@ -84,7 +84,7 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE(
     GST_PAD_ALWAYS,
     GST_STATIC_CAPS
     ("video/mpeg, " 
-     "mpegversion=(int){ 2, 4 }, "  /* MPEG versions 2 and 4 */
+     "mpegversion=(int){ 2, 4 }, "                /* MPEG versions 2 and 4 */
          "systemstream=(boolean)false, "
          "framerate=(fraction)[ 0, MAX ], "
          "width=(int)[ 1, MAX ], "
@@ -92,7 +92,8 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE(
      "video/x-h264, "                             /* H264                  */
          "framerate=(fraction)[ 0, MAX ], "
          "width=(int)[ 1, MAX ], "
-         "height=(int)[ 1, MAX ]"
+         "height=(int)[ 1, MAX ] ;"
+     "video/x-xvid"                               /* XVID                  */
     )
 );
 
@@ -616,6 +617,11 @@ static gboolean gst_tividdec2_set_sink_caps(GstPad *pad, GstCaps *caps)
         codec = gst_ticodec_get_codec("H.264 Video Decoder");
     }
 
+    /* XVID Decode */
+    else if (!strcmp(mime, "video/x-xvid")) {
+        codec = gst_ticodec_get_codec("MPEG4 Video Decoder");
+    }
+
     /* Mime type not supported */
     else {
         GST_ELEMENT_ERROR(viddec2, STREAM, NOT_IMPLEMENTED,
-- 
1.5.4.3