This repository has been archived by the owner on Mar 10, 2019. It is now read-only.
forked from GNOME/rhythmbox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for custom RBPlayer implementations. Add Deezer plugin.
- Loading branch information
Martin Ashby
committed
Jan 22, 2018
1 parent
5f93a66
commit 32e37e9
Showing
20 changed files
with
1,774 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"name": "Mac", | ||
"includePath": [ | ||
"/usr/include", | ||
"/usr/local/include", | ||
"${workspaceRoot}" | ||
], | ||
"defines": [], | ||
"intelliSenseMode": "clang-x64", | ||
"browse": { | ||
"path": [ | ||
"/usr/include", | ||
"/usr/local/include", | ||
"${workspaceRoot}" | ||
], | ||
"limitSymbolsToIncludedHeaders": true, | ||
"databaseFilename": "" | ||
}, | ||
"macFrameworkPath": [ | ||
"/System/Library/Frameworks", | ||
"/Library/Frameworks" | ||
] | ||
}, | ||
{ | ||
"name": "Linux", | ||
"includePath": [ | ||
"/usr/include/c++/6", | ||
"/usr/include/x86_64-linux-gnu/c++/6", | ||
"/usr/include/c++/6/backward", | ||
"/usr/lib/gcc/x86_64-linux-gnu/6/include", | ||
"/usr/local/include", | ||
"/usr/lib/gcc/x86_64-linux-gnu/6/include-fixed", | ||
"/usr/include/x86_64-linux-gnu", | ||
"/usr/include", | ||
"/usr/include/lirc", | ||
"/usr/include/gstreamer-1.0", | ||
"${workspaceRoot}", | ||
"${workspaceRoot}/backends", | ||
"${workspaceRoot}/rhythmdb", | ||
"${workspaceRoot}/backends/gstreamer", | ||
"/usr/include/libxml2", | ||
"/usr/include/glib-2.0", | ||
"/usr/lib/x86_64-linux-gnu/glib-2.0/include/", | ||
"/usr/include/gdk-pixbuf-2.0", | ||
"/usr/include/gtk-3.0", | ||
"${workspaceRoot}/widgets", | ||
"${workspaceRoot}/lib", | ||
"/usr/include/totem-pl-parser/1/plparser", | ||
"${workspaceRoot}/metadata", | ||
"${workspaceRoot}/sources", | ||
"${workspaceRoot}/podcast", | ||
"/usr/include/pango-1.0", | ||
"/usr/include/cairo", | ||
"/usr/include/atk-1.0", | ||
"${workspaceRoot}/plugins", | ||
"${workspaceRoot}/shell", | ||
"/usr/include/libpeas-1.0", | ||
"/usr/include/gobject-introspection-1.0", | ||
"/usr/include/deezer", | ||
"/usr/include/webkitgtk-4.0", | ||
"/usr/include/libsoup-2.4", | ||
"/usr/include/json-glib-1.0" | ||
], | ||
"defines": [], | ||
"intelliSenseMode": "clang-x64", | ||
"browse": { | ||
"path": [ | ||
"/usr/include/c++/6", | ||
"/usr/include/x86_64-linux-gnu/c++/6", | ||
"/usr/include/c++/6/backward", | ||
"/usr/lib/gcc/x86_64-linux-gnu/6/include", | ||
"/usr/local/include", | ||
"/usr/lib/gcc/x86_64-linux-gnu/6/include-fixed", | ||
"/usr/include/x86_64-linux-gnu", | ||
"/usr/include", | ||
"${workspaceRoot}", | ||
"/usr/include/glib-2.0" | ||
], | ||
"limitSymbolsToIncludedHeaders": true, | ||
"databaseFilename": "" | ||
} | ||
}, | ||
{ | ||
"name": "Win32", | ||
"includePath": [ | ||
"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include", | ||
"${workspaceRoot}" | ||
], | ||
"defines": [ | ||
"_DEBUG", | ||
"UNICODE" | ||
], | ||
"intelliSenseMode": "msvc-x64", | ||
"browse": { | ||
"path": [ | ||
"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include/*", | ||
"${workspaceRoot}" | ||
], | ||
"limitSymbolsToIncludedHeaders": true, | ||
"databaseFilename": "" | ||
} | ||
} | ||
], | ||
"version": 3 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"files.associations": { | ||
"rb-encoder.h": "c", | ||
"rhythmdb.h": "c", | ||
"rb-player.h": "c", | ||
"glib-object.h": "c", | ||
"gtk.h": "c", | ||
"rb-property-view.h": "c", | ||
"gi18n-lib.h": "c", | ||
"glib.h": "c", | ||
"galloca.h": "c", | ||
"gtypes.h": "c", | ||
"deezer-source.h": "c", | ||
"rb-deezer-entry-type.h": "c", | ||
"rhythmdb-entry-type.h": "c", | ||
"rb-deezer-plugin.h": "c", | ||
"deezer-api.h": "c", | ||
"rb-deezer-source.h": "c", | ||
"deezer-player.h": "c", | ||
"deezer-connect.h": "c", | ||
"deezer-track.h": "c", | ||
"json-glib.h": "c" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,3 +64,7 @@ endif | |
if USE_GUDEV | ||
SUBDIRS += android | ||
endif | ||
|
||
if ENABLE_DEEZER | ||
SUBDIRS += deezer | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# plugin library file called libdeezerpl in order not to conflict with libdeezer.so | ||
# as provided by Deezer SDK. Otherwise build will not work. | ||
|
||
plugindir = $(PLUGINDIR)/deezer | ||
plugindatadir = $(PLUGINDATADIR)/deezer | ||
plugin_LTLIBRARIES = libdeezerpl.la | ||
|
||
libdeezerpl_la_SOURCES = \ | ||
rb-deezer-source.h \ | ||
rb-deezer-plugin.h \ | ||
rb-deezer-source.c \ | ||
rb-deezer-plugin.c \ | ||
rb-deezer-player.c \ | ||
rb-deezer-player.h \ | ||
rb-deezer-entry-type.h \ | ||
rb-deezer-entry-type.c \ | ||
yuarel.c \ | ||
yuarel.h | ||
|
||
libdeezerpl_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) | ||
libdeezerpl_la_LIBTOOLFLAGS = --tag=disable-static | ||
libdeezerpl_la_LIBADD = \ | ||
$(top_builddir)/shell/librhythmbox-core.la \ | ||
$(DEEZER_LIBS) | ||
|
||
AM_CPPFLAGS = \ | ||
-Wno-error=unused-function \ | ||
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ | ||
-DG_LOG_DOMAIN=\"Rhythmbox\" \ | ||
-I$(top_srcdir) \ | ||
-I$(top_srcdir)/lib \ | ||
-I$(top_srcdir)/metadata \ | ||
-I$(top_srcdir)/rhythmdb \ | ||
-I$(top_srcdir)/widgets \ | ||
-I$(top_srcdir)/sources \ | ||
-I$(top_srcdir)/plugins \ | ||
-I$(top_srcdir)/shell \ | ||
-I$(top_srcdir)/backends \ | ||
-DPIXMAP_DIR=\""$(datadir)/pixmaps"\" \ | ||
-DSHARE_DIR=\"$(pkgdatadir)\" \ | ||
-DDATADIR=\""$(datadir)"\" \ | ||
$(RHYTHMBOX_CFLAGS) \ | ||
$(DEEZER_CFLAGS) \ | ||
-D_DEFAULT_SOURCE \ | ||
-std=c11 | ||
|
||
plugin_in_files = deezer.plugin.in | ||
%.plugin: %.plugin.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache | ||
|
||
plugin_DATA = $(plugin_in_files:.plugin.in=.plugin) | ||
|
||
EXTRA_DIST = $(plugin_in_files) | ||
|
||
CLEANFILES = $(plugin_DATA) | ||
DISTCLEANFILES = $(plugin_DATA) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[Plugin] | ||
Module=deezerpl | ||
IAge=2 | ||
_Name=Deezer | ||
_Description=A plugin to play music from Deezer | ||
Authors=Martin Ashby <[email protected]> | ||
Copyright=Copyright © 2018 Martin Ashby | ||
Website=https://mfashby.net |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
#include "rb-deezer-entry-type.h" | ||
|
||
enum { | ||
PROP_DZ_ENTRY_NAME = 1, | ||
N_PROPERTIES | ||
}; | ||
|
||
struct _RBDeezerEntryType { | ||
RhythmDBEntryType parent; | ||
char* name; | ||
}; | ||
|
||
static void rb_deezer_entry_type_init(RBDeezerEntryType* entry_type) {} | ||
|
||
static void rb_deezer_entry_get_prop(GObject* object, | ||
guint property_id, | ||
GValue* value, | ||
GParamSpec* pspec) { | ||
|
||
RBDeezerEntryType* entry = RB_DEEZER_ENTRY_TYPE(object); | ||
switch (property_id) { | ||
case PROP_DZ_ENTRY_NAME: | ||
g_value_set_string(value, entry->name); | ||
break; | ||
default: | ||
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); | ||
break; | ||
} | ||
} | ||
|
||
static void rb_deezer_entry_set_prop(GObject* object, | ||
guint property_id, | ||
const GValue* value, | ||
GParamSpec* pspec) { | ||
RBDeezerEntryType* entry = RB_DEEZER_ENTRY_TYPE(object); | ||
switch (property_id) { | ||
case PROP_DZ_ENTRY_NAME: | ||
g_free(entry->name); | ||
entry->name = g_value_dup_string(value); | ||
break; | ||
default: | ||
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); | ||
break; | ||
} | ||
} | ||
|
||
static void rb_deezer_entry_type_class_init(RBDeezerEntryTypeClass* entry_type_cls) { | ||
GObjectClass* cls = G_OBJECT_CLASS(entry_type_cls); | ||
cls->get_property = rb_deezer_entry_get_prop; | ||
cls->set_property = rb_deezer_entry_set_prop; | ||
|
||
g_object_class_install_property(cls, PROP_DZ_ENTRY_NAME, | ||
g_param_spec_string( | ||
"name", | ||
"Name", | ||
"Name of the entry type", | ||
"", | ||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | ||
) | ||
); | ||
} | ||
|
||
static void rb_deezer_entry_type_class_finalize(RBDeezerEntryTypeClass* entry_type_cls) { | ||
|
||
} | ||
|
||
G_DEFINE_DYNAMIC_TYPE( | ||
RBDeezerEntryType, | ||
rb_deezer_entry_type, | ||
rhythmdb_entry_type_get_type() | ||
) | ||
|
||
void _rb_deezer_entry_type_register_type(GTypeModule* type_module) { | ||
rb_deezer_entry_type_register_type(type_module); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#ifndef RB_DEEZER_ENTRY_TYPE_H | ||
#define RB_DEEZER_ENTRY_TYPE_H | ||
|
||
#include <glib-object.h> | ||
#include "rhythmdb-entry-type.h" | ||
|
||
G_DECLARE_FINAL_TYPE ( | ||
RBDeezerEntryType, | ||
rb_deezer_entry_type, | ||
RB, DEEZER_ENTRY_TYPE, | ||
RhythmDBEntryType | ||
); | ||
|
||
void _rb_deezer_entry_type_register_type(GTypeModule*); | ||
|
||
#endif |
Oops, something went wrong.