Commit 0aec6d50 authored by Bastien Nocera's avatar Bastien Nocera

Forgot the commit

svn path=/tags/V_2_21_5; revision=9
parent 39aec9e0
Bastien Nocera <hadess@hadess.net>
This diff is collapsed.
============ Version 2.21.5
2007-12-03 Bastien Nocera <hadess@hadess.net>
* NEWS: upd
* configure.in: 2.21.5
2007-12-03 Bastien Nocera <hadess@hadess.net>
* AUTHORS: added
* README: added
(Closes: #501314)
* plparse/totem-disc.c: (cd_cache_new), (cd_cache_has_medium):
Fix double-free due to overzealous free (Closes: #501120)
============ Version 2.21.4
2007-12-03 Bastien Nocera <hadess@hadess.net>
* Makefile.am:
* configure.in: 2.21.4
* totem-plparser-mini-uninstalled.pc.in:
* totem-plparser-mini.pc.in:
* totem-plparser-uninstalled.pc.in:
* totem-plparser.pc.in: Update includes to new location
2007-12-03 Bastien Nocera <hadess@hadess.net>
* MAINTAINERS: add
* plparse/stamp-totem-pl-parser-builtins.h: Remove this built item
2007-12-03 Bastien Nocera <hadess@hadess.net>
* *: Moved from Totem, export mini plparser
for use in the browser plugin (Closes: #462153)
Bastien Nocera
Email: hadess@hadess.net
Userid: hadess
SUBDIRS = lib plparse po
EXTRA_DIST = \
COPYING.LIB \
autogen.sh \
intltool-extract.in \
intltool-merge.in \
intltool-update.in \
AUTHORS NEWS \
totem-plparser.pc.in \
totem-plparser-mini.pc
CLEANFILES = totem-plparser.pc
DISTCLEANFILES = intltool-extract intltool-merge intltool-update \
gnome-doc-utils.make
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = totem-plparser.pc totem-plparser-mini.pc
DISTCHECK_CONFIGURE_FLAGS = --disable-scrollkeeper
New features and significant updates in version...
2.21.5:
* Fix a double-free crasher
2.21.4:
* Split out from the main Totem module
_|_ __|_ _ ._ _
|_(_)|_(/_| | |
playlist parser
totem-pl-parser is a simple GObject-based library to parse a host of
playlist formats, as well as save those
News
====
See NEWS file
Dependencies
============
gnome-vfs and glib to a recent level
BUGS
====
Bugs should be filed in GNOME's Bugzilla:
http://bugzilla.gnome.org/enter_bug.cgi?product=totem&component=playlist%20parser
To get a better debug output, run:
# test-parser --debug
Contact
=======
Bastien Nocera <hadess@hadess.net>
http://www.gnome.org/projects/totem/
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
PKG_NAME="totem"
(test -f $srcdir/configure.in) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
echo " top-level $PKG_NAME directory"
exit 1
}
which gnome-autogen.sh || {
echo "You need to install gnome-common from the GNOME SVN"
exit 1
}
REQUIRED_PKG_CONFIG_VERSION=0.17.1 REQUIRED_AUTOMAKE_VERSION=1.9 USE_GNOME2_MACROS=1 . gnome-autogen.sh
AC_PREREQ(2.52)
m4_define(totem_version_major, 2)
m4_define(totem_version_minor, 21)
m4_define(totem_version_micro, 5)
AC_INIT([totem-pl-parser],
[totem_version_major.totem_version_minor.totem_version_micro],
[http://bugzilla.gnome.org/enter_bug.cgi?product=totem&component=playlist%20parser])
AC_CONFIG_SRCDIR([plparse/totem-pl-parser.c])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([1.9 dist-bzip2 no-dist-gzip check-news subdir-objects])
dnl Add the languages which your application supports to po/LINGUAS
GETTEXT_PACKAGE=totem-pl-parser
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"], [Define to the Gettext package name])
AC_SUBST(GETTEXT_PACKAGE)
AM_GLIB_GNU_GETTEXT
IT_PROG_INTLTOOL([0.35.0])
AC_PROG_CXX
AM_PROG_CC_C_O
AC_PROG_LIBTOOL()
PKG_PROG_PKG_CONFIG
dnl Use local version of asprintf when not on the current system.
AC_CHECK_FUNCS(asprintf)
AC_CONFIG_LIBOBJ_DIR([lib])
AC_REPLACE_FUNCS([asprintf])
AC_PATH_PROG([GLIB_GENMARSHAL],[glib-genmarshal])
AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums])
# Requirements
GLIB_REQS=2.13.4
GTK_REQS=2.11.6
GNOMEVFS_REQS=2.16.0
# Before making a release, the PLPARSER_LT_VERSION string should be modified.
# The string is of the form C:R:A.
# - If interfaces have been changed or added, but binary compatibility has
# been preserved, change to C+1:0:A+1
# - If binary compatibility has been broken (eg removed or changed interfaces)
# change to C+1:0:0
# - If the interface is the same as the previous version, change to C:R+1:A
PLPARSER_LT_VERSION=10:2:0
AC_SUBST(PLPARSER_LT_VERSION)
TOTEM_PL_PARSER_VERSION_MAJOR=totem_version_major
TOTEM_PL_PARSER_VERSION_MINOR=totem_version_minor
TOTEM_PL_PARSER_VERSION_MICRO=totem_version_micro
AC_SUBST(TOTEM_PL_PARSER_VERSION_MAJOR)
AC_SUBST(TOTEM_PL_PARSER_VERSION_MINOR)
AC_SUBST(TOTEM_PL_PARSER_VERSION_MICRO)
dnl ***
dnl HAL
dnl ***
AC_ARG_WITH(hal,
AC_HELP_STRING([--without-hal],
[Disable HAL support]))
if test "x$with_hal" != "xno"; then
PKG_CHECK_MODULES(HAL, hal >= 0.5 hal < 0.6 dbus-1 >= $DBUS_REQS, enable_hal05=yes, enable_hal05=no)
if test x$enable_hal05 = xyes; then
enable_hal=yes
AC_DEFINE(HAVE_HAL, 1, [Define if you HAL support])
else
if test "x$with_hal" = "xyes"; then
AC_MSG_ERROR([HAL support explicitly requested but HAL couldn't be found])
fi
fi
fi
AM_CONDITIONAL(HAVE_HAL, test x"$enable_hal" = xyes)
dnl Check for packages for building libtotem-plparser.la
PKG_CHECK_MODULES(TOTEM_PLPARSER, [gtk+-2.0 libxml-2.0 gnome-vfs-2.0 gnome-vfs-module-2.0])
PKG_CHECK_MODULES([TOTEM_PLPARSER_MINI], [gnome-vfs-2.0 gnome-vfs-module-2.0])
GNOME_COMMON_INIT
GNOME_DEBUG_CHECK
GNOME_COMPILE_WARNINGS([maximum])
GNOME_CXX_WARNINGS
GNOME_MAINTAINER_MODE_DEFINES
if test "$GCC" = "yes" ; then
CFLAGS="\
-Wall \
-Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
-Wnested-externs -Wpointer-arith \
-Wcast-align -Wsign-compare \
-fno-strict-aliasing \
$CFLAGS"
fi
AC_SUBST([AM_CPPFLAGS])
AC_SUBST([AM_CFLAGS])
AC_SUBST([AM_CXXFLAGS])
AC_SUBST([AM_LDFLAGS])
AC_OUTPUT([
Makefile
totem-plparser.pc
totem-plparser-uninstalled.pc
totem-plparser-mini.pc
totem-plparser-mini-uninstalled.pc
lib/Makefile
plparse/Makefile
plparse/totem-pl-parser-features.h
po/Makefile.in
])
noinst_LTLIBRARIES = \
libtotem_glibc.la
common_defines = \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
-DDATADIR=\""$(datadir)"\" \
$(DISABLE_DEPRECATED)
noinst_HEADERS = totem_internal.h
libtotem_glibc_la_SOURCES =
libtotem_glibc_la_LIBADD = @LTLIBOBJS@
EXTRA_DIST = asprintf.c
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <sys/varargs.h>
int totem_private_asprintf(char **out, const char *fmt, ...)
{
va_list ap;
int ret_status = EOF;
char dir_name[2001];
char file_name[2000];
FILE *fp = NULL;
char *work = NULL;
va_start(ap, fmt);
/* Warning: tmpfile() does not work well on Windows (MinGW)
* if user does not have write access on the drive where
* working dir is? */
#ifdef __MINGW32__
/* file_name = G_tempfile(); */
GetTempPath ( 2000, dir_name );
GetTempFileName ( dir_name, "asprintf", 0, file_name );
fp = fopen ( file_name, "w+" );
#else
fp = tmpfile();
#endif /* __MINGW32__ */
if ( fp ) {
int count;
count = vfprintf(fp, fmt, ap);
if (count >= 0) {
work = calloc(count + 1, sizeof(char));
if (work != NULL) {
rewind(fp);
ret_status = fread(work, sizeof(char), count, fp);
if (ret_status != count) {
ret_status = EOF;
free(work);
work = NULL;
}
}
}
fclose(fp);
#ifdef __MINGW32__
unlink ( file_name );
#endif /* __MINGW32__ */
}
va_end(ap);
*out = work;
return ret_status;
}
#include "config.h"
/* replacement of asprintf & vasprintf */
#ifndef HAVE_ASPRINTF
#define HAVE_ASPRINTF
#ifdef __GNUC__
#define asprintf(STRINGPP, FORMAT, ARGS...) totem_private_asprintf((STRINGPP), FORMAT, ##ARGS)
#elif defined (_MSC_VER)
#define asprintf(STRINGPP, FORMATARGS) totem_private_asprintf((STRINGPP), FORMATARGS)
#else
#define asprintf(STRINGPP, FORMAT, ...) totem_private_asprintf((STRINGPP), FORMAT, __VA_ARGS__)
#endif
int totem_private_asprintf(char **string, const char *format, ...);
#endif
noinst_PROGRAMS = test-parser disc-test
test_parser_SOURCES = test-parser.c
test_parser_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_builddir)/src/plparser \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\"\
$(DISABLE_DEPRECATED) \
$(AM_CPPFLAGS)
test_parser_CFLAGS = \
$(TOTEM_PLPARSER_CFLAGS)\
$(HAL_CFLAGS) \
$(DBUS_CFLAGS) \
$(WARN_CFLAGS) \
$(AM_CFLAGS)
test_parser_LDADD = \
$(TOTEM_PLPARSER_LIBS) \
libtotem-plparser.la
disc_test_SOURCES = \
disc-test.c
disc_test_CPPFLAGS = \
$(common_defines) \
$(AM_CPPFLAGS)
disc_test_CFLAGS = \
$(WARN_CFLAGS) \
$(TOTEM_PLPARSER_CFLAGS)\
$(AM_CFLAGS)
disc_test_LDFLAGS = \
$(AM_LDFLAGS)
disc_test_LDADD = \
libtotem-plparser.la \
$(TOTEM_PLPARSER_LIBS)
lib_LTLIBRARIES = libtotem-plparser.la libtotem-plparser-mini.la
MARSHALFILES = totemplparser-marshal.c totemplparser-marshal.h
BUILT_SOURCES = $(MARSHALFILES)
totemplparser-marshal.c: totemplparser-marshal.h
( $(GLIB_GENMARSHAL) --prefix=totemplparser_marshal $(srcdir)/totemplparser-marshal.list --header --body > totemplparser-marshal.c )
totemplparser-marshal.h: totemplparser-marshal.list
( $(GLIB_GENMARSHAL) --prefix=totemplparser_marshal $(srcdir)/totemplparser-marshal.list --header > totemplparser-marshal.h )
plparserincludedir = $(pkgincludedir)/1/plparser
plparserinclude_HEADERS = \
totem-pl-parser-builtins.h \
totem-pl-parser-features.h \
totem-pl-parser.h \
totem-disc.h \
totem-pl-parser-mini.h
libtotem_plparser_la_SOURCES = \
totem-disc.c \
totem-disc.h \
totem-pl-parser-builtins.c \
totem-pl-parser-builtins.h \
totem-pl-parser.c \
totem-pl-parser-features.h \
totem-pl-parser.h \
totem-pl-parser-lines.c \
totem-pl-parser-lines.h \
totemplparser-marshal.c \
totemplparser-marshal.h \
totem-pl-parser-media.c \
totem-pl-parser-media.h \
totem-pl-parser-misc.c \
totem-pl-parser-misc.h \
totem-pl-parser-pla.c \
totem-pl-parser-pla.h \
totem-pl-parser-pls.c \
totem-pl-parser-pls.h \
totem-pl-parser-podcast.c \
totem-pl-parser-podcast.h \
totem-pl-parser-private.h \
totem-pl-parser-qt.c \
totem-pl-parser-qt.h \
totem-pl-parser-smil.c \
totem-pl-parser-smil.h \
totem-pl-parser-wm.c \
totem-pl-parser-wm.h \
totem-pl-parser-xspf.c \
totem-pl-parser-xspf.h \
xmlparser.h xmlparser.c \
xmllexer.h xmllexer.c
libtotem_plparser_la_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_srcdir)/lib \
-I$(top_builddir)/src/plparser \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\"\
$(DISABLE_DEPRECATED) \
$(AM_CPPFLAGS)
libtotem_plparser_la_CFLAGS = \
$(TOTEM_PLPARSER_CFLAGS) \
$(HAL_CFLAGS) \
$(DBUS_CFLAGS) \
$(WARN_CFLAGS) \
$(AM_CFLAGS) \
-I$(top_srcdir)/lib \
-D_GNU_SOURCE
libtotem_plparser_la_LIBADD = \
$(TOTEM_PLPARSER_LIBS) \
$(top_builddir)/lib/libtotem_glibc.la \
$(HAL_LIBS)
libtotem_plparser_la_LDFLAGS = \
-version-info $(PLPARSER_LT_VERSION) \
-export-symbols $(srcdir)/plparser.symbols \
-no-undefined \
$(AM_LDFLAGS)
libtotem_plparser_mini_la_SOURCES = \
totem-pl-parser-mini.h \
totem-pl-parser.c \
totem-pl-parser-lines.c \
totem-pl-parser-lines.h \
totem-pl-parser-misc.c \
totem-pl-parser-misc.h \
totem-pl-parser-pls.c \
totem-pl-parser-pls.h \
totem-pl-parser-podcast.c \
totem-pl-parser-podcast.h \
totem-pl-parser-private.h \
totem-pl-parser-qt.c \
totem-pl-parser-qt.h \
totem-pl-parser-smil.c \
totem-pl-parser-smil.h \
totem-pl-parser-wm.c \
totem-pl-parser-wm.h \
totem-pl-parser-xspf.c \
totem-pl-parser-xspf.h
libtotem_plparser_mini_la_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_builddir)/src/plparser \
-DTOTEM_PL_PARSER_MINI \
$(DISABLE_DEPRECATED) \
$(AM_CPPFLAGS)
libtotem_plparser_mini_la_CFLAGS = \
$(TOTEM_PLPARSER_MINI_CFLAGS) \
$(WARN_CFLAGS) \
$(AM_CFLAGS)
libtotem_plparser_mini_la_LIBADD = \
$(TOTEM_PLPARSER_MINI_LIBS)
libtotem_plparser_mini_la_LDFLAGS = \
-no-undefined \
$(AM_LDFLAGS)
totem-pl-parser-builtins.h: stamp-totem-pl-parser-builtins.h
@true
stamp-totem-pl-parser-builtins.h: totem-pl-parser.h Makefile
(cd $(srcdir) && $(GLIB_MKENUMS) \
--fhead "#ifndef __TOTEM_PL_PARSER_BUILTINS_H__\n#define __TOTEM_PL_PARSER_BUILTINS_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
--fprod "/* enumerations from \"@filename@\" */\n" \
--vhead "GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define TOTEM_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
--ftail "G_END_DECLS\n\n#endif /* __TOTEM_PL_PARSER_BUILTINS_H__ */" totem-pl-parser.h) >> xgen-gtbh \
&& (cmp -s xgen-gtbh totem-pl-parser-builtins.h || cp xgen-gtbh totem-pl-parser-builtins.h ) \
&& rm -f xgen-gtbh \
&& echo timestamp > $(@F)
totem-pl-parser-builtins.c: totem-pl-parser.h Makefile totem-pl-parser-builtins.h
(cd $(srcdir) && $(GLIB_MKENUMS) \
--fhead "#include \"totem-pl-parser.h\"\n#include \"totem-pl-parser-builtins.h\"" \
--fprod "\n/* enumerations from \"@filename@\" */" \
--vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G@Type@Value values[] = {" \
--vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
--vtail " { 0, NULL, NULL }\n };\n etype = g_@type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" \
totem-pl-parser.h ) > xgen-gtbc \
&& cp xgen-gtbc totem-pl-parser-builtins.c \
&& rm -f xgen-gtbc
CLEANFILES = \
totem-pl-parser-builtins.h \
totem-pl-parser-builtins.c \
stamp-totem-pl-parser-builtins.h \
$(BUILT_SOURCES)
EXTRA_DIST = \
totemplparser-marshal.list \
totem-pl-parser-features.h.in \
plparser.symbols
/* Small test app for disc concent detection
* (c) 2004 Ronald Bultje <rbultje@ronald.bitfreak.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <glib.h>
#include <libgnomevfs/gnome-vfs.h>
#include "totem-disc.h"
gint
main (gint argc,
gchar *argv[])
{
TotemDiscMediaType type;
GError *error = NULL;
const char *type_s = NULL;
char *url = NULL;
gboolean is_dir = FALSE;
GList *or, *list;
GnomeVFSVolumeMonitor *mon;
if (argc != 2) {
g_print ("Usage: %s <device>\n", argv[0]);
return -1;
}
g_type_init ();
gnome_vfs_init ();
g_log_set_always_fatal (G_LOG_LEVEL_WARNING);
if (g_file_test (argv[1], G_FILE_TEST_IS_DIR) != FALSE) {
type = totem_cd_detect_type_from_dir (argv[1], &url, &error);
is_dir = TRUE;
} else {
type = totem_cd_detect_type_with_url (argv[1], &url, &error);
}
switch (type) {
case MEDIA_TYPE_ERROR:
mon = gnome_vfs_get_volume_monitor ();
g_print ("Error: %s\n", error ? error->message : "unknown reason");
g_print ("\n");
g_print ("List of connected drives:\n");
for (or = list = gnome_vfs_volume_monitor_get_connected_drives (mon);
list != NULL; list = list->next) {
char *device;
device = gnome_vfs_drive_get_device_path ((GnomeVFSDrive *) list->data);
g_print ("%s\n", device);
g_free (device);
}
if (or == NULL)
g_print ("No connected drives!\n");
g_print ("List of mounted volumes:\n");
for (or = list = gnome_vfs_volume_monitor_get_mounted_volumes (mon);
list != NULL; list = list->next) {
char *device;