[Libreoffice-commits] core.git: avmedia/source
Michael Meeks
michael.meeks at suse.com
Mon Aug 26 21:24:55 PDT 2013
avmedia/source/vlc/vlcplayer.hxx | 1
avmedia/source/vlc/wrapper/EventManager.cxx | 7 -----
avmedia/source/vlc/wrapper/Types.hxx | 38 ++++++++++++++++++++++++++++
3 files changed, 39 insertions(+), 7 deletions(-)
New commits:
commit ea12c1f1dedac1e42c6c91bf749aa409bd4504de
Author: Michael Meeks <michael.meeks at suse.com>
Date: Tue Aug 27 05:22:18 2013 +0100
avmedia: vlc - extract required types to their own header.
Change-Id: I63d4aa217f57186ae37a9398b845fa734ef2cd5b
diff --git a/avmedia/source/vlc/vlcplayer.hxx b/avmedia/source/vlc/vlcplayer.hxx
index 96dc646..de809f7 100644
--- a/avmedia/source/vlc/vlcplayer.hxx
+++ b/avmedia/source/vlc/vlcplayer.hxx
@@ -21,7 +21,6 @@
#define _VLCPLAYER_HXX
#include "vlccommon.hxx"
-#include <vlc/vlc.h>
#include <boost/shared_ptr.hpp>
#include <cppuhelper/compbase2.hxx>
#include <com/sun/star/media/XPlayer.hpp>
diff --git a/avmedia/source/vlc/wrapper/EventManager.cxx b/avmedia/source/vlc/wrapper/EventManager.cxx
index fe893c7..2edad30 100644
--- a/avmedia/source/vlc/wrapper/EventManager.cxx
+++ b/avmedia/source/vlc/wrapper/EventManager.cxx
@@ -7,15 +7,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include <vlc/libvlc.h>
-#include <vlc/libvlc_media.h>
-#include <vlc/libvlc_events.h>
-
#include "EventManager.hxx"
#include "SymbolLoader.hxx"
#include "EventHandler.hxx"
-
-typedef void ( *libvlc_callback_t ) ( const struct libvlc_event_t *, void * );
+#include "Types.hxx"
namespace VLC
{
diff --git a/avmedia/source/vlc/wrapper/Types.hxx b/avmedia/source/vlc/wrapper/Types.hxx
new file mode 100644
index 0000000..55257b6
--- /dev/null
+++ b/avmedia/source/vlc/wrapper/Types.hxx
@@ -0,0 +1,38 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* Typedefs and structures that represent the libvlc API / ABI */
+
+#ifndef _WRAPPER_TYPES_HXX
+#define _WRAPPER_TYPES_HXX
+
+extern "C" {
+
+// basic callback / event types we use
+typedef int libvlc_event_type_t;
+typedef struct libvlc_event_manager_t libvlc_event_manager_t;
+typedef void ( *libvlc_callback_t ) ( const struct libvlc_event_t *, void * );
+
+// the enumeration values we use cf. libvlc_events.h
+#define libvlc_MediaPlayerPaused 0x105
+#define libvlc_MediaPlayerEndReached 0x109
+
+// event structure pieces we use
+typedef struct libvlc_event_t
+{
+ int type; // event type
+ void *p_obj; // object emitting that event
+
+ union // so far we don't need this.
+ {
+ struct {
+ const char *dummy1;
+ const char *dummy2;
+ } padding;
+ } u;
+} libvlc_event_t;
+
+}
+
+#endif // _WRAPPER_TYPES_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list