[longomatch] Reorganize code and remove unused files
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Reorganize code and remove unused files
- Date: Wed, 11 Feb 2015 15:59:08 +0000 (UTC)
commit 04d212ca6085f859b047d8c0101914e068083f76
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Sat Feb 7 13:02:51 2015 +0100
Reorganize code and remove unused files
libcesarplayer/Makefile.am | 6 +-
libcesarplayer/gst-camera-capturer.c | 3 +-
libcesarplayer/gst-camera-capturer.h | 2 +-
libcesarplayer/gst-nle-source.c | 2 +-
libcesarplayer/gst-nle-source.h | 2 +-
libcesarplayer/gst-remuxer.h | 2 +-
libcesarplayer/gst-video-editor.c | 2 +-
libcesarplayer/gst-video-editor.h | 2 +-
libcesarplayer/gst-video-encoder.c | 2 +-
libcesarplayer/gst-video-encoder.h | 2 +-
libcesarplayer/gstscreenshot.c | 2 +-
libcesarplayer/gstvideowidget.c | 1193 -------------------------
libcesarplayer/gstvideowidget.h | 123 ---
libcesarplayer/{common.h => lgm-utils.h} | 87 ++-
libcesarplayer/{video-utils.m => lgm-utils.m} | 18 +-
libcesarplayer/lgm-video-player.c | 12 -
libcesarplayer/lgm-video-player.h | 2 +-
libcesarplayer/liblongomatch.cproj | 8 +-
libcesarplayer/macros.h | 39 -
libcesarplayer/test-capturer.c | 11 +-
libcesarplayer/test-discoverer.c | 2 +-
libcesarplayer/video-utils.h | 71 --
22 files changed, 75 insertions(+), 1518 deletions(-)
---
diff --git a/libcesarplayer/Makefile.am b/libcesarplayer/Makefile.am
index beb3d20..f6188f4 100644
--- a/libcesarplayer/Makefile.am
+++ b/libcesarplayer/Makefile.am
@@ -33,7 +33,6 @@ lib_LTLIBRARIES = \
libcesarplayer_la_SOURCES = \
$(BVWMARSHALFILES) \
- common.h\
lgm-gtk-glue.c\
lgm-gtk-glue.h\
lgm-video-player.h\
@@ -50,9 +49,8 @@ libcesarplayer_la_SOURCES = \
gst-video-encoder.h\
gst-nle-source.c\
gst-nle-source.h\
- video-utils.m\
- video-utils.h\
- macros.h
+ lgm-utils.m\
+ lgm-utils.h
libcesarplayer_la_LDFLAGS = \
$(CESARPLAYER_LIBS)
diff --git a/libcesarplayer/gst-camera-capturer.c b/libcesarplayer/gst-camera-capturer.c
index eb24350..4090954 100644
--- a/libcesarplayer/gst-camera-capturer.c
+++ b/libcesarplayer/gst-camera-capturer.c
@@ -33,8 +33,7 @@
#include "gst-camera-capturer.h"
#include "gstscreenshot.h"
-#include "common.h"
-#include "video-utils.h"
+#include "lgm-utils.h"
#include "baconvideowidget-marshal.h"
diff --git a/libcesarplayer/gst-camera-capturer.h b/libcesarplayer/gst-camera-capturer.h
index a7829b2..e617c13 100644
--- a/libcesarplayer/gst-camera-capturer.h
+++ b/libcesarplayer/gst-camera-capturer.h
@@ -33,7 +33,7 @@
#include <glib-object.h>
#include <gdk/gdk.h>
-#include "common.h"
+#include "lgm-utils.h"
G_BEGIN_DECLS
#define GST_TYPE_CAMERA_CAPTURER (gst_camera_capturer_get_type ())
diff --git a/libcesarplayer/gst-nle-source.c b/libcesarplayer/gst-nle-source.c
index 0bb4d53..64db5b4 100644
--- a/libcesarplayer/gst-nle-source.c
+++ b/libcesarplayer/gst-nle-source.c
@@ -28,7 +28,7 @@
#include <gst/app/gstappsink.h>
#include <gst/app/gstappsrc.h>
-#include "video-utils.h"
+#include "lgm-utils.h"
#include "gst-nle-source.h"
GST_DEBUG_CATEGORY (_nlesrc_gst_debug_cat);
diff --git a/libcesarplayer/gst-nle-source.h b/libcesarplayer/gst-nle-source.h
index d20cb27..4cdaabe 100644
--- a/libcesarplayer/gst-nle-source.h
+++ b/libcesarplayer/gst-nle-source.h
@@ -30,7 +30,7 @@
#endif
#include <glib-object.h>
-#include "common.h"
+#include "lgm-utils.h"
G_BEGIN_DECLS
#define GST_TYPE_NLE_SOURCE (gst_nle_source_get_type ())
diff --git a/libcesarplayer/gst-remuxer.h b/libcesarplayer/gst-remuxer.h
index fd7becb..e095724 100644
--- a/libcesarplayer/gst-remuxer.h
+++ b/libcesarplayer/gst-remuxer.h
@@ -32,7 +32,7 @@
#endif
#include <gst/gst.h>
-#include "common.h"
+#include "lgm-utils.h"
G_BEGIN_DECLS
#define GST_TYPE_REMUXER (gst_remuxer_get_type ())
diff --git a/libcesarplayer/gst-video-editor.c b/libcesarplayer/gst-video-editor.c
index 0c5e2d0..bbb8b2b 100644
--- a/libcesarplayer/gst-video-editor.c
+++ b/libcesarplayer/gst-video-editor.c
@@ -25,7 +25,7 @@
#include <gst/gst.h>
#include "gst-video-editor.h"
#include "gst-nle-source.h"
-#include "video-utils.h"
+#include "lgm-utils.h"
#define AUDIO_INT_CAPS "audio/x-raw-int, rate=44100, channels=2"
diff --git a/libcesarplayer/gst-video-editor.h b/libcesarplayer/gst-video-editor.h
index 8052197..0951c8c 100644
--- a/libcesarplayer/gst-video-editor.h
+++ b/libcesarplayer/gst-video-editor.h
@@ -32,7 +32,7 @@
#include <glib-object.h>
-#include "common.h"
+#include "lgm-utils.h"
G_BEGIN_DECLS
#define GST_TYPE_VIDEO_EDITOR (gst_video_editor_get_type ())
diff --git a/libcesarplayer/gst-video-encoder.c b/libcesarplayer/gst-video-encoder.c
index 804b719..56ff1f7 100644
--- a/libcesarplayer/gst-video-encoder.c
+++ b/libcesarplayer/gst-video-encoder.c
@@ -23,7 +23,7 @@
#include <gst/gst.h>
#include "gst-video-encoder.h"
-#include "video-utils.h"
+#include "lgm-utils.h"
GST_DEBUG_CATEGORY (_video_encoder_gst_debug_cat);
diff --git a/libcesarplayer/gst-video-encoder.h b/libcesarplayer/gst-video-encoder.h
index d0389fd..c6d1b42 100644
--- a/libcesarplayer/gst-video-encoder.h
+++ b/libcesarplayer/gst-video-encoder.h
@@ -30,7 +30,7 @@
#include <glib-object.h>
-#include "common.h"
+#include "lgm-utils.h"
G_BEGIN_DECLS
#define GST_TYPE_VIDEO_ENCODER (gst_video_encoder_get_type ())
diff --git a/libcesarplayer/gstscreenshot.c b/libcesarplayer/gstscreenshot.c
index 94bb3e7..93f48d0 100644
--- a/libcesarplayer/gstscreenshot.c
+++ b/libcesarplayer/gstscreenshot.c
@@ -25,7 +25,7 @@
#include <string.h>
#include "gstscreenshot.h"
-#include "video-utils.h"
+#include "lgm-utils.h"
static void
diff --git a/libcesarplayer/common.h b/libcesarplayer/lgm-utils.h
similarity index 59%
rename from libcesarplayer/common.h
rename to libcesarplayer/lgm-utils.h
index 0afcadc..6dc53e7 100644
--- a/libcesarplayer/common.h
+++ b/libcesarplayer/lgm-utils.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 Andoni Morales Alastruey <ylatuya gmail com>
+ * Copyright (C) 2009-2015 Andoni Morales Alastruey <ylatuya gmail com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -15,10 +15,37 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
*
+ * The Totem project hereby grant permission for non-gpl compatible GStreamer
+ * plugins to be used and distributed together with GStreamer and Totem. This
+ * permission is above and beyond the permissions granted by the GPL license
+ * Totem is covered by.
+ *
*/
-#ifndef __LIBCESARPLAYER_COMMON_H__
-#define __LIBCESARPLAYER_COMMON_H__
+#ifndef __LGM_UTILS_H__
+#define __LGM_UTILS_H__
+
+#include <gst/gst.h>
+#include <gst/interfaces/xoverlay.h>
+#include <gst/pbutils/pbutils.h>
+#include <gio/gio.h>
+#include <glib/gi18n.h>
+#include <gdk/gdk.h>
+#if defined (GDK_WINDOWING_X11)
+#include <gdk/gdkx.h>
+#elif defined (GDK_WINDOWING_WIN32)
+#include <gdk/gdkwin32.h>
+#elif defined (GDK_WINDOWING_QUARTZ)
+#include <gdk/gdkquartz.h>
+#endif
+
+#ifdef WIN32
+#define EXPORT __declspec (dllexport)
+#else
+#define EXPORT
+#endif
+
+G_BEGIN_DECLS
/* Default video/audio sinks */
#if defined(OSTYPE_WINDOWS)
@@ -47,33 +74,6 @@
#define AUDIOSRC "gsettingsaudiosrc"
#endif
-/**
- * Error:
- * @GST_ERROR_AUDIO_PLUGIN: Error loading audio output plugin or device.
- * @GST_ERROR_NO_PLUGIN_FOR_FILE: A required GStreamer plugin or xine feature is missing.
- * @GST_ERROR_VIDEO_PLUGIN: Error loading video output plugin or device.
- * @GST_ERROR_AUDIO_BUSY: Audio output device is busy.
- * @GST_ERROR_BROKEN_FILE: The movie file is broken and cannot be decoded.
- * @GST_ERROR_FILE_GENERIC: A generic error for problems with movie files.
- * @GST_ERROR_FILE_PERMISSION: Permission was refused to access the stream, or authentication was required.
- * @GST_ERROR_FILE_ENCRYPTED: The stream is encrypted and cannot be played.
- * @GST_ERROR_FILE_NOT_FOUND: The stream cannot be found.
- * @GST_ERROR_DVD_ENCRYPTED: The DVD is encrypted and libdvdcss is not installed.
- * @GST_ERROR_INVALID_DEVICE: The device given in an MRL (e.g. DVD drive or DVB tuner) did not exist.
- * @GST_ERROR_DEVICE_BUSY: The device was busy.
- * @GST_ERROR_UNKNOWN_HOST: The host for a given stream could not be resolved.
- * @GST_ERROR_NETWORK_UNREACHABLE: The host for a given stream could not be reached.
- * @GST_ERROR_CONNECTION_REFUSED: The server for a given stream refused the connection.
- * @GST_ERROR_INVALID_LOCATION: An MRL was malformed, or CDDB playback was attempted (which is now
unsupported).
- * @GST_ERROR_GENERIC: A generic error occurred.
- * @GST_ERROR_CODEC_NOT_HANDLED: The audio or video codec required by the stream is not supported.
- * @GST_ERROR_AUDIO_ONLY: An audio-only stream could not be played due to missing audio output support.
- * @GST_ERROR_CANNOT_CAPTURE: Error determining frame capture support for a video with
bacon_video_widget_can_get_frames().
- * @GST_ERROR_READ_ERROR: A generic error for problems reading streams.
- * @GST_ERROR_PLUGIN_LOAD: A library or plugin could not be loaded.
- * @GST_ERROR_EMPTY_FILE: A movie file was empty.
- *
- **/
typedef enum
{
/* Plugins */
@@ -143,4 +143,31 @@ typedef enum
CAPTURE_SOURCE_TYPE_FILE = 4,
} CaptureSourceType;
+typedef enum {
+ GST_AUTOPLUG_SELECT_TRY,
+ GST_AUTOPLUG_SELECT_EXPOSE,
+ GST_AUTOPLUG_SELECT_SKIP
+} GstAutoplugSelectResult;
+
+
+EXPORT void lgm_init_backend (int argc, char **argv);
+EXPORT GstDiscovererResult lgm_discover_uri (const gchar *uri, guint64 *duration,
+ guint *width, guint *height, guint *fps_n, guint *fps_d, guint *par_n,
+ guint *par_d, gchar **container, gchar **video_codec, gchar **audio_codec,
+ GError **err);
+EXPORT guintptr lgm_get_window_handle (GdkWindow *window);
+EXPORT void lgm_set_window_handle (GstXOverlay *overlay, guintptr window_handle);
+
+void lgm_init_debug();
+gchar * lgm_filename_to_uri (const gchar *filena);
+GstElement * lgm_create_video_encoder (VideoEncoderType type, guint quality,
+ gboolean realtime, GQuark quark, GError **err);
+GstElement * lgm_create_audio_encoder (AudioEncoderType type, guint quality,
+ GQuark quark, GError **err);
+GstElement * lgm_create_muxer (VideoMuxerType type,
+ GQuark quark, GError **err);
+GstAutoplugSelectResult lgm_filter_video_decoders (GstElement* object,
+ GstPad* arg0, GstCaps* arg1, GstElementFactory* arg2, gpointer user_data);
+
+G_END_DECLS
#endif
diff --git a/libcesarplayer/video-utils.m b/libcesarplayer/lgm-utils.m
similarity index 97%
rename from libcesarplayer/video-utils.m
rename to libcesarplayer/lgm-utils.m
index e06d852..c8fd7e7 100644
--- a/libcesarplayer/video-utils.m
+++ b/libcesarplayer/lgm-utils.m
@@ -22,23 +22,7 @@
*
*/
-#include "video-utils.h"
-
-#include <glib/gi18n.h>
-#include <libintl.h>
-
-#include <gst/gst.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdio.h>
-#if defined (GDK_WINDOWING_X11)
-#include <gdk/gdkx.h>
-#elif defined (GDK_WINDOWING_WIN32)
-#include <gdk/gdkwin32.h>
-#elif defined (GDK_WINDOWING_QUARTZ)
-#include <gdk/gdkquartz.h>
-#endif
+#include "lgm-utils.h"
GstAutoplugSelectResult
lgm_filter_video_decoders (GstElement * object, GstPad * arg0,
diff --git a/libcesarplayer/lgm-video-player.c b/libcesarplayer/lgm-video-player.c
index b1b9cc6..e644452 100644
--- a/libcesarplayer/lgm-video-player.c
+++ b/libcesarplayer/lgm-video-player.c
@@ -17,21 +17,9 @@
*
*/
-
-#include <gst/gst.h>
-#include <gst/interfaces/xoverlay.h>
-
-/* gtk+/gnome */
-#include <gdk/gdk.h>
-
-#include <gio/gio.h>
-#include <glib/gi18n.h>
-
#include "lgm-video-player.h"
#include "baconvideowidget-marshal.h"
-#include "common.h"
#include "gstscreenshot.h"
-#include "video-utils.h"
#define LGM_PLAY_TIMEOUT 20
#define LGM_PAUSE_TIMEOUT 100
diff --git a/libcesarplayer/lgm-video-player.h b/libcesarplayer/lgm-video-player.h
index 553d196..9d5793b 100644
--- a/libcesarplayer/lgm-video-player.h
+++ b/libcesarplayer/lgm-video-player.h
@@ -26,7 +26,7 @@
#define EXPORT
#endif
-#include <gst/gst.h>
+#include "lgm-utils.h"
G_BEGIN_DECLS
#define LGM_TYPE_VIDEO_WIDGET (lgm_video_player_get_type ())
diff --git a/libcesarplayer/liblongomatch.cproj b/libcesarplayer/liblongomatch.cproj
index abbc56f..d47d7d3 100644
--- a/libcesarplayer/liblongomatch.cproj
+++ b/libcesarplayer/liblongomatch.cproj
@@ -51,33 +51,29 @@
</CodeGeneration>
</PropertyGroup>
<ItemGroup>
- <None Include="common.h" />
<None Include="gst-camera-capturer.h" />
<None Include="gstscreenshot.h" />
<None Include="gst-smart-video-scaler.h" />
<None Include="gst-video-editor.h" />
- <None Include="gstvideowidget.h" />
- <None Include="macros.h" />
- <None Include="video-utils.h" />
<None Include="baconvideowidget-marshal.h" />
<None Include="gst-remuxer.h" />
<None Include="gst-video-encoder.h" />
<None Include="lgm-video-player.h" />
<None Include="gst-nle-source.h" />
<None Include="lgm-gtk-glue.h" />
+ <None Include="lgm-utils.h" />
+ <None Include="lgm-utils.m" />
</ItemGroup>
<ItemGroup>
<Compile Include="gst-camera-capturer.c" />
<Compile Include="gstscreenshot.c" />
<Compile Include="gst-smart-video-scaler.c" />
<Compile Include="gst-video-editor.c" />
- <Compile Include="gstvideowidget.c" />
<Compile Include="baconvideowidget-marshal.c" />
<Compile Include="gst-remuxer.c" />
<Compile Include="gst-video-encoder.c" />
<Compile Include="gst-nle-source.c" />
<Compile Include="lgm-video-player.c" />
- <Compile Include="video-utils.m" />
<Compile Include="lgm-gtk-glue.c" />
</ItemGroup>
</Project>
\ No newline at end of file
diff --git a/libcesarplayer/test-capturer.c b/libcesarplayer/test-capturer.c
index 3ba3e63..abc8057 100644
--- a/libcesarplayer/test-capturer.c
+++ b/libcesarplayer/test-capturer.c
@@ -18,17 +18,8 @@
*/
#include <gtk/gtk.h>
-#include <stdlib.h>
-#include <unistd.h>
#include "gst-camera-capturer.h"
-#include "video-utils.h"
-#if defined (GDK_WINDOWING_X11)
-#include <gdk/gdkx.h>
-#elif defined (GDK_WINDOWING_WIN32)
-#include <gdk/gdkwin32.h>
-#elif defined (GDK_WINDOWING_QUARTZ)
-#include <gdk/gdkquartz.h>
-#endif
+#include "lgm-utils.h"
static GtkWidget *recbutton, *stopbutton;
static int sargc;
diff --git a/libcesarplayer/test-discoverer.c b/libcesarplayer/test-discoverer.c
index 013a701..eead164 100644
--- a/libcesarplayer/test-discoverer.c
+++ b/libcesarplayer/test-discoverer.c
@@ -17,7 +17,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "video-utils.h"
+#include "lgm-utils.h"
int
main (int argc, char *argv[])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]