v4l2: Remove some OMAP specific hacks
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Tue, 4 Aug 2009 07:32:07 +0000 (09:32 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Tue, 4 Aug 2009 07:32:07 +0000 (09:32 +0200)
They require special build flags and are not useful in general.

sys/v4l2/gstv4l2sink.c
sys/v4l2/v4l2_calls.h

index b0dff5e61e68f60138710f02b3b8270d9fd6dd6e..fd792cd754d725aec27f6c4f734c93056c65e3ce 100644 (file)
@@ -624,14 +624,7 @@ gst_v4l2sink_buffer_alloc (GstBaseSink * bsink, guint64 offset, guint size,
                   V4L2_BUF_TYPE_VIDEO_OUTPUT))) {
         return GST_FLOW_ERROR;
       }
-#ifdef OMAPZOOM
-      if (!gst_v4l2_object_start_streaming (v4l2sink->v4l2object)) {
-        return GST_FLOW_ERROR;
-      }
-      v4l2sink->state = STATE_STREAMING;
-#else
       v4l2sink->state = STATE_PENDING_STREAMON;
-#endif
 
       GST_INFO_OBJECT (v4l2sink, "outputting buffers via mmap()");
 
@@ -693,14 +686,12 @@ gst_v4l2sink_show_frame (GstBaseSink * bsink, GstBuffer * buf)
   if (!gst_v4l2_buffer_pool_qbuf (v4l2sink->pool, GST_V4L2_BUFFER (buf))) {
     return GST_FLOW_ERROR;
   }
-#ifndef OMAPZOOM
   if (v4l2sink->state == STATE_PENDING_STREAMON) {
     if (!gst_v4l2_object_start_streaming (v4l2sink->v4l2object)) {
       return GST_FLOW_ERROR;
     }
     v4l2sink->state = STATE_STREAMING;
   }
-#endif
 
   if (!newbuf) {
     gst_buffer_ref (buf);
index 1f24c1f452f503bca49e5fa668f6587d746df463..e862ac9f5ca7caa6620e95dc87d41c99aadd1dbe 100644 (file)
@@ -140,24 +140,7 @@ gboolean   gst_v4l2_set_attribute          (GstV4l2Object *v4l2object,
 gboolean        gst_v4l2_get_capabilities       (GstV4l2Object * v4l2object);
 
 
-/* note:  in case this is a build with TTIF logging, we can optimize slightly
- * and avoid the gst_caps_to_string() in case logging isn't enabled by using
- * the TTIF_TRACE_ARG_PROCESSOR feature of ttif_trace_fprintf():
- */
-#ifdef GST_LOG_OVER_TTIF
-#  define LOG_CAPS(obj, caps)    G_STMT_START {                 \
-    if (caps) {                                                 \
-      static TTIF_TRACE_ARG_PROCESSOR proc = {                  \
-        .convert = (char (*)(void *))gst_caps_to_string,        \
-        .free    = (void (*)(char *))g_free                     \
-      };                                                        \
-      GST_DEBUG_OBJECT (obj, "%s: %qs", #caps, &proc, (caps));  \
-    } else {                                                    \
-      GST_DEBUG_OBJECT (obj, "null");                           \
-    }                                                           \
-  } G_STMT_END
-#else
-#  define LOG_CAPS(obj, caps)    G_STMT_START {                 \
+#define LOG_CAPS(obj, caps)    G_STMT_START {                   \
     if (caps) {                                                 \
       gchar *capstr = gst_caps_to_string (caps);                \
       GST_DEBUG_OBJECT (obj, "%s: %s", #caps, capstr);          \
@@ -166,16 +149,5 @@ gboolean        gst_v4l2_get_capabilities       (GstV4l2Object * v4l2object);
       GST_DEBUG_OBJECT (obj, "null");                           \
     }                                                           \
   } G_STMT_END
-#endif
-
-/* note: the omapzoom kernel v4l2 display driver deviates from the v4l2 API
- * spec in a few areas.  For example, we must always have one buffer with
- * the driver before STREAMON until after STREAMOFF.  And some interfaces,
- * such as rotation (and mirroring?) are different.
- *
- * this is only a temporary hack, as we should switch to the new driver soon
- */
-#define OMAPZOOM
-
 
 #endif /* __V4L2_CALLS_H__ */