Commit f9f0074d authored by Bastien Nocera's avatar Bastien Nocera

7 years later, remove xine-lib backend.

2009-05-06  Bastien Nocera  <hadess@hadess.net>

	* COPYING:
	* README:
	* configure.in:
	* data/icons/scalable/totem.svg:
	* data/totem-video-thumbnailer.1:
	* data/totem-video-thumbnailer.pod:
	* data/totem.1:
	* src/backend/Makefile.am:
	* src/backend/bacon-video-widget-common.c:
	* src/backend/bacon-video-widget-common.h:
	* src/backend/bacon-video-widget-gst-0.10.c (bvw_error_msg),
	(bacon_video_widget_init), (bacon_video_widget_finalize),
	(bacon_video_widget_open), (bacon_video_widget_play),
	(bacon_video_widget_can_direct_seek),
	(bacon_video_widget_seek_time), (bacon_video_widget_close),
	(bacon_video_widget_pause), (get_visualization_size),
	(bacon_video_widget_is_seekable):
	* src/backend/bacon-video-widget-xine.c:
	* src/backend/bacon-video-widget.h:
	* src/backend/video-utils.c:
	* src/backend/video-utils.h:
	* totem.doap:
	7 years later, remove xine-lib backend.
	Bye bye
parent b82bc22e
...@@ -350,8 +350,5 @@ extend this exception to your version of the code, but you are not obligated ...@@ -350,8 +350,5 @@ extend this exception to your version of the code, but you are not obligated
to do so. If you do not wish to do so, delete this exception statement from to do so. If you do not wish to do so, delete this exception statement from
your version. your version.
Note that the src/backend/bacon-video-widget-xine.c file does not require such
an exception as it does not link to GStreamer plugins.
Note that the src/totem-subtitle-encoding.c file was relicensed to LGPL Note that the src/totem-subtitle-encoding.c file was relicensed to LGPL
(see http://bugzilla.gnome.org/show_bug.cgi?id=515809). (see http://bugzilla.gnome.org/show_bug.cgi?id=515809).
2009-05-06 Bastien Nocera <hadess@hadess.net>
* COPYING:
* README:
* configure.in:
* data/icons/scalable/totem.svg:
* data/totem-video-thumbnailer.1:
* data/totem-video-thumbnailer.pod:
* data/totem.1:
* src/backend/Makefile.am:
* src/backend/bacon-video-widget-common.c:
* src/backend/bacon-video-widget-common.h:
* src/backend/bacon-video-widget-gst-0.10.c (bvw_error_msg),
(bacon_video_widget_init), (bacon_video_widget_finalize),
(bacon_video_widget_open), (bacon_video_widget_play),
(bacon_video_widget_can_direct_seek),
(bacon_video_widget_seek_time), (bacon_video_widget_close),
(bacon_video_widget_pause), (get_visualization_size),
(bacon_video_widget_is_seekable):
* src/backend/bacon-video-widget-xine.c:
* src/backend/bacon-video-widget.h:
* src/backend/video-utils.c:
* src/backend/video-utils.h:
* totem.doap:
7 years later, remove xine-lib backend.
Bye bye
2009-05-01 Bastien Nocera <hadess@hadess.net> 2009-05-01 Bastien Nocera <hadess@hadess.net>
* browser-plugin/totemPlugin.cpp: * browser-plugin/totemPlugin.cpp:
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
_|_ __|_ _ ._ _ _|_ __|_ _ ._ _
|_(_)|_(/_| | | |_(_)|_(/_| | |
Totem is movie player for the GNOME desktop based on xine or GStreamer. Totem is movie player for the GNOME desktop based on GStreamer.
It features a playlist, a full-screen mode, seek and volume controls, It features a playlist, a full-screen mode, seek and volume controls,
as well as complete keyboard navigation. as well as complete keyboard navigation.
...@@ -17,9 +17,6 @@ See NEWS file ...@@ -17,9 +17,6 @@ See NEWS file
Dependencies Dependencies
============ ============
xine-lib 1.1.7 or newer:
http://xinehq.de
or
GStreamer 0.10.6, and gstreamer-plugins-base 0.10.7 GStreamer 0.10.6, and gstreamer-plugins-base 0.10.7
http://gstreamer.freedesktop.org http://gstreamer.freedesktop.org
......
...@@ -53,148 +53,103 @@ allowed_plugins="thumbnail screensaver ontop galago gromit lirc media-player-key ...@@ -53,148 +53,103 @@ allowed_plugins="thumbnail screensaver ontop galago gromit lirc media-player-key
PLUGINDIR='${libdir}/totem/plugins' PLUGINDIR='${libdir}/totem/plugins'
AC_SUBST(PLUGINDIR) AC_SUBST(PLUGINDIR)
dnl xine or gst ?
dnl the two versions here implicate the gstreamer core and gst-plugins dnl the two versions here implicate the gstreamer core and gst-plugins
dnl release versions. dnl release versions.
XINE_REQS=1.1.7
GST_MAJORMINOR=0.10 GST_MAJORMINOR=0.10
GST_REQS=0.10.22 GST_REQS=0.10.22
GSTPLUG_REQS=0.10.22.1 GSTPLUG_REQS=0.10.22.1
AC_ARG_ENABLE(xine,
AC_HELP_STRING([--enable-xine], [use xine instead of GStreamer for the backend]),
[case "${enableval}" in
yes) ENABLE_XINE=yes ;;
no) ENABLE_XINE=no ;;
*) AC_MSG_ERROR([
***** Bad value ${enableval} for --enable-xine
***** Please use one of the following:
***** --enable-xine=yes
***** --enable-xine=no
]) ;;
esac],
[ENABLE_XINE=auto]) dnl Default value
HAVE_GSTREAMER=no HAVE_GSTREAMER=no
if test x$ENABLE_XINE = xno || test x$ENABLE_XINE = xauto; then
dnl Check for the required GStreamer versions for missing plugins
dnl installation, unless this has been disabled.
AC_MSG_CHECKING([whether to enable easy codec installation support])
AC_ARG_ENABLE([easy-codec-installation],
[
AS_HELP_STRING([--enable-easy-codec-installation],
[Whether to enable easy codec installation support for GStreamer]
)
], [
case "${enableval}" in
yes) enable_easy_codec_installation=yes ;;
no) enable_easy_codec_installation=no ;;
*) enable_easy_codec_installation=auto ;;
esac
], [
dnl default value
enable_easy_codec_installation=auto
]
)
AC_MSG_RESULT([$enable_easy_codec_installation])
if test "x$enable_easy_codec_installation" != "xno"; then
PKG_CHECK_MODULES(MISSING_PLUGINS, gstreamer-plugins-base-0.10,
[
MISSING_PLUGINS_LIBS="$MISSING_PLUGINS_LIBS -lgstpbutils-0.10"
AC_DEFINE([ENABLE_MISSING_PLUGIN_INSTALLATION], 1,
[Whether we can and want to do installation of missing plugins])
])
fi
MM="gstreamer-0.10 >= $GST_REQS gstreamer-base-0.10 >= $GST_REQS gstreamer-plugins-base-0.10 >= $GSTPLUG_REQS gstreamer-tag-0.10 >= $GSTPLUG_REQS gconf-2.0"
PKG_CHECK_MODULES(GST, $MM,
HAVE_GSTREAMER=yes, HAVE_GSTREAMER=no)
GST_LIBS="$GST_LIBS -lgstbase-$GST_MAJORMINOR -lgstinterfaces-$GST_MAJORMINOR -lgstvideo-$GST_MAJORMINOR -lgstaudio-$GST_MAJORMINOR -lgstpbutils-$GST_MAJORMINOR -lgsttag-$GST_MAJORMINOR"
AC_SUBST(GST_LIBS)
EXTRA_BACKEND_LIBS="-lgstinterfaces-$GST_MAJORMINOR -lgstvideo-$GST_MAJORMINOR -lgstaudio-$GST_MAJORMINOR -lgstpbutils-$GST_MAJORMINOR"
AC_MSG_CHECKING(for backend libraries)
dnl Give error and exit if we don't have gstreamer
if test "x$HAVE_GSTREAMER" = "xno"; then
AC_MSG_ERROR(you need the GStreamer or the xine-lib development packages installed)
fi
AC_MSG_RESULT(GStreamer-$GST_MAJORMINOR)
dnl Check for required plugins dnl Check for the required GStreamer versions for missing plugins
gst010_toolsdir=`$PKG_CONFIG --variable=toolsdir gstreamer-0.10` dnl installation, unless this has been disabled.
gst010_inspect="$gst010_toolsdir/gst-inspect-0.10" AC_MSG_CHECKING([whether to enable easy codec installation support])
AC_ARG_ENABLE([easy-codec-installation],
[
AS_HELP_STRING([--enable-easy-codec-installation],
[Whether to enable easy codec installation support for GStreamer]
)
], [
case "${enableval}" in
yes) enable_easy_codec_installation=yes ;;
no) enable_easy_codec_installation=no ;;
*) enable_easy_codec_installation=auto ;;
esac
], [
dnl default value
enable_easy_codec_installation=auto
]
)
AC_MSG_RESULT([$enable_easy_codec_installation])
if test "x$enable_easy_codec_installation" != "xno"; then
PKG_CHECK_MODULES(MISSING_PLUGINS, gstreamer-plugins-base-0.10,
[
MISSING_PLUGINS_LIBS="$MISSING_PLUGINS_LIBS -lgstpbutils-0.10"
AC_DEFINE([ENABLE_MISSING_PLUGIN_INSTALLATION], 1,
[Whether we can and want to do installation of missing plugins])
])
fi
MM="gstreamer-0.10 >= $GST_REQS gstreamer-base-0.10 >= $GST_REQS gstreamer-plugins-base-0.10 >= $GSTPLUG_REQS gstreamer-tag-0.10 >= $GSTPLUG_REQS gconf-2.0"
PKG_CHECK_MODULES(GST, $MM,
HAVE_GSTREAMER=yes, HAVE_GSTREAMER=no)
GST_LIBS="$GST_LIBS -lgstbase-$GST_MAJORMINOR -lgstinterfaces-$GST_MAJORMINOR -lgstvideo-$GST_MAJORMINOR -lgstaudio-$GST_MAJORMINOR -lgstpbutils-$GST_MAJORMINOR -lgsttag-$GST_MAJORMINOR"
AC_SUBST(GST_LIBS)
EXTRA_BACKEND_LIBS="-lgstinterfaces-$GST_MAJORMINOR -lgstvideo-$GST_MAJORMINOR -lgstaudio-$GST_MAJORMINOR -lgstpbutils-$GST_MAJORMINOR"
AC_MSG_CHECKING(for backend libraries)
dnl Give error and exit if we don't have gstreamer
if test "x$HAVE_GSTREAMER" = "xno"; then
AC_MSG_ERROR(you need the GStreamer development packages installed)
fi
AC_MSG_RESULT(GStreamer-$GST_MAJORMINOR)
dnl Check for required plugins
gst010_toolsdir=`$PKG_CONFIG --variable=toolsdir gstreamer-0.10`
gst010_inspect="$gst010_toolsdir/gst-inspect-0.10"
dnl Give error and exit if we don't have the gst_inspect tool
AC_MSG_CHECKING([GStreamer 0.10 inspection tool])
if test -r "$gst010_inspect"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
AC_MSG_ERROR([
Cannot find required GStreamer-0.10 tool 'gst-inspect-0.10'.
It should be part of gstreamer-0_10-utils. Please install it.
])
fi
dnl Give error and exit if we don't have the gst_inspect tool dnl Check for elements from gst-plugins-base
AC_MSG_CHECKING([GStreamer 0.10 inspection tool]) for base_element in playbin2 ffmpegcolorspace videoscale
if test -r "$gst010_inspect"; then do
AC_MSG_CHECKING([GStreamer 0.10 $base_element plugin])
if $gst010_inspect $base_element >/dev/null 2>/dev/null; then
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
else else
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
AC_MSG_ERROR([ AC_MSG_ERROR([
Cannot find required GStreamer-0.10 tool 'gst-inspect-0.10'. Cannot find required GStreamer-0.10 plugin '$base_element'.
It should be part of gstreamer-0_10-utils. Please install it. It should be part of gst-plugins-base. Please install it.
]) ])
fi fi
done
dnl Check for elements from gst-plugins-base dnl Check for elements from gst-plugins-good
for base_element in playbin2 ffmpegcolorspace videoscale for good_element in gconfaudiosink gconfvideosink goom
do do
AC_MSG_CHECKING([GStreamer 0.10 $base_element plugin]) AC_MSG_CHECKING([GStreamer 0.10 $good_element plugin])
if $gst010_inspect $base_element >/dev/null 2>/dev/null; then if $gst010_inspect $good_element >/dev/null 2>/dev/null; then
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
else else
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
AC_MSG_ERROR([ AC_MSG_ERROR([
Cannot find required GStreamer-0.10 plugin '$base_element'. Cannot find required GStreamer-0.10 plugin '$good_element'.
It should be part of gst-plugins-base. Please install it. It should be part of gst-plugins-good. Please install it.
])
fi
done
dnl Check for elements from gst-plugins-good
for good_element in gconfaudiosink gconfvideosink goom
do
AC_MSG_CHECKING([GStreamer 0.10 $good_element plugin])
if $gst010_inspect $good_element >/dev/null 2>/dev/null; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
AC_MSG_ERROR([
Cannot find required GStreamer-0.10 plugin '$good_element'.
It should be part of gst-plugins-good. Please install it.
])
fi
done
fi
if test x$ENABLE_XINE = xno && test x$HAVE_GSTREAMER = xno; then
AC_MSG_CHECKING(for backend libraries)
AC_MSG_RESULT([none])
AC_MSG_ERROR(you need the GStreamer or the xine-lib development packages installed)
fi
if test x$HAVE_GSTREAMER = xno; then
MM="libxine >= $XINE_REQS gconf-2.0"
PKG_CHECK_MODULES(XINE, $MM, HAVE_XINE=yes,
[
AC_MSG_RESULT(no)
HAVE_XINE=no
]) ])
AC_MSG_CHECKING(for backend libraries)
if test x$HAVE_XINE = xyes; then
AC_MSG_RESULT([xine-lib])
else
AC_MSG_WARN([No xine-lib found])
fi fi
fi done
if test "$HAVE_GSTREAMER" = "yes"; then
AC_DEFINE([HAVE_GSTREAMER],[1],[Define if using gst backend])
fi
AM_CONDITIONAL(TOTEM_GST, test "x$HAVE_GSTREAMER" = "xyes")
AC_MSG_CHECKING([Whether not to check for iso-codes]) AC_MSG_CHECKING([Whether not to check for iso-codes])
AC_ARG_ENABLE([iso-codes], AC_ARG_ENABLE([iso-codes],
...@@ -614,19 +569,16 @@ for plugin in ${used_plugins}; do ...@@ -614,19 +569,16 @@ for plugin in ${used_plugins}; do
add_plugin="0" add_plugin="0"
fi fi
dnl We need the souphttpsrc element for the YouTube plugin, if we're using GStreamer. dnl We need the souphttpsrc element for the YouTube plugin
dnl The xine backend is fine for YouTube videos. AC_MSG_CHECKING([GStreamer 0.10 souphttpsrc plugin])
if test "$HAVE_GSTREAMER" = "yes"; then if $gst010_inspect souphttpsrc >/dev/null 2>/dev/null; then
AC_MSG_CHECKING([GStreamer 0.10 souphttpsrc plugin]) AC_MSG_RESULT([yes])
if $gst010_inspect souphttpsrc >/dev/null 2>/dev/null; then else
AC_MSG_RESULT([yes]) AC_MSG_RESULT([no])
else AC_MSG_ERROR([
AC_MSG_RESULT([no]) Cannot find required GStreamer-0.10 plugin 'souphttpsrc'.
AC_MSG_ERROR([ It should be part of gst-plugins-good. Please install it.
Cannot find required GStreamer-0.10 plugin 'souphttpsrc'. ])
It should be part of gst-plugins-good. Please install it.
])
fi
fi fi
;; ;;
esac esac
...@@ -922,15 +874,11 @@ docs/reference/version.xml ...@@ -922,15 +874,11 @@ docs/reference/version.xml
]) ])
AC_MSG_NOTICE([Totem was configured with the following options:]) AC_MSG_NOTICE([Totem was configured with the following options:])
if test x$HAVE_GSTREAMER = xno ; then AC_MSG_NOTICE([** Using the GStreamer-$GST_MAJORMINOR backend])
AC_MSG_NOTICE([** Using the xine backend]) if test "x$MISSING_PLUGINS_LIBS" != "x"; then
AC_MSG_NOTICE([** Easy codec installation support enabled])
else else
AC_MSG_NOTICE([** Using the GStreamer-$GST_MAJORMINOR backend]) AC_MSG_NOTICE([ Easy codec installation support disabled])
if test "x$MISSING_PLUGINS_LIBS" != "x"; then
AC_MSG_NOTICE([** Easy codec installation support enabled])
else
AC_MSG_NOTICE([ Easy codec installation support disabled])
fi
fi fi
if test x$enable_python = xyes ; then if test x$enable_python = xyes ; then
AC_MSG_NOTICE([** Python binding support enabled]) AC_MSG_NOTICE([** Python binding support enabled])
......
...@@ -620,7 +620,6 @@ ...@@ -620,7 +620,6 @@
<rdf:Bag> <rdf:Bag>
<rdf:li>totem</rdf:li> <rdf:li>totem</rdf:li>
<rdf:li>gstreamer</rdf:li> <rdf:li>gstreamer</rdf:li>
<rdf:li>xine</rdf:li>
<rdf:li>player</rdf:li> <rdf:li>player</rdf:li>
<rdf:li>mplayer</rdf:li> <rdf:li>mplayer</rdf:li>
<rdf:li>video</rdf:li> <rdf:li>video</rdf:li>
......
...@@ -38,8 +38,8 @@ ...@@ -38,8 +38,8 @@
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" "" . ds L" ""
. ds R" "" . ds R" ""
. ds C` "" . ds C`
. ds C' "" . ds C'
'br\} 'br\}
.el\{\ .el\{\
. ds -- \|\(em\| . ds -- \|\(em\|
...@@ -131,8 +131,8 @@ ...@@ -131,8 +131,8 @@
.rm #[ #] #H #V #F C .rm #[ #] #H #V #F C
.\" ======================================================================== .\" ========================================================================
.\" .\"
.IX Title "TOTEM-VIDEO-THUMBNAILER 1" .IX Title "totem-video-thumbnailer 1"
.TH TOTEM-VIDEO-THUMBNAILER 1 "2009-04-21" "GNOME" "" .TH totem-video-thumbnailer 1 "2009-05-06" "GNOME" ""
.\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents. .\" way too many mistakes in technical documents.
.if n .ad l .if n .ad l
...@@ -157,7 +157,7 @@ The input filename. This can be in any format that \fBtotem\fR can play. ...@@ -157,7 +157,7 @@ The input filename. This can be in any format that \fBtotem\fR can play.
The output filename, output in \s-1PNG\s0 format. The output filename, output in \s-1PNG\s0 format.
.IP "\fBbackend options\fR" 8 .IP "\fBbackend options\fR" 8
.IX Item "backend options" .IX Item "backend options"
Options to be passed to the backend (i.e. \fBxine\fR or \fBgstreamer\fR). Options to be passed to the backend (i.e. \fBgstreamer\fR).
.SH "OPTIONS" .SH "OPTIONS"
.IX Header "OPTIONS" .IX Header "OPTIONS"
.IP "\fB\-j\fR \fB\-\-jpeg\fR" 8 .IP "\fB\-j\fR \fB\-\-jpeg\fR" 8
......
...@@ -26,7 +26,7 @@ The output filename, output in PNG format. ...@@ -26,7 +26,7 @@ The output filename, output in PNG format.
=item B<backend options> =item B<backend options>
Options to be passed to the backend (i.e. B<xine> or B<gstreamer>). Options to be passed to the backend (i.e. B<gstreamer>).
=back =back
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
.\" 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA .\" 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
.TH totem 1 "2008\-08\-25" "GNOME" .TH totem 1 "2008\-08\-25" "GNOME"
.SH NAME .SH NAME
Totem \- GNOME desktop movie player based on GStreamer or xine Totem \- GNOME desktop movie player based on GStreamer
.SH SYNOPSIS .SH SYNOPSIS
.B totem .B totem
.RI [ option... ] " " [ filenames | URI ] .RI [ option... ] " " [ filenames | URI ]
...@@ -23,9 +23,7 @@ Totem \- GNOME desktop movie player based on GStreamer or xine ...@@ -23,9 +23,7 @@ Totem \- GNOME desktop movie player based on GStreamer or xine
.B Totem .B Totem
is a movie player for the GNOME desktop. Through use of the is a movie player for the GNOME desktop. Through use of the
.B GStreamer .B GStreamer
or backend many popular file and streaming formats are supported including:
.B xine
backends many popular file and streaming formats are supported including:
MPEG audio and video (MP3/MPV), Ogg, AVI, ASF, MOV, WMV, MPEG audio and video (MP3/MPV), Ogg, AVI, ASF, MOV, WMV,
QuickTime, and more. Playing of DVD and VCD media is QuickTime, and more. Playing of DVD and VCD media is
also possible. also possible.
...@@ -223,7 +221,6 @@ The latest version of Totem may be downloaded from ...@@ -223,7 +221,6 @@ The latest version of Totem may be downloaded from
.UE .UE
.SH SEE ALSO .SH SEE ALSO
.BR "totem-video-thumbnailer" (1), .BR "totem-video-thumbnailer" (1),
.BR xine (1)
.P .P
The online documentation available through the program's The online documentation available through the program's
.I Help .I Help
......
2009-05-06 Bastien Nocera <hadess@hadess.net>
reviewed by: <delete if not using a buddy>
* POTFILES.in:
2009-04-29 Takeshi AIHANA <takeshi.aihana@gmail.com> 2009-04-29 Takeshi AIHANA <takeshi.aihana@gmail.com>
* ja.po: Fixed b.g.o #580634. * ja.po: Fixed b.g.o #580634.
......
...@@ -34,7 +34,6 @@ src/totem-time-label.c ...@@ -34,7 +34,6 @@ src/totem-time-label.c
src/totem-uri.c src/totem-uri.c
src/totem.c src/totem.c
src/backend/bacon-video-widget-gst-0.10.c src/backend/bacon-video-widget-gst-0.10.c
src/backend/bacon-video-widget-xine.c
src/backend/video-utils.c src/backend/video-utils.c
src/plugins/totem-plugin-manager.c src/plugins/totem-plugin-manager.c
src/plugins/totem-plugins-engine.c src/plugins/totem-plugins-engine.c
......
noinst_PROGRAMS = bvw-test noinst_PROGRAMS = bvw-test
lib_LTLIBRARIES = libbaconvideowidget.la noinst_LTLIBRARIES = libbaconvideowidget.la
bvw_test_SOURCES = bvw-test.c bvw_test_SOURCES = bvw-test.c
...@@ -32,22 +32,14 @@ baconvideowidget-marshal.c: baconvideowidget-marshal.h ...@@ -32,22 +32,14 @@ baconvideowidget-marshal.c: baconvideowidget-marshal.h
libbaconvideowidget_la_SOURCES = \ libbaconvideowidget_la_SOURCES = \
$(BVWMARSHALFILES) \ $(BVWMARSHALFILES) \
bacon-video-widget.h \ bacon-video-widget.h \
bacon-video-widget-common.h bacon-video-widget-common.c \
bacon-resize.h bacon-resize.c \ bacon-resize.h bacon-resize.c \
video-utils.c video-utils.h \ video-utils.c video-utils.h \
debug.h
if TOTEM_GST
libbaconvideowidget_la_SOURCES += \
bacon-video-widget-gst-0.10.c \ bacon-video-widget-gst-0.10.c \
bacon-video-widget-gst-missing-plugins.c \ bacon-video-widget-gst-missing-plugins.c \
bacon-video-widget-gst-missing-plugins.h \ bacon-video-widget-gst-missing-plugins.h \
gstscreenshot.c \ gstscreenshot.c \
gstscreenshot.h gstscreenshot.h
else debug.h
libbaconvideowidget_la_SOURCES += \
bacon-video-widget-xine.c
endif
libbaconvideowidget_la_CPPFLAGS = \ libbaconvideowidget_la_CPPFLAGS = \
-D_REENTRANT \ -D_REENTRANT \
......
/*
* Copyright (C) 2006 Bastien Nocera <hadess@hadess.net>
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, 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 are above and beyond the permissions granted by the GPL license
* Totem is covered by.
*
* Monday 7th February 2005: Christian Schaller: Add exception clause.
* See license_change file for details.
*
*/
#include <config.h>
#include "bacon-video-widget-common.h"
static struct {
int height;
int fps;
} const vis_qualities[] = {
{ 240, 15 }, /* VISUAL_SMALL */
{ 320, 25 }, /* VISUAL_NORMAL */
{ 480, 25 }, /* VISUAL_LARGE */
{ 600, 30 } /* VISUAL_EXTRA_LARGE */
};
gboolean
bacon_video_widget_common_can_direct_seek (BaconVideoWidgetCommon *com)
{
g_return_val_if_fail (com != NULL, FALSE);
if (com->mrl == NULL)
return FALSE;
/* (instant seeking only make sense with video,
* hence no cdda:// here) */
if (g_str_has_prefix (com->mrl, "file://") ||
g_str_has_prefix (com->mrl, "dvd:/") ||
g_str_has_prefix (com->mrl, "vcd:/"))
return TRUE;
return FALSE;
}
gboolean
bacon_video_widget_common_get_vis_quality (BvwVisualsQuality q,
int *height, int *fps)
{
g_return_val_if_fail (height != NULL, FALSE);
g_return_val_if_fail (fps != NULL, FALSE);
g_return_val_if_fail (q < G_N_ELEMENTS (vis_qualities), FALSE);
*height = vis_qualities[q].height;
*fps = vis_qualities[q].fps;
return TRUE;
}
/*
* Copyright (C) 2006 Bastien Nocera <hadess@hadess.net>
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, 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 are above and beyond the permissions granted by the GPL license
* Totem is covered by.
*
* Monday 7th February 2005: Christian Schaller: Add exception clause.
* See license_change file for details.
*
*/
#ifndef HAVE_BACON_VIDEO_WIDGET_COMMON_H
#define HAVE_BACON_VIDEO_WIDGET_COMMON_H
#include "bacon-video-widget.h"
#include <glib.h>
G_BEGIN_DECLS
#define SMALL_STREAM_WIDTH 200
#define SMALL_STREAM_HEIGHT 120
struct BaconVideoWidgetCommon {
char *mrl;
};
gboolean bacon_video_widget_common_can_direct_seek (BaconVideoWidgetCommon *com);
gboolean bacon_video_widget_common_get_vis_quality (BvwVisualsQuality q,
int *height,
int *fps);
G_END_DECLS
#endif /* HAVE_BACON_VIDEO_WIDGET_COMMON_H */
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
* @stability: Unstable * @stability: Unstable
* @include: bacon-video-widget.h * @include: bacon-video-widget.h
* *
* #BaconVideoWidget is a widget to play audio or video streams, with support for visualisations for audio-only streams. It has a GStreamer and xine * #BaconVideoWidget is a widget to play audio or video streams, with support for visualisations for audio-only streams. It has a GStreamer
* backend, and abstracts away the differences to provide a simple interface to the functionality required by Totem. It handles all the low-level * backend, and abstracts away the differences to provide a simple interface to the functionality required by Totem. It handles all the low-level
* audio and video work for Totem (or passes the work off to the backend). * audio and video work for Totem (or passes the work off to the backend).
**/ **/
...@@ -76,7 +76,6 @@ ...@@ -76,7 +76,6 @@
#include <gconf/gconf-client.h> #include <gconf/gconf-client.h>
#include "bacon-video-widget.h" #include "bacon-video-widget.h"
#include "bacon-video-widget-common.h"
#include "bacon-video-widget-gst-missing-plugins.h" #include "bacon-video-widget-gst-missing-plugins.h"
#include "baconvideowidget-marshal.h" #include "baconvideowidget-marshal.h"
#include "video-utils.h" #include "video-utils.h"
...@@ -85,6 +84,8 @@ ...@@ -85,6 +84,8 @@
#define DEFAULT_HEIGHT 420 #define DEFAULT_HEIGHT 420
#define DEFAULT_WIDTH 315 #define DEFAULT_WIDTH 315
#define SMALL_STREAM_WIDTH 200
#define SMALL_STREAM_HEIGHT 120
#define is_error(e, d, c) \ #define is_error(e, d, c) \
(e->domain == GST_##d##_ERROR && \ (e->domain == GST_##d##_ERROR && \
...@@ -140,7 +141,8 @@ typedef enum { ...@@ -140,7 +141,8 @@ typedef enum {
struct BaconVideoWidgetPrivate struct BaconVideoWidgetPrivate
{ {
BvwAspectRatio ratio_type; char *mrl;
BvwAspectRatio ratio_type;
GstElement *play; GstElement *play;
GstXOverlay *xoverlay; /* protect with lock */ GstXOverlay *xoverlay; /* protect with lock */
...@@ -345,7 +347,7 @@ bvw_error_msg (BaconVideoWidget * bvw, GstMessage * msg) ...@@ -345,7 +347,7 @@ bvw_error_msg (BaconVideoWidget * bvw, GstMessage * msg)
GST_ERROR ("code = %d", err->code); GST_ERROR ("code = %d", err->code);
GST_ERROR ("debug = %s", GST_STR_NULL (dbg)); GST_ERROR ("debug = %s", GST_STR_NULL (dbg));
GST_ERROR ("source = %" GST_PTR_FORMAT, msg->src); GST_ERROR ("source = %" GST_PTR_FORMAT, msg->src);
GST_ERROR ("uri = %s", GST_STR_NULL (bvw->com->mrl)); GST_ERROR ("uri = %s", GST_STR_NULL (bvw->priv->mrl));
g_message ("Error: %s\n%s\n", GST_STR_NULL (err->message), g_message ("Error: %s\n%s\n", GST_STR_NULL (err->message),
GST_STR_NULL (dbg)); GST_STR_NULL (dbg));
...@@ -1195,8 +1197,7 @@ bacon_video_widget_init (BaconVideoWidget * bvw) ...@@ -1195,8 +1197,7 @@ bacon_video_widget_init (BaconVideoWidget * bvw)
GTK_WIDGET_UNSET_FLAGS (GTK_WIDGET (bvw), GTK_DOUBLE_BUFFERED); GTK_WIDGET_UNSET_FLAGS (GTK_WIDGET (bvw), GTK_DOUBLE_BUFFERED);
bvw->priv = priv = G_TYPE_INSTANCE_GET_PRIVATE (bvw, BACON_TYPE_VIDEO_WIDGET, BaconVideoWidgetPrivate); bvw->priv = priv = G_TYPE_INSTANCE_GET_PRIVATE (bvw, BACON_TYPE_VIDEO_WIDGET, BaconVideoWidgetPrivate);
bvw->com = g_new0 (BaconVideoWidgetCommon, 1);
priv->update_id = 0; priv->update_id = 0;
priv->tagcache = NULL; priv->tagcache = NULL;
priv->audiotags = NULL; priv->audiotags = NULL;
...@@ -2001,8 +2002,8 @@ bacon_video_widget_finalize (GObject * object) ...@@ -2001,8 +2002,8 @@ bacon_video_widget_finalize (GObject * object)
g_free (bvw->priv->media_device); g_free (bvw->priv->media_device);
bvw->priv->media_device = NULL; bvw->priv->media_device = NULL;
g_free (bvw->com->mrl); g_free (bvw->priv->mrl);