Commit 31d966e0 authored by Sam Hocevar's avatar Sam Hocevar

  * The Gtk+ interface is now built as a Debian package as well. The Gnome
    package depends on it because of the icon and menu entry.
  * Added an intf_WarnHexDump() function to do raw hexadecimal dumps of
    memory areas. For debugging purposes or for real men, as you wish.
  * Lots of tidying in dvd_ioctl.c, a few comments added.
  * Better error handling in the subpicture decoder.
  * Tidied video_spu.c. More to come later.
  * Fixed subtitle displaying. Will soon work in overlay mode as well.
parent 4875485d
......@@ -451,7 +451,7 @@ all: vlc @ALIASES@ plugins
clean:
rm -f $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) $(STD_PLUGIN_OBJ)
rm -f plugins/*/*.o src/*/*.o lib/*.so
rm -f vlc @ALIASES@
rm -f vlc kvlc gvlc
distclean: clean
rm -f src/*/*.o plugins/*/*.o **/*~ *.log
......
......@@ -7,8 +7,8 @@ Standards-Version: 3.0.1
Package: vlc
Architecture: any
Depends: ${shlibs:Depends}, vlc-gnome
Suggests: vlc-sdl, vlc-esd
Depends: ${shlibs:Depends}, vlc-gtk
Suggests: vlc-sdl, vlc-esd, vlc-gnome
Description: the free MPEG and DVD player VideoLAN Client
VideoLAN is a free MPEG, MPEG2 and DVD software solution.
.
......@@ -17,12 +17,20 @@ Description: the free MPEG and DVD player VideoLAN Client
Package: vlc-gnome
Architecture: any
Depends: vlc (= ${Source-Version}), ${shlibs:Depends}
Depends: vlc (= ${Source-Version}), vlc-gtk (= ${Source-Version}), ${shlibs:Depends}
Description: Gnome plugin for the VideoLAN Client
VideoLAN is a free MPEG, MPEG2 and DVD software solution.
.
This plugin adds a Gnome interface to the VideoLAN Client.
Package: vlc-gtk
Architecture: any
Depends: vlc (= ${Source-Version}), ${shlibs:Depends}
Description: Gtk+ plugin for the VideoLAN Client
VideoLAN is a free MPEG, MPEG2 and DVD software solution.
.
This plugin adds a Gtk+ interface to the VideoLAN Client.
Package: vlc-esd
Architecture: any
Depends: vlc (= ${Source-Version}), ${shlibs:Depends}
......
......@@ -16,13 +16,14 @@ build-stamp:
./configure --prefix=/usr \
--mandir=\$${prefix}/share/man \
--infodir=\$${prefix}/share/info \
--enable-gnome --enable-fb --with-glide --with-ggi \
--with-sdl --enable-esd --enable-alsa --disable-ppro ; \
--enable-gnome --enable-gtk --enable-fb --with-glide \
--with-ggi --with-sdl --enable-esd --enable-alsa \
--disable-ppro ; \
else \
./configure --prefix=/usr \
--mandir=\$${prefix}/share/man \
--infodir=\$${prefix}/share/info \
--enable-gnome --enable-fb --with-ggi \
--enable-gnome --enable-gtk --enable-fb --with-ggi \
--with-sdl --enable-esd --enable-alsa; \
fi
......@@ -48,7 +49,7 @@ install: build
DESTDIR=`pwd`/debian/vlc/ $(MAKE) install prefix=/usr
# make symlinks for packages
for alias in ggi gnome glide esd sdl alsa ; do \
for alias in ggi gtk gnome glide esd sdl alsa ; do \
mkdir -p debian/vlc-$$alias/usr/share/doc/ ; \
ln -s vlc debian/vlc-$$alias/usr/share/doc/vlc-$$alias ; \
mkdir -p debian/vlc-$$alias/usr/lib/videolan/vlc/ ; \
......@@ -56,13 +57,13 @@ install: build
debian/vlc-$$alias/usr/lib/videolan/vlc/ ; \
done
mkdir -p debian/vlc-gnome/usr/bin/
mv debian/vlc/usr/bin/gvlc debian/vlc-gnome/usr/bin/
mkdir -p debian/vlc-gnome/usr/share/videolan/
mkdir -p debian/vlc-gtk/usr/bin/
mv debian/vlc/usr/bin/gvlc debian/vlc-gtk/usr/bin/
mkdir -p debian/vlc-gtk/usr/share/videolan/
mv debian/vlc/usr/share/videolan/gvlc.png \
debian/vlc-gnome/usr/share/videolan/
mkdir -p debian/vlc-gnome/usr/share/man/man1/
ln -s vlc.1.gz debian/vlc-gnome/usr/share/man/man1/gvlc.1.gz
debian/vlc-gtk/usr/share/videolan/
mkdir -p debian/vlc-gtk/usr/share/man/man1/
ln -s vlc.1.gz debian/vlc-gtk/usr/share/man/man1/gvlc.1.gz
# Build architecture-independent files here.
binary-indep: build install
......@@ -81,10 +82,10 @@ binary-arch: build install
# dh_installpam
# dh_installinit
dh_installcron
dh_installmanpages -Nvlc-gnome -Nvlc-ggi -Nvlc-glide -Nvlc-esd -Nvlc-sdl -Nvlc-alsa
dh_installmanpages -Nvlc-gnome -Nvlc-gtk -Nvlc-ggi -Nvlc-glide -Nvlc-esd -Nvlc-sdl -Nvlc-alsa
dh_installinfo
# dh_undocumented
dh_installchangelogs -Nvlc-gnome -Nvlc-ggi -Nvlc-glide -Nvlc-esd -Nvlc-sdl -Nvlc-alsa
dh_installchangelogs -Nvlc-gnome -Nvlc-gtk -Nvlc-ggi -Nvlc-glide -Nvlc-esd -Nvlc-sdl -Nvlc-alsa
dh_link
dh_strip
dh_compress
......
?package(vlc-gnome):command="/usr/bin/gvlc" hotkey="V" needs="X11" \
section="Apps/Viewers" title="Gnome VideoLAN Client" \
icon="/usr/share/videolan/gvlc.png"
?package(vlc-gtk):command="/usr/bin/gvlc" hotkey="V" needs="X11" \
section="Apps/Viewers" title="Gnome/Gtk VideoLAN Client" \
icon="/usr/share/videolan/gvlc.png"
This package was debianized by Samuel Hocevar <sam@zoy.org> on
Mon, 13 Mar 2000 02:21:45 +0100.
It was downloaded from ftp://ftp.videolan.org/pub/videolan/
It was taken from the CVS tree. See http://www.videolan.org/cvs.html
Upstream Author(s): The VideoLAN Team <videolan@videolan.org>
VideoLAN is Copyright 1996, 1997, 1998, 1999, 2000 The VideoLAN Team
VideoLAN is Copyright 1996, 1997, 1998, 1999, 2000, 2001 The VideoLAN Team
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
......
......@@ -85,3 +85,5 @@ void intf_IntfMsg ( char *psz_format, ... );
void intf_MsgImm ( char *psz_format, ... );
void intf_ErrMsgImm ( char *psz_format, ... );
void intf_WarnMsgImm ( int i_level, char *psz_format, ... );
void intf_WarnHexDump ( int i_level, void *p_data, int i_size );
/*****************************************************************************
* video_graphics.h: pictures manipulation primitives
* Includes function to compose, convert and display pictures, and also basic
* functions to copy pictures data or descriptors.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* Requires:
* "config.h"
* "common.h"
* "mtime.h"
* "video.h"
*****************************************************************************/
/*****************************************************************************
* Prototypes
*****************************************************************************/
......@@ -2,7 +2,7 @@
* intf_beos.cpp: beos interface
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: intf_beos.cpp,v 1.10 2001/02/20 07:49:12 sam Exp $
* $Id: intf_beos.cpp,v 1.11 2001/02/26 12:16:28 sam Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -61,7 +61,7 @@ extern "C"
#include "main.h"
}
#include "beos_window.h"
#include "window.h"
/*****************************************************************************
* intf_sys_t: description and status of FB interface
......
......@@ -54,13 +54,13 @@ extern "C"
#include "video.h"
#include "video_output.h"
#include "interface.h" /* XXX maybe to remove if beos_window.h is splitted */
#include "interface.h" /* XXX maybe to remove if window.h is splitted */
#include "intf_msg.h"
#include "main.h"
}
#include "beos_window.h"
#include "window.h"
#define WIDTH 128
#define HEIGHT 64
......
/*****************************************************************************
* beos_window.h: beos window class prototype
* window.h: BeOS window class prototype
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
*
* Authors:
* Jean-Marc Dressler
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
*
* 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
......
......@@ -2,7 +2,7 @@
* dvd_ioctl.c: DVD ioctl replacement function
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: dvd_ioctl.c,v 1.1 2001/02/20 07:49:12 sam Exp $
* $Id: dvd_ioctl.c,v 1.2 2001/02/26 12:16:28 sam Exp $
*
* Authors: Markus Kuespert <ltlBeBoy@beosmail.com>
* Samuel Hocevar <sam@zoy.org>
......@@ -48,24 +48,23 @@
#include "dvd_ioctl.h"
/*****************************************************************************
* Local prototypes
* Local prototypes - BeOS specific
*****************************************************************************/
#if defined( SYS_BEOS )
static int dvd_do_auth ( int i_fd, dvd_authinfo *p_authinfo );
static int dvd_read_struct ( int i_fd, dvd_struct *p_dvd );
static int dvd_read_physical ( int i_fd, dvd_struct *p_dvd );
static int dvd_read_copyright ( int i_fd, dvd_struct *p_dvd );
static int dvd_read_disckey ( int i_fd, dvd_struct *p_dvd );
static int dvd_read_bca ( int i_fd, dvd_struct *p_dvd );
static int dvd_read_manufact ( int i_fd, dvd_struct *p_dvd );
static int communicate_with_dvd ( int i_fd,
struct cdrom_generic_command *p_cgc );
static void init_cdrom_command ( struct cdrom_generic_command *p_cgc,
void *buf, int i_len, int i_type );
static void setup_report_key ( struct cdrom_generic_command *p_cgc,
unsigned i_agid, unsigned i_type );
static void setup_send_key ( struct cdrom_generic_command *p_cgc,
unsigned i_agid, unsigned i_type );
static int ReadData ( int i_fd, dvd_struct *p_dvd );
static int ReadCopyright ( int i_fd, dvd_struct *p_dvd );
static int ReadKey ( int i_fd, dvd_struct *p_dvd );
static int ReadBCA ( int i_fd, dvd_struct *p_dvd );
static int ReadManufacturer ( int i_fd, dvd_struct *p_dvd );
static void InitGenericCommand( struct cdrom_generic_command *p_cgc,
void *buf, int i_len, int i_type );
static void InitReadCommand ( struct cdrom_generic_command *p_cgc,
unsigned i_agid, unsigned i_type );
static void InitWriteCommand ( struct cdrom_generic_command *p_cgc,
unsigned i_agid, unsigned i_type );
static int SendCommand ( int i_fd, struct cdrom_generic_command *p_cgc );
#endif
/*****************************************************************************
......@@ -80,382 +79,262 @@ int dvd_ioctl( int i_fd, unsigned long i_op, void *p_arg )
return( ioctl( i_fd, i_op, p_arg ) );
#elif defined( SYS_BEOS )
switch ( i_op )
{
case DVD_AUTH:
return dvd_do_auth( i_fd, (dvd_authinfo *)p_arg );
case DVD_READ_STRUCT:
return dvd_read_struct( i_fd, (dvd_struct *)p_arg );
default:
intf_ErrMsg( "css error: unknown command 0x%x", i_op );
return -1;
}
#else
int i_ret;
unsigned char buf[20];
return -1;
#endif
}
struct cdrom_generic_command p_cgc;
#if defined( SYS_BEOS )
dvd_struct *p_dvd = (dvd_struct *)p_arg;
dvd_authinfo *p_authinfo = (dvd_authinfo *)p_arg;
/*****************************************************************************
* setup_report_key
*****************************************************************************/
static void setup_report_key( struct cdrom_generic_command *p_cgc,
unsigned i_agid, unsigned i_type )
{
p_cgc->cmd[0] = GPCMD_REPORT_KEY;
p_cgc->cmd[10] = i_type | (i_agid << 6);
switch( i_type )
switch ( i_op )
{
case 0:
case 8:
case 5:
p_cgc->buflen = 8;
break;
case DVD_AUTH: /* Request type is "authentication" */
{
memset( buf, 0, sizeof( buf ) );
InitGenericCommand( &p_cgc, buf, 0, CGC_DATA_READ );
case 1:
p_cgc->buflen = 16;
break;
switch( p_authinfo->type )
{
case DVD_LU_SEND_AGID: /* LU data send */
case 2:
case 4:
p_cgc->buflen = 12;
break;
}
intf_WarnMsg( 2, "css DoAuth: DVD_LU_SEND_AGID" );
p_cgc->cmd[9] = p_cgc->buflen;
p_cgc->data_direction = CGC_DATA_READ;
}
InitReadCommand( &p_cgc, p_authinfo->lsa.agid, 0 );
/*****************************************************************************
* setup_send_key
*****************************************************************************/
static void setup_send_key( struct cdrom_generic_command *p_cgc,
unsigned i_agid, unsigned i_type )
{
p_cgc->cmd[0] = GPCMD_SEND_KEY;
p_cgc->cmd[10] = i_type | (i_agid << 6);
i_ret = SendCommand( i_fd, &p_cgc );
switch( i_type )
{
case 1:
p_cgc->buflen = 16;
break;
p_authinfo->lsa.agid = buf[7] >> 6;
case 3:
p_cgc->buflen = 12;
break;
return i_ret;
case 6:
p_cgc->buflen = 8;
break;
}
case DVD_LU_SEND_KEY1:
p_cgc->cmd[9] = p_cgc->buflen;
p_cgc->data_direction = CGC_DATA_WRITE;
}
intf_WarnMsg( 2, "css DoAuth: DVD_LU_SEND_KEY1" );
/*****************************************************************************
* init_cdrom_command
*****************************************************************************/
static void init_cdrom_command( struct cdrom_generic_command *p_cgc,
void *buf, int i_len, int i_type )
{
memset( p_cgc, 0, sizeof(struct cdrom_generic_command) );
InitReadCommand( &p_cgc, p_authinfo->lsk.agid, 2 );
if (buf)
{
memset( buf, 0, i_len );
}
i_ret = SendCommand( i_fd, &p_cgc );
p_cgc->buffer = (char *) buf;
p_cgc->buflen = i_len;
p_cgc->data_direction = i_type;
p_cgc->timeout = 255;
}
/* Copy the key */
memcpy( p_authinfo->lsk.key, &buf[4], sizeof(dvd_key) );
/* DVD handling */
return i_ret;
/*****************************************************************************
* dvd_do_auth
*****************************************************************************/
static int dvd_do_auth( int i_fd, dvd_authinfo *p_authinfo )
{
int i_ret;
unsigned char buf[20];
struct cdrom_generic_command p_cgc;
case DVD_LU_SEND_CHALLENGE:
#define copy_key(dest,src) memcpy((dest), (src), sizeof(dvd_key))
#define copy_chal(dest,src) memcpy((dest), (src), sizeof(dvd_challenge))
intf_WarnMsg( 2, "css DoAuth: DVD_LU_SEND_CHALLENGE" );
#if 0
struct rpc_state_t rpc_state;
#endif
InitReadCommand( &p_cgc, p_authinfo->lsc.agid, 1 );
memset( buf, 0, sizeof(buf) );
init_cdrom_command( &p_cgc, buf, 0, CGC_DATA_READ );
i_ret = SendCommand( i_fd, &p_cgc );
switch (p_authinfo->type)
{
/* LU data send */
case DVD_LU_SEND_AGID:
/* Copy the challenge */
memcpy( p_authinfo->lsc.chal, &buf[4],
sizeof(dvd_challenge) );
intf_WarnMsg( 2, "css dvd_do_auth: DVD_LU_SEND_AGID" );
return i_ret;
setup_report_key(&p_cgc, p_authinfo->lsa.agid, 0);
case DVD_LU_SEND_TITLE_KEY: /* Post-auth key */
/* handle uniform packets for scsi type devices (scsi,atapi) */
if ((i_ret = communicate_with_dvd(i_fd, &p_cgc)))
{
return i_ret;
}
intf_WarnMsg( 2, "css DoAuth: DVD_LU_SEND_TITLE_KEY" );
p_authinfo->lsa.agid = buf[7] >> 6;
/* Returning data, let host change state */
InitReadCommand( &p_cgc, p_authinfo->lstk.agid, 4 );
break;
p_cgc.cmd[5] = p_authinfo->lstk.lba;
p_cgc.cmd[4] = p_authinfo->lstk.lba >> 8;
p_cgc.cmd[3] = p_authinfo->lstk.lba >> 16;
p_cgc.cmd[2] = p_authinfo->lstk.lba >> 24;
case DVD_LU_SEND_KEY1:
i_ret = SendCommand( i_fd, &p_cgc );
intf_WarnMsg( 2, "css dvd_do_auth: DVD_LU_SEND_KEY1" );
p_authinfo->lstk.cpm = (buf[4] >> 7) & 1;
p_authinfo->lstk.cp_sec = (buf[4] >> 6) & 1;
p_authinfo->lstk.cgms = (buf[4] >> 4) & 3;
setup_report_key(&p_cgc, p_authinfo->lsk.agid, 2);
/* Copy the key */
memcpy( p_authinfo->lstk.title_key, &buf[5],
sizeof(dvd_key) );
/* handle uniform packets for scsi type devices (scsi,atapi) */
if ((i_ret = communicate_with_dvd(i_fd, &p_cgc)))
{
return i_ret;
}
return i_ret;
copy_key(p_authinfo->lsk.key, &buf[4]);
/* Returning data, let host change state */
case DVD_LU_SEND_ASF:
break;
intf_WarnMsg( 2, "css DoAuth: DVD_LU_SEND_ASF" );
case DVD_LU_SEND_CHALLENGE:
InitReadCommand( &p_cgc, p_authinfo->lsasf.agid, 5 );
intf_WarnMsg( 2, "css dvd_do_auth: DVD_LU_SEND_CHALLENGE" );
i_ret = SendCommand( i_fd, &p_cgc );
setup_report_key(&p_cgc, p_authinfo->lsc.agid, 1);
p_authinfo->lsasf.asf = buf[7] & 1;
/* handle uniform packets for scsi type devices (scsi,atapi) */
if ((i_ret = communicate_with_dvd(i_fd, &p_cgc)))
{
return i_ret;
}
copy_chal(p_authinfo->lsc.chal, &buf[4]);
/* Returning data, let host change state */
return i_ret;
break;
case DVD_HOST_SEND_CHALLENGE: /* LU data receive */
/* Post-auth key */
case DVD_LU_SEND_TITLE_KEY:
intf_WarnMsg( 2, "css DoAuth: DVD_LU_SEND_CHALLENGE" );
intf_WarnMsg( 2, "css dvd_do_auth: DVD_LU_SEND_TITLE_KEY" );
InitWriteCommand( &p_cgc, p_authinfo->hsc.agid, 1 );
buf[1] = 0xe;
setup_report_key(&p_cgc, p_authinfo->lstk.agid, 4);
p_cgc.cmd[5] = p_authinfo->lstk.lba;
p_cgc.cmd[4] = p_authinfo->lstk.lba >> 8;
p_cgc.cmd[3] = p_authinfo->lstk.lba >> 16;
p_cgc.cmd[2] = p_authinfo->lstk.lba >> 24;
/* handle uniform packets for scsi type devices (scsi,atapi) */
if ((i_ret = communicate_with_dvd(i_fd, &p_cgc)))
{
return i_ret;
}
p_authinfo->lstk.cpm = (buf[4] >> 7) & 1;
p_authinfo->lstk.cp_sec = (buf[4] >> 6) & 1;
p_authinfo->lstk.cgms = (buf[4] >> 4) & 3;
copy_key(p_authinfo->lstk.title_key, &buf[5]);
/* Returning data, let host change state */
break;
/* Copy the challenge */
memcpy( &buf[4], p_authinfo->hsc.chal,
sizeof(dvd_challenge) );
case DVD_LU_SEND_ASF:
if( (i_ret = SendCommand(i_fd, &p_cgc)) )
{
return i_ret;
}
intf_WarnMsg( 2, "css dvd_do_auth: DVD_LU_SEND_ASF" );
p_authinfo->type = DVD_LU_SEND_KEY1;
setup_report_key(&p_cgc, p_authinfo->lsasf.agid, 5);
return 0;
/* handle uniform packets for scsi type devices (scsi,atapi) */
if ((i_ret = communicate_with_dvd(i_fd, &p_cgc)))
{
return i_ret;
}
case DVD_HOST_SEND_KEY2:
p_authinfo->lsasf.asf = buf[7] & 1;
intf_WarnMsg( 2, "css DoAuth: DVD_LU_SEND_KEY2" );
break;
InitWriteCommand( &p_cgc, p_authinfo->hsk.agid, 3 );
buf[1] = 0xa;
/* LU data receive (LU changes state) */
case DVD_HOST_SEND_CHALLENGE:
/* Copy the key */
memcpy( &buf[4], p_authinfo->hsk.key, sizeof(dvd_key) );
intf_WarnMsg( 2, "css dvd_do_auth: DVD_LU_SEND_CHALLENGE" );
if( (i_ret = SendCommand(i_fd, &p_cgc)) )
{
p_authinfo->type = DVD_AUTH_FAILURE;
return i_ret;
}
setup_send_key(&p_cgc, p_authinfo->hsc.agid, 1);
buf[1] = 0xe;
copy_chal(&buf[4], p_authinfo->hsc.chal);
p_authinfo->type = DVD_AUTH_ESTABLISHED;
/* handle uniform packets for scsi type devices (scsi,atapi) */
if ((i_ret = communicate_with_dvd(i_fd, &p_cgc)))
{
return i_ret;
}
return 0;
p_authinfo->type = DVD_LU_SEND_KEY1;
case DVD_INVALIDATE_AGID: /* Misc */
break;
intf_WarnMsg( 2, "css DoAuth: DVD_INVALIDATE_AGID" );
case DVD_HOST_SEND_KEY2:
InitReadCommand( &p_cgc, p_authinfo->lsa.agid, 0x3f );
intf_WarnMsg( 2, "css dvd_do_auth: DVD_LU_SEND_KEY2" );
return SendCommand( i_fd, &p_cgc );
setup_send_key(&p_cgc, p_authinfo->hsk.agid, 3);
buf[1] = 0xa;
copy_key(&buf[4], p_authinfo->hsk.key);
case DVD_LU_SEND_RPC_STATE: /* Get region settings */
/* handle uniform packets for scsi type devices (scsi,atapi) */
if ((i_ret = communicate_with_dvd(i_fd, &p_cgc)))
{
p_authinfo->type = DVD_AUTH_FAILURE;
return i_ret;
}
p_authinfo->type = DVD_AUTH_ESTABLISHED;
intf_WarnMsg( 2, "css DoAuth: DVD_LU_SEND_RPC_STATE "
"(unimplemented)" );
break;
#if 0
p_dvdetup_report_key( &p_cgc, 0, 8 );
memset( &rpc_state, 0, sizeof(rpc_state_t) );
p_cgc.buffer = (char *) &rpc_state;
/* Misc */
case DVD_INVALIDATE_AGID