mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-09-03 10:43:55 +00:00
playbin2: Proxy navigation interface
This commit is contained in:
parent
d5779c96c4
commit
46a3ea011d
1 changed files with 28 additions and 1 deletions
|
@ -233,6 +233,7 @@
|
||||||
#include <gst/pbutils/pbutils.h>
|
#include <gst/pbutils/pbutils.h>
|
||||||
#include <gst/interfaces/streamvolume.h>
|
#include <gst/interfaces/streamvolume.h>
|
||||||
#include <gst/interfaces/xoverlay.h>
|
#include <gst/interfaces/xoverlay.h>
|
||||||
|
#include <gst/interfaces/navigation.h>
|
||||||
|
|
||||||
#include "gstplay-enum.h"
|
#include "gstplay-enum.h"
|
||||||
#include "gstplay-marshal.h"
|
#include "gstplay-marshal.h"
|
||||||
|
@ -585,6 +586,8 @@ static void gst_play_bin_implements_interface_init (gpointer g_iface,
|
||||||
gpointer g_iface_data);
|
gpointer g_iface_data);
|
||||||
static void gst_play_bin_xoverlay_init (gpointer g_iface,
|
static void gst_play_bin_xoverlay_init (gpointer g_iface,
|
||||||
gpointer g_iface_data);
|
gpointer g_iface_data);
|
||||||
|
static void gst_play_bin_navigation_init (gpointer g_iface,
|
||||||
|
gpointer g_iface_data);
|
||||||
|
|
||||||
static GType
|
static GType
|
||||||
gst_play_bin_get_type (void)
|
gst_play_bin_get_type (void)
|
||||||
|
@ -615,6 +618,10 @@ gst_play_bin_get_type (void)
|
||||||
gst_play_bin_xoverlay_init,
|
gst_play_bin_xoverlay_init,
|
||||||
NULL, NULL
|
NULL, NULL
|
||||||
};
|
};
|
||||||
|
static const GInterfaceInfo nav_info = {
|
||||||
|
gst_play_bin_navigation_init,
|
||||||
|
NULL, NULL
|
||||||
|
};
|
||||||
|
|
||||||
gst_play_bin_type = g_type_register_static (GST_TYPE_PIPELINE,
|
gst_play_bin_type = g_type_register_static (GST_TYPE_PIPELINE,
|
||||||
"GstPlayBin2", &gst_play_bin_info, 0);
|
"GstPlayBin2", &gst_play_bin_info, 0);
|
||||||
|
@ -625,6 +632,8 @@ gst_play_bin_get_type (void)
|
||||||
&svol_info);
|
&svol_info);
|
||||||
g_type_add_interface_static (gst_play_bin_type, GST_TYPE_X_OVERLAY,
|
g_type_add_interface_static (gst_play_bin_type, GST_TYPE_X_OVERLAY,
|
||||||
&xov_info);
|
&xov_info);
|
||||||
|
g_type_add_interface_static (gst_play_bin_type, GST_TYPE_NAVIGATION,
|
||||||
|
&nav_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
return gst_play_bin_type;
|
return gst_play_bin_type;
|
||||||
|
@ -4088,7 +4097,8 @@ static gboolean
|
||||||
gst_play_bin_implements_interface_supported (GstImplementsInterface * iface,
|
gst_play_bin_implements_interface_supported (GstImplementsInterface * iface,
|
||||||
GType type)
|
GType type)
|
||||||
{
|
{
|
||||||
if (type == GST_TYPE_X_OVERLAY || type == GST_TYPE_STREAM_VOLUME)
|
if (type == GST_TYPE_X_OVERLAY || type == GST_TYPE_STREAM_VOLUME ||
|
||||||
|
type == GST_TYPE_NAVIGATION)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
else
|
else
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -4101,6 +4111,23 @@ gst_play_bin_implements_interface_init (gpointer g_iface, gpointer g_iface_data)
|
||||||
iface->supported = gst_play_bin_implements_interface_supported;
|
iface->supported = gst_play_bin_implements_interface_supported;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gst_play_bin_navigation_send_event (GstNavigation * navigation,
|
||||||
|
GstStructure * structure)
|
||||||
|
{
|
||||||
|
GstPlayBin *playbin = GST_PLAY_BIN (navigation);
|
||||||
|
|
||||||
|
gst_navigation_send_event (GST_NAVIGATION (playbin->playsink), structure);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gst_play_bin_navigation_init (gpointer g_iface, gpointer g_iface_data)
|
||||||
|
{
|
||||||
|
GstNavigationInterface *iface = (GstNavigationInterface *) g_iface;
|
||||||
|
|
||||||
|
iface->send_event = gst_play_bin_navigation_send_event;
|
||||||
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
gst_play_bin2_plugin_init (GstPlugin * plugin)
|
gst_play_bin2_plugin_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue