Commit 1fdc92cb authored by Sam Hocevar's avatar Sam Hocevar

* ./modules/video_output/wingdi.c: skeleton of a Windows GDI video output.

  * ./modules/access/file.c: the file access plugin gets the real file size
    under WinCE.
  * ./modules/audio_filter/converter/u8tofixed32.c: added this conversion
    filter to play some WAV files without an FPU.
  * ./bootstrap: bootstrap --update-vc doesn't rely on the Makefile's presence.
parent 24e0e49b
#! /bin/sh #! /bin/sh
## bootstrap file for vlc, the VideoLAN Client ## bootstrap file for vlc, the VideoLAN Client
## $Id: bootstrap,v 1.32 2002/11/20 19:07:26 sam Exp $ ## $Id: bootstrap,v 1.33 2002/11/21 13:53:31 sam Exp $
## ##
## Authors: Samuel Hocevar <sam@zoy.org> ## Authors: Samuel Hocevar <sam@zoy.org>
...@@ -79,10 +79,12 @@ then ...@@ -79,10 +79,12 @@ then
# The evil ^M # The evil ^M
M=' ' M=' '
# Sources that get built under Win32 # Sources that get built under Win32 - FIXME: anyone wanna deuglify this? :)
LIBVLC_SOURCES=`make show-libvlc-sources | grep '^X: ' | cut -b3-` LIBVLC_SOURCES=`awk 'BEGIN{a=0}{if(!a&&/^'SOURCES_libvlc_common'[^-_a-zA-Z0-9]*=/){a=1;print$0;next;}if(a){if(/^[a-zA-Z]/){exit;}print $0}}' < Makefile.am | tr '\\ ' '\n\n' | sed -ne 's/[^$-_a-zA-Z0-9][^$-_a-zA-Z0-9]*\([a-zA-Z]\)/\1/p'; awk 'BEGIN{a=0}{if(!a&&/^'SOURCES_libvlc_win32'[^-_a-zA-Z0-9]*=/){a=1;print$0;next;}if(a){if(/^[a-zA-Z]/){exit;}print $0}}' < Makefile.am | tr '\\ ' '\n\n' | sed -ne 's/[^$-_a-zA-Z0-9][^$-_a-zA-Z0-9]*\([a-zA-Z]\)/\1/p'; awk 'BEGIN{a=0}{if(!a&&/^'SOURCES_libvlc_dirent'[^-_a-zA-Z0-9]*=/){a=1;print$0;next;}if(a){if(/^[a-zA-Z]/){exit;}print $0}}' < Makefile.am | tr '\\ ' '\n\n' | sed -ne 's/[^$-_a-zA-Z0-9][^$-_a-zA-Z0-9]*\([a-zA-Z]\)/\1/p'; awk 'BEGIN{a=0}{if(!a&&/^'SOURCES_libvlc_getopt'[^-_a-zA-Z0-9]*=/){a=1;print$0;next;}if(a){if(/^[a-zA-Z]/){exit;}print $0}}' < Makefile.am | tr '\\ ' '\n\n' | sed -ne 's/[^$-_a-zA-Z0-9][^$-_a-zA-Z0-9]*\([a-zA-Z]\)/\1/p'; awk 'BEGIN{a=0}{if(!a&&/^'SOURCES_libvlc_libc'[^-_a-zA-Z0-9]*=/){a=1;print$0;next;}if(a){if(/^[a-zA-Z]/){exit;}print $0}}' < Makefile.am | tr '\\ ' '\n\n' | sed -ne 's/[^$-_a-zA-Z0-9][^$-_a-zA-Z0-9]*\([a-zA-Z]\)/\1/p'`
LIBVLC_HEADERS=`make show-libvlc-headers | grep '^X: ' | cut -b3-`
LIBVLC_PKG_HEADERS=`make show-libvlc-pkg-headers | grep '^X: ' | cut -b3-` LIBVLC_HEADERS=`awk 'BEGIN{a=0}{if(!a&&/^'HEADERS_include'[^-_a-zA-Z0-9]*=/){a=1;print$0;next;}if(a){if(/^[a-zA-Z]/){exit;}print $0}}' < Makefile.am | tr '\\ ' '\n\n' | sed -ne 's/[^$-_a-zA-Z0-9][^$-_a-zA-Z0-9]*\([a-zA-Z]\)/\1/p'; awk 'BEGIN{a=0}{if(!a&&/^'HEADERS_include_built'[^-_a-zA-Z0-9]*=/){a=1;print$0;next;}if(a){if(/^[a-zA-Z]/){exit;}print $0}}' < Makefile.am | tr '\\ ' '\n\n' | sed -ne 's/[^$-_a-zA-Z0-9][^$-_a-zA-Z0-9]*\([a-zA-Z]\)/\1/p'`
LIBVLC_PKG_HEADERS=`awk 'BEGIN{a=0}{if(!a&&/^'dist_pkginclude_HEADERS'[^-_a-zA-Z0-9]*=/){a=1;print$0;next;}if(a){if(/^[a-zA-Z]/){exit;}print $0}}' < Makefile.am | tr '\\ ' '\n\n' | sed -ne 's/[^$-_a-zA-Z0-9][^$-_a-zA-Z0-9]*\([a-zA-Z]\)/\1/p'`
# Clean up # Clean up
rm -f evc/*.vcp msvc/*.dsp rm -f evc/*.vcp msvc/*.dsp
......
...@@ -597,7 +597,7 @@ PLUGINS="${PLUGINS} idct idctclassic motion mpeg_video spudec mpeg_audio" ...@@ -597,7 +597,7 @@ PLUGINS="${PLUGINS} idct idctclassic motion mpeg_video spudec mpeg_audio"
#PLUGINS="${PLUGINS} a52old imdct downmix" #PLUGINS="${PLUGINS} a52old imdct downmix"
PLUGINS="${PLUGINS} lpcm a52" PLUGINS="${PLUGINS} lpcm a52"
PLUGINS="${PLUGINS} deinterlace invert yuv wall transform distort clone crop motionblur" PLUGINS="${PLUGINS} deinterlace invert yuv wall transform distort clone crop motionblur"
PLUGINS="${PLUGINS} float32tos16 float32tos8 float32tou16 float32tou8 a52tospdif fixed32tofloat32 fixed32tos16 s16tofloat32 s16tofloat32swab s8tofloat32 u8tofloat32" PLUGINS="${PLUGINS} float32tos16 float32tos8 float32tou16 float32tou8 a52tospdif fixed32tofloat32 fixed32tos16 s16tofloat32 s16tofloat32swab s8tofloat32 u8tofixed32 u8tofloat32"
PLUGINS="${PLUGINS} trivial_resampler ugly_resampler linear_resampler" PLUGINS="${PLUGINS} trivial_resampler ugly_resampler linear_resampler"
PLUGINS="${PLUGINS} trivial_channel_mixer" PLUGINS="${PLUGINS} trivial_channel_mixer"
PLUGINS="${PLUGINS} trivial_mixer spdif_mixer float32_mixer" PLUGINS="${PLUGINS} trivial_mixer spdif_mixer float32_mixer"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vlc.c: the vlc player, WinCE version * vlc.c: the vlc player, WinCE version
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: vlc.c,v 1.4 2002/11/20 16:43:32 sam Exp $ * $Id: vlc.c,v 1.5 2002/11/21 13:53:31 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -52,8 +52,8 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, ...@@ -52,8 +52,8 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPTSTR lpCmdLine, int nCmdShow ) LPTSTR lpCmdLine, int nCmdShow )
{ {
int i_ret; int i_ret;
int i_argc = 5; int i_argc = 4;
char * ppsz_argv[] = { lpCmdLine, "-vv", "--intf", "dummy", "shovel.mpeg", /*"washington.mpeg",*/ NULL }; char * ppsz_argv[] = { lpCmdLine, "-vv", "--intf", "dummy", NULL, NULL };
HWND window; HWND window;
MSG message; MSG message;
...@@ -63,10 +63,17 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, ...@@ -63,10 +63,17 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
char psz_title[100]; char psz_title[100];
wchar_t pwz_title[100]; wchar_t pwz_title[100];
i_argc = 5;
ppsz_argv[4] = "washington.mpeg";
ppsz_argv[4] = "shovel.mpeg";
ppsz_argv[4] = "11h50.wav";
ppsz_argv[4] = "apple_promouse.mpeg";
/* Store our instance for future reference */ /* Store our instance for future reference */
hInst = hInstance; hInst = hInstance;
/* Register window class */ /* Register window class */
memset( &wc, 0, sizeof(wc) );
wc.style = CS_HREDRAW | CS_VREDRAW; wc.style = CS_HREDRAW | CS_VREDRAW;
wc.lpfnWndProc = (WNDPROC) WndProc; wc.lpfnWndProc = (WNDPROC) WndProc;
wc.cbClsExtra = 0; wc.cbClsExtra = 0;
...@@ -86,10 +93,10 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, ...@@ -86,10 +93,10 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
/* Create our nice window */ /* Create our nice window */
window = CreateWindow( L"VLC", pwz_title, window = CreateWindow( L"VLC", pwz_title,
WS_VISIBLE | WS_SIZEBOX | WS_CAPTION, WS_VISIBLE /*| WS_SIZEBOX | WS_CAPTION*/,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
//CW_USEDEFAULT, CW_USEDEFAULT, //CW_USEDEFAULT, CW_USEDEFAULT,
200,100, 200,200,
NULL, NULL, hInst, NULL ); NULL, NULL, hInst, NULL );
ShowWindow( window, nCmdShow ); ShowWindow( window, nCmdShow );
...@@ -192,10 +199,18 @@ static long FAR PASCAL WndProc ( HWND hWnd, UINT message, ...@@ -192,10 +199,18 @@ static long FAR PASCAL WndProc ( HWND hWnd, UINT message,
{ {
HDC hdc; HDC hdc;
int wmId, wmEvent; int wmId, wmEvent;
int x, y;
PAINTSTRUCT ps; PAINTSTRUCT ps;
switch( message ) switch( message )
{ {
case WM_LBUTTONDOWN:
x = LOWORD(lParam);
y = HIWORD(lParam);
hdc = GetDC(hWnd);
Rectangle(hdc, x-4, y-4, x+4, y+4);
ReleaseDC(hWnd, hdc);
break;
case WM_COMMAND: case WM_COMMAND:
wmId = LOWORD(wParam); wmId = LOWORD(wParam);
wmEvent = HIWORD(wParam); wmEvent = HIWORD(wParam);
......
...@@ -51,6 +51,18 @@ Package=<4> ...@@ -51,6 +51,18 @@ Package=<4>
############################################################################### ###############################################################################
Project: "plugin_araw"=.\plugin_araw.vcp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "plugin_dummy"=.\plugin_dummy.vcp - Package Owner=<4> Project: "plugin_dummy"=.\plugin_dummy.vcp - Package Owner=<4>
Package=<5> Package=<5>
...@@ -255,7 +267,7 @@ Package=<4> ...@@ -255,7 +267,7 @@ Package=<4>
############################################################################### ###############################################################################
Project: "plugin_spudec"=.\plugin_spudec.vcp - Package Owner=<4> Project: "plugin_trivial_channel_mixer"=.\plugin_trivial_channel_mixer.vcp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
...@@ -267,7 +279,7 @@ Package=<4> ...@@ -267,7 +279,7 @@ Package=<4>
############################################################################### ###############################################################################
Project: "plugin_trivial_channel_mixer"=.\plugin_trivial_channel_mixer.vcp - Package Owner=<4> Project: "plugin_trivial_mixer"=.\plugin_trivial_mixer.vcp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
...@@ -279,7 +291,7 @@ Package=<4> ...@@ -279,7 +291,7 @@ Package=<4>
############################################################################### ###############################################################################
Project: "plugin_trivial_mixer"=.\plugin_trivial_mixer.vcp - Package Owner=<4> Project: "plugin_trivial_resampler"=.\plugin_trivial_resampler.vcp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
...@@ -291,7 +303,7 @@ Package=<4> ...@@ -291,7 +303,7 @@ Package=<4>
############################################################################### ###############################################################################
Project: "plugin_trivial_resampler"=.\plugin_trivial_resampler.vcp - Package Owner=<4> Project: "plugin_ts"=.\plugin_ts.vcp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
...@@ -303,7 +315,7 @@ Package=<4> ...@@ -303,7 +315,7 @@ Package=<4>
############################################################################### ###############################################################################
Project: "plugin_ts"=.\plugin_ts.vcp - Package Owner=<4> Project: "plugin_u8tofixed32"=.\plugin_u8tofixed32.vcp - Package Owner=<4>
Package=<5> Package=<5>
{{{ {{{
...@@ -327,6 +339,18 @@ Package=<4> ...@@ -327,6 +339,18 @@ Package=<4>
############################################################################### ###############################################################################
Project: "plugin_wav"=.\plugin_wav.vcp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "plugin_waveout"=.\plugin_waveout.vcp - Package Owner=<4> Project: "plugin_waveout"=.\plugin_waveout.vcp - Package Owner=<4>
Package=<5> Package=<5>
...@@ -339,6 +363,18 @@ Package=<4> ...@@ -339,6 +363,18 @@ Package=<4>
############################################################################### ###############################################################################
Project: "plugin_wingdi"=.\plugin_wingdi.vcp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "vlc"=.\vlc.vcp - Package Owner=<4> Project: "vlc"=.\vlc.vcp - Package Owner=<4>
Package=<5> Package=<5>
...@@ -347,75 +383,6 @@ Package=<5> ...@@ -347,75 +383,6 @@ Package=<5>
Package=<4> Package=<4>
{{{ {{{
Begin Project Dependency
Project_Dep_Name plugin_a52tospdif
End Project Dependency
Begin Project Dependency
Project_Dep_Name plugin_access_file
End Project Dependency
Begin Project Dependency
Project_Dep_Name plugin_dummy
End Project Dependency
Begin Project Dependency
Project_Dep_Name plugin_es
End Project Dependency
Begin Project Dependency
Project_Dep_Name plugin_fixed32tofloat32
End Project Dependency
Begin Project Dependency
Project_Dep_Name plugin_fixed32tos16
End Project Dependency
Begin Project Dependency
Project_Dep_Name plugin_i420_rgb
End Project Dependency
Begin Project Dependency
Project_Dep_Name plugin_i420_yuy2
End Project Dependency
Begin Project Dependency
Project_Dep_Name plugin_i422_yuy2
End Project Dependency
Begin Project Dependency
Project_Dep_Name plugin_idct
End Project Dependency
Begin Project Dependency
Project_Dep_Name plugin_idctclassic
End Project Dependency
Begin Project Dependency
Project_Dep_Name plugin_linear_resampler
End Project Dependency
Begin Project Dependency
Project_Dep_Name plugin_memcpy
End Project Dependency
Begin Project Dependency
Project_Dep_Name plugin_motion
End Project Dependency
Begin Project Dependency
Project_Dep_Name plugin_mpeg_audio
End Project Dependency
Begin Project Dependency
Project_Dep_Name plugin_mpeg_system
End Project Dependency
Begin Project Dependency
Project_Dep_Name plugin_mpeg_video
End Project Dependency
Begin Project Dependency
Project_Dep_Name plugin_ps
End Project Dependency
Begin Project Dependency
Project_Dep_Name plugin_trivial_channel_mixer
End Project Dependency
Begin Project Dependency
Project_Dep_Name plugin_trivial_mixer
End Project Dependency
Begin Project Dependency
Project_Dep_Name plugin_trivial_resampler
End Project Dependency
Begin Project Dependency
Project_Dep_Name plugin_ts
End Project Dependency
Begin Project Dependency
Project_Dep_Name plugin_waveout
End Project Dependency
Begin Project Dependency Begin Project Dependency
Project_Dep_Name libvlc Project_Dep_Name libvlc
End Project Dependency End Project Dependency
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* file.c: file input (file: access plug-in) * file.c: file input (file: access plug-in)
***************************************************************************** *****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN * Copyright (C) 2001, 2002 VideoLAN
* $Id: file.c,v 1.4 2002/11/20 13:37:35 sam Exp $ * $Id: file.c,v 1.5 2002/11/21 13:53:32 sam Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -123,7 +123,13 @@ static int Open( vlc_object_t *p_this ) ...@@ -123,7 +123,13 @@ static int Open( vlc_object_t *p_this )
p_input->stream.b_seekable = 0; p_input->stream.b_seekable = 0;
p_input->stream.p_selected_area->i_size = 0; p_input->stream.p_selected_area->i_size = 0;
} }
#ifdef HAVE_SYS_STAT_H #ifdef UNDER_CE
else if( VLC_TRUE )
{
/* We'll update i_size after it's been opened */
p_input->stream.b_seekable = 1;
}
#elif defined( HAVE_SYS_STAT_H )
else if( S_ISREG(stat_info.st_mode) || S_ISCHR(stat_info.st_mode) else if( S_ISREG(stat_info.st_mode) || S_ISCHR(stat_info.st_mode)
|| S_ISBLK(stat_info.st_mode) ) || S_ISBLK(stat_info.st_mode) )
{ {
...@@ -139,13 +145,13 @@ static int Open( vlc_object_t *p_this ) ...@@ -139,13 +145,13 @@ static int Open( vlc_object_t *p_this )
p_input->stream.b_seekable = 0; p_input->stream.b_seekable = 0;
p_input->stream.p_selected_area->i_size = 0; p_input->stream.p_selected_area->i_size = 0;
} }
#endif
else else
{ {
vlc_mutex_unlock( &p_input->stream.stream_lock ); vlc_mutex_unlock( &p_input->stream.stream_lock );
msg_Err( p_input, "unknown file type for `%s'", psz_name ); msg_Err( p_input, "unknown file type for `%s'", psz_name );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
#endif
} }
p_input->stream.p_selected_area->i_tell = 0; p_input->stream.p_selected_area->i_tell = 0;
...@@ -181,6 +187,8 @@ static int Open( vlc_object_t *p_this ) ...@@ -181,6 +187,8 @@ static int Open( vlc_object_t *p_this )
free( p_access_data ); free( p_access_data );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
p_input->stream.p_selected_area->i_size =
GetFileSize( (HANDLE)p_access_data->i_handle, NULL );
#else #else
p_access_data->i_handle = open( psz_name, p_access_data->i_handle = open( psz_name,
/*O_NONBLOCK | O_LARGEFILE*/ 0 ); /*O_NONBLOCK | O_LARGEFILE*/ 0 );
......
...@@ -9,4 +9,5 @@ SOURCES_fixed32tofloat32 = modules/audio_filter/converter/fixed32tofloat32.c ...@@ -9,4 +9,5 @@ SOURCES_fixed32tofloat32 = modules/audio_filter/converter/fixed32tofloat32.c
SOURCES_s16tofloat32 = modules/audio_filter/converter/s16tofloat32.c SOURCES_s16tofloat32 = modules/audio_filter/converter/s16tofloat32.c
SOURCES_s16tofloat32swab = modules/audio_filter/converter/s16tofloat32swab.c SOURCES_s16tofloat32swab = modules/audio_filter/converter/s16tofloat32swab.c
SOURCES_s8tofloat32 = modules/audio_filter/converter/s8tofloat32.c SOURCES_s8tofloat32 = modules/audio_filter/converter/s8tofloat32.c
SOURCES_u8tofixed32 = modules/audio_filter/converter/u8tofixed32.c
SOURCES_u8tofloat32 = modules/audio_filter/converter/u8tofloat32.c SOURCES_u8tofloat32 = modules/audio_filter/converter/u8tofloat32.c
/*****************************************************************************
* u8tofixed32.c : converter from unsigned 8 bits integer to fixed32.
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: u8tofixed32.c,v 1.1 2002/11/21 13:53:32 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
* 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.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#include <stdlib.h> /* malloc(), free() */
#include <string.h>
#include <vlc/vlc.h>
#include "audio_output.h"
#include "aout_internal.h"
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static int Create ( vlc_object_t * );
static void DoWork ( aout_instance_t *, aout_filter_t *, aout_buffer_t *,
aout_buffer_t * );
/*****************************************************************************
* Module descriptor
*****************************************************************************/
vlc_module_begin();
set_description( _("audio filter for u8->fixed32 conversion") );
set_capability( "audio filter", 1 );
set_callbacks( Create, NULL );
vlc_module_end();
/*****************************************************************************
* Create: create and initialize converter
*****************************************************************************/
static int Create( vlc_object_t *p_this )
{
aout_filter_t * p_filter = (aout_filter_t *)p_this;
if ( p_filter->input.i_format != VLC_FOURCC('u','8',' ',' ')
|| p_filter->output.i_format != VLC_FOURCC('f','i','3','2') )
{
return -1;
}
if ( !AOUT_FMTS_SIMILAR( &p_filter->input, &p_filter->output ) )
{
return -1;
}
p_filter->pf_do_work = DoWork;
p_filter->b_in_place = VLC_TRUE;
return 0;
}
/*****************************************************************************
* DoWork: convert a buffer
*****************************************************************************/
static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
aout_buffer_t * p_in_buf, aout_buffer_t * p_out_buf )
{
int i = p_in_buf->i_nb_samples * aout_FormatNbChannels( &p_filter->input );
/* We start from the end because b_in_place is true */
u8 * p_in = (u8 *)p_in_buf->p_buffer + i - 1;
vlc_fixed_t * p_out = (vlc_fixed_t *)p_out_buf->p_buffer + i - 1;
while( i-- )
{
*p_out = (vlc_fixed_t)( (int32_t)(*p_in - 128) * (FIXED32_ONE / 128) );
p_in--; p_out--;
}
p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes * sizeof(vlc_fixed_t);
}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* wav.c : wav file input module for vlc * wav.c : wav file input module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: wav.c,v 1.2 2002/10/26 19:14:46 fenrir Exp $ * $Id: wav.c,v 1.3 2002/11/21 13:53:32 sam Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
...@@ -25,8 +25,6 @@ ...@@ -25,8 +25,6 @@
*****************************************************************************/ *****************************************************************************/
#include <stdlib.h> /* malloc(), free() */ #include <stdlib.h> /* malloc(), free() */
#include <string.h> /* strdup() */ #include <string.h> /* strdup() */
#include <errno.h>
#include <sys/types.h>
#include <vlc/vlc.h> #include <vlc/vlc.h>
#include <vlc/input.h> #include <vlc/input.h>
......
...@@ -4,3 +4,4 @@ SOURCES_ggi = modules/video_output/ggi.c ...@@ -4,3 +4,4 @@ SOURCES_ggi = modules/video_output/ggi.c
SOURCES_glide = modules/video_output/glide.c SOURCES_glide = modules/video_output/glide.c
SOURCES_vout_sdl = modules/video_output/sdl.c SOURCES_vout_sdl = modules/video_output/sdl.c
SOURCES_svgalib = modules/video_output/svgalib.c SOURCES_svgalib = modules/video_output/svgalib.c
SOURCES_wingdi = modules/video_output/wingdi.c
/*****************************************************************************
* wingdi.c : Win32 / WinCE GDI video output plugin for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: wingdi.c,v 1.1 2002/11/21 13:53:32 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
* 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.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#include <stdlib.h> /* malloc(), free() */
#include <string.h>
#include <vlc/vlc.h>
#include <vlc/vout.h>
#define MAX_DIRECTBUFFERS 10
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static int OpenVideo ( vlc_object_t * );
static void CloseVideo ( vlc_object_t * );
static int Init ( vout_thread_t * );
static void End ( vout_thread_t * );
static int Manage ( vout_thread_t * );
static void Render ( vout_thread_t *, picture_t * );
static void Display ( vout_thread_t *, picture_t * );
/*****************************************************************************
* Module descriptor
*****************************************************************************/
vlc_module_begin();
set_description( _("Windows GDI video output module") );
set_capability( "video output", 10 );
set_callbacks( OpenVideo, CloseVideo );
vlc_module_end();
/*****************************************************************************
* OpenVideo: activate GDI video thread output method
*****************************************************************************/
static int OpenVideo ( vlc_object_t *p_this )
{
vout_thread_t * p_vout = (vout_thread_t *)p_this;
p_vout->pf_init = Init;
p_vout->pf_end = End;
p_vout->pf_manage = Manage;
p_vout->pf_render = Render;
p_vout->pf_display = Display;
return VLC_SUCCESS;
}
/*****************************************************************************
* CloseVideo: deactivate the GDI video output
*****************************************************************************/
static void CloseVideo ( vlc_object_t *p_this )
{
;
}
/*****************************************************************************
* Init: initialize video thread output method
*****************************************************************************/
static int Init( vout_thread_t *p_vout )
{
int i_index;
picture_t *p_pic;
I_OUTPUTPICTURES = 0;
/* Initialize the output structure */
p_vout->output.i_chroma = VLC_FOURCC('R','V','1','6');
p_vout->output.i_rmask = 0xf800;
p_vout->output.i_gmask = 0x07e0;
p_vout->output.i_bmask = 0x001f;
p_vout->output.i_width = p_vout->render.i_width;
p_vout->output.i_height = p_vout->render.i_height;
p_vout->output.i_aspect = p_vout->render.i_aspect;
/* Try to initialize MAX_DIRECTBUFFERS direct buffers */
while( I_OUTPUTPICTURES < MAX_DIRECTBUFFERS )
{
p_pic = NULL;
/* Find an empty picture slot */
for( i_index = 0 ; i_index < VOUT_MAX_PICTURES ; i_index++ )
{
if( p_vout->p_picture[ i_index ].i_status == FREE_PICTURE )
{
p_pic = p_vout->p_picture + i_index;
break;
}
}
/* Allocate the picture */
if( p_pic == NULL )
{
break;
}
vout_AllocatePicture( p_vout, p_pic, p_vout->output.i_width,
p_vout->output.i_height,
p_vout->output.i_chroma );
if( p_pic->i_planes == 0 )
{
break;
}
p_pic->i_status = DESTROYED_PICTURE;
p_pic->i_type = DIRECT_PICTURE;
PP_OUTPUTPICTURE[ I_OUTPUTPICTURES ] = p_pic;
I_OUTPUTPICTURES++;
}
return VLC_SUCCESS;
}
/*****************************************************************************
* End: terminate video thread output method
*****************************************************************************/
static void End( vout_thread_t *p_vout )
{
int i_index;
/* Free the fake output buffers we allocated */
for( i_index = I_OUTPUTPICTURES ; i_index ; )
{
i_index--;
free( PP_OUTPUTPICTURE[ i_index ]->p_data_orig );
}
}
/*****************************************************************************
* Manage: handle events
*****************************************************************************
* This function should be called regularly by video output thread. It manages
* console events. It returns a non null value on error.
*****************************************************************************/
static int Manage( vout_thread_t *p_vout )
{
return VLC_SUCCESS;
}
/*****************************************************************************
* Render: render previously calculated output
*****************************************************************************/
static void Render( vout_thread_t *p_vout, picture_t *p_pic )
{
/* No need to do anything, the fake direct buffers stay as they are */
}
/*****************************************************************************
* Display: displays previously rendered output
*****************************************************************************/
static void Display( vout_thread_t *p_vout, picture_t *p_pic )
{
/* No need to do anything, the fake direct buffers stay as they are */
}
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