Commit 44bcfed0 authored by Sam Hocevar's avatar Sam Hocevar

Encore un commit venu tout droit des abysses de l'enfer, d�sol� pour

le flood, c'est la derni�re fois.

  . apr�s le demoronifier, le GPLifier: il y a les ent�tes de la GPL dans
   chaque fichier ; votre mission, si vous l'acceptez, est de mettre votre
   nom dans chaque fichier qui est votre oeuvre ou auquel vous avez
   particip�, pour qu'on sache qui a fait quoi. Pas de fausse modestie,
   c'est plus pour des raisons pratiques que pour la gloire.

  . rajout de -lthreads pour que �a linke sous Hurd

  . rajout de quelques #include pour que �a compile sous FreeBSD
   (d'ailleurs �a compile mais �a ne linke pas, je ne sais pas comment
   linker avec la libpthread sur la machine de Dae)

  . quelques #ifdef SYS_BSD �� et l�.
parent 296df89a
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
# Environment # Environment
CC=egcc CC=egcc
#CC=gcc295
SHELL=/bin/sh SHELL=/bin/sh
# Audio output settings # Audio output settings
...@@ -82,7 +83,9 @@ PROGRAM_OPTIONS += DEBUG ...@@ -82,7 +83,9 @@ PROGRAM_OPTIONS += DEBUG
endif endif
# PROGRAM_BUILD is a complete identification of the build # PROGRAM_BUILD is a complete identification of the build
PROGRAM_BUILD = `date -R` $(USER)@`hostname` # ( we can't use fancy options with date since OSes like Solaris
# or FreeBSD have strange date implementations )
PROGRAM_BUILD = `date` $(USER)@`hostname`
# DEFINE will contain some of the constants definitions decided in Makefile, # DEFINE will contain some of the constants definitions decided in Makefile,
# including ARCH_xx and SYS_xx. It will be passed to C compiler. # including ARCH_xx and SYS_xx. It will be passed to C compiler.
...@@ -105,12 +108,18 @@ endif ...@@ -105,12 +108,18 @@ endif
# #
# C headers directories # C headers directories
# #
INCLUDE += -Iinclude INCLUDE += -Iinclude -I/usr/local/include -I/usr/X11R6/include
# #
# Libraries # Libraries
# #
LIB += -L/usr/local/lib
ifeq ($(SYS),GNU)
LIB += -lthreads
else
LIB += -lpthread LIB += -lpthread
endif
LIB += -lm LIB += -lm
LIB += -ldl LIB += -ldl
...@@ -132,8 +141,10 @@ ifeq ($(ARCH),X86) ...@@ -132,8 +141,10 @@ ifeq ($(ARCH),X86)
CCFLAGS += -malign-double CCFLAGS += -malign-double
#CCFLAGS += -march=pentium #CCFLAGS += -march=pentium
ifeq ($(PPRO), YES) ifeq ($(PPRO), YES)
ifneq ($(SYS), BSD)
CCFLAGS += -march=pentiumpro CCFLAGS += -march=pentiumpro
endif endif
endif
# Eventual MMX optimizations for x86 # Eventual MMX optimizations for x86
ifeq ($(MMX), YES) ifeq ($(MMX), YES)
CFLAGS += -DHAVE_MMX CFLAGS += -DHAVE_MMX
...@@ -327,7 +338,7 @@ FORCE: ...@@ -327,7 +338,7 @@ FORCE:
# Real targets # Real targets
# #
vlc: $(C_OBJ) $(ASM_OBJ) $(PLUGIN_OBJ) vlc: $(C_OBJ) $(ASM_OBJ) $(PLUGIN_OBJ)
$(CC) $(LCFLAGS) $(CFLAGS) --export-dynamic -rdynamic -o $@ $(C_OBJ) $(ASM_OBJ) $(CC) $(CCFLAGS) $(LCFLAGS) $(CFLAGS) --export-dynamic -rdynamic -o $@ $(C_OBJ) $(ASM_OBJ)
# #
# Generic rules (see below) # Generic rules (see below)
......
/***************************************************************************** /*****************************************************************************
* ac3_decoder.h : ac3 decoder interface * ac3_decoder.h : ac3 decoder interface
* (c)1999 VideoLAN *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
*
* Authors:
*
* 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-1307, USA.
*****************************************************************************/ *****************************************************************************/
/**** ac3 decoder API - public ac3 decoder structures */ /**** ac3 decoder API - public ac3 decoder structures */
......
/***************************************************************************** /*****************************************************************************
* ac3_decoder_thread.h : ac3 decoder thread interface * ac3_decoder_thread.h : ac3 decoder thread interface
* (c)1999 VideoLAN *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
*
* Authors:
*
* 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-1307, USA.
*****************************************************************************/ *****************************************************************************/
/***************************************************************************** /*****************************************************************************
......
/***************************************************************************** /*****************************************************************************
* audio_decoder.h : audio decoder thread interface * audio_decoder.h : audio decoder thread interface
* (c)1999 VideoLAN
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
*
* Authors:
*
* 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-1307, USA.
*****************************************************************************/
/*****************************************************************************
* = Prototyped functions are implemented in audio_decoder/audio_decoder.c * = Prototyped functions are implemented in audio_decoder/audio_decoder.c
* *
* = Required headers : * = Required headers :
* - "common.h" ( u32, byte_t, boolean_t ) * - "common.h" ( u32, byte_t, boolean_t )
* - "vlc_thread.h" ( vlc_thread_t ) * - "threads.h" ( vlc_thread_t )
* - "input.h" ( ts_packet_t, input_thread_t ) * - "input.h" ( ts_packet_t, input_thread_t )
* - "decoder_fifo.h" ( decoder_fifo_t ) * - "decoder_fifo.h" ( decoder_fifo_t )
* - "audio_output.h" ( aout_fifo_t, aout_thread_t ) * - "audio_output.h" ( aout_fifo_t, aout_thread_t )
......
/***************************************************************************** /*****************************************************************************
* audio_output.h : audio output thread interface * audio_output.h : audio output thread interface
* (c)1999 VideoLAN
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
*
* Authors:
*
* 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-1307, USA.
*****************************************************************************/
/*****************************************************************************
* Required headers: * Required headers:
* - <sys/soundcard.h> ( audio_buf_info ) * - <sys/soundcard.h> ( audio_buf_info )
* - "common.h" ( boolean_t ) * - "common.h" ( boolean_t )
* - "mtime.h" ( mtime_t ) * - "mtime.h" ( mtime_t )
* - "vlc_thread.h" ( vlc_thread_t ) * - "threads.h" ( vlc_thread_t )
*****************************************************************************/ *****************************************************************************/
/* TODO : /* TODO :
......
/***************************************************************************** /*****************************************************************************
* common.h: common definitions * common.h: common definitions
* (c)1998 VideoLAN * Collection of useful common types and macros definitions
*****************************************************************************
* Collection of usefull common types and macros definitions
***************************************************************************** *****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
*
* Authors:
*
* 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-1307, USA.
*****************************************************************************/
/*****************************************************************************
* required headers: * required headers:
* config.h * config.h
*****************************************************************************/ *****************************************************************************/
......
/***************************************************************************** /*****************************************************************************
* config.h: limits and configuration * config.h: limits and configuration
* (c)1999 VideoLAN
*****************************************************************************
* Defines all compilation-time configuration constants and size limits * Defines all compilation-time configuration constants and size limits
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
*
* Authors:
*
* 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-1307, USA.
*****************************************************************************/ *****************************************************************************/
/* Conventions regarding names of symbols and variables /* Conventions regarding names of symbols and variables
......
/***************************************************************************** /*****************************************************************************
* debug.h: vlc debug macros * debug.h: vlc debug macros
* (c)1999 VideoLAN
*****************************************************************************
* Stand alone file * Stand alone file
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
*
* Authors:
*
* 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-1307, USA.
*****************************************************************************/
/*****************************************************************************
* Required headers: * Required headers:
* - <string.h> * - <string.h>
* - intf_msg.h * - intf_msg.h
......
/***************************************************************************** /*****************************************************************************
* decoder_fifo.h: interface for decoders PES fifo * decoder_fifo.h: interface for decoders PES fifo
* (c)1999 VideoLAN
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
*
* Authors:
*
* 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-1307, USA.
*****************************************************************************/
/*****************************************************************************
* Required headers: * Required headers:
* - "config.h" * - "config.h"
* - "common.h" * - "common.h"
* - "vlc_thread.h" * - "threads.h"
* - "input.h" * - "input.h"
*****************************************************************************/ *****************************************************************************/
......
/***************************************************************************** /*****************************************************************************
* input.h: input thread interface * input.h: input thread interface
* (c)1999 VideoLAN *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
*
* Authors:
*
* 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-1307, USA.
*****************************************************************************/ *****************************************************************************/
/***************************************************************************** /*****************************************************************************
......
/***************************************************************************** /*****************************************************************************
* input_netlist.h: netlist interface * input_netlist.h: netlist interface
* (c)1998 VideoLAN
*****************************************************************************
* The netlists are an essential part of the input structure. We maintain a * The netlists are an essential part of the input structure. We maintain a
* list of free TS packets and free PES packets to avoid continuous malloc * list of free TS packets and free PES packets to avoid continuous malloc
* and free. * and free.
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
*
* Authors:
*
* 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-1307, USA.
*****************************************************************************/ *****************************************************************************/
#include "intf_msg.h" #include "intf_msg.h"
......
/***************************************************************************** /*****************************************************************************
* input_vlan.h: vlan input method * input_vlan.h: vlan input method
* (c)1999 VideoLAN
*****************************************************************************
* XXX??
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
*
* Authors:
*
* 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-1307, USA.
*****************************************************************************/
/*****************************************************************************
* Required headers: * Required headers:
* <netinet/in.h> * <netinet/in.h>
* "vlc_thread.h" * "threads.h"
*****************************************************************************/ *****************************************************************************/
/***************************************************************************** /*****************************************************************************
......
/*****************************************************************************
* int_types.h: internal types
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
*
* Authors:
*
* 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-1307, USA.
*****************************************************************************/
/* Basic types definitions */ /* Basic types definitions */
typedef unsigned char u8; typedef unsigned char u8;
typedef signed char s8; typedef signed char s8;
......
/***************************************************************************** /*****************************************************************************
* interface.h: interface access for other threads * interface.h: interface access for other threads
* (c)1999 VideoLAN
*****************************************************************************
* This library provides basic functions for threads to interact with user * This library provides basic functions for threads to interact with user
* interface, such as message output. * interface, such as message output.
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
*
* Authors:
*
* 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-1307, USA.
*****************************************************************************/
/*****************************************************************************
* Required headers: * Required headers:
* <sys/uio.h> * <sys/uio.h>
* <X11/Xlib.h> * <X11/Xlib.h>
...@@ -12,7 +31,7 @@ ...@@ -12,7 +31,7 @@
* "config.h" * "config.h"
* "common.h" * "common.h"
* "mtime.h" * "mtime.h"
* "vlc_thread.h" * "threads.h"
* "input.h" * "input.h"
* "video.h" * "video.h"
* "video_output.h" * "video_output.h"
......
/***************************************************************************** /*****************************************************************************
* intf_msg.h: messages interface * intf_msg.h: messages interface
* (c)1999 VideoLAN
*****************************************************************************
* This library provides basic functions for threads to interact with user * This library provides basic functions for threads to interact with user
* interface, such as message output. See config.h for output configuration. * interface, such as message output. See config.h for output configuration.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
*
* Authors:
*
* 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-1307, USA.
*****************************************************************************/ *****************************************************************************/
/***************************************************************************** /*****************************************************************************
......
/***************************************************************************** /*****************************************************************************
* main.h: access to all program variables * main.h: access to all program variables
* (c)1999 VideoLAN
*****************************************************************************
* Declaration and extern access to global program object. * Declaration and extern access to global program object.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
*
* Authors:
*
* 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-1307, USA.
*****************************************************************************/ *****************************************************************************/
/***************************************************************************** /*****************************************************************************
......
/***************************************************************************** /*****************************************************************************