office-gobmx/vcl/inc/unx/gstsink.hxx
Jan-Marek Glogowski a6201725d7 Don't link avmediagst with gtk3 and qt5
While the VCL plugins are dynamically loaded and therefore just
load their depending toolkit libraries, the GStreamer avmedia
backend now links against Qt and GTK+. The GStreamer API itself
is toolkit agnostic and the toolkit setup just uses a single
GStreamer symbol to create the specific video sink.

So the toolkit binding can simply be moved into the VCL plugin.
At the point of the GStreamer toolkit setup call the GStreamer
library is loaded by avmediagst, so the dlsym lookup should
never fail.

I also dropped the special GtkWidget handling. Using g_object_get
will increase the refcount of the widget. A g_object_unref after
adding it to the container seems to destroy it correctly.

Change-Id: I693947e441bceb4b09bc38920e308e39142d0a35
Reviewed-on: https://gerrit.libreoffice.org/73849
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-06-13 23:45:09 +02:00

27 lines
748 B
C++

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*/
#pragma once
#include <config_vclplug.h>
#if ENABLE_GSTREAMER_1_0
#include <gst/gst.h>
#include <dlfcn.h>
typedef GstElement* (*GstElementFactoryName)(const gchar*, const gchar*);
static GstElementFactoryName gstElementFactoryNameSymbol()
{
return reinterpret_cast<GstElementFactoryName>(dlsym(nullptr, "gst_element_factory_make"));
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */