Commit dff43436 authored by Jean-Paul Saman's avatar Jean-Paul Saman

Merge branch 'master' of git@git.videolan.org:vlc

parents c72f2f9d 87db766d
......@@ -133,7 +133,7 @@ public class MediaList
}
/**
* @param media The media descriptor mrl.
* @param mrl The media descriptor mrl.
*/
public boolean removeMedia(String mrl)
{
......
......@@ -38,6 +38,8 @@ public class VLMTest
private String mrl = getClass().getResource("/raffa_voice.ogg").getFile();
private String mediaName = "test";
@Before
public void setup()
{
......@@ -62,18 +64,89 @@ public class VLMTest
public void testAddBroadcast()
{
VLM vlm = jvlc.getVLM();
vlm.addBroadcast("test", "file://" + mrl, "", null, true, false);
vlm.addBroadcast(mediaName, "file://" + mrl, "", null, true, false);
}
@Test
public void testShowMedia()
{
VLM vlm = jvlc.getVLM();
vlm.addBroadcast("test", "file://" + mrl, "", null, true, false);
vlm.showMedia("test");
vlm.addBroadcast(mediaName, "file://" + mrl, "", null, true, false);
vlm.showMedia(mediaName);
}
@Test
public void testDisableMedia()
{
VLM vlm = jvlc.getVLM();
vlm.addBroadcast(mediaName, "file://" + mrl, "", null, true, false);
vlm.disableMedia(mediaName);
}
@Test
public void testPlayMedia()
{
VLM vlm = jvlc.getVLM();
vlm.addBroadcast(mediaName, "file://" + mrl, "", null, true, false);
vlm.playMedia(mediaName);
}
@Test
public void testPauseMedia()
{
VLM vlm = jvlc.getVLM();
vlm.addBroadcast(mediaName, "file://" + mrl, "", null, true, false);
vlm.playMedia(mediaName);
vlm.pauseMedia(mediaName);
}
@Test
public void testStopMedia()
{
VLM vlm = jvlc.getVLM();
vlm.addBroadcast(mediaName, "file://" + mrl, "", null, true, false);
vlm.playMedia(mediaName);
vlm.stopMedia(mediaName);
}
@Test
public void testSeekMedia()
{
VLM vlm = jvlc.getVLM();
vlm.addBroadcast(mediaName, "file://" + mrl, "", null, true, false);
vlm.playMedia(mediaName);
vlm.seekMedia(mediaName, 0.3f);
}
@Test
public void testAddMediaInput()
{
VLM vlm = jvlc.getVLM();
vlm.addBroadcast(mediaName, "file://" + mrl, "", null, true, false);
vlm.addMediaInput(mediaName, "file://" + mrl);
}
@Test
public void testEnableMedia()
{
VLM vlm = jvlc.getVLM();
vlm.addBroadcast(mediaName, "file://" + mrl, "", null, false, false);
vlm.enableMedia(mediaName);
}
@Test
public void testDeleteMedia()
{
VLM vlm = jvlc.getVLM();
vlm.addBroadcast(mediaName, "file://" + mrl, "", null, false, false);
vlm.deleteMedia(mediaName);
}
@Test
public void testMediaLoop()
{
VLM vlm = jvlc.getVLM();
vlm.addBroadcast(mediaName, "file://" + mrl, "", null, false, false);
vlm.setMediaLoop(mediaName, true);
}
}
private.m4
dnl Private VLC macros - generated by bootstrap
dnl Helper macro for vlc-config generation
AC_DEFUN([VLC_CONFIG_HELPER], [
cat >> vlc-config.in << BLAH
access_file) list="\${list} access/libaccess_file" ;;
access_mmap) list="\${list} access/libaccess_mmap" ;;
access_directory) list="\${list} access/libaccess_directory" ;;
access_dv) list="\${list} access/libaccess_dv" ;;
access_udp) list="\${list} access/libaccess_udp" ;;
access_tcp) list="\${list} access/libaccess_tcp" ;;
access_http) list="\${list} access/libaccess_http" ;;
access_ftp) list="\${list} access/libaccess_ftp" ;;
access_smb) list="\${list} access/libaccess_smb" ;;
access_gnomevfs) list="\${list} access/libaccess_gnomevfs" ;;
access_eyetv) list="\${list} access/libaccess_eyetv" ;;
dvdnav) list="\${list} access/libdvdnav" ;;
dvdread) list="\${list} access/libdvdread" ;;
dc1394) list="\${list} access/libdc1394" ;;
access_fake) list="\${list} access/libaccess_fake" ;;
pvr) list="\${list} access/libpvr" ;;
v4l) list="\${list} access/libv4l" ;;
cdda) list="\${list} access/libcdda" ;;
access_jack) list="\${list} access/libaccess_jack" ;;
bda) list="\${list} access/bda/libbda" ;;
dshow) list="\${list} access/dshow/libdshow" ;;
dvb) list="\${list} access/dvb/libdvb" ;;
access_mms) list="\${list} access/mms/libaccess_mms" ;;
cddax) list="\${list} access/cdda/libcddax" ;;
access_realrtsp) list="\${list} access/rtsp/libaccess_realrtsp" ;;
access_rtmp) list="\${list} access/rtmp/libaccess_rtmp" ;;
v4l2) list="\${list} access/v4l2/libv4l2" ;;
vcd) list="\${list} access/vcd/libvcd" ;;
vcdx) list="\${list} access/vcdx/libvcdx" ;;
screen) list="\${list} access/screen/libscreen" ;;
access_filter_timeshift) list="\${list} access_filter/libaccess_filter_timeshift" ;;
access_filter_record) list="\${list} access_filter/libaccess_filter_record" ;;
access_filter_dump) list="\${list} access_filter/libaccess_filter_dump" ;;
access_filter_bandwidth) list="\${list} access_filter/libaccess_filter_bandwidth" ;;
access_output_dummy) list="\${list} access_output/libaccess_output_dummy" ;;
access_output_file) list="\${list} access_output/libaccess_output_file" ;;
access_output_udp) list="\${list} access_output/libaccess_output_udp" ;;
access_output_http) list="\${list} access_output/libaccess_output_http" ;;
access_output_shout) list="\${list} access_output/libaccess_output_shout" ;;
equalizer) list="\${list} audio_filter/libequalizer" ;;
normvol) list="\${list} audio_filter/libnormvol" ;;
audio_format) list="\${list} audio_filter/libaudio_format" ;;
param_eq) list="\${list} audio_filter/libparam_eq" ;;
trivial_channel_mixer) list="\${list} audio_filter/channel_mixer/libtrivial_channel_mixer" ;;
simple_channel_mixer) list="\${list} audio_filter/channel_mixer/libsimple_channel_mixer" ;;
headphone_channel_mixer) list="\${list} audio_filter/channel_mixer/libheadphone_channel_mixer" ;;
dolby_surround_decoder) list="\${list} audio_filter/channel_mixer/libdolby_surround_decoder" ;;
mono) list="\${list} audio_filter/channel_mixer/libmono" ;;
converter_fixed) list="\${list} audio_filter/converter/libconverter_fixed" ;;
converter_float) list="\${list} audio_filter/converter/libconverter_float" ;;
a52tospdif) list="\${list} audio_filter/converter/liba52tospdif" ;;
a52tofloat32) list="\${list} audio_filter/converter/liba52tofloat32" ;;
dtstospdif) list="\${list} audio_filter/converter/libdtstospdif" ;;
dtstofloat32) list="\${list} audio_filter/converter/libdtstofloat32" ;;
mpgatofixed32) list="\${list} audio_filter/converter/libmpgatofixed32" ;;
trivial_resampler) list="\${list} audio_filter/resampler/libtrivial_resampler" ;;
ugly_resampler) list="\${list} audio_filter/resampler/libugly_resampler" ;;
linear_resampler) list="\${list} audio_filter/resampler/liblinear_resampler" ;;
bandlimited_resampler) list="\${list} audio_filter/resampler/libbandlimited_resampler" ;;
spatializer) list="\${list} audio_filter/spatializer/libspatializer" ;;
trivial_mixer) list="\${list} audio_mixer/libtrivial_mixer" ;;
float32_mixer) list="\${list} audio_mixer/libfloat32_mixer" ;;
spdif_mixer) list="\${list} audio_mixer/libspdif_mixer" ;;
alsa) list="\${list} audio_output/libalsa" ;;
arts) list="\${list} audio_output/libarts" ;;
aout_directx) list="\${list} audio_output/libaout_directx" ;;
esd) list="\${list} audio_output/libesd" ;;
aout_file) list="\${list} audio_output/libaout_file" ;;
oss) list="\${list} audio_output/liboss" ;;
aout_sdl) list="\${list} audio_output/libaout_sdl" ;;
waveout) list="\${list} audio_output/libwaveout" ;;
hd1000a) list="\${list} audio_output/libhd1000a" ;;
portaudio) list="\${list} audio_output/libportaudio" ;;
auhal) list="\${list} audio_output/libauhal" ;;
jack) list="\${list} audio_output/libjack" ;;
pulse) list="\${list} audio_output/libpulse" ;;
a52) list="\${list} codec/liba52" ;;
cinepak) list="\${list} codec/libcinepak" ;;
dts) list="\${list} codec/libdts" ;;
flac) list="\${list} codec/libflac" ;;
lpcm) list="\${list} codec/liblpcm" ;;
araw) list="\${list} codec/libaraw" ;;
vorbis) list="\${list} codec/libvorbis" ;;
tarkin) list="\${list} codec/libtarkin" ;;
theora) list="\${list} codec/libtheora" ;;
tremor) list="\${list} codec/libtremor" ;;
speex) list="\${list} codec/libspeex" ;;
adpcm) list="\${list} codec/libadpcm" ;;
mpeg_audio) list="\${list} codec/libmpeg_audio" ;;
libmpeg2) list="\${list} codec/liblibmpeg2" ;;
rawvideo) list="\${list} codec/librawvideo" ;;
quicktime) list="\${list} codec/libquicktime" ;;
faad) list="\${list} codec/libfaad" ;;
dvbsub) list="\${list} codec/libdvbsub" ;;
telx) list="\${list} codec/libtelx" ;;
mash) list="\${list} codec/libmash" ;;
x264) list="\${list} codec/libx264" ;;
twolame) list="\${list} codec/libtwolame" ;;
dirac) list="\${list} codec/libdirac" ;;
png) list="\${list} codec/libpng" ;;
svcdsub) list="\${list} codec/libsvcdsub" ;;
cvdsub) list="\${list} codec/libcvdsub" ;;
fake) list="\${list} codec/libfake" ;;
realaudio) list="\${list} codec/librealaudio" ;;
sdl_image) list="\${list} codec/libsdl_image" ;;
zvbi) list="\${list} codec/libzvbi" ;;
csri) list="\${list} codec/libcsri" ;;
cdg) list="\${list} codec/libcdg" ;;
fluidsynth) list="\${list} codec/libfluidsynth" ;;
cc) list="\${list} codec/libcc" ;;
cmml) list="\${list} codec/cmml/libcmml" ;;
dmo) list="\${list} codec/dmo/libdmo" ;;
ffmpeg) list="\${list} codec/ffmpeg/libffmpeg" ;;
ffmpegaltivec) list="\${list} codec/ffmpeg/libffmpegaltivec" ;;
subsdec) list="\${list} codec/subtitles/libsubsdec" ;;
subsusf) list="\${list} codec/subtitles/libsubsusf" ;;
t140) list="\${list} codec/subtitles/libt140" ;;
spudec) list="\${list} codec/spudec/libspudec" ;;
xvmc) list="\${list} codec/xvmc/libxvmc" ;;
gestures) list="\${list} control/libgestures" ;;
showintf) list="\${list} control/libshowintf" ;;
telnet) list="\${list} control/libtelnet" ;;
netsync) list="\${list} control/libnetsync" ;;
ntservice) list="\${list} control/libntservice" ;;
hotkeys) list="\${list} control/libhotkeys" ;;
lirc) list="\${list} control/liblirc" ;;
rc) list="\${list} control/librc" ;;
dbus) list="\${list} control/libdbus" ;;
motion) list="\${list} control/libmotion" ;;
http) list="\${list} control/http/libhttp" ;;
a52sys) list="\${list} demux/liba52sys" ;;
dtssys) list="\${list} demux/libdtssys" ;;
flacsys) list="\${list} demux/libflacsys" ;;
ogg) list="\${list} demux/libogg" ;;
demuxdump) list="\${list} demux/libdemuxdump" ;;
rawdv) list="\${list} demux/librawdv" ;;
rawvid) list="\${list} demux/librawvid" ;;
au) list="\${list} demux/libau" ;;
wav) list="\${list} demux/libwav" ;;
mkv) list="\${list} demux/libmkv" ;;
live555) list="\${list} demux/liblive555" ;;
nsv) list="\${list} demux/libnsv" ;;
real) list="\${list} demux/libreal" ;;
ts) list="\${list} demux/libts" ;;
ps) list="\${list} demux/libps" ;;
mod) list="\${list} demux/libmod" ;;
pva) list="\${list} demux/libpva" ;;
aiff) list="\${list} demux/libaiff" ;;
mjpeg) list="\${list} demux/libmjpeg" ;;
subtitle) list="\${list} demux/libsubtitle" ;;
asademux) list="\${list} demux/libasademux" ;;
ty) list="\${list} demux/libty" ;;
vobsub) list="\${list} demux/libvobsub" ;;
voc) list="\${list} demux/libvoc" ;;
xa) list="\${list} demux/libxa" ;;
nuv) list="\${list} demux/libnuv" ;;
nsc) list="\${list} demux/libnsc" ;;
mpc) list="\${list} demux/libmpc" ;;
gme) list="\${list} demux/libgme" ;;
tta) list="\${list} demux/libtta" ;;
vc1) list="\${list} demux/libvc1" ;;
demux_cdg) list="\${list} demux/libdemux_cdg" ;;
smf) list="\${list} demux/libsmf" ;;
asf) list="\${list} demux/asf/libasf" ;;
avi) list="\${list} demux/avi/libavi" ;;
mp4) list="\${list} demux/mp4/libmp4" ;;
m4a) list="\${list} demux/mpeg/libm4a" ;;
m4v) list="\${list} demux/mpeg/libm4v" ;;
mpga) list="\${list} demux/mpeg/libmpga" ;;
mpgv) list="\${list} demux/mpeg/libmpgv" ;;
h264) list="\${list} demux/mpeg/libh264" ;;
playlist) list="\${list} demux/playlist/libplaylist" ;;
ncurses) list="\${list} gui/libncurses" ;;
fbosd) list="\${list} gui/libfbosd" ;;
beos) list="\${list} gui/beos/libbeos" ;;
pda) list="\${list} gui/pda/libpda" ;;
macosx) list="\${list} gui/macosx/libmacosx" ;;
minimal_macosx) list="\${list} gui/minimal_macosx/libminimal_macosx" ;;
qnx) list="\${list} gui/qnx/libqnx" ;;
qt4) list="\${list} gui/qt4/libqt4" ;;
skins2) list="\${list} gui/skins2/libskins2" ;;
wxwidgets) list="\${list} gui/wxwidgets/libwxwidgets" ;;
wince) list="\${list} gui/wince/libwince" ;;
folder) list="\${list} meta_engine/libfolder" ;;
id3tag) list="\${list} meta_engine/libid3tag" ;;
musicbrainz) list="\${list} meta_engine/libmusicbrainz" ;;
taglib) list="\${list} meta_engine/libtaglib" ;;
gtk_main) list="\${list} misc/libgtk_main" ;;
gnome_main) list="\${list} misc/libgnome_main" ;;
gtk2_main) list="\${list} misc/libgtk2_main" ;;
gnome2_main) list="\${list} misc/libgnome2_main" ;;
screensaver) list="\${list} misc/libscreensaver" ;;
qte_main) list="\${list} misc/libqte_main" ;;
freetype) list="\${list} misc/libfreetype" ;;
win32text) list="\${list} misc/libwin32text" ;;
quartztext) list="\${list} misc/libquartztext" ;;
logger) list="\${list} misc/liblogger" ;;
vod_rtsp) list="\${list} misc/libvod_rtsp" ;;
gnutls) list="\${list} misc/libgnutls" ;;
svg) list="\${list} misc/libsvg" ;;
profile_parser) list="\${list} misc/libprofile_parser" ;;
audioscrobbler) list="\${list} misc/libaudioscrobbler" ;;
inhibit) list="\${list} misc/libinhibit" ;;
dummy) list="\${list} misc/dummy/libdummy" ;;
lua) list="\${list} misc/lua/liblua" ;;
memcpy) list="\${list} misc/memcpy/libmemcpy" ;;
memcpymmx) list="\${list} misc/memcpy/libmemcpymmx" ;;
memcpymmxext) list="\${list} misc/memcpy/libmemcpymmxext" ;;
memcpy3dn) list="\${list} misc/memcpy/libmemcpy3dn" ;;
memcpyaltivec) list="\${list} misc/memcpy/libmemcpyaltivec" ;;
msn) list="\${list} misc/notify/libmsn" ;;
growl) list="\${list} misc/notify/libgrowl" ;;
growl_udp) list="\${list} misc/notify/libgrowl_udp" ;;
notify) list="\${list} misc/notify/libnotify" ;;
xosd) list="\${list} misc/notify/libxosd" ;;
telepathy) list="\${list} misc/notify/libtelepathy" ;;
test1) list="\${list} misc/testsuite/libtest1" ;;
test2) list="\${list} misc/testsuite/libtest2" ;;
test3) list="\${list} misc/testsuite/libtest3" ;;
test4) list="\${list} misc/testsuite/libtest4" ;;
export) list="\${list} misc/playlist/libexport" ;;
osd_parser) list="\${list} misc/osd/libosd_parser" ;;
xtag) list="\${list} misc/xml/libxtag" ;;
xml) list="\${list} misc/xml/libxml" ;;
probe_hal) list="\${list} misc/probe/libprobe_hal" ;;
mux_dummy) list="\${list} mux/libmux_dummy" ;;
mux_avi) list="\${list} mux/libmux_avi" ;;
mux_ogg) list="\${list} mux/libmux_ogg" ;;
mux_mp4) list="\${list} mux/libmux_mp4" ;;
mux_asf) list="\${list} mux/libmux_asf" ;;
mux_wav) list="\${list} mux/libmux_wav" ;;
mux_mpjpeg) list="\${list} mux/libmux_mpjpeg" ;;
mux_ps) list="\${list} mux/mpeg/libmux_ps" ;;
mux_ts) list="\${list} mux/mpeg/libmux_ts" ;;
rtcp) list="\${list} mux/rtp/librtcp" ;;
packetizer_copy) list="\${list} packetizer/libpacketizer_copy" ;;
packetizer_mpegvideo) list="\${list} packetizer/libpacketizer_mpegvideo" ;;
packetizer_mpeg4video) list="\${list} packetizer/libpacketizer_mpeg4video" ;;
packetizer_mpeg4audio) list="\${list} packetizer/libpacketizer_mpeg4audio" ;;
packetizer_h264) list="\${list} packetizer/libpacketizer_h264" ;;
packetizer_vc1) list="\${list} packetizer/libpacketizer_vc1" ;;
sap) list="\${list} services_discovery/libsap" ;;
hal) list="\${list} services_discovery/libhal" ;;
shout) list="\${list} services_discovery/libshout" ;;
upnp_cc) list="\${list} services_discovery/libupnp_cc" ;;
upnp_intel) list="\${list} services_discovery/libupnp_intel" ;;
bonjour) list="\${list} services_discovery/libbonjour" ;;
podcast) list="\${list} services_discovery/libpodcast" ;;
stream_out_dummy) list="\${list} stream_out/libstream_out_dummy" ;;
stream_out_description) list="\${list} stream_out/libstream_out_description" ;;
stream_out_standard) list="\${list} stream_out/libstream_out_standard" ;;
stream_out_transcode) list="\${list} stream_out/libstream_out_transcode" ;;
stream_out_duplicate) list="\${list} stream_out/libstream_out_duplicate" ;;
stream_out_es) list="\${list} stream_out/libstream_out_es" ;;
stream_out_display) list="\${list} stream_out/libstream_out_display" ;;
stream_out_gather) list="\${list} stream_out/libstream_out_gather" ;;
stream_out_rtp) list="\${list} stream_out/libstream_out_rtp" ;;
stream_out_switcher) list="\${list} stream_out/libstream_out_switcher" ;;
stream_out_bridge) list="\${list} stream_out/libstream_out_bridge" ;;
stream_out_mosaic_bridge) list="\${list} stream_out/libstream_out_mosaic_bridge" ;;
stream_out_autodel) list="\${list} stream_out/libstream_out_autodel" ;;
stream_out_transrate) list="\${list} stream_out/transrate/libstream_out_transrate" ;;
i420_rgb) list="\${list} video_chroma/libi420_rgb" ;;
i420_rgb_mmx) list="\${list} video_chroma/libi420_rgb_mmx" ;;
i420_rgb_sse2) list="\${list} video_chroma/libi420_rgb_sse2" ;;
i420_yuy2) list="\${list} video_chroma/libi420_yuy2" ;;
i420_yuy2_mmx) list="\${list} video_chroma/libi420_yuy2_mmx" ;;
i420_yuy2_sse2) list="\${list} video_chroma/libi420_yuy2_sse2" ;;
i420_yuy2_altivec) list="\${list} video_chroma/libi420_yuy2_altivec" ;;
i422_yuy2) list="\${list} video_chroma/libi422_yuy2" ;;
i422_yuy2_mmx) list="\${list} video_chroma/libi422_yuy2_mmx" ;;
i422_yuy2_sse2) list="\${list} video_chroma/libi422_yuy2_sse2" ;;
i422_i420) list="\${list} video_chroma/libi422_i420" ;;
i420_ymga) list="\${list} video_chroma/libi420_ymga" ;;
i420_ymga_mmx) list="\${list} video_chroma/libi420_ymga_mmx" ;;
grey_yuv) list="\${list} video_chroma/libgrey_yuv" ;;
yuy2_i422) list="\${list} video_chroma/libyuy2_i422" ;;
yuy2_i420) list="\${list} video_chroma/libyuy2_i420" ;;
chroma_chain) list="\${list} video_chroma/libchroma_chain" ;;
mosaic) list="\${list} video_filter/libmosaic" ;;
transform) list="\${list} video_filter/libtransform" ;;
invert) list="\${list} video_filter/libinvert" ;;
adjust) list="\${list} video_filter/libadjust" ;;
wall) list="\${list} video_filter/libwall" ;;
clone) list="\${list} video_filter/libclone" ;;
crop) list="\${list} video_filter/libcrop" ;;
motionblur) list="\${list} video_filter/libmotionblur" ;;
logo) list="\${list} video_filter/liblogo" ;;
deinterlace) list="\${list} video_filter/libdeinterlace" ;;
blend) list="\${list} video_filter/libblend" ;;
scale) list="\${list} video_filter/libscale" ;;
marq) list="\${list} video_filter/libmarq" ;;
rss) list="\${list} video_filter/librss" ;;
motiondetect) list="\${list} video_filter/libmotiondetect" ;;
rv32) list="\${list} video_filter/librv32" ;;
osdmenu) list="\${list} video_filter/libosdmenu" ;;
magnify) list="\${list} video_filter/libmagnify" ;;
wave) list="\${list} video_filter/libwave" ;;
ripple) list="\${list} video_filter/libripple" ;;
psychedelic) list="\${list} video_filter/libpsychedelic" ;;
gradient) list="\${list} video_filter/libgradient" ;;
panoramix) list="\${list} video_filter/libpanoramix" ;;
opencv_wrapper) list="\${list} video_filter/libopencv_wrapper" ;;
opencv_example) list="\${list} video_filter/libopencv_example" ;;
rotate) list="\${list} video_filter/librotate" ;;
noise) list="\${list} video_filter/libnoise" ;;
puzzle) list="\${list} video_filter/libpuzzle" ;;
colorthres) list="\${list} video_filter/libcolorthres" ;;
extract) list="\${list} video_filter/libextract" ;;
sharpen) list="\${list} video_filter/libsharpen" ;;
erase) list="\${list} video_filter/liberase" ;;
bluescreen) list="\${list} video_filter/libbluescreen" ;;
alphamask) list="\${list} video_filter/libalphamask" ;;
gaussianblur) list="\${list} video_filter/libgaussianblur" ;;
grain) list="\${list} video_filter/libgrain" ;;
seamcarving) list="\${list} video_filter/libseamcarving" ;;
croppadd) list="\${list} video_filter/libcroppadd" ;;
atmo) list="\${list} video_filter/atmo/libatmo" ;;
aa) list="\${list} video_output/libaa" ;;
caca) list="\${list} video_output/libcaca" ;;
fb) list="\${list} video_output/libfb" ;;
ggi) list="\${list} video_output/libggi" ;;
glide) list="\${list} video_output/libglide" ;;
vout_sdl) list="\${list} video_output/libvout_sdl" ;;
svgalib) list="\${list} video_output/libsvgalib" ;;
mga) list="\${list} video_output/libmga" ;;
hd1000v) list="\${list} video_output/libhd1000v" ;;
snapshot) list="\${list} video_output/libsnapshot" ;;
opengl) list="\${list} video_output/libopengl" ;;
opengllayer) list="\${list} video_output/libopengllayer" ;;
image) list="\${list} video_output/libimage" ;;
directfb) list="\${list} video_output/libdirectfb" ;;
vmem) list="\${list} video_output/libvmem" ;;
vout_directx) list="\${list} video_output/msw/libvout_directx" ;;
direct3d) list="\${list} video_output/msw/libdirect3d" ;;
glwin32) list="\${list} video_output/msw/libglwin32" ;;
wingdi) list="\${list} video_output/msw/libwingdi" ;;
wingapi) list="\${list} video_output/msw/libwingapi" ;;
qte) list="\${list} video_output/qte/libqte" ;;
x11) list="\${list} video_output/x11/libx11" ;;
xvideo) list="\${list} video_output/x11/libxvideo" ;;
glx) list="\${list} video_output/x11/libglx" ;;
xvmc) list="\${list} video_output/x11/libxvmc" ;;
goom) list="\${list} visualization/libgoom" ;;
visual) list="\${list} visualization/visual/libvisual" ;;
galaktos) list="\${list} visualization/galaktos/libgalaktos" ;;
BLAH
])
......@@ -127,7 +127,7 @@ typedef struct http_auth_t
char *psz_qop;
int i_nonce;
char *psz_cnonce;
char *psz_A1; /* stored A1 value if algorithm = "MD5-sess" */
char *psz_HA1; /* stored H(A1) value if algorithm = "MD5-sess" */
} http_auth_t;
struct access_sys_t
......@@ -209,6 +209,8 @@ static void AuthParseHeader( access_t *p_access, const char *psz_header,
http_auth_t *p_auth );
static void AuthReply( access_t *p_acces, const char *psz_prefix,
vlc_url_t *p_url, http_auth_t *p_auth );
static int AuthCheckReply( access_t *p_access, const char *psz_header,
vlc_url_t *p_url, http_auth_t *p_auth );
static void AuthReset( http_auth_t *p_auth );
/*****************************************************************************
......@@ -1360,8 +1362,15 @@ static int Request( access_t *p_access, int64_t i_tell )
}
else if( !strcasecmp( psz, "authentication-info" ) )
{
msg_Dbg( p_access, "Authentication info: %s", p );
/* FIXME: use */
msg_Dbg( p_access, "Authentication Info header: %s", p );
if( AuthCheckReply( p_access, p, &p_sys->url, &p_sys->auth ) )
goto error;
}
else if( !strcasecmp( psz, "proxy-authentication-info" ) )
{
msg_Dbg( p_access, "Proxy Authentication Info header: %s", p );
if( AuthCheckReply( p_access, p, &p_sys->proxy, &p_sys->proxy_auth ) )
goto error;
}
free( psz );
......@@ -1511,11 +1520,8 @@ static char *AuthGetParam( const char *psz_header, const char *psz_param )
const char *psz_end;
psz_header += strlen( psz_what );
psz_end = strchr( psz_header, '"' );
if( !psz_end )
{
psz_end = psz_header;
while( *psz_end ) psz_end++;
}
if( !psz_end ) /* Invalid since we should have a closing quote */
return strdup( psz_header );
return strndup( psz_header, psz_end - psz_header );
}
else
......@@ -1526,7 +1532,7 @@ static char *AuthGetParam( const char *psz_header, const char *psz_param )
static char *AuthGetParamNoQuotes( const char *psz_header, const char *psz_param )
{
char psz_what[strlen(psz_param)+3];
char psz_what[strlen(psz_param)+2];
sprintf( psz_what, "%s=", psz_param );
psz_header = strstr( psz_header, psz_what );
if( psz_header )
......@@ -1534,11 +1540,10 @@ static char *AuthGetParamNoQuotes( const char *psz_header, const char *psz_param
const char *psz_end;
psz_header += strlen( psz_what );
psz_end = strchr( psz_header, ',' );
if( !psz_end )
{
psz_end = psz_header;
while( *psz_end ) psz_end++;
}
/* XXX: Do we need to filter out trailing space between the value and
* the comma/end of line? */
if( !psz_end ) /* Can be valid if this is the last parameter */
return strdup( psz_header );
return strndup( psz_header, psz_end - psz_header );
}
else
......@@ -1576,14 +1581,18 @@ static void AuthParseHeader( access_t *p_access, const char *psz_header,
p_auth->psz_algorithm = AuthGetParamNoQuotes( psz_header, "algorithm" );
p_auth->psz_qop = AuthGetParam( psz_header, "qop" );
p_auth->i_nonce = 0;
/* printf("realm: %s\ndomain: %s\nnonce: %s\nopaque: %s\nstale: %s\nalgorithm: %s\nqop: %s\n",p_auth->psz_realm,p_auth->psz_domain,p_auth->psz_nonce,p_auth->psz_opaque,p_auth->psz_stale,p_auth->psz_algorithm,p_auth->psz_qop); */
/* printf("realm: |%s|\ndomain: |%s|\nnonce: |%s|\nopaque: |%s|\n"
"stale: |%s|\nalgorithm: |%s|\nqop: |%s|\n",
p_auth->psz_realm,p_auth->psz_domain,p_auth->psz_nonce,
p_auth->psz_opaque,p_auth->psz_stale,p_auth->psz_algorithm,
p_auth->psz_qop); */
if( !p_auth->psz_realm )
msg_Warn( p_access, "Digest Access Authentication: "
"Mandatory 'realm' parameter is missing" );
if( !p_auth->psz_nonce )
msg_Warn( p_access, "Digest Access Authentication: "
"Mandatory 'nonce' parameter is missing" );
if( p_auth->psz_qop ) /* FIXME */
if( p_auth->psz_qop ) /* FIXME: parse the qop list */
{
char *psz_tmp = strchr( p_auth->psz_qop, ',' );
if( psz_tmp ) *psz_tmp = '\0';
......@@ -1592,27 +1601,121 @@ static void AuthParseHeader( access_t *p_access, const char *psz_header,
else
{
const char *psz_end = strchr( psz_header, ' ' );
if( !psz_end )
{
psz_end = psz_header;
while( *psz_end ) psz_end++;
}
msg_Warn( p_access, "Unknown authentication scheme: '%*s'",
psz_end - psz_header, psz_header );
if( psz_end )
msg_Warn( p_access, "Unknown authentication scheme: '%*s'",
psz_end - psz_header, psz_header );
else
msg_Warn( p_access, "Unknown authentication scheme: '%s'",
psz_header );
}
}
static char *AuthAlgoMD5( const char *psz_data )
static char *AuthDigest( access_t *p_access, vlc_url_t *p_url,
http_auth_t *p_auth, const char *psz_method )
{
(void)p_access;
const char *psz_username = p_url->psz_username ?: "";
const char *psz_password = p_url->psz_password ?: "";
char *psz_HA1 = NULL;
char *psz_HA2 = NULL;
char *psz_response = NULL;
struct md5_s md5;
char *psz_md5;
/* H(A1) */
if( p_auth->psz_HA1 )
{
psz_HA1 = strdup( p_auth->psz_HA1 );
if( !psz_HA1 ) goto error;
}
else
{
InitMD5( &md5 );
AddMD5( &md5, psz_username, strlen( psz_username ) );
AddMD5( &md5, ":", 1 );
AddMD5( &md5, p_auth->psz_realm, strlen( p_auth->psz_realm ) );
AddMD5( &md5, ":", 1 );
AddMD5( &md5, psz_password, strlen( psz_password ) );
EndMD5( &md5 );
psz_HA1 = psz_md5_hash( &md5 );
if( !psz_HA1 ) goto error;
if( p_auth->psz_algorithm
&& !strcmp( p_auth->psz_algorithm, "MD5-sess" ) )
{
InitMD5( &md5 );
AddMD5( &md5, psz_HA1, 32 );
free( psz_HA1 );
AddMD5( &md5, ":", 1 );
AddMD5( &md5, p_auth->psz_nonce, strlen( p_auth->psz_nonce ) );
AddMD5( &md5, ":", 1 );
AddMD5( &md5, p_auth->psz_cnonce, strlen( p_auth->psz_cnonce ) );
EndMD5( &md5 );
psz_HA1 = psz_md5_hash( &md5 );
if( !psz_HA1 ) goto error;
p_auth->psz_HA1 = strdup( psz_HA1 );
if( !p_auth->psz_HA1 ) goto error;
}
}
/* H(A2) */
InitMD5( &md5 );
if( *psz_method )
AddMD5( &md5, psz_method, strlen( psz_method ) );
AddMD5( &md5, ":", 1 );
if( p_url->psz_path )
AddMD5( &md5, p_url->psz_path, strlen( p_url->psz_path ) );
else
AddMD5( &md5, "/", 1 );
if( p_auth->psz_qop && !strcmp( p_auth->psz_qop, "auth-int" ) )
{
char *psz_ent;
struct md5_s ent;
InitMD5( &ent );
AddMD5( &ent, "", 0 ); /* XXX: entity-body. should be ok for GET */
EndMD5( &ent );
psz_ent = psz_md5_hash( &ent );
if( !psz_ent ) goto error;
AddMD5( &md5, ":", 1 );
AddMD5( &md5, psz_ent, 32 );
free( psz_ent );
}
EndMD5( &md5 );