Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
421866e2
Commit
421866e2
authored
Jul 12, 2004
by
Cyril Deguet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* all: skeleton of a coming-soon OpenGL visualization plugin, compatible
with MilkDrop for winamp.
parent
ce1924e3
Changes
9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
587 additions
and
14 deletions
+587
-14
build-vlc
build-vlc
+7
-13
config.in
config.in
+2
-0
configure.ac
configure.ac
+13
-1
modules/visualization/galaktos/Modules.am
modules/visualization/galaktos/Modules.am
+4
-0
modules/visualization/galaktos/glx.c
modules/visualization/galaktos/glx.c
+148
-0
modules/visualization/galaktos/glx.h
modules/visualization/galaktos/glx.h
+31
-0
modules/visualization/galaktos/plugin.c
modules/visualization/galaktos/plugin.c
+309
-0
modules/visualization/galaktos/plugin.h
modules/visualization/galaktos/plugin.h
+56
-0
src/audio_output/input.c
src/audio_output/input.c
+17
-0
No files found.
build-vlc
View file @
421866e2
...
...
@@ -2,7 +2,8 @@
FEATURES
=
"
SKINS skins
SKINS2 skins2
SKINS skins2
FAMILIAR familiar
WXWINDOWS wxwindows
OPIE opie
MACOSX macosx
...
...
@@ -80,6 +81,7 @@ RELEASE release
SOUT sout
WITHFFMPEGMP3LAME ffmpeg-mp3lame
WITHFFMPEGFAAC ffmpeg-faac
GALAKTOS galaktos
"
PATHS
=
"
WITHXML2CONFIGPATH xml2-config-path
...
...
@@ -136,25 +138,17 @@ do
eval
x
=
"
\$
CONFIG_
$1
"
if
[
"
$x
"
==
"y"
]
then
if
[
"
$1
"
==
"WITHFFMPEGMP3LAME"
]
then
echo
-n
"--with-
$2
"
>>
.cmd
else if
[
"
$1
"
==
"WITHFFMPEGFAAC"
]
if
[
"
$1
"
==
"WITHFFMPEGMP3LAME"
]
||
[
"
$1
"
==
"WITHFFMPEGFAAC"
]
then
echo
-n
"--with-
$2
"
>>
.cmd
else
echo
-n
"--enable-
$2
"
>>
.cmd
fi
fi
fi
else
if
[
"
$1
"
==
"WITHFFMPEGMP3LAME
"
]
if
[
"
$1
"
!=
"WITHFFMPEGMP3LAME"
]
&&
[
"
$1
"
!=
"WITHFFMPEGFAAC
"
]
then
echo
-n
"--without-
$2
"
>>
.cmd
else if
[
"
$1
"
==
"WITHFFMPEGFAAC"
]
then
echo
-n
"--without-
$2
"
>>
.cmd
else
echo
-n
"--disable-
$2
"
>>
.cmd
fi
fi
fi
fi
shift
;
shift
done
...
...
config.in
View file @
421866e2
...
...
@@ -16,6 +16,7 @@ bool 'Skins2 module' CONFIG_SKINS2
if [ "$CONFIG_SKINS2" = "y" ]; then
string 'xml2-config path' CONFIG_WITHXML2CONFIGPATH ""
fi
bool 'Familiar GTK+ support' CONFIG_FAMILIAR
# TODO: --enable-pda
bool 'wxWindows support' CONFIG_WXWINDOWS
if [ "$CONFIG_WXWINDOWS" = "y" ]; then
...
...
@@ -36,6 +37,7 @@ bool 'Goom visualization plugin' CONFIG_GOOM
if [ "$CONFIG_GOOM" = "y" ]; then
string 'goom tree for static linking' CONFIG_WITHGOOMTREE ""
fi
bool 'GaLaktos visualization plugin' CONFIG_GALAKTOS
bool 'SLP service discovery support' CONFIG_SLP
if [ "$CONFIG_SLP" = "y" ]; then
string 'libslp headers and libraries' CONFIG_WITHSLP ""
...
...
configure.ac
View file @
421866e2
...
...
@@ -3346,6 +3346,17 @@ then
VLC_ADD_PLUGINS([visual])
fi
dnl
dnl OpenGL visualisation plugin
dnl
AC_ARG_ENABLE(galaktos,
[ --enable-galaktos OpenGL visualisation plugin (default disabled)])
if test "${enable_galaktos}" = "yes"
then
VLC_ADD_PLUGINS([galaktos])
VLC_ADD_LDFLAGS([galaktos],[-lGL -lGLU])
fi
dnl
dnl goom visualization plugin
dnl
...
...
@@ -3855,6 +3866,7 @@ AC_CONFIG_FILES([
modules/video_output/x11/Makefile
modules/visualization/Makefile
modules/visualization/visual/Makefile
modules/visualization/galaktos/Makefile
])
AC_CONFIG_FILES([vlc-config], [chmod 0755 vlc-config])
...
...
modules/visualization/galaktos/Modules.am
0 → 100644
View file @
421866e2
SOURCES_galaktos = plugin.c \
plugin.h \
glx.c \
glx.h
modules/visualization/galaktos/glx.c
0 → 100644
View file @
421866e2
/*****************************************************************************
* glx.c:
*****************************************************************************
* Copyright (C) 2004 VideoLAN
* $Id$
*
* Authors: Cyril Deguet <asmax@videolan.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.
*****************************************************************************/
#include "glx.h"
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <GL/glx.h>
/* Local prototypes */
static
int
CreateWindow
(
galaktos_thread_t
*
p_thread
,
int
i_width
,
int
i_height
);
typedef
struct
{
Display
*
p_display
;
GLXFBConfig
fbconf
;
Window
wnd
;
GLXWindow
gwnd
;
}
glx_data_t
;
#define OS_DATA ((glx_data_t*)(p_thread->p_os_data))
int
galaktos_glx_init
(
galaktos_thread_t
*
p_thread
,
int
i_width
,
int
i_height
)
{
Display
*
p_display
;
int
i_opcode
,
i_evt
,
i_err
;
int
i_maj
,
i_min
;
int
i_nbelem
;
GLXFBConfig
*
p_fbconfs
,
fbconf
;
static
const
int
p_attr
[]
=
{
GLX_RED_SIZE
,
5
,
GLX_GREEN_SIZE
,
5
,
GLX_BLUE_SIZE
,
5
,
GLX_DOUBLEBUFFER
,
True
,
GLX_DRAWABLE_TYPE
,
GLX_WINDOW_BIT
,
0
};
/* Initialize OS data */
p_thread
->
p_os_data
=
malloc
(
sizeof
(
glx_data_t
)
);
/* Open the display */
OS_DATA
->
p_display
=
p_display
=
XOpenDisplay
(
NULL
);
if
(
!
p_display
)
{
msg_Err
(
p_thread
,
"Cannot open display"
);
return
-
1
;
}
/* Check for GLX extension */
if
(
!
XQueryExtension
(
p_display
,
"GLX"
,
&
i_opcode
,
&
i_evt
,
&
i_err
)
)
{
msg_Err
(
p_thread
,
"GLX extension not supported"
);
return
-
1
;
}
if
(
!
glXQueryExtension
(
p_display
,
&
i_err
,
&
i_evt
)
)
{
msg_Err
(
p_thread
,
"glXQueryExtension failed"
);
return
-
1
;
}
/* Check GLX version */
if
(
!
glXQueryVersion
(
p_display
,
&
i_maj
,
&
i_min
)
)
{
msg_Err
(
p_thread
,
"glXQueryVersion failed"
);
return
-
1
;
}
if
(
i_maj
<=
0
||
((
i_maj
==
1
)
&&
(
i_min
<
3
))
)
{
msg_Err
(
p_thread
,
"GLX 1.3 is needed"
);
return
-
1
;
}
/* Get the FB configuration */
p_fbconfs
=
glXChooseFBConfig
(
p_display
,
0
,
p_attr
,
&
i_nbelem
);
if
(
(
i_nbelem
<=
0
)
||
!
p_fbconfs
)
{
msg_Err
(
p_thread
,
"Cannot get FB configurations"
);
if
(
p_fbconfs
)
{
XFree
(
p_fbconfs
);
}
return
-
1
;
}
OS_DATA
->
fbconf
=
fbconf
=
p_fbconfs
[
0
];
if
(
CreateWindow
(
p_thread
,
i_width
,
i_height
)
==
-
1
)
{
XFree
(
p_fbconfs
);
return
-
1
;
}
msg_Err
(
p_thread
,
"NOT IMPLEMENTED YET ;)"
);
return
0
;
}
int
CreateWindow
(
galaktos_thread_t
*
p_thread
,
int
i_width
,
int
i_height
)
{
Display
*
p_display
;
XVisualInfo
*
p_vi
;
XSetWindowAttributes
xattr
;
Window
wnd
;
p_display
=
OS_DATA
->
p_display
;
/* Get the X11 visual */
p_vi
=
glXGetVisualFromFBConfig
(
p_display
,
OS_DATA
->
fbconf
);
if
(
!
p_vi
)
{
msg_Err
(
p_thread
,
"Cannot get X11 visual"
);
return
-
1
;
}
/* Create the window */
xattr
.
background_pixel
=
BlackPixel
(
p_display
,
DefaultScreen
(
p_display
)
);
xattr
.
border_pixel
=
0
;
OS_DATA
->
wnd
=
wnd
=
XCreateWindow
(
p_display
,
DefaultRootWindow
(
p_display
),
0
,
0
,
i_width
,
i_height
,
0
,
p_vi
->
depth
,
InputOutput
,
p_vi
->
visual
,
CWBackPixel
|
CWBorderPixel
,
&
xattr
);
XFree
(
p_vi
);
/* Create the GLX window */
OS_DATA
->
gwnd
=
glXCreateWindow
(
p_display
,
OS_DATA
->
fbconf
,
wnd
,
NULL
);
if
(
OS_DATA
->
gwnd
==
None
)
{
msg_Err
(
p_thread
,
"Cannot create GLX window"
);
return
-
1
;
}
return
0
;
}
modules/visualization/galaktos/glx.h
0 → 100644
View file @
421866e2
/*****************************************************************************
* plugin.h:
*****************************************************************************
* Copyright (C) 2004 VideoLAN
* $Id$
*
* Authors: Cyril Deguet <asmax@videolan.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.
*****************************************************************************/
#ifndef _GALAKTOS_GLX_H_
#define _GALAKTOS_GLX_H_
#include "plugin.h"
int
galaktos_glx_init
(
galaktos_thread_t
*
p_thread
,
int
i_width
,
int
i_height
);
#endif
modules/visualization/galaktos/plugin.c
0 → 100644
View file @
421866e2
This diff is collapsed.
Click to expand it.
modules/visualization/galaktos/plugin.h
0 → 100644
View file @
421866e2
/*****************************************************************************
* plugin.h:
*****************************************************************************
* Copyright (C) 2004 VideoLAN
* $Id$
*
* Authors: Cyril Deguet <asmax@videolan.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.
*****************************************************************************/
#ifndef _GALAKTOS_PLUGIN_H_
#define _GALAKTOS_PLUGIN_H_
#include <vlc/vlc.h>
#include <vlc/aout.h>
#define MAX_BLOCKS 10
typedef
struct
{
VLC_COMMON_MEMBERS
vout_thread_t
*
p_vout
;
char
*
psz_title
;
vlc_mutex_t
lock
;
vlc_cond_t
wait
;
/* Audio properties */
int
i_channels
;
/* Audio samples queue */
block_t
*
pp_blocks
[
MAX_BLOCKS
];
int
i_blocks
;
audio_date_t
date
;
/* OS specific data */
void
*
p_os_data
;
}
galaktos_thread_t
;
#endif
src/audio_output/input.c
View file @
421866e2
...
...
@@ -122,6 +122,14 @@ int aout_InputNew( aout_instance_t * p_aout, aout_input_t * p_input )
var_Change
(
p_aout
,
"visual"
,
VLC_VAR_ADDCHOICE
,
&
val
,
&
text
);
}
/* Look for galaktos plugin */
p_module
=
config_FindModule
(
VLC_OBJECT
(
p_aout
),
"galaktos"
);
if
(
p_module
)
{
val
.
psz_string
=
"galaktos"
;
text
.
psz_string
=
_
(
"GaLaktos"
);
var_Change
(
p_aout
,
"visual"
,
VLC_VAR_ADDCHOICE
,
&
val
,
&
text
);
}
if
(
var_Get
(
p_aout
,
"effect-list"
,
&
val
)
==
VLC_SUCCESS
)
{
var_Set
(
p_aout
,
"visual"
,
val
);
...
...
@@ -563,6 +571,7 @@ static int VisualizationCallback( vlc_object_t *p_this, char const *psz_cmd,
{
ChangeFiltersString
(
p_aout
,
"goom"
,
VLC_FALSE
);
ChangeFiltersString
(
p_aout
,
"visual"
,
VLC_FALSE
);
ChangeFiltersString
(
p_aout
,
"galaktos"
,
VLC_FALSE
);
}
else
{
...
...
@@ -570,6 +579,13 @@ static int VisualizationCallback( vlc_object_t *p_this, char const *psz_cmd,
{
ChangeFiltersString
(
p_aout
,
"visual"
,
VLC_FALSE
);
ChangeFiltersString
(
p_aout
,
"goom"
,
VLC_TRUE
);
ChangeFiltersString
(
p_aout
,
"galaktos"
,
VLC_FALSE
);
}
else
if
(
!
strcmp
(
"galaktos"
,
psz_mode
)
)
{
ChangeFiltersString
(
p_aout
,
"visual"
,
VLC_FALSE
);
ChangeFiltersString
(
p_aout
,
"goom"
,
VLC_FALSE
);
ChangeFiltersString
(
p_aout
,
"galaktos"
,
VLC_TRUE
);
}
else
{
...
...
@@ -579,6 +595,7 @@ static int VisualizationCallback( vlc_object_t *p_this, char const *psz_cmd,
ChangeFiltersString
(
p_aout
,
"goom"
,
VLC_FALSE
);
ChangeFiltersString
(
p_aout
,
"visual"
,
VLC_TRUE
);
ChangeFiltersString
(
p_aout
,
"galaktos"
,
VLC_FALSE
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment