mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 05:31:15 +00:00
Removed the Xid stuff now that xvideosink supports toplevel windows.
Original commit message from CVS: Removed the Xid stuff now that xvideosink supports toplevel windows.
This commit is contained in:
parent
ec5ff24595
commit
0d639bfc25
1 changed files with 0 additions and 84 deletions
|
@ -14,57 +14,6 @@ static guint64 sum = 0;
|
||||||
static guint64 min = G_MAXINT;
|
static guint64 min = G_MAXINT;
|
||||||
static guint64 max = 0;
|
static guint64 max = 0;
|
||||||
|
|
||||||
#ifndef USE_GLIB2
|
|
||||||
GtkWidget *window;
|
|
||||||
GtkWidget *gtk_socket;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef void (*found_handler) (GstElement *element, gint xid, void *priv);
|
|
||||||
|
|
||||||
void
|
|
||||||
arg_search (GstBin *bin, gchar *argname, found_handler handler, void *priv)
|
|
||||||
{
|
|
||||||
GList *children;
|
|
||||||
gchar *ccargname;
|
|
||||||
|
|
||||||
ccargname = g_strdup_printf("::%s",argname);
|
|
||||||
|
|
||||||
children = gst_bin_get_list(bin);
|
|
||||||
|
|
||||||
#ifndef USE_GLIB2
|
|
||||||
while (children) {
|
|
||||||
GstElement *child;
|
|
||||||
|
|
||||||
child = GST_ELEMENT (children->data);
|
|
||||||
children = g_list_next (children);
|
|
||||||
|
|
||||||
if (GST_IS_BIN (child)) arg_search (GST_BIN (child), argname, handler, priv);
|
|
||||||
else {
|
|
||||||
GtkType type;
|
|
||||||
|
|
||||||
type = GTK_OBJECT_TYPE (child);
|
|
||||||
|
|
||||||
while (type != GTK_TYPE_INVALID) {
|
|
||||||
GtkArg *args;
|
|
||||||
guint32 *flags;
|
|
||||||
guint num_args,i;
|
|
||||||
|
|
||||||
args = gtk_object_query_args(type,&flags,&num_args);
|
|
||||||
|
|
||||||
for (i=0;i<num_args;i++) {
|
|
||||||
if (strstr(args[i].name,ccargname)) {
|
|
||||||
(handler)(child, gst_util_get_int_arg (GTK_OBJECT (child), argname) ,priv);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
type = gtk_type_parent(type);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
g_free(ccargname);
|
|
||||||
}
|
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
idle_func (gpointer data)
|
idle_func (gpointer data)
|
||||||
{
|
{
|
||||||
|
@ -93,37 +42,6 @@ idle_func (gpointer data)
|
||||||
return busy;
|
return busy;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
handle_have_size (GstElement *element,int width,int height)
|
|
||||||
{
|
|
||||||
#ifndef USE_GLIB2
|
|
||||||
gtk_widget_set_usize(gtk_socket,width,height);
|
|
||||||
gtk_widget_show_all(window);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
xid_handler (GstElement *element, gint xid, void *priv)
|
|
||||||
{
|
|
||||||
#ifndef USE_GLIB2
|
|
||||||
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
|
||||||
|
|
||||||
gtk_socket = gtk_socket_new ();
|
|
||||||
gtk_widget_show(gtk_socket);
|
|
||||||
|
|
||||||
gtk_container_add(GTK_CONTAINER(window),gtk_socket);
|
|
||||||
|
|
||||||
gtk_widget_realize(gtk_socket);
|
|
||||||
gtk_socket_steal (GTK_SOCKET (gtk_socket), xid);
|
|
||||||
|
|
||||||
gtk_object_set(GTK_OBJECT(window),"allow_grow",TRUE,NULL);
|
|
||||||
gtk_object_set(GTK_OBJECT(window),"allow_shrink",TRUE,NULL);
|
|
||||||
|
|
||||||
gtk_signal_connect (GTK_OBJECT (element), "have_size",
|
|
||||||
GTK_SIGNAL_FUNC (handle_have_size), element);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_props (gpointer data, gpointer user_data)
|
print_props (gpointer data, gpointer user_data)
|
||||||
{
|
{
|
||||||
|
@ -227,8 +145,6 @@ main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (run_pipeline) {
|
if (run_pipeline) {
|
||||||
arg_search(GST_BIN(pipeline),"xid",xid_handler,NULL);
|
|
||||||
|
|
||||||
gst_buffer_print_stats();
|
gst_buffer_print_stats();
|
||||||
fprintf(stderr,"RUNNING pipeline\n");
|
fprintf(stderr,"RUNNING pipeline\n");
|
||||||
if (gst_element_set_state (pipeline, GST_STATE_PLAYING) != GST_STATE_SUCCESS) {
|
if (gst_element_set_state (pipeline, GST_STATE_PLAYING) != GST_STATE_SUCCESS) {
|
||||||
|
|
Loading…
Reference in a new issue