*/
#include "config.h"
+#include "empathy-video-src.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <gst/interfaces/colorbalance.h>
+#include <gst/video/colorbalance.h>
#define DEBUG_FLAG EMPATHY_DEBUG_VOIP
-#include <libempathy/empathy-debug.h>
-
-#include "empathy-video-src.h"
+#include "empathy-debug.h"
G_DEFINE_TYPE(EmpathyGstVideoSrc, empathy_video_src, GST_TYPE_BIN)
return NULL;
}
-static gboolean
-empathy_video_src_drop_eos (GstPad *pad, GstEvent *event, gpointer user_data)
+static GstPadProbeReturn
+empathy_video_src_drop_eos (GstPad *pad,
+ GstPadProbeInfo *info,
+ gpointer user_data)
{
- return GST_EVENT_TYPE (event) != GST_EVENT_EOS;
+ if (GST_EVENT_TYPE (GST_PAD_PROBE_INFO_EVENT (info)) == GST_EVENT_EOS)
+ return GST_PAD_PROBE_DROP;
+
+ return GST_PAD_PROBE_OK;
}
static void
gchar *str;
/* allocate caps here, so we can update it by optional elements */
- caps = gst_caps_new_simple ("video/x-raw-yuv",
+ caps = gst_caps_new_simple ("video/x-raw",
"width", G_TYPE_INT, 320,
"height", G_TYPE_INT, 240,
NULL);
/* Drop EOS events, so that our sinks don't get confused when we restart the
* source (triggering an EOS) */
src = gst_element_get_static_pad (element, "src");
- gst_pad_add_event_probe (src, G_CALLBACK (empathy_video_src_drop_eos), NULL);
+
+ gst_pad_add_probe (src, GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM,
+ empathy_video_src_drop_eos, NULL, NULL);
+
gst_object_unref (src);
/* videorate with the required properties optional as it needs a currently
g_free (str);
if ((element = empathy_gst_add_to_bin (GST_BIN (obj),
- element, "ffmpegcolorspace")) == NULL)
- g_error ("Failed to add \"ffmpegcolorspace\" (gst-plugins-base missing?)");
+ element, "videoconvert")) == NULL)
+ g_error ("Failed to add \"videoconvert\" (gst-plugins-base missing?)");
if ((element = empathy_gst_add_to_bin (GST_BIN (obj),
element, "videoscale")) == NULL)