Commit d4f18c4e authored by Sam Hocevar's avatar Sam Hocevar

  * ./extras/MacOSX_dvdioctl: removed outdated files.
  * ./plugins/fx/scope.c: fixed an infinite loop error.
  * ./plugins: fixed segfaults in various demux plugins.
  * ./plugins/sdl/vout_sdl.c: SDL_VIDEODRIVER can be specified from the
    command line; try "--vout sdl:aalib"
parent aaee289a
......@@ -10,17 +10,10 @@ A typical way to configure vlc is:
See `./configure --help' for more information.
Here is a shortcut to copy-paste for a complete build:
make distclean ; ./configure --prefix=/usr --enable-gnome \
--enable-fb --with-glide --with-ggi --enable-esd --enable-qt
If you intend to debug stuff, you may want to compile with debugging
symbols:
make distclean ; ./configure --prefix=/usr --enable-gnome \
--enable-fb --with-glide --with-ggi --enable-esd --enable-qt \
--enable-debug
make distclean ; ./configure --prefix=/usr --enable-gnome --enable-debug
It is also possible to cross-compile for the Win32 platform using mingw32:
......
This diff is collapsed.
This diff is collapsed.
/*****************************************************************************
* DVDioctl.h: Linux-like DVD driver for Darwin and MacOS X
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: DVDioctl.h,v 1.4 2001/06/25 11:34:08 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Eugenio Jarosiewicz <ej0@cise.ufl.edu>
*
* The contents of this file constitute Original Code as defined in and
* are subject to the Apple Public Source License Version 1.1 (the
* "License"). You may not use this file except in compliance with the
* License. Please obtain a copy of the License at
* http://www.apple.com/publicsource and read it before using this file.
*
* This Original Code and all software distributed under the License are
* distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
* License for the specific language governing rights and limitations
* under the License.
*****************************************************************************/
#if defined(KERNEL)
/* Everything has already been defined */
#else
enum DVDKeyFormat
{
kCSSAGID = 0x00,
kChallengeKey = 0x01,
kKey1 = 0x02,
kKey2 = 0x03,
kTitleKey = 0x04,
kASF = 0x05,
kSetRegion = 0x06,
kRPCState = 0x08,
kCSS2AGID = 0x10,
kCPRMAGID = 0x11,
kInvalidateAGID = 0x3f
};
enum DVDKeyClass
{
kCSS_CSS2_CPRM = 0x00,
kRSSA = 0x01
};
#endif
typedef struct dvdioctl_data
{
void *p_buffer;
#if defined(KERNEL)
UInt32 i_size;
UInt32 i_lba;
UInt8 i_agid;
#else
u32 i_size;
u32 i_lba;
u8 i_agid;
#endif
int i_keyclass;
int i_keyformat;
} dvdioctl_data_t;
#define IODVD_READ_STRUCTURE _IOWR('B', 1, dvdioctl_data_t)
#define IODVD_SEND_KEY _IOWR('B', 2, dvdioctl_data_t)
#define IODVD_REPORT_KEY _IOWR('B', 3, dvdioctl_data_t)
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 32;
objects = {
06AA1264FFB2107B11CA28AA = {
buildActionMask = 2147483647;
files = (
);
generatedFileNames = (
);
isa = PBXShellScriptBuildPhase;
name = "Shell Script";
neededFileNames = (
);
shellPath = /bin/sh;
shellScript = "script=\"${SYSTEM_DEVELOPER_DIR}/ProjectBuilder Extras/Kernel Extension Support/KEXTPostprocess\";\nif [ -x \"$script\" ]; then\n . \"$script\"\nfi";
};
06AA1265FFB2107B11CA28AA = {
buildRules = (
);
buildSettings = {
COPY_PHASE_STRIP = NO;
};
isa = PBXBuildStyle;
name = Development;
};
06AA1266FFB2107B11CA28AA = {
buildRules = (
);
buildSettings = {
COPY_PHASE_STRIP = YES;
};
isa = PBXBuildStyle;
name = Deployment;
};
06AA1267FFB2110C11CA28AA = {
buildActionMask = 2147483647;
files = (
);
generatedFileNames = (
);
isa = PBXShellScriptBuildPhase;
name = "Shell Script";
neededFileNames = (
);
shellPath = /bin/sh;
shellScript = "script=\"${SYSTEM_DEVELOPER_DIR}/ProjectBuilder Extras/Kernel Extension Support/KEXTPreprocess\";\nif [ -x \"$script\" ]; then\n . \"$script\"\nfi";
};
089C1669FE841209C02AAC07 = {
buildStyles = (
06AA1265FFB2107B11CA28AA,
06AA1266FFB2107B11CA28AA,
);
isa = PBXProject;
mainGroup = 089C166AFE841209C02AAC07;
projectDirPath = .;
targets = (
089C1673FE841209C02AAC07,
);
};
089C166AFE841209C02AAC07 = {
children = (
247142CAFF3F8F9811CA285C,
089C167CFE841241C02AAC07,
19C28FB6FE9D52B211CA2CBB,
);
isa = PBXGroup;
name = DVDioctl;
refType = 4;
};
089C1673FE841209C02AAC07 = {
buildPhases = (
06AA1267FFB2110C11CA28AA,
089C1674FE841209C02AAC07,
089C1675FE841209C02AAC07,
089C1676FE841209C02AAC07,
089C1677FE841209C02AAC07,
089C1679FE841209C02AAC07,
06AA1264FFB2107B11CA28AA,
);
buildSettings = {
FRAMEWORK_SEARCH_PATHS = "";
HEADER_SEARCH_PATHS = "";
INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/Extensions";
KERNEL_MODULE = YES;
LIBRARY_SEARCH_PATHS = "";
MODULE_IOKIT = YES;
MODULE_NAME = DVDioctl;
MODULE_VERSION = 1.0.0d1;
OPTIMIZATION_CFLAGS = "";
OTHER_CFLAGS = "";
OTHER_LDFLAGS = "";
OTHER_REZFLAGS = "";
PRODUCT_NAME = DVDioctl;
SECTORDER_FLAGS = "";
WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas";
WRAPPER_EXTENSION = kext;
};
conditionalBuildSettings = {
};
dependencies = (
);
isa = PBXBundleTarget;
name = DVDioctl;
productInstallPath = "$(SYSTEM_LIBRARY_DIR)/Extensions";
productName = DVDioctl;
productReference = 0B81C263FFB7832611CA28AA;
productSettingsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<!DOCTYPE plist SYSTEM \"file://localhost/System/Library/DTDs/PropertyList.dtd\">
<plist version=\"0.9\">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>DVDioctl</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>DVDioctl</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0.0d1</string>
<key>IOKitPersonalities</key>
<dict>
<key>DVDioctl</key>
<dict>
<key>CFBundleIdentifier</key>
<string>DVDioctl</string>
<key>IOClass</key>
<string>DVDioctl</string>
<key>IOKitDebug</key>
<integer>65535</integer>
<key>IOMatchCategory</key>
<string>DVDioctl</string>
<key>IOProviderClass</key>
<string>IOResources</string>
<key>IOResourceMatch</key>
<string>IOKit</string>
</dict>
</dict>
<key>OSBundleLibraries</key>
<dict/>
</dict>
</plist>
";
shouldUseHeadermap = 1;
};
089C1674FE841209C02AAC07 = {
buildActionMask = 2147483647;
files = (
1A224C40FF42367911CA2CB7,
);
isa = PBXHeadersBuildPhase;
name = Headers;
};
089C1675FE841209C02AAC07 = {
buildActionMask = 2147483647;
files = (
089C1680FE841241C02AAC07,
);
isa = PBXResourcesBuildPhase;
name = "Bundle Resources";
};
089C1676FE841209C02AAC07 = {
buildActionMask = 2147483647;
files = (
1A224C41FF42367911CA2CB7,
);
isa = PBXSourcesBuildPhase;
name = Sources;
};
089C1677FE841209C02AAC07 = {
buildActionMask = 2147483647;
files = (
);
isa = PBXFrameworksBuildPhase;
name = "Frameworks & Libraries";
};
089C1679FE841209C02AAC07 = {
buildActionMask = 2147483647;
files = (
);
isa = PBXRezBuildPhase;
name = "ResourceManager Resources";
};
089C167CFE841241C02AAC07 = {
children = (
089C167DFE841241C02AAC07,
);
isa = PBXGroup;
name = Resources;
refType = 4;
};
089C167DFE841241C02AAC07 = {
children = (
089C167EFE841241C02AAC07,
);
isa = PBXVariantGroup;
name = InfoPlist.strings;
refType = 4;
};
089C167EFE841241C02AAC07 = {
fileEncoding = 10;
isa = PBXFileReference;
name = English;
path = English.lproj/InfoPlist.strings;
refType = 4;
};
089C1680FE841241C02AAC07 = {
fileRef = 089C167DFE841241C02AAC07;
isa = PBXBuildFile;
settings = {
};
};
0B81C263FFB7832611CA28AA = {
isa = PBXBundleReference;
path = DVDioctl.kext;
refType = 3;
};
19C28FB6FE9D52B211CA2CBB = {
children = (
0B81C263FFB7832611CA28AA,
);
isa = PBXGroup;
name = Products;
refType = 4;
};
1A224C3EFF42367911CA2CB7 = {
isa = PBXFileReference;
path = DVDioctl.h;
refType = 4;
};
1A224C3FFF42367911CA2CB7 = {
isa = PBXFileReference;
path = DVDioctl.cpp;
refType = 4;
};
1A224C40FF42367911CA2CB7 = {
fileRef = 1A224C3EFF42367911CA2CB7;
isa = PBXBuildFile;
settings = {
};
};
1A224C41FF42367911CA2CB7 = {
fileRef = 1A224C3FFF42367911CA2CB7;
isa = PBXBuildFile;
settings = {
ATTRIBUTES = (
);
};
};
247142CAFF3F8F9811CA285C = {
children = (
1A224C3EFF42367911CA2CB7,
1A224C3FFF42367911CA2CB7,
);
isa = PBXGroup;
name = Source;
path = "";
refType = 4;
};
};
rootObject = 089C1669FE841209C02AAC07;
}
Binary files a/extras/MacOSX_dvdioctl/English.lproj/InfoPlist.strings and /dev/null differ
DVD driver for Darwin and Mac OS X
==================================
This experimental kernel extension (KEXT) for Darwin is a wrapper for
the DVD-related kernel IOKit functions. It was written for two main reasons:
- the lack of userland support for DVD key negociation functions
- the fact that the kernel locks mounted device, preventing raw device
reads if the DVD is mounted
Building the driver
===================
You can either load the project in Project Builder and press the "build"
icon, or open a terminal window and type "pbxbuild".
Installing the driver
=====================
Open a terminal window, and type "kextload build/DVDioctl.kext", or whatever
the path to the build tree is. You need to be root in order to do this.
Using the driver
================
The driver creates a special /dev/dvd block device upon loading. When a
process tries to open this device, it looks for an IODVDMedia object and
opens it. All further operation done to the /dev/dvd device are then
forwarded to the IODVDMedia device.
......@@ -8,7 +8,7 @@
* -dvd_udf to find files
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: dvd_access.c,v 1.8 2002/03/15 04:41:54 sam Exp $
* $Id: dvd_access.c,v 1.9 2002/03/18 19:14:52 sam Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -787,7 +787,7 @@ static char * DVDParse( input_thread_t * p_input )
/* check block device */
if( stat( psz_device, &stat_info ) == -1 )
{
intf_ErrMsg( "input error: cannot stat() device `%s' (%s)",
intf_ErrMsg( "dvd error: cannot stat() device `%s' (%s)",
psz_device, strerror(errno));
return NULL;
}
......
/* dvd_demux.c: DVD demux functions.
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: dvd_demux.c,v 1.3 2002/03/09 16:48:33 stef Exp $
* $Id: dvd_demux.c,v 1.4 2002/03/18 19:14:52 sam Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -88,6 +88,11 @@ void _M( demux_getfunctions)( function_list_t * p_function_list )
*****************************************************************************/
static int DVDInit( input_thread_t * p_input )
{
if( p_input->stream.i_method != INPUT_METHOD_DVD )
{
return -1;
}
vlc_mutex_lock( &p_input->stream.stream_lock );
DVDLaunchDecoders( p_input );
......
......@@ -6,7 +6,7 @@
* It depends on: libdvdread for ifo files and block reading.
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: input_dvdread.c,v 1.33 2002/03/12 18:37:46 stef Exp $
* $Id: input_dvdread.c,v 1.34 2002/03/18 19:14:52 sam Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -131,6 +131,11 @@ void _M( demux_getfunctions )( function_list_t * p_function_list )
*****************************************************************************/
static int DvdReadInit( input_thread_t * p_input )
{
if( p_input->stream.i_method != INPUT_METHOD_DVD )
{
return -1;
}
vlc_mutex_lock( &p_input->stream.stream_lock );
DvdReadLauchDecoders( p_input );
......
......@@ -2,7 +2,7 @@
* scope.c : Scope effect module
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: scope.c,v 1.4 2002/03/02 03:51:23 sam Exp $
* $Id: scope.c,v 1.5 2002/03/18 19:14:52 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -106,6 +106,8 @@ static void aout_getfunctions( function_list_t * p_function_list )
*****************************************************************************/
static int aout_Open( aout_thread_t *p_aout )
{
char *psz_method;
/* Allocate structure */
p_aout->p_sys = malloc( sizeof( aout_sys_t ) );
if( p_aout->p_sys == NULL )
......@@ -114,11 +116,32 @@ static int aout_Open( aout_thread_t *p_aout )
return -1;
}
psz_method = config_GetPszVariable( "aout" );
if( psz_method )
{
if( !*psz_method )
{
free( psz_method );
return -1;
}
}
else
{
return -1;
}
/* Open video output */
p_aout->p_sys->p_vout =
vout_CreateThread( NULL, SCOPE_WIDTH, SCOPE_HEIGHT,
FOURCC_I420, SCOPE_ASPECT );
if( p_aout->p_sys->p_vout == NULL )
{
intf_ErrMsg( "aout scope error: no suitable vout module" );
free( p_aout->p_sys );
return -1;
}
/* Open audio output */
p_aout->p_sys->aout.i_format = p_aout->i_format;
p_aout->p_sys->aout.i_rate = p_aout->i_rate;
......@@ -128,7 +151,7 @@ static int aout_Open( aout_thread_t *p_aout )
(void *)&p_aout->p_sys->aout );
if( p_aout->p_sys->aout.p_module == NULL )
{
intf_ErrMsg( "aout error: no suitable aout module" );
intf_ErrMsg( "aout scope error: no suitable aout module" );
vout_DestroyThread( p_aout->p_sys->p_vout, NULL );
free( p_aout->p_sys );
return -1;
......
......@@ -2,7 +2,7 @@
* mpeg_es.c : Elementary Stream input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: mpeg_es.c,v 1.5 2002/03/15 17:17:35 sam Exp $
* $Id: mpeg_es.c,v 1.6 2002/03/18 19:14:52 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -113,10 +113,10 @@ static int ESInit( input_thread_t * p_input )
if( *p_peek || *(p_peek + 1) || *(p_peek + 2) != 1 )
{
if( *p_input->psz_demux && strncmp( p_input->psz_demux, "es", 3 ) )
if( *p_input->psz_demux && strncmp( !p_input->psz_demux, "es", 3 ) )
{
/* User forced */
intf_ErrMsg( "input error: this doesn't seem like an MPEG stream, continuing" );
intf_ErrMsg( "input error: this doesn't look like an MPEG ES stream, continuing" );
}
else
{
......@@ -126,7 +126,7 @@ static int ESInit( input_thread_t * p_input )
}
else if( *(p_peek + 3) > 0xb9 )
{
if( *p_input->psz_demux && strncmp( p_input->psz_demux, "es", 3 ) )
if( *p_input->psz_demux && strncmp( !p_input->psz_demux, "es", 3 ) )
{
/* User forced */
intf_ErrMsg( "input error: this seems to be a system stream (PS plug-in ?), but continuing" );
......
......@@ -2,7 +2,7 @@
* mpeg_ps.c : Program Stream input module for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: mpeg_ps.c,v 1.7 2002/03/15 17:17:35 sam Exp $
* $Id: mpeg_ps.c,v 1.8 2002/03/18 19:14:52 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -107,10 +107,10 @@ static int PSInit( input_thread_t * p_input )
if( *p_peek || *(p_peek + 1) || *(p_peek + 2) != 1 )
{
if( *p_input->psz_demux && strncmp( p_input->psz_demux, "ps", 3 ) )
if( *p_input->psz_demux && !strncmp( p_input->psz_demux, "ps", 3 ) )
{
/* User forced */
intf_ErrMsg( "input error: this doesn't seem like an MPEG stream, continuing" );
intf_ErrMsg( "input error: this doesn't look like an MPEG PS stream, continuing" );
}
else
{
......@@ -120,7 +120,7 @@ static int PSInit( input_thread_t * p_input )
}
else if( *(p_peek + 3) <= 0xb9 )
{
if( *p_input->psz_demux && strncmp( p_input->psz_demux, "ps", 3 ) )
if( *p_input->psz_demux && !strncmp( p_input->psz_demux, "ps", 3 ) )
{
/* User forced */
intf_ErrMsg( "input error: this seems to be an elementary stream (ES plug-in ?),");
......
......@@ -2,7 +2,7 @@
* mpeg_ts.c : Transport Stream input module for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: mpeg_ts.c,v 1.6 2002/03/15 17:17:35 sam Exp $
* $Id: mpeg_ts.c,v 1.7 2002/03/18 19:14:52 sam Exp $
*
* Authors: Henri Fallon <henri@via.ecp.fr>
*
......@@ -107,10 +107,10 @@ static int TSInit( input_thread_t * p_input )
if( *p_peek != TS_SYNC_CODE )
{
if( *p_input->psz_demux && strncmp( p_input->psz_demux, "ts", 3 ) )
if( *p_input->psz_demux && !strncmp( p_input->psz_demux, "ts", 3 ) )
{
/* User forced */
intf_ErrMsg( "input error: this doesn't seem like a TS stream, continuing" );
intf_ErrMsg( "input error: this doesn't look like a TS stream, continuing" );
}
else
{
......
......@@ -2,7 +2,7 @@
* vout_sdl.c: SDL video output display method
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: vout_sdl.c,v 1.84 2002/03/17 17:00:38 sam Exp $
* $Id: vout_sdl.c,v 1.85 2002/03/18 19:14:52 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Pierre Baillet <oct@zoy.org>
......@@ -154,6 +154,8 @@ void _M( vout_getfunctions )( function_list_t * p_function_list )
*****************************************************************************/
static int vout_Create( vout_thread_t *p_vout )
{
char *psz_method;
if( SDL_WasInit( SDL_INIT_VIDEO ) != 0 )
{
return( 1 );
......@@ -167,6 +169,20 @@ static int vout_Create( vout_thread_t *p_vout )
return( 1 );
}
psz_method = config_GetPszVariable( "vout" );
if( psz_method )
{
while( *psz_method && *psz_method != ':' )
{
psz_method++;
}
if( *psz_method )
{
setenv( "SDL_VIDEODRIVER", psz_method + 1, 1 );
}
}
/* Initialize library */
if( SDL_Init( SDL_INIT_VIDEO
#ifndef WIN32
......
......@@ -454,6 +454,11 @@ static int VCDInit( input_thread_t * p_input )
{
es_descriptor_t * p_es;
if( p_input->stream.i_method != INPUT_METHOD_VCD )
{
return -1;
}
vlc_mutex_lock( &p_input->stream.stream_lock );
/* Set program information. */
......
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