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
to do so. If you do not wish to do so, delete this exception statement from
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
(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>
* browser-plugin/totemPlugin.cpp:
......
......@@ -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,
as well as complete keyboard navigation.
......@@ -17,9 +17,6 @@ See NEWS file
Dependencies
============
xine-lib 1.1.7 or newer:
http://xinehq.de
or
GStreamer 0.10.6, and gstreamer-plugins-base 0.10.7
http://gstreamer.freedesktop.org
......
......@@ -53,148 +53,103 @@ allowed_plugins="thumbnail screensaver ontop galago gromit lirc media-player-key
PLUGINDIR='${libdir}/totem/plugins'
AC_SUBST(PLUGINDIR)
dnl xine or gst ?
dnl the two versions here implicate the gstreamer core and gst-plugins
dnl release versions.
XINE_REQS=1.1.7
GST_MAJORMINOR=0.10
GST_REQS=0.10.22
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
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
gst010_toolsdir=`$PKG_CONFIG --variable=toolsdir gstreamer-0.10`
gst010_inspect="$gst010_toolsdir/gst-inspect-0.10"
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 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
AC_MSG_CHECKING([GStreamer 0.10 inspection tool])
if test -r "$gst010_inspect"; then
dnl Check for elements from gst-plugins-base
for base_element in playbin2 ffmpegcolorspace videoscale
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])
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.
Cannot find required GStreamer-0.10 plugin '$base_element'.
It should be part of gst-plugins-base. Please install it.
])
fi
done
dnl Check for elements from gst-plugins-base
for base_element in playbin2 ffmpegcolorspace videoscale
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])
else
AC_MSG_RESULT([no])
AC_MSG_ERROR([
Cannot find required GStreamer-0.10 plugin '$base_element'.
It should be part of gst-plugins-base. 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
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.
])
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
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")
done
AC_MSG_CHECKING([Whether not to check for iso-codes])
AC_ARG_ENABLE([iso-codes],
......@@ -614,19 +569,16 @@ for plugin in ${used_plugins}; do
add_plugin="0"
fi
dnl We need the souphttpsrc element for the YouTube plugin, if we're using GStreamer.
dnl The xine backend is fine for YouTube videos.
if test "$HAVE_GSTREAMER" = "yes"; then
AC_MSG_CHECKING([GStreamer 0.10 souphttpsrc plugin])
if $gst010_inspect souphttpsrc >/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 'souphttpsrc'.
It should be part of gst-plugins-good. Please install it.
])
fi
dnl We need the souphttpsrc element for the YouTube plugin
AC_MSG_CHECKING([GStreamer 0.10 souphttpsrc plugin])
if $gst010_inspect souphttpsrc >/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 'souphttpsrc'.
It should be part of gst-plugins-good. Please install it.
])
fi
;;
esac
......@@ -922,15 +874,11 @@ docs/reference/version.xml
])
AC_MSG_NOTICE([Totem was configured with the following options:])
if test x$HAVE_GSTREAMER = xno ; then
AC_MSG_NOTICE([** Using the xine backend])
AC_MSG_NOTICE([** Using the GStreamer-$GST_MAJORMINOR backend])
if test "x$MISSING_PLUGINS_LIBS" != "x"; then
AC_MSG_NOTICE([** Easy codec installation support enabled])
else
AC_MSG_NOTICE([** Using the GStreamer-$GST_MAJORMINOR backend])
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
AC_MSG_NOTICE([ Easy codec installation support disabled])
fi
if test x$enable_python = xyes ; then
AC_MSG_NOTICE([** Python binding support enabled])
......
......@@ -620,7 +620,6 @@
<rdf:Bag>
<rdf:li>totem</rdf:li>
<rdf:li>gstreamer</rdf:li>
<rdf:li>xine</rdf:li>
<rdf:li>player</rdf:li>
<rdf:li>mplayer</rdf:li>
<rdf:li>video</rdf:li>
......
......@@ -38,8 +38,8 @@
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" ""
. ds R" ""
. ds C` ""
. ds C' ""
. ds C`
. ds C'
'br\}
.el\{\
. ds -- \|\(em\|
......@@ -131,8 +131,8 @@
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "TOTEM-VIDEO-THUMBNAILER 1"
.TH TOTEM-VIDEO-THUMBNAILER 1 "2009-04-21" "GNOME" ""
.IX Title "totem-video-thumbnailer 1"
.TH totem-video-thumbnailer 1 "2009-05-06" "GNOME" ""
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......@@ -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.
.IP "\fBbackend options\fR" 8
.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"
.IX Header "OPTIONS"
.IP "\fB\-j\fR \fB\-\-jpeg\fR" 8
......
......@@ -26,7 +26,7 @@ The output filename, output in PNG format.
=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
......
......@@ -15,7 +15,7 @@
.\" 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
.TH totem 1 "2008\-08\-25" "GNOME"
.SH NAME
Totem \- GNOME desktop movie player based on GStreamer or xine
Totem \- GNOME desktop movie player based on GStreamer
.SH SYNOPSIS
.B totem
.RI [ option... ] " " [ filenames | URI ]
......@@ -23,9 +23,7 @@ Totem \- GNOME desktop movie player based on GStreamer or xine
.B Totem
is a movie player for the GNOME desktop. Through use of the
.B GStreamer
or
.B xine
backends many popular file and streaming formats are supported including:
backend many popular file and streaming formats are supported including:
MPEG audio and video (MP3/MPV), Ogg, AVI, ASF, MOV, WMV,
QuickTime, and more. Playing of DVD and VCD media is
also possible.
......@@ -223,7 +221,6 @@ The latest version of Totem may be downloaded from
.UE
.SH SEE ALSO
.BR "totem-video-thumbnailer" (1),
.BR xine (1)
.P
The online documentation available through the program's
.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>
* ja.po: Fixed b.g.o #580634.
......
......@@ -34,7 +34,6 @@ src/totem-time-label.c
src/totem-uri.c
src/totem.c
src/backend/bacon-video-widget-gst-0.10.c
src/backend/bacon-video-widget-xine.c
src/backend/video-utils.c
src/plugins/totem-plugin-manager.c
src/plugins/totem-plugins-engine.c
......
noinst_PROGRAMS = bvw-test
lib_LTLIBRARIES = libbaconvideowidget.la
noinst_LTLIBRARIES = libbaconvideowidget.la
bvw_test_SOURCES = bvw-test.c
......@@ -32,22 +32,14 @@ baconvideowidget-marshal.c: baconvideowidget-marshal.h
libbaconvideowidget_la_SOURCES = \
$(BVWMARSHALFILES) \
bacon-video-widget.h \
bacon-video-widget-common.h bacon-video-widget-common.c \
bacon-resize.h bacon-resize.c \
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-missing-plugins.c \
bacon-video-widget-gst-missing-plugins.h \
gstscreenshot.c \
gstscreenshot.h
else
libbaconvideowidget_la_SOURCES += \
bacon-video-widget-xine.c
endif
debug.h
libbaconvideowidget_la_CPPFLAGS = \
-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 */
This diff is collapsed.
This diff is collapsed.
......@@ -52,7 +52,6 @@ typedef struct BaconVideoWidgetCommon BaconVideoWidgetCommon;
typedef struct {
/*< private >*/
GtkEventBox parent;
BaconVideoWidgetCommon *com;
BaconVideoWidgetPrivate *priv;
} BaconVideoWidget;
......
......@@ -12,113 +12,6 @@
#include <string.h>
#include <stdio.h>
/* Code taken from:
* transcode Copyright (C) Thomas Oestreich - June 2001
* enix enix.berlios.de
*/
void yuy2toyv12 (guint8 *y, guint8 *u, guint8 *v, guint8 *input,
int width, int height) {
int i, j, w2;
w2 = width / 2;
for (i = 0; i < height; i += 2) {
for (j = 0; j < w2; j++) {
/* packed YUV 422 is: Y[i] U[i] Y[i+1] V[i] */
*(y++) = *(input++);
*(u++) = *(input++);
*(y++) = *(input++);
*(v++) = *(input++);
}
/* down sampling */
for (j = 0; j < w2; j++) {
/* skip every second line for U and V */
*(y++) = *(input++);
input++;
*(y++) = *(input++);
input++;
}
}
}
#define clip_8_bit(val) \
{ \
if (val < 0) \
val = 0; \
else \
if (val > 255) val = 255; \
}
guint8 * yv12torgb (guint8 *src_y, guint8 *src_u, guint8 *src_v,
int width, int height) {
int i, j;
int y, u, v;
int r, g, b;
int sub_i_uv;
int sub_j_uv;
int uv_width, uv_height;
guchar *rgb;
uv_width = width / 2;
uv_height = height / 2;
rgb = (guchar *) malloc (width * height * 3);
if (!rgb)
return NULL;
for (i = 0; i < height; ++i) {
/* calculate u & v rows */
sub_i_uv = ((i * uv_height) / height);
for (j = 0; j < width; ++j) {
/* calculate u & v columns */
sub_j_uv = ((j * uv_width) / width);
/***************************************************
* Colour conversion from
* http://www.inforamp.net/~poynton/notes/colour_and_gamma/ColorFAQ.html#RTFToC30
*
* Thanks to Billy Biggs <vektor@dumbterm.net>
* for the pointer and the following conversion.
*
* R' = [ 1.1644 0 1.5960 ] ([ Y' ] [ 16 ])
* G' = [ 1.1644 -0.3918 -0.8130 ] * ([ Cb ] - [ 128 ])
* B' = [ 1.1644 2.0172 0 ] ([ Cr ] [ 128 ])
*
* Where in xine the above values are represented as
* Y' == image->y
* Cb == image->u
* Cr == image->v
*
***************************************************/
y = src_y[(i * width) + j] - 16;
u = src_u[(sub_i_uv * uv_width) + sub_j_uv] - 128;
v = src_v[(sub_i_uv * uv_width) + sub_j_uv] - 128;
r = (1.1644 * y) + (1.5960 * v);
g = (1.1644 * y) - (0.3918 * u) - (0.8130 * v);
b = (1.1644 * y) + (2.0172 * u);
clip_8_bit (r);
clip_8_bit (g);
clip_8_bit (b);
rgb[(i * width + j) * 3 + 0] = r;
rgb[(i * width + j) * 3 + 1] = g;
rgb[(i * width + j) * 3 + 2] = b;
}
}
return rgb;
}
void
totem_gdk_window_set_invisible_cursor (GdkWindow *window)
{
......
......@@ -7,11 +7,6 @@
void totem_gdk_window_set_invisible_cursor (GdkWindow *window);
void totem_gdk_window_set_waiting_cursor (GdkWindow *window);
void yuy2toyv12 (guint8 *y, guint8 *u, guint8 *v, guint8 *input,
int width, int height);
guint8 *yv12torgb (guint8 *src_y, guint8 *src_u, guint8 *src_v,
int width, int height);
gboolean totem_display_is_local (void);
char *totem_time_to_string (gint64 msecs);
......
......@@ -4,7 +4,7 @@
xmlns:gnome="http://api.gnome.org/doap-extensions#"
xmlns="http://usefulinc.com/ns/doap#">
<name xml:lang="en">totem</name>
<shortdesc xml:lang="en">Movie player for the GNOME desktop based on xine or GStreamer</shortdesc>
<shortdesc xml:lang="en">Movie player for the GNOME desktop based on GStreamer</shortdesc>
<homepage rdf:resource="http://projects.gnome.org/totem/" />
<category rdf:resource="http://api.gnome.org/doap-extensions#desktop" />
<maintainer>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment