mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
events seem to be gone
Original commit message from CVS: events seem to be gone
This commit is contained in:
parent
5f6cac5419
commit
a809ce288b
7 changed files with 1 additions and 99 deletions
2
common
2
common
|
@ -1 +1 @@
|
|||
Subproject commit 42491fe8cbc7f7bd736008e67e6ba1e78cda6d2d
|
||||
Subproject commit 2d7b19ccea5558f1689a287374f645a593291407
|
|
@ -1,45 +0,0 @@
|
|||
#include <gst/gst.h>
|
||||
#include <gst/gstpropsprivate.h>
|
||||
|
||||
/*
|
||||
* no need to librify this simple function set
|
||||
*/
|
||||
|
||||
static void
|
||||
print_props (gpointer data, gpointer user_data)
|
||||
{
|
||||
GstPropsEntry *entry = (GstPropsEntry *)data;
|
||||
GstElement *element = GST_ELEMENT (user_data);
|
||||
|
||||
g_print ("%s: %s: ", gst_element_get_name (element),
|
||||
g_quark_to_string (entry->propid));
|
||||
switch (entry->propstype) {
|
||||
case GST_PROPS_INT_ID:
|
||||
g_print ("%d\n", entry->data.int_data);
|
||||
break;
|
||||
case GST_PROPS_STRING_ID:
|
||||
g_print ("%s\n", entry->data.string_data.string);
|
||||
break;
|
||||
case GST_PROPS_FLOAT_ID:
|
||||
g_print ("%f\n", entry->data.float_data);
|
||||
break;
|
||||
default:
|
||||
g_print ("unknown\n");
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
event_func (GstElement *element, GstEvent *event)
|
||||
{
|
||||
GstProps *props;
|
||||
|
||||
if (event == NULL)
|
||||
return;
|
||||
|
||||
if (GST_EVENT_TYPE (event) == GST_EVENT_INFO) {
|
||||
props = GST_EVENT_INFO_PROPS (event);
|
||||
|
||||
g_list_foreach (props->properties, print_props, GST_EVENT_SRC (event));
|
||||
}
|
||||
}
|
||||
|
|
@ -5,7 +5,6 @@
|
|||
*/
|
||||
|
||||
#include <gst/gst.h>
|
||||
#include "events.h"
|
||||
|
||||
GstElement *
|
||||
element_create (char *name, char *element)
|
||||
|
@ -41,7 +40,6 @@ main (int argc, char *argv[])
|
|||
g_print ("Creating pipeline\n");
|
||||
pipeline = gst_pipeline_new ("pipeline");
|
||||
|
||||
g_signal_connect (G_OBJECT (pipeline), "event", G_CALLBACK (event_func), NULL);
|
||||
g_print ("Creating elements\n");
|
||||
if (!(src = element_create ("src", "fakesrc"))) return 1;
|
||||
g_object_set (G_OBJECT (src), "sizetype", 2, NULL);
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
*/
|
||||
|
||||
#include <gst/gst.h>
|
||||
#include "events.h"
|
||||
|
||||
GstElement *
|
||||
element_create (char *name, char *element)
|
||||
|
@ -52,7 +51,6 @@ main (int argc, char *argv[])
|
|||
/* create */
|
||||
g_print ("Creating pipeline\n");
|
||||
pipeline = gst_pipeline_new ("pipeline");
|
||||
g_signal_connect (G_OBJECT (pipeline), "event", G_CALLBACK (event_func), NULL);
|
||||
|
||||
g_print ("Creating elements\n");
|
||||
if (!(tee = element_create ("tee", "tee"))) return 1;
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
#include <gst/gst.h>
|
||||
#include <gst/gstpropsprivate.h>
|
||||
|
||||
/*
|
||||
* no need to librify this simple function set
|
||||
*/
|
||||
|
||||
static void
|
||||
print_props (gpointer data, gpointer user_data)
|
||||
{
|
||||
GstPropsEntry *entry = (GstPropsEntry *)data;
|
||||
GstElement *element = GST_ELEMENT (user_data);
|
||||
|
||||
g_print ("%s: %s: ", gst_element_get_name (element),
|
||||
g_quark_to_string (entry->propid));
|
||||
switch (entry->propstype) {
|
||||
case GST_PROPS_INT_ID:
|
||||
g_print ("%d\n", entry->data.int_data);
|
||||
break;
|
||||
case GST_PROPS_STRING_ID:
|
||||
g_print ("%s\n", entry->data.string_data.string);
|
||||
break;
|
||||
case GST_PROPS_FLOAT_ID:
|
||||
g_print ("%f\n", entry->data.float_data);
|
||||
break;
|
||||
default:
|
||||
g_print ("unknown\n");
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
event_func (GstElement *element, GstEvent *event)
|
||||
{
|
||||
GstProps *props;
|
||||
|
||||
if (event == NULL)
|
||||
return;
|
||||
|
||||
if (GST_EVENT_TYPE (event) == GST_EVENT_INFO) {
|
||||
props = GST_EVENT_INFO_PROPS (event);
|
||||
|
||||
g_list_foreach (props->properties, print_props, GST_EVENT_SRC (event));
|
||||
}
|
||||
}
|
||||
|
|
@ -5,7 +5,6 @@
|
|||
*/
|
||||
|
||||
#include <gst/gst.h>
|
||||
#include "events.h"
|
||||
|
||||
GstElement *
|
||||
element_create (char *name, char *element)
|
||||
|
@ -41,7 +40,6 @@ main (int argc, char *argv[])
|
|||
g_print ("Creating pipeline\n");
|
||||
pipeline = gst_pipeline_new ("pipeline");
|
||||
|
||||
g_signal_connect (G_OBJECT (pipeline), "event", G_CALLBACK (event_func), NULL);
|
||||
g_print ("Creating elements\n");
|
||||
if (!(src = element_create ("src", "fakesrc"))) return 1;
|
||||
g_object_set (G_OBJECT (src), "sizetype", 2, NULL);
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
*/
|
||||
|
||||
#include <gst/gst.h>
|
||||
#include "events.h"
|
||||
|
||||
GstElement *
|
||||
element_create (char *name, char *element)
|
||||
|
@ -52,7 +51,6 @@ main (int argc, char *argv[])
|
|||
/* create */
|
||||
g_print ("Creating pipeline\n");
|
||||
pipeline = gst_pipeline_new ("pipeline");
|
||||
g_signal_connect (G_OBJECT (pipeline), "event", G_CALLBACK (event_func), NULL);
|
||||
|
||||
g_print ("Creating elements\n");
|
||||
if (!(tee = element_create ("tee", "tee"))) return 1;
|
||||
|
|
Loading…
Reference in a new issue