mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
[804/906] rpi: call bcm_host_init in plugin_init
This commit is contained in:
parent
561a71c244
commit
6497947186
2 changed files with 14 additions and 2 deletions
|
@ -253,6 +253,10 @@ gst_gl_context_default_get_proc_address (GstGLContext * context,
|
||||||
gpointer ret = NULL;
|
gpointer ret = NULL;
|
||||||
|
|
||||||
#ifdef USE_EGL_RPI
|
#ifdef USE_EGL_RPI
|
||||||
|
|
||||||
|
//FIXME: Can't understand why default does not work
|
||||||
|
// so for now retrieve proc addressed manually
|
||||||
|
|
||||||
static GModule *module_egl = NULL;
|
static GModule *module_egl = NULL;
|
||||||
static GModule *module_glesv2 = NULL;
|
static GModule *module_glesv2 = NULL;
|
||||||
|
|
||||||
|
@ -281,8 +285,7 @@ gst_gl_context_default_get_proc_address (GstGLContext * context,
|
||||||
static GModule *module = NULL;
|
static GModule *module = NULL;
|
||||||
|
|
||||||
if (!module)
|
if (!module)
|
||||||
module = g_module_open (NULL /*"/opt/vc/lib/libGLESv2.so" */ ,
|
module = g_module_open (NULL, G_MODULE_BIND_LAZY);
|
||||||
G_MODULE_BIND_LAZY);
|
|
||||||
|
|
||||||
if (module) {
|
if (module) {
|
||||||
if (!g_module_symbol (module, name, &ret)) {
|
if (!g_module_symbol (module, name, &ret)) {
|
||||||
|
|
|
@ -43,6 +43,10 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_EGL_RPI
|
||||||
|
#include <bcm_host.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <gst/gl/gstglconfig.h>
|
#include <gst/gl/gstglconfig.h>
|
||||||
|
|
||||||
#include "gstglimagesink.h"
|
#include "gstglimagesink.h"
|
||||||
|
@ -99,6 +103,11 @@ plugin_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
GST_DEBUG_CATEGORY_INIT (gst_gl_gstgl_debug, "gstopengl", 0, "gstopengl");
|
GST_DEBUG_CATEGORY_INIT (gst_gl_gstgl_debug, "gstopengl", 0, "gstopengl");
|
||||||
|
|
||||||
|
#ifdef USE_EGL_RPI
|
||||||
|
GST_DEBUG ("Initialize BCM host");
|
||||||
|
bcm_host_init ();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!gst_element_register (plugin, "glimagesink",
|
if (!gst_element_register (plugin, "glimagesink",
|
||||||
GST_RANK_MARGINAL, GST_TYPE_GLIMAGE_SINK)) {
|
GST_RANK_MARGINAL, GST_TYPE_GLIMAGE_SINK)) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
Loading…
Reference in a new issue