Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
e2a614c8
Commit
e2a614c8
authored
Jun 26, 2008
by
Ilkka Ollakka
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of git@git.videolan.org:vlc
parents
51f898a0
c617646c
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
282 additions
and
204 deletions
+282
-204
NEWS
NEWS
+30
-25
THANKS
THANKS
+1
-1
configure.ac
configure.ac
+0
-10
extras/contrib/src/Distributions/win32.mak
extras/contrib/src/Distributions/win32.mak
+1
-1
extras/contrib/src/Makefile
extras/contrib/src/Makefile
+0
-19
extras/contrib/src/packages.mak
extras/contrib/src/packages.mak
+0
-2
extras/package/win32/vlc.win32.nsi.in
extras/package/win32/vlc.win32.nsi.in
+0
-7
include/vlc_interface.h
include/vlc_interface.h
+2
-1
modules/gui/qt4/components/extended_panels.cpp
modules/gui/qt4/components/extended_panels.cpp
+0
-0
modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/components/interface_widgets.cpp
+24
-14
modules/gui/qt4/components/interface_widgets.hpp
modules/gui/qt4/components/interface_widgets.hpp
+4
-3
modules/gui/qt4/components/open_panels.cpp
modules/gui/qt4/components/open_panels.cpp
+45
-26
modules/gui/qt4/components/open_panels.hpp
modules/gui/qt4/components/open_panels.hpp
+14
-0
modules/gui/qt4/dialogs/help.cpp
modules/gui/qt4/dialogs/help.cpp
+3
-0
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.cpp
+2
-11
modules/gui/qt4/qt4.cpp
modules/gui/qt4/qt4.cpp
+77
-34
modules/gui/qt4/ui/open_capture.ui
modules/gui/qt4/ui/open_capture.ui
+12
-12
modules/gui/qt4/ui/open_net.ui
modules/gui/qt4/ui/open_net.ui
+2
-1
modules/video_filter/rss.c
modules/video_filter/rss.c
+1
-1
src/input/stream.c
src/input/stream.c
+0
-1
src/libvlc-module.c
src/libvlc-module.c
+1
-6
src/misc/update.c
src/misc/update.c
+41
-29
src/misc/update.h
src/misc/update.h
+22
-0
No files found.
NEWS
View file @
e2a614c8
...
@@ -5,6 +5,7 @@ Changes between 0.8.6 and 0.9.0-git (not released yet):
...
@@ -5,6 +5,7 @@ Changes between 0.8.6 and 0.9.0-git (not released yet):
Important notes:
Important notes:
----------------
----------------
* This release will not work with Windows 98/ME and Mac OS X 10.3.9 (Panther)
* The HTTP interface is now only available on the local machine by default.
* The HTTP interface is now only available on the local machine by default.
If you want to make it available from other machines, you will have to
If you want to make it available from other machines, you will have to
edit the ".hosts" file.
edit the ".hosts" file.
...
@@ -15,9 +16,9 @@ Important notes:
...
@@ -15,9 +16,9 @@ Important notes:
C:\Program Files\VideoLAN\VLC\http\old\.hosts
C:\Program Files\VideoLAN\VLC\http\old\.hosts
- On Mac OS X, you can find it in VLC.app/Contents/MacOS/share/http/.hosts
- On Mac OS X, you can find it in VLC.app/Contents/MacOS/share/http/.hosts
and respectively in VLC.app/Contents/MacOS/share/http/old/.hosts
and respectively in VLC.app/Contents/MacOS/share/http/old/.hosts
* This version of VLC contains a new interface for Windows and Linux.
This
* This version of VLC contains a new interface for Windows and Linux.
interface lacks the "Streaming Wizard" that used to be present in VLC 0.8.6.
This interface has a fullscreen controller. This interface lacks the
It will be replaced by a better alternative in the next version.
"Streaming Wizard" that used to be present in VLC 0.8.6.
If you absolutely need it, we advise you to keep VLC 0.8.6.
If you absolutely need it, we advise you to keep VLC 0.8.6.
* The behavior of --sout-keep was changed. It's now activated by default.
* The behavior of --sout-keep was changed. It's now activated by default.
* The marq, mosaic and logo commands in the rc interface changed. They
* The marq, mosaic and logo commands in the rc interface changed. They
...
@@ -33,14 +34,15 @@ Important notes:
...
@@ -33,14 +34,15 @@ Important notes:
EXTVLCOPT options parsing in m3u playlists. Note that only a limited set
EXTVLCOPT options parsing in m3u playlists. Note that only a limited set
of options is available to m3u playlists (CVE-2007-6683).
of options is available to m3u playlists (CVE-2007-6683).
* The old access:url syntax is no longer supported. Use access://url instead.
* The old access:url syntax is no longer supported. Use access://url instead.
E.g.: vlc:quit -> vlc://quit ;
E.g.: vlc:quit -> vlc://quit ;
udp:@239.255.12.12 -> udp://@239.255.12.12
udp:@239.255.12.12 -> udp://@239.255.12.12
* The ffmpeg module has been removed and replaced by avcodec, avformat, swscale
* The ffmpeg module has been removed and replaced by avcodec, avformat, swscale
(or imgresample if you use a swscale-less ffmpeg build) and postproc modules.
(or imgresample if you use a swscale-less ffmpeg build) and postproc modules.
* The web plugins ActiveX (IE)/Firefox/Mozilla/Safari now recognize the following
* The web plugins ActiveX (IE)/Firefox/Mozilla/Safari now recognize the
states: IDLE/CLOSE=0, OPENING=1, BUFFERING=2, PLAYING=3, PAUSED=4, STOPPING=5,
following states: IDLE/CLOSE=0, OPENING=1, BUFFERING=2, PLAYING=3, PAUSED=4,
FORWARD=6, BACKWARD=7, ENDED=8, ERROR=9. With FORWARD and BACKWARD being
STOPPING=5, FORWARD=6, BACKWARD=7, ENDED=8, ERROR=9. With FORWARD and
reserved for future implementations and are thus not functional atm.
BACKWARD being reserved for future implementations and are thus not
functional atm.
* Croping and padding in transcode are now done using the croppadd video
* Croping and padding in transcode are now done using the croppadd video
filter. For example:
filter. For example:
transcode{vcodec=mp2v,vfilter=croppadd{cropttop=20,cropbottom=30,paddleft=100}}
transcode{vcodec=mp2v,vfilter=croppadd{cropttop=20,cropbottom=30,paddleft=100}}
...
@@ -56,7 +58,7 @@ Security updates:
...
@@ -56,7 +58,7 @@ Security updates:
Playlist:
Playlist:
* Vastly improved playlist support:
* Vastly improved playlist support:
* Media library
support
* Media library
creation to save all your playlist items
* "Live search"
* "Live search"
* Shoutcast TV listings
* Shoutcast TV listings
* Audioscrobbler/Last.FM support
* Audioscrobbler/Last.FM support
...
@@ -74,15 +76,15 @@ Inputs:
...
@@ -74,15 +76,15 @@ Inputs:
* JACK audio input support
* JACK audio input support
* Input run time option (improved live stream recording)
* Input run time option (improved live stream recording)
* BDA devices access module for DVB-C/S/T capture cards on Microsoft Windows
* BDA devices access module for DVB-C/S/T capture cards on Microsoft Windows
* Re-written Screen access module for Mac OS X
* Re-written Screen access module for Mac OS X
using OpenGL instead of QuickDraw
using OpenGL instead of QuickDraw
* Screen module now supports partial screen capture and mouse following on X11.
* Screen module now supports partial screen capture and mouse following on X11.
* Experimental EyeTV access module
(Mac OS X only)
* Experimental EyeTV access module
This requires the user to install a plugin to EyeTV.app
This requires the user to install a plugin to EyeTV.app
(available as a separate download).
(available as a separate download).
* RTMP input support
* RTMP input support
* QTKit-based Input module for Mac OS X allowing display and streaming of video
* QTKit-based Input module for Mac OS X allowing display and streaming of video
taken from all
QuickTime-compatible video devices (no audio ye
t)
taken from all
iSight-labelled video cameras (no audio suppor
t)
* HTTP access now supports gzip compressed data and Digest Access
* HTTP access now supports gzip compressed data and Digest Access
Authentication.
Authentication.
* New options to reduce latency between arrival of raw data and display of
* New options to reduce latency between arrival of raw data and display of
...
@@ -102,6 +104,7 @@ Demuxers:
...
@@ -102,6 +104,7 @@ Demuxers:
* TiVo Series 2 support
* TiVo Series 2 support
* CD+G karaoke Files support
* CD+G karaoke Files support
* MXF files support
* MXF files support
* OMA support
Decoders:
Decoders:
* VP60/VP61/VP6F/VP62 support
* VP60/VP61/VP6F/VP62 support
...
@@ -113,15 +116,15 @@ Decoders:
...
@@ -113,15 +116,15 @@ Decoders:
* Fluidsynth MIDI software synthesis (with external sound fonts)
* Fluidsynth MIDI software synthesis (with external sound fonts)
* New codec FOURCCs to support more specific files:
* New codec FOURCCs to support more specific files:
Avid, FCP, Sony, Samsung, ...
Avid, FCP, Sony, Samsung, ...
* Closed Caption Decoder (DVD, ReplayTV, TiVo, DVB/ATSC)
* H.264 PAFF support
* H.264 PAFF support
* DNxHD / VC-3 support
* DNxHD / VC-3 support
* NellyMoser ASAO support
* NellyMoser ASAO support
* APE (Monkey audio) support
* APE (Monkey audio) support
* VBI & EBU (Teletext) support
* RealVideo support (with the RealVideo run-time)
* RealVideo support (with the RealVideo run-time)
Subtitles:
Subtitles:
* Closed Caption Decoder (DVD, ReplayTV, TiVo, DVB/ATSC)
* VBI & EBU (Teletext) support (*nix, Mac OS)
* Ogg/Kate subtitles support
* Ogg/Kate subtitles support
* AQTitle subtitles support
* AQTitle subtitles support
* MKV USF subtitles support
* MKV USF subtitles support
...
@@ -141,7 +144,7 @@ Encoders:
...
@@ -141,7 +144,7 @@ Encoders:
* Improved H.264 encoding speed
* Improved H.264 encoding speed
Video outputs and filters:
Video outputs and filters:
* New CoreAnimation
output module (Mac OS X 10.5
only)
* New CoreAnimation
-based output module (VLCKit framework on OS X
only)
* Adjust, Invert and Distort (now split into Wave, Ripple, Gradient and
* Adjust, Invert and Distort (now split into Wave, Ripple, Gradient and
Psychedelic) video filters can now be streamed
Psychedelic) video filters can now be streamed
* New puzzle video output filter
* New puzzle video output filter
...
@@ -180,8 +183,6 @@ Stream output:
...
@@ -180,8 +183,6 @@ Stream output:
* RTMP output
* RTMP output
Interfaces:
Interfaces:
* Windows/Linux
* Brand new interface for Linux and Windows, based on the Qt toolkit
* All
* All
* New Simple Preferences dialogs showing the most important settings in an
* New Simple Preferences dialogs showing the most important settings in an
end-user suitable way.
end-user suitable way.
...
@@ -189,12 +190,16 @@ Interfaces:
...
@@ -189,12 +190,16 @@ Interfaces:
* Improved mouse gestures
* Improved mouse gestures
* Vastly improved Update checker
* Vastly improved Update checker
* Full support for meta data editing (ID3v2, Ogg/Vorbis, AAC, APEv1/2)
* Full support for meta data editing (ID3v2, Ogg/Vorbis, AAC, APEv1/2)
* Windows/Linux
* Brand new interface for Linux and Windows, based on the Qt toolkit
* Fullscreen controller (transparency on Linux+Composite)
* Mac OS X
* Mac OS X
* Improved video output features
* Improved video output features
* Online access to VideoLAN's Help Wiki within VLC
* Online access to VideoLAN's Help Wiki within VLC
* New setting to disable the "Recent Items" service
* New setting to disable the "Recent Items" service
* When playing Radio (live) streams, the current track is shown correctly
* When playing Radio (live) streams, the current track is shown correctly
* Correct appearance on Macs using Aqua's graphite theme
* Correct appearance on Macs using Aqua's graphite theme
* Simplified Extended Controls panel
* Ncurses:
* Ncurses:
* Correctly displays wide characters when using an UTF-8 locale,
* Correctly displays wide characters when using an UTF-8 locale,
if libncursesw is available.
if libncursesw is available.
...
@@ -216,12 +221,12 @@ Linux Port:
...
@@ -216,12 +221,12 @@ Linux Port:
(which means that VLC doesn't use the $HOME/.vlc directory anymore)
(which means that VLC doesn't use the $HOME/.vlc directory anymore)
Mac OS X Port:
Mac OS X Port:
* Mac OS X Framework that can be used to embed VLC in third party
* Mac OS X Framework
"VLCKit"
that can be used to embed VLC in third party
applications (Google Summer of Code Student project, Mac OS X 10.5 only)
applications (Google Summer of Code Student project, Mac OS X 10.5 only)
* New text renderer based on Quartz replacing the existing Freetype solution
* New text renderer based on Quartz replacing the existing Freetype solution
* Complete compatibility with Mac OS X 10.5 Leopard
* Complete compatibility with Mac OS X 10.5 Leopard
* It is now required to compile a fully featured build
* It is now required to compile a fully featured build
* The support of Mac OS X 10.3.9 was discontinued.
* The support of Mac OS X 10.3.9
and QuickTime 6.x
was discontinued.
LibVLC:
LibVLC:
* Event management and various improvements in libvlc
* Event management and various improvements in libvlc
...
@@ -947,12 +952,12 @@ Video Output:
...
@@ -947,12 +952,12 @@ Video Output:
* Experimental generic OpenGL video output (X11, Win32, MacOS X)
* Experimental generic OpenGL video output (X11, Win32, MacOS X)
with support for effects.
with support for effects.
* Improved filter and subpictures support :
* Improved filter and subpictures support :
- New filters can be streamed.
- New filters can be streamed.
- "Subpicture filters" to overlay subpictures on video
- "Subpicture filters" to overlay subpictures on video
- Centralized scaling and blending
- Centralized scaling and blending
* New filters :
* New filters :
- "time", to display current time
- "time", to display current time
- "marq", to display a marquee
- "marq", to display a marquee
Interfaces:
Interfaces:
* OSD sliders for volume and postition information
* OSD sliders for volume and postition information
...
...
THANKS
View file @
e2a614c8
...
@@ -147,7 +147,7 @@ Laurent Mutricy <laurent.mutricy at ecl2005 dot ec-lyon dot fr> - HTTP interface
...
@@ -147,7 +147,7 @@ Laurent Mutricy <laurent.mutricy at ecl2005 dot ec-lyon dot fr> - HTTP interface
Leo Spalteholz <leo dot spalteholz at gmail dot com> - Qt interface design
Leo Spalteholz <leo dot spalteholz at gmail dot com> - Qt interface design
Loox Thefuture <loox.thefuture at gmail dot com> - Media key in X11 vout
Loox Thefuture <loox.thefuture at gmail dot com> - Media key in X11 vout
Lorena Gomes - Catalan translation
Lorena Gomes - Catalan translation
Lukas Durfina <lukas.durfina at gmail.com> -
qt4: full screen controller. teletext button fix
.
Lukas Durfina <lukas.durfina at gmail.com> -
Qt4: full screen controller. Teletext button fix. Various fixes
.
Mahrazi Mohd Kamal <mahrazi at gmail.com> - Malay Translation
Mahrazi Mohd Kamal <mahrazi at gmail.com> - Malay Translation
Marc Nolette <nolette at videotron.ca> - PVR support in DirectShow input
Marc Nolette <nolette at videotron.ca> - PVR support in DirectShow input
Marco Munderloh <Marco.Munderloh at web.de> - HTTP fix for Win32 to URL filenames
Marco Munderloh <Marco.Munderloh at web.de> - HTTP fix for Win32 to URL filenames
...
...
configure.ac
View file @
e2a614c8
...
@@ -5589,16 +5589,6 @@ then
...
@@ -5589,16 +5589,6 @@ then
VLC_ADD_PLUGIN([test4])
VLC_ADD_PLUGIN([test4])
fi
fi
dnl
dnl Microsoft Layer for Unicode for WIN9x/ME
dnl
if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"
then
AC_CHECK_LIB(unicows, LoadUnicowsSymbol, [
VLC_ADD_LDFLAGS([vlc libvlc],[-Wl,--exclude-libs,libunicows.a -lunicows])
])
fi
dnl
dnl
dnl gtk_main plugin
dnl gtk_main plugin
dnl
dnl
...
...
extras/contrib/src/Distributions/win32.mak
View file @
e2a614c8
...
@@ -5,7 +5,7 @@ all: .iconv .intl .freetype .fribidi .zlib \
...
@@ -5,7 +5,7 @@ all: .iconv .intl .freetype .fribidi .zlib \
.live .goom2k4 .caca .mod .x264 .xml .twolame
\
.live .goom2k4 .caca .mod .x264 .xml .twolame
\
.png .gpg-error .gcrypt .opencdk .gnutls .mpcdec
\
.png .gpg-error .gcrypt .opencdk .gnutls .mpcdec
\
.dvdnav .dvbpsi .wxwidgets .qt4_win32 .dirac .SDL_image
\
.dvdnav .dvbpsi .wxwidgets .qt4_win32 .dirac .SDL_image
\
.dx_headers .dshow_headers .gecko-win32 .
unicows .
dca
\
.dx_headers .dshow_headers .gecko-win32 .dca
\
.lua .tag .fontconfig .portaudio
\
.lua .tag .fontconfig .portaudio
\
.aclocal
.aclocal
# .daap .cddb .cdio .vcdimager
# .daap .cddb .cdio .vcdimager
extras/contrib/src/Makefile
View file @
e2a614c8
...
@@ -2311,25 +2311,6 @@ DISTCLEAN_PKG += yasm-$(YASM_VERSION).tar.bz2
...
@@ -2311,25 +2311,6 @@ DISTCLEAN_PKG += yasm-$(YASM_VERSION).tar.bz2
CLEAN_FILE
+=
.aclocal
CLEAN_FILE
+=
.aclocal
# ***************************************************************************
# UNICOWS (Unicode support for WINME/98/95)
# ***************************************************************************
libunicows-$(UNICOWS_VERSION).tar.gz
:
$(WGET)
$(UNICOWS_URL)
mv
libunicows-
$(UNICOWS_VERSION)
-src
.tar.gz
$@
||
true
libunicows
:
libunicows-$(UNICOWS_VERSION).tar.gz
$(EXTRACT_GZ)
.unicows
:
libunicows
(
cd
$<
/src
;
make
-f
makefile.mingw32
PATHSEP
=
'/'
$(HOSTCC)
&&
cp
-f
../lib/mingw32/libunicows.a
$(PREFIX)
/lib
)
touch
$@
CLEAN_FILE
+=
.unicows
CLEAN_PKG
+=
libunicows
DISTCLEAN_PKG
+=
libunicows-
$(UNICOWS_VERSION)
.tar.gz
# ***************************************************************************
# ***************************************************************************
# TagLib read and editing of tags of popular audio formats
# TagLib read and editing of tags of popular audio formats
# ***************************************************************************
# ***************************************************************************
...
...
extras/contrib/src/packages.mak
View file @
e2a614c8
...
@@ -208,8 +208,6 @@ EXPAT_VERSION=2.0.0
...
@@ -208,8 +208,6 @@ EXPAT_VERSION=2.0.0
EXPAT_URL
=
$(SF)
/expat/expat-
$(EXPAT_VERSION)
.tar.gz
EXPAT_URL
=
$(SF)
/expat/expat-
$(EXPAT_VERSION)
.tar.gz
PTHREADS_VERSION
=
2-8-0
PTHREADS_VERSION
=
2-8-0
PTHREADS_URL
=
ftp://sources.redhat.com/pub/pthreads-win32/pthreads-w32-
$(PTHREADS_VERSION)
-release
.tar.gz
PTHREADS_URL
=
ftp://sources.redhat.com/pub/pthreads-win32/pthreads-w32-
$(PTHREADS_VERSION)
-release
.tar.gz
UNICOWS_VERSION
=
1.1.1
UNICOWS_URL
=
$(SF)
/libunicows/libunicows-
$(UNICOWS_VERSION)
-src
.tar.gz
ZVBI_VERSION
=
0.2.30
ZVBI_VERSION
=
0.2.30
ZVBI_URL
=
$(SF)
/zapping/zvbi-
$(ZVBI_VERSION)
.tar.bz2
ZVBI_URL
=
$(SF)
/zapping/zvbi-
$(ZVBI_VERSION)
.tar.bz2
TAGLIB_VERSION
=
1.5
TAGLIB_VERSION
=
1.5
...
...
extras/package/win32/vlc.win32.nsi.in
View file @
e2a614c8
...
@@ -637,13 +637,6 @@ Function .onInit
...
@@ -637,13 +637,6 @@ Function .onInit
done:
done:
!insertmacro MUI_LANGDLL_DISPLAY
!insertmacro MUI_LANGDLL_DISPLAY
;Win98 detection
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion" VersionNumber
StrCmp $R0 "4.9" lbl_win98
lbl_win98:
MessageBox MB_OK|MB_ICONQUESTION "Windows 98 ! Remember to install MSLU" IDOK
FunctionEnd
FunctionEnd
;; End function
;; End function
...
...
include/vlc_interface.h
View file @
e2a614c8
...
@@ -177,7 +177,8 @@ typedef enum vlc_dialog {
...
@@ -177,7 +177,8 @@ typedef enum vlc_dialog {
#define INTF_ABOUT_MSG LICENSE_MSG
#define INTF_ABOUT_MSG LICENSE_MSG
#define EXTENSIONS_AUDIO "*.a52;*.aac;*.ac3;*.dts;*.flac;*.m4a;*.m4p;*.mka;" \
#define EXTENSIONS_AUDIO "*.a52;*.aac;*.ac3;*.dts;*.flac;*.m4a;*.m4p;*.mka;" \
"*.mod;*.mp1;*.mp2;*.mp3;*.ogg;*.spx;*.wav;*.wma;*.xm"
"*.mod;*.mp1;*.mp2;*.mp3;*.ogg;*.oma;*.spx;" \
"*.wav;*.wma;*.xm"
#define EXTENSIONS_VIDEO "*.asf;*.avi;*.divx;*.dv;*.flv;*.gxf;*.m1v;*.m2v;" \
#define EXTENSIONS_VIDEO "*.asf;*.avi;*.divx;*.dv;*.flv;*.gxf;*.m1v;*.m2v;" \
"*.m4v;*.mkv;*.mov;*.mp2;*.mp4;*.mpeg;*.mpeg1;" \
"*.m4v;*.mkv;*.mov;*.mp2;*.mp4;*.mpeg;*.mpeg1;" \
...
...
modules/gui/qt4/components/extended_panels.cpp
100755 → 100644
View file @
e2a614c8
File mode changed from 100755 to 100644
modules/gui/qt4/components/interface_widgets.cpp
View file @
e2a614c8
...
@@ -65,6 +65,7 @@ VideoWidget::VideoWidget( intf_thread_t *_p_i ) : QFrame( NULL ), p_intf( _p_i )
...
@@ -65,6 +65,7 @@ VideoWidget::VideoWidget( intf_thread_t *_p_i ) : QFrame( NULL ), p_intf( _p_i )
hide
();
setMinimumSize
(
16
,
16
);
hide
();
setMinimumSize
(
16
,
16
);
videoSize
.
rwidth
()
=
-
1
;
videoSize
.
rwidth
()
=
-
1
;
videoSize
.
rheight
()
=
-
1
;
videoSize
.
rheight
()
=
-
1
;
setSizePolicy
(
QSizePolicy
::
Expanding
,
QSizePolicy
::
Expanding
);
/* Black background is more coherent for a Video Widget IMVHO */
/* Black background is more coherent for a Video Widget IMVHO */
QPalette
plt
=
palette
();
QPalette
plt
=
palette
();
...
@@ -74,10 +75,17 @@ VideoWidget::VideoWidget( intf_thread_t *_p_i ) : QFrame( NULL ), p_intf( _p_i )
...
@@ -74,10 +75,17 @@ VideoWidget::VideoWidget( intf_thread_t *_p_i ) : QFrame( NULL ), p_intf( _p_i )
setAttribute
(
Qt
::
WA_PaintOnScreen
,
true
);
setAttribute
(
Qt
::
WA_PaintOnScreen
,
true
);
/* The core can ask through a callback to show the video. */
/* The core can ask through a callback to show the video. */
connect
(
this
,
SIGNAL
(
askVideoWidgetToShow
()),
this
,
SLOT
(
show
()),
Qt
::
BlockingQueuedConnection
);
#if HAS_QT43
connect
(
this
,
SIGNAL
(
askVideoWidgetToShow
(
unsigned
int
,
unsigned
int
)),
this
,
SLOT
(
SetSizing
(
unsigned
int
,
unsigned
int
)),
Qt
::
BlockingQueuedConnection
);
#else
#error This is broken. Fix it with a QEventLoop with a processEvents ()
connect
(
this
,
SIGNAL
(
askVideoWidgetToShow
(
unsigned
int
,
unsigned
int
)),
this
,
SLOT
(
SetSizing
(
unsigned
int
,
unsigned
int
))
);
#endif
/* The core can ask through a callback to resize the video */
// CONNECT( this, askResize( int, int ), this, SetSizing( int, int ) );
}
}
void
VideoWidget
::
paintEvent
(
QPaintEvent
*
ev
)
void
VideoWidget
::
paintEvent
(
QPaintEvent
*
ev
)
...
@@ -115,7 +123,7 @@ void *VideoWidget::request( vout_thread_t *p_nvout, int *pi_x, int *pi_y,
...
@@ -115,7 +123,7 @@ void *VideoWidget::request( vout_thread_t *p_nvout, int *pi_x, int *pi_y,
unsigned
int
*
pi_width
,
unsigned
int
*
pi_height
)
unsigned
int
*
pi_width
,
unsigned
int
*
pi_height
)
{
{
msg_Dbg
(
p_intf
,
"Video was requested %i, %i"
,
*
pi_x
,
*
pi_y
);
msg_Dbg
(
p_intf
,
"Video was requested %i, %i"
,
*
pi_x
,
*
pi_y
);
emit
askVideoWidgetToShow
();
emit
askVideoWidgetToShow
(
*
pi_width
,
*
pi_height
);
if
(
p_vout
)
if
(
p_vout
)
{
{
msg_Dbg
(
p_intf
,
"embedded video already in use"
);
msg_Dbg
(
p_intf
,
"embedded video already in use"
);
...
@@ -134,6 +142,7 @@ void VideoWidget::SetSizing( unsigned int w, unsigned int h )
...
@@ -134,6 +142,7 @@ void VideoWidget::SetSizing( unsigned int w, unsigned int h )
msg_Dbg
(
p_intf
,
"Video is resizing to: %i %i"
,
w
,
h
);
msg_Dbg
(
p_intf
,
"Video is resizing to: %i %i"
,
w
,
h
);
videoSize
.
rwidth
()
=
w
;
videoSize
.
rwidth
()
=
w
;
videoSize
.
rheight
()
=
h
;
videoSize
.
rheight
()
=
h
;
if
(
isHidden
()
)
show
();
updateGeometry
();
// Needed for deinterlace
updateGeometry
();
// Needed for deinterlace
}
}
...
@@ -461,7 +470,7 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
...
@@ -461,7 +470,7 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
BUTTON_SET_IMG
(
prevSectionButton
,
""
,
previous
.
png
,
""
);
BUTTON_SET_IMG
(
prevSectionButton
,
""
,
previous
.
png
,
""
);
BUTTON_SET_IMG
(
nextSectionButton
,
""
,
next
.
png
,
""
);
BUTTON_SET_IMG
(
nextSectionButton
,
""
,
next
.
png
,
""
);
BUTTON_SET_IMG
(
menuButton
,
""
,
previous
.
png
,
""
);
BUTTON_SET_IMG
(
menuButton
,
""
,
previous
.
png
,
qtr
(
"Menu"
)
);
discFrame
->
hide
();
discFrame
->
hide
();
...
@@ -721,11 +730,8 @@ void ControlsWidget::next()
...
@@ -721,11 +730,8 @@ void ControlsWidget::next()
void
ControlsWidget
::
setNavigation
(
int
navigation
)
void
ControlsWidget
::
setNavigation
(
int
navigation
)
{
{
#define HELP_MENU N_( "Menu" )
#define HELP_PCH N_( "Previous chapter" )
#define HELP_PCH N_( "Previous chapter" )
#define HELP_NCH N_( "Next chapter" )
#define HELP_NCH N_( "Next chapter" )
#define HELP_PTR N_( "Previous track" )
#define HELP_NTR N_( "Next track" )
// 1 = chapter, 2 = title, 0 = no
// 1 = chapter, 2 = title, 0 = no
if
(
navigation
==
0
)
if
(
navigation
==
0
)
...
@@ -872,7 +878,7 @@ FullscreenControllerWidget::FullscreenControllerWidget( intf_thread_t *_p_i,
...
@@ -872,7 +878,7 @@ FullscreenControllerWidget::FullscreenControllerWidget( intf_thread_t *_p_i,
MainInterface
*
_p_mi
,
bool
b_advControls
,
bool
b_shiny
)
MainInterface
*
_p_mi
,
bool
b_advControls
,
bool
b_shiny
)
:
ControlsWidget
(
_p_i
,
_p_mi
,
b_advControls
,
b_shiny
,
true
),
:
ControlsWidget
(
_p_i
,
_p_mi
,
b_advControls
,
b_shiny
,
true
),
i_lastPosX
(
-
1
),
i_lastPosY
(
-
1
),
i_hideTimeout
(
1
),
i_lastPosX
(
-
1
),
i_lastPosY
(
-
1
),
i_hideTimeout
(
1
),
b_mouseIsOver
(
false
)
b_mouseIsOver
(
false
)
,
b_isFullscreen
(
false
)
{
{
setWindowFlags
(
Qt
::
ToolTip
);
setWindowFlags
(
Qt
::
ToolTip
);
...
@@ -970,7 +976,11 @@ void FullscreenControllerWidget::slowHideFSC()
...
@@ -970,7 +976,11 @@ void FullscreenControllerWidget::slowHideFSC()
}
}
else
else
{
{
#ifdef WIN32TRICK
if
(
windowOpacity
()
>
0.0
&&
!
fscHidden
)
#else
if
(
windowOpacity
()
>
0.0
)
if
(
windowOpacity
()
>
0.0
)
#endif
{
{
/* we should use 0.01 because of 100 pieces ^^^
/* we should use 0.01 because of 100 pieces ^^^
but than it cannt be done in time */
but than it cannt be done in time */
...
@@ -1007,7 +1017,7 @@ void FullscreenControllerWidget::customEvent( QEvent *event )
...
@@ -1007,7 +1017,7 @@ void FullscreenControllerWidget::customEvent( QEvent *event )
{
{
int
type
=
event
->
type
();
int
type
=
event
->
type
();
if
(
type
==
FullscreenControlShow_Type
)
if
(
type
==
FullscreenControlShow_Type
&&
b_isFullscreen
)
{
{
#ifdef WIN32TRICK
#ifdef WIN32TRICK
// after quiting and going to fs, we need to call show()
// after quiting and going to fs, we need to call show()
...
@@ -1144,7 +1154,8 @@ static int regMouseMoveCallback( vlc_object_t *vlc_object, const char *variable,
...
@@ -1144,7 +1154,8 @@ static int regMouseMoveCallback( vlc_object_t *vlc_object, const char *variable,
if
(
var_GetBool
(
p_vout
,
"fullscreen"
)
&&
!
b_registered
)
if
(
var_GetBool
(
p_vout
,
"fullscreen"
)
&&
!
b_registered
)
{
{
p_fs
->
SetHideTimeout
(
var_GetInteger
(
p_vout
,
"mouse-hide-timeout"
)
);
p_fs
->
setHideTimeout
(
var_GetInteger
(
p_vout
,
"mouse-hide-timeout"
)
);
p_fs
->
setIsFullscreen
(
true
);
var_AddCallback
(
p_vout
,
"mouse-moved"
,
var_AddCallback
(
p_vout
,
"mouse-moved"
,
showFullscreenControllCallback
,
(
void
*
)
p_fs
);
showFullscreenControllCallback
,
(
void
*
)
p_fs
);
b_registered
=
true
;
b_registered
=
true
;
...
@@ -1152,14 +1163,13 @@ static int regMouseMoveCallback( vlc_object_t *vlc_object, const char *variable,
...
@@ -1152,14 +1163,13 @@ static int regMouseMoveCallback( vlc_object_t *vlc_object, const char *variable,
if
(
!
var_GetBool
(
p_vout
,
"fullscreen"
)
&&
b_registered
)
if
(
!
var_GetBool
(
p_vout
,
"fullscreen"
)
&&
b_registered
)
{
{
p_fs
->
setIsFullscreen
(
false
);
p_fs
->
hide
();
var_DelCallback
(
p_vout
,
"mouse-moved"
,
var_DelCallback
(
p_vout
,
"mouse-moved"
,
showFullscreenControllCallback
,
(
void
*
)
p_fs
);
showFullscreenControllCallback
,
(
void
*
)
p_fs
);
b_registered
=
false
;
b_registered
=
false
;
}
}
if
(
!
var_GetBool
(
p_vout
,
"fullscreen"
)
)
p_fs
->
hide
();
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
...
...
modules/gui/qt4/components/interface_widgets.hpp
View file @
e2a614c8
...
@@ -91,8 +91,7 @@ private:
...
@@ -91,8 +91,7 @@ private:
QSize
videoSize
;
QSize
videoSize
;
signals:
signals:
void
askVideoWidgetToShow
();
void
askVideoWidgetToShow
(
unsigned
int
,
unsigned
int
);
//void askResize();
public
slots
:
public
slots
:
void
SetSizing
(
unsigned
int
,
unsigned
int
);
void
SetSizing
(
unsigned
int
,
unsigned
int
);
...
@@ -251,7 +250,8 @@ public:
...
@@ -251,7 +250,8 @@ public:
FullscreenControllerWidget
(
intf_thread_t
*
,
MainInterface
*
,
bool
,
bool
);
FullscreenControllerWidget
(
intf_thread_t
*
,
MainInterface
*
,
bool
,
bool
);
virtual
~
FullscreenControllerWidget
();
virtual
~
FullscreenControllerWidget
();
void
SetHideTimeout
(
int
hideTimeout
)
{
i_hideTimeout
=
hideTimeout
;
}
void
setHideTimeout
(
int
hideTimeout
)
{
i_hideTimeout
=
hideTimeout
;
}
void
setIsFullscreen
(
bool
isFS
)
{
b_isFullscreen
=
isFS
;
}
void
regFullscreenCallback
(
vout_thread_t
*
p_vout
);
void
regFullscreenCallback
(
vout_thread_t
*
p_vout
);
bool
isFSCHidden
();
bool
isFSCHidden
();
...
@@ -284,6 +284,7 @@ private:
...
@@ -284,6 +284,7 @@ private:
int
i_lastPosY
;
int
i_lastPosY
;
int
i_hideTimeout
;
/* FSC hiding timeout, same as mouse hiding timeout */
int
i_hideTimeout
;
/* FSC hiding timeout, same as mouse hiding timeout */
bool
b_mouseIsOver
;
bool
b_mouseIsOver
;
bool
b_isFullscreen
;
#ifdef WIN32TRICK
#ifdef WIN32TRICK
bool
fscHidden
;
bool
fscHidden
;
...
...
modules/gui/qt4/components/open_panels.cpp
View file @
e2a614c8
...
@@ -410,13 +410,14 @@ NetOpenPanel::NetOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
...
@@ -410,13 +410,14 @@ NetOpenPanel::NetOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
ui
.
setupUi
(
this
);
ui
.
setupUi
(
this
);
/* CONNECTs */
/* CONNECTs */
CONNECT
(
ui
.
protocolCombo
,
currentIndexChang
ed
(
int
),
CONNECT
(
ui
.
protocolCombo
,
activat
ed
(
int
),
this
,
updateProtocol
(
int
)
);
this
,
updateProtocol
(
int
)
);
CONNECT
(
ui
.
portSpin
,
valueChanged
(
int
),
this
,
updateMRL
()
);
CONNECT
(
ui
.
portSpin
,
valueChanged
(
int
),
this
,
updateMRL
()
);
CONNECT
(
ui
.
addressText
,
textChanged
(
QString
),
this
,
updateMRL
());
CONNECT
(
ui
.
addressText
,
textChanged
(
QString
),
this
,
updateMRL
());
CONNECT
(
ui
.
timeShift
,
clicked
(),
this
,
updateMRL
());
CONNECT
(
ui
.
timeShift
,
clicked
(),
this
,
updateMRL
());
CONNECT
(
ui
.
ipv6
,
clicked
(),
this
,
updateMRL
());
CONNECT
(
ui
.
ipv6
,
clicked
(),
this
,
updateMRL
());
ui
.
protocolCombo
->
addItem
(
""
);
ui
.
protocolCombo
->
addItem
(
"HTTP"
,
QVariant
(
"http"
));
ui
.
protocolCombo
->
addItem
(
"HTTP"
,
QVariant
(
"http"
));
ui
.
protocolCombo
->
addItem
(
"HTTPS"
,
QVariant
(
"https"
));
ui
.
protocolCombo
->
addItem
(
"HTTPS"
,
QVariant
(
"https"
));
ui
.
protocolCombo
->
addItem
(
"FTP"
,
QVariant
(
"ftp"
));
ui
.
protocolCombo
->
addItem
(
"FTP"
,
QVariant
(
"ftp"
));
...
@@ -424,6 +425,7 @@ NetOpenPanel::NetOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
...
@@ -424,6 +425,7 @@ NetOpenPanel::NetOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
ui
.
protocolCombo
->
addItem
(
"RTSP"
,
QVariant
(
"rtsp"
));
ui
.
protocolCombo
->
addItem
(
"RTSP"
,
QVariant
(
"rtsp"
));
ui
.
protocolCombo
->
addItem
(
"UDP/RTP (unicast)"
,
QVariant
(
"udp"
));
ui
.
protocolCombo
->
addItem
(
"UDP/RTP (unicast)"
,
QVariant
(
"udp"
));
ui
.
protocolCombo
->
addItem
(
"UDP/RTP (multicast)"
,
QVariant
(
"udp"
));
ui
.
protocolCombo
->
addItem
(
"UDP/RTP (multicast)"
,
QVariant
(
"udp"
));
ui
.
protocolCombo
->
addItem
(
"RTMP"
,
QVariant
(
"rtmp"
));
}
}
NetOpenPanel
::~
NetOpenPanel
()
NetOpenPanel
::~
NetOpenPanel
()
...
@@ -433,19 +435,26 @@ void NetOpenPanel::clear()
...
@@ -433,19 +435,26 @@ void NetOpenPanel::clear()
{}
{}
/* update the widgets according the type of protocol */
/* update the widgets according the type of protocol */
void
NetOpenPanel
::
updateProtocol
(
int
idx
)
{
void
NetOpenPanel
::
updateProtocol
(
int
idx
_proto
)
{
QString
addr
=
ui
.
addressText
->
text
();
QString
addr
=
ui
.
addressText
->
text
();
QString
proto
=
ui
.
protocolCombo
->
itemData
(
idx
).
toString
();
QString
proto
=
ui
.
protocolCombo
->
itemData
(
idx
_proto
).
toString
();
ui
.
timeShift
->
setEnabled
(
idx
>=
5
);
ui
.
timeShift
->
setEnabled
(
idx_proto
==
UDP_PROTO
||
ui
.
ipv6
->
setEnabled
(
idx
==
5
);
idx_proto
==
UDPM_PROTO
);
ui
.
addressText
->
setEnabled
(
idx
!=
5
);
ui
.
ipv6
->
setEnabled
(
idx_proto
==
UDP_PROTO
);
ui
.
portSpin
->
setEnabled
(
idx
>=
5
);
ui
.
addressText
->
setEnabled
(
idx_proto
!=
UDP_PROTO
);
ui
.
portSpin
->
setEnabled
(
idx_proto
==
UDP_PROTO
||
idx_proto
==
UDPM_PROTO
);
if
(
idx_proto
==
NO_PROTO
)
return
;
/* If we already have a protocol in the address, replace it */
/* If we already have a protocol in the address, replace it */
if
(
addr
.
contains
(
"://"
))
{
if
(
addr
.
contains
(
"://"
))
msg_Err
(
p_intf
,
"replace"
);
{
addr
.
replace
(
QRegExp
(
"^.*://"
),
proto
+
"://"
);
if
(
idx_proto
!=
UDPM_PROTO
)
addr
.
replace
(
QRegExp
(
"^.*://@*"
),
proto
+
"://"
);
else
addr
.
replace
(
QRegExp
(
"^.*://"
),
proto
+
"://@"
);
ui
.
addressText
->
setText
(
addr
);
ui
.
addressText
->
setText
(
addr
);
}
}
updateMRL
();
updateMRL
();
...
@@ -455,36 +464,41 @@ void NetOpenPanel::updateMRL() {
...
@@ -455,36 +464,41 @@ void NetOpenPanel::updateMRL() {
QString
mrl
=
""
;
QString
mrl
=
""
;
QString
addr
=
ui
.
addressText
->
text
();
QString
addr
=
ui
.
addressText
->
text
();
addr
=
QUrl
::
toPercentEncoding
(
addr
,
":/?#@!$&'()*+,;="
);
addr
=
QUrl
::
toPercentEncoding
(
addr
,
":/?#@!$&'()*+,;="
);
int
proto
=
ui
.
protocolCombo
->
currentIndex
();
int
idx_
proto
=
ui
.
protocolCombo
->
currentIndex
();
if
(
addr
.
contains
(
"://"
)
&&
(
proto
!=
5
||
proto
!=
6
)
)
if
(
addr
.
contains
(
"://"
))
{
{
mrl
=
addr
;
/* Match the correct item in the comboBox */
ui
.
protocolCombo
->
setCurrentIndex
(
ui
.
protocolCombo
->
findData
(
addr
.
section
(
':'
,
0
,
0
)
)
);
if
(
idx_proto
!=
UDP_PROTO
||
idx_proto
!=
UDPM_PROTO
)
mrl
=
addr
;
}
}
else
else
{
{
switch
(
proto
)
{
switch
(
idx_
proto
)
{
case
0
:
case
HTTP_PROTO
:
mrl
=
"http://"
+
addr
;
mrl
=
"http://"
+
addr
;
emit
methodChanged
(
"http-caching"
);
emit
methodChanged
(
"http-caching"
);
break
;
break
;
case
1
:
case
HTTPS_PROTO
:
mrl
=
"https://"
+
addr
;
mrl
=
"https://"
+
addr
;
emit
methodChanged
(
"http-caching"
);
emit
methodChanged
(
"http-caching"
);
break
;
break
;
case
3
:
case
MMS_PROTO
:
mrl
=
"mms://"
+
addr
;
mrl
=
"mms://"
+
addr
;
emit
methodChanged
(
"mms-caching"
);
emit
methodChanged
(
"mms-caching"
);
break
;
break
;
case
2
:
case
FTP_PROTO
:
mrl
=
"ftp://"
+
addr
;
mrl
=
"ftp://"
+
addr
;
emit
methodChanged
(
"ftp-caching"
);
emit
methodChanged
(
"ftp-caching"
);
break
;
break
;
case
4
:
/* RTSP */
case
RTSP_PROTO
:
mrl
=
"rtsp://"
+
addr
;
mrl
=
"rtsp://"
+
addr
;
emit
methodChanged
(
"rtsp-caching"
);
emit
methodChanged
(
"rtsp-caching"
);
break
;
break
;
case
5
:
case
UDP_PROTO
:
mrl
=
"udp://@"
;
mrl
=
"udp://@"
;
if
(
ui
.
ipv6
->
isEnabled
()
&&
ui
.
ipv6
->
isChecked
()
)
if
(
ui
.
ipv6
->
isEnabled
()
&&
ui
.
ipv6
->
isChecked
()
)
{
{
...
@@ -493,7 +507,7 @@ void NetOpenPanel::updateMRL() {
...
@@ -493,7 +507,7 @@ void NetOpenPanel::updateMRL() {
mrl
+=
QString
(
":%1"
).
arg
(
ui
.
portSpin
->
value
()
);
mrl
+=
QString
(
":%1"
).
arg
(
ui
.
portSpin
->
value
()
);
emit
methodChanged
(
"udp-caching"
);
emit
methodChanged
(
"udp-caching"
);
break
;
break
;
case
6
:
/* UDP multicast */
case
UDPM_PROTO
:
/* UDP multicast */
mrl
=
"udp://@"
;
mrl
=
"udp://@"
;
/* Add [] to IPv6 */
/* Add [] to IPv6 */
if
(
addr
.
contains
(
':'
)
&&
!
addr
.
contains
(
'['
)
)
if
(
addr
.
contains
(
':'
)
&&
!
addr
.
contains
(
'['
)
)
...
@@ -503,6 +517,11 @@ void NetOpenPanel::updateMRL() {
...
@@ -503,6 +517,11 @@ void NetOpenPanel::updateMRL() {
else
mrl
+=
addr
;
else
mrl
+=
addr
;
mrl
+=
QString
(
":%1"
).
arg
(
ui
.
portSpin
->
value
()
);
mrl
+=
QString
(
":%1"
).
arg
(
ui
.
portSpin
->
value
()
);
emit
methodChanged
(
"udp-caching"
);
emit
methodChanged
(
"udp-caching"
);
case
RTMP_PROTO
:
mrl
=
"rtmp://"
+
addr
;
emit
methodChanged
(
"rtmp-caching"
);
break
;
}
}
}
}
...
@@ -907,10 +926,10 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
...
@@ -907,10 +926,10 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
screenDevLayout
->
addWidget
(
screenLabel
,
0
,
0
);
screenDevLayout
->
addWidget
(
screenLabel
,
0
,
0
);
/* General connects */
/* General connects */
connect
(
ui
.
deviceCombo
,
SIGNAL
(
activated
(
int
)
)
,
CONNECT
(
ui
.
deviceCombo
,
activated
(
int
)
,
stackedDevLayout
,
SLOT
(
setCurrentIndex
(
int
)
)
);
stackedDevLayout
,
setCurrentIndex
(
int
)
);
connect
(
ui
.
deviceCombo
,
SIGNAL
(
activated
(
int
)
),
CONNECT
(
ui
.
deviceCombo
,
activated
(
int
),
stackedPropLayout
,
SLOT
(
setCurrentIndex
(
int
)
)
);
stackedPropLayout
,
setCurrentIndex
(
int
)
);
CONNECT
(
ui
.
deviceCombo
,
activated
(
int
),
this
,
updateMRL
()
);
CONNECT
(
ui
.
deviceCombo
,
activated
(
int
),
this
,
updateMRL
()
);
CONNECT
(
ui
.
deviceCombo
,
activated
(
int
),
this
,
updateButtons
()
);
CONNECT
(
ui
.
deviceCombo
,
activated
(
int
),
this
,
updateButtons
()
);
...
@@ -1114,7 +1133,7 @@ void CaptureOpenPanel::advancedDialog()
...
@@ -1114,7 +1133,7 @@ void CaptureOpenPanel::advancedDialog()
advButtonBox
->
addButton
(
closeButton
,
QDialogButtonBox
::
AcceptRole
);
advButtonBox
->
addButton
(
closeButton
,
QDialogButtonBox
::
AcceptRole
);
advButtonBox
->
addButton
(
cancelButton
,
QDialogButtonBox
::
RejectRole
);
advButtonBox
->
addButton
(
cancelButton
,
QDialogButtonBox
::
RejectRole
);
gLayout
->
addWidget
(
advButtonBox
,
i_confsize
+
1
,
0
,
1
,
-
1
);
mainLayout
->
addWidget
(
advButtonBox
);
/* Creation of the MRL */
/* Creation of the MRL */
if
(
adv
->
exec
()
)
if
(
adv
->
exec
()
)
...
...
modules/gui/qt4/components/open_panels.hpp
View file @
e2a614c8
...
@@ -48,6 +48,20 @@
...
@@ -48,6 +48,20 @@
#define setSpinBoxFreq( spinbox ){ spinbox->setRange ( 0, INT_MAX ); \
#define setSpinBoxFreq( spinbox ){ spinbox->setRange ( 0, INT_MAX ); \
spinbox->setAccelerated( true ); }
spinbox->setAccelerated( true ); }
enum
{
NO_PROTO
,
HTTP_PROTO
,
HTTPS_PROTO
,
MMS_PROTO
,
FTP_PROTO
,
RTSP_PROTO
,
UDP_PROTO
,
UDPM_PROTO
,
RTMP_PROTO
};
enum
enum
{
{
V4L_DEVICE
,
V4L_DEVICE
,
...
...
modules/gui/qt4/dialogs/help.cpp
View file @
e2a614c8
...
@@ -292,6 +292,9 @@ void UpdateDialog::updateNotify( bool b_result )
...
@@ -292,6 +292,9 @@ void UpdateDialog::updateNotify( bool b_result )
updateButton
->
setText
(
"Download"
);
updateButton
->
setText
(
"Download"
);
updateLabel
->
setText
(
qtr
(
"There is a new version of VLC :
\n
"
)
updateLabel
->
setText
(
qtr
(
"There is a new version of VLC :
\n
"
)
+
qfu
(
p_release
->
psz_desc
)
);
+
qfu
(
p_release
->
psz_desc
)
);
/* Force the dialog to be shown */
this
->
show
();
}
}
else
else
updateLabel
->
setText
(
qtr
(
"You have the latest version of VLC"
)
);
updateLabel
->
setText
(
qtr
(
"You have the latest version of VLC"
)
);
...
...
modules/gui/qt4/main_interface.cpp
View file @
e2a614c8
...
@@ -436,12 +436,7 @@ void MainInterface::handleMainUi( QSettings *settings )
...
@@ -436,12 +436,7 @@ void MainInterface::handleMainUi( QSettings *settings )
if
(
videoEmbeddedFlag
)
if
(
videoEmbeddedFlag
)
{
{
videoWidget
=
new
VideoWidget
(
p_intf
);
videoWidget
=
new
VideoWidget
(
p_intf
);
mainLayout
->
insertWidget
(
0
,
videoWidget
);
mainLayout
->
insertWidget
(
0
,
videoWidget
,
10
);
var_Create
(
p_intf
,
"window_widget"
,
VLC_VAR_ADDRESS
);
vlc_value_t
val
;
val
.
p_address
=
this
;
var_Set
(
p_intf
,
"window_widget"
,
val
);
}
}
/* Finish the sizing */
/* Finish the sizing */
...
@@ -659,8 +654,6 @@ private:
...
@@ -659,8 +654,6 @@ private:
* Thou shall not call/resize/hide widgets from on another thread.
* Thou shall not call/resize/hide widgets from on another thread.
* This is wrong, and this is TEH reason to emit signals on those Video Functions
* This is wrong, and this is TEH reason to emit signals on those Video Functions
**/
**/
/* function called from ::DoRequest in order to show a nice VideoWidget
at the good size */
void
*
MainInterface
::
requestVideo
(
vout_thread_t
*
p_nvout
,
int
*
pi_x
,
void
*
MainInterface
::
requestVideo
(
vout_thread_t
*
p_nvout
,
int
*
pi_x
,
int
*
pi_y
,
unsigned
int
*
pi_width
,
int
*
pi_y
,
unsigned
int
*
pi_width
,
unsigned
int
*
pi_height
)
unsigned
int
*
pi_height
)
...
@@ -692,7 +685,7 @@ void *MainInterface::requestVideo( vout_thread_t *p_nvout, int *pi_x,
...
@@ -692,7 +685,7 @@ void *MainInterface::requestVideo( vout_thread_t *p_nvout, int *pi_x,
#endif
#endif
videoIsActive
=
true
;
videoIsActive
=
true
;
emit
askVideoToResize
(
*
pi_width
,
*
pi_height
);
//
emit askVideoToResize( *pi_width, *pi_height );
emit
askUpdate
();
emit
askUpdate
();
fullscreenControls
->
regFullscreenCallback
(
p_nvout
);
fullscreenControls
->
regFullscreenCallback
(
p_nvout
);
...
@@ -700,8 +693,6 @@ void *MainInterface::requestVideo( vout_thread_t *p_nvout, int *pi_x,
...
@@ -700,8 +693,6 @@ void *MainInterface::requestVideo( vout_thread_t *p_nvout, int *pi_x,
return
ret
;
return
ret
;
}
}
/* function called from ::DoRequest in order to show a nice VideoWidget
at the good size */
void
MainInterface
::
requestNotEmbeddedVideo
(
vout_thread_t
*
p_nvout
)
void
MainInterface
::
requestNotEmbeddedVideo
(
vout_thread_t
*
p_nvout
)
{
{
fullscreenControls
->
regFullscreenCallback
(
p_nvout
);
fullscreenControls
->
regFullscreenCallback
(
p_nvout
);
...
...
modules/gui/qt4/qt4.cpp
View file @
e2a614c8
...
@@ -29,6 +29,10 @@
...
@@ -29,6 +29,10 @@
#include <QLocale>
#include <QLocale>
#include <QTranslator>
#include <QTranslator>
#include <QDate>
#include <QDate>
#include <QMutex>
#include <QMutexLocker>
#include <QWaitCondition>
#include <QPointer>
#include "qt4.hpp"
#include "qt4.hpp"
#include "dialogs_provider.hpp"
#include "dialogs_provider.hpp"
...
@@ -91,7 +95,7 @@ static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * );
...
@@ -91,7 +95,7 @@ static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * );
#define OPACITY_TEXT N_( "Windows opacity between 0.1 and 1." )
#define OPACITY_TEXT N_( "Windows opacity between 0.1 and 1." )
#define OPACITY_LONGTEXT N_( "Sets the windows opacity between 0.1 and 1 " \
#define OPACITY_LONGTEXT N_( "Sets the windows opacity between 0.1 and 1 " \
"for main interface, playlist and extended panel."
\
"for main interface, playlist and extended panel."\
" This option only works with Windows and " \
" This option only works with Windows and " \
"X11 with composite extensions." )
"X11 with composite extensions." )
...
@@ -228,6 +232,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -228,6 +232,7 @@ static int Open( vlc_object_t *p_this )
XCloseDisplay
(
p_display
);
XCloseDisplay
(
p_display
);
#endif
#endif
/* Allocations */
p_intf
->
p_sys
=
(
intf_sys_t
*
)
malloc
(
sizeof
(
intf_sys_t
)
);
p_intf
->
p_sys
=
(
intf_sys_t
*
)
malloc
(
sizeof
(
intf_sys_t
)
);
if
(
!
p_intf
->
p_sys
)
if
(
!
p_intf
->
p_sys
)
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
...
@@ -235,9 +240,12 @@ static int Open( vlc_object_t *p_this )
...
@@ -235,9 +240,12 @@ static int Open( vlc_object_t *p_this )
p_intf
->
pf_run
=
Run
;
p_intf
->
pf_run
=
Run
;
/* Access to the playlist */
p_intf
->
p_sys
->
p_playlist
=
pl_Yield
(
p_intf
);
p_intf
->
p_sys
->
p_playlist
=
pl_Yield
(
p_intf
);
/* Listen to the messages */
p_intf
->
p_sys
->
p_sub
=
msg_Subscribe
(
p_intf
);
p_intf
->
p_sys
->
p_sub
=
msg_Subscribe
(
p_intf
);
var_Create
(
p_this
,
"window_widget"
,
VLC_VAR_ADDRESS
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
...
@@ -288,8 +296,12 @@ static void Run( intf_thread_t *p_intf )
...
@@ -288,8 +296,12 @@ static void Run( intf_thread_t *p_intf )
Init
(
p_intf
);
Init
(
p_intf
);
}
}
static
QMutex
windowLock
;
static
QWaitCondition
windowWait
;
static
void
Init
(
intf_thread_t
*
p_intf
)
static
void
Init
(
intf_thread_t
*
p_intf
)
{
{
vlc_value_t
val
;
char
dummy
[]
=
""
;
char
dummy
[]
=
""
;
char
*
argv
[]
=
{
dummy
};
char
*
argv
[]
=
{
dummy
};
int
argc
=
1
;
int
argc
=
1
;
...
@@ -309,23 +321,33 @@ static void Init( intf_thread_t *p_intf )
...
@@ -309,23 +321,33 @@ static void Init( intf_thread_t *p_intf )
/* Start the QApplication here */
/* Start the QApplication here */
QApplication
*
app
=
new
QApplication
(
argc
,
argv
,
true
);
QApplication
*
app
=
new
QApplication
(
argc
,
argv
,
true
);
p_intf
->
p_sys
->
p_app
=
app
;
/* Icon setting
FIXME: use a bigger icon ? */
if
(
QDate
::
currentDate
().
dayOfYear
()
>=
354
)
if
(
QDate
::
currentDate
().
dayOfYear
()
>=
354
)
app
->
setWindowIcon
(
QIcon
(
QPixmap
(
vlc_christmas_xpm
)
)
);
app
->
setWindowIcon
(
QIcon
(
QPixmap
(
vlc_christmas_xpm
)
)
);
else
else
app
->
setWindowIcon
(
QIcon
(
QPixmap
(
vlc_xpm
)
)
);
app
->
setWindowIcon
(
QIcon
(
QPixmap
(
vlc_xpm
)
)
);
p_intf
->
p_sys
->
p_app
=
app
;
/
/ Initialize timers and the Dialog Provider
/
* Initialize timers and the Dialog Provider */
DialogsProvider
::
getInstance
(
p_intf
);
DialogsProvider
::
getInstance
(
p_intf
);
// Create the normal interface
QPointer
<
MainInterface
>
*
miP
=
NULL
;
/* Create the normal interface in non-DP mode */
if
(
!
p_intf
->
pf_show_dialog
)
if
(
!
p_intf
->
pf_show_dialog
)
{
{
MainInterface
*
p_mi
=
new
MainInterface
(
p_intf
);
p_intf
->
p_sys
->
p_mi
=
new
MainInterface
(
p_intf
);
p_intf
->
p_sys
->
p_mi
=
p_mi
;
/* We don't show it because it is done in the MainInterface constructor
/* We don't show it because it is done in the MainInterface constructor
p_mi->show(); */
p_mi->show(); */
p_intf
->
p_sys
->
b_isDialogProvider
=
false
;
p_intf
->
p_sys
->
b_isDialogProvider
=
false
;
miP
=
new
QPointer
<
MainInterface
>
(
p_intf
->
p_sys
->
p_mi
);
val
.
p_address
=
miP
;
QMutexLocker
locker
(
&
windowLock
);
var_Set
(
p_intf
,
"window_widget"
,
val
);
windowWait
.
wakeAll
();
}
}
else
else
{
{
...
@@ -333,6 +355,8 @@ static void Init( intf_thread_t *p_intf )
...
@@ -333,6 +355,8 @@ static void Init( intf_thread_t *p_intf )
p_intf
->
p_sys
->
b_isDialogProvider
=
true
;
p_intf
->
p_sys
->
b_isDialogProvider
=
true
;
}
}
/* Explain to the core how to show a dialog :D */
p_intf
->
pf_show_dialog
=
ShowDialog
;
#ifdef ENABLE_NLS
#ifdef ENABLE_NLS
// Translation - get locale
// Translation - get locale
...
@@ -353,16 +377,13 @@ static void Init( intf_thread_t *p_intf )
...
@@ -353,16 +377,13 @@ static void Init( intf_thread_t *p_intf )
app
->
installTranslator
(
&
qtTranslator
);
app
->
installTranslator
(
&
qtTranslator
);
#endif //ENABLE_NLS
#endif //ENABLE_NLS
/* Explain to the core how to show a dialog :D */
p_intf
->
pf_show_dialog
=
ShowDialog
;
/* Last settings */
/* Last settings */
app
->
setQuitOnLastWindowClosed
(
false
);
app
->
setQuitOnLastWindowClosed
(
false
);
/*
r
etrieve last known path used in file browsing */
/*
R
etrieve last known path used in file browsing */
char
*
psz_path
=
config_GetPsz
(
p_intf
,
"qt-filedialog-path"
);
char
*
psz_path
=
config_GetPsz
(
p_intf
,
"qt-filedialog-path"
);
p_intf
->
p_sys
->
psz_filepath
=
EMPTY_STR
(
psz_path
)
?
psz_path
p_intf
->
p_sys
->
psz_filepath
=
EMPTY_STR
(
psz_path
)
?
psz_path
:
config_GetHomeDir
();
:
config_GetHomeDir
();
#ifdef UPDATE_CHECK
#ifdef UPDATE_CHECK
/* Checking for VLC updates */
/* Checking for VLC updates */
...
@@ -385,6 +406,14 @@ static void Init( intf_thread_t *p_intf )
...
@@ -385,6 +406,14 @@ static void Init( intf_thread_t *p_intf )
/* And quit */
/* And quit */
if
(
miP
)
{
QMutexLocker
locker
(
&
windowLock
);
val
.
p_address
=
NULL
;
var_Set
(
p_intf
,
"window_widget"
,
val
);
delete
miP
;
}
/* Destroy first the main interface because it is connected to some slots
/* Destroy first the main interface because it is connected to some slots
in the MainInputManager */
in the MainInputManager */
delete
p_intf
->
p_sys
->
p_mi
;
delete
p_intf
->
p_sys
->
p_mi
;
...
@@ -396,8 +425,10 @@ static void Init( intf_thread_t *p_intf )
...
@@ -396,8 +425,10 @@ static void Init( intf_thread_t *p_intf )
/* Destroy the MainInputManager */
/* Destroy the MainInputManager */
MainInputManager
::
killInstance
();
MainInputManager
::
killInstance
();
/* Delete the application */
delete
app
;
delete
app
;
/* Save the path */
config_PutPsz
(
p_intf
,
"qt-filedialog-path"
,
p_intf
->
p_sys
->
psz_filepath
);
config_PutPsz
(
p_intf
,
"qt-filedialog-path"
,
p_intf
->
p_sys
->
psz_filepath
);
free
(
psz_path
);
free
(
psz_path
);
}
}
...
@@ -436,53 +467,65 @@ static int OpenWindow (vlc_object_t *obj)
...
@@ -436,53 +467,65 @@ static int OpenWindow (vlc_object_t *obj)
{
{
vout_window_t
*
wnd
=
(
vout_window_t
*
)
obj
;
vout_window_t
*
wnd
=
(
vout_window_t
*
)
obj
;
/* TODO: should probably be in the libvlc core instead: */
if
(
!
config_GetInt
(
obj
,
"embedded-video"
))
return
VLC_EGENERIC
;
intf_thread_t
*
intf
=
(
intf_thread_t
*
)
intf_thread_t
*
intf
=
(
intf_thread_t
*
)
vlc_object_find_name
(
obj
,
"qt4"
,
FIND_ANYWHERE
);
vlc_object_find_name
(
obj
,
"qt4"
,
FIND_ANYWHERE
);
if
(
intf
==
NULL
)
if
(
intf
==
NULL
)
return
VLC_EGENERIC
;
/* Qt4 not in use */
return
VLC_EGENERIC
;
/* Qt4 not in use */
assert
(
intf
->
i_object_type
==
VLC_OBJECT_INTF
);
assert
(
intf
->
i_object_type
==
VLC_OBJECT_INTF
);
var_Create
(
intf
,
"window_mutex"
,
VLC_VAR_MUTEX
);
var_Create
(
intf
,
"window_widget"
,
VLC_VAR_ADDRESS
);
var_Create
(
intf
,
"window_widget"
,
VLC_VAR_ADDRESS
);
vlc_value_t
lockval
,
ptrval
;
vlc_value_t
ptrval
;
var_Get
(
intf
,
"window_mutex"
,
&
lockval
);
vlc_mutex_lock
((
vlc_mutex_t
*
)
lockval
.
p_address
);
windowLock
.
lock
(
);
msg_Dbg
(
obj
,
"waiting for interface..."
);
msg_Dbg
(
obj
,
"waiting for interface..."
);
do
for
(;;)
{
{
var_Get
(
intf
,
"window_widget"
,
&
ptrval
);
var_Get
(
intf
,
"window_widget"
,
&
ptrval
);
/* FIXME A condition variable would be way more appropriate. */
if
(
ptrval
.
p_address
!=
NULL
)
msleep
(
INTF_IDLE_SLEEP
);
break
;
}
while
(
ptrval
.
p_address
==
NULL
);
windowWait
.
wait
(
&
windowLock
);
}
msg_Dbg
(
obj
,
"requestiong window..."
);
msg_Dbg
(
obj
,
"requesting window..."
);
MainInterface
*
mi
=
(
MainInterface
*
)
ptrval
.
p_address
;
QPointer
<
MainInterface
>
*
miP
=
(
QPointer
<
MainInterface
>
*
)
ptrval
.
p_address
;
miP
=
new
QPointer
<
MainInterface
>
(
*
miP
);
/* create our own copy */
vlc_object_release
(
intf
);
wnd
->
handle
=
mi
->
requestVideo
(
wnd
->
vout
,
&
wnd
->
pos_x
,
&
wnd
->
pos_y
,
if
(
miP
->
isNull
())
&
wnd
->
width
,
&
wnd
->
height
);
return
VLC_EGENERIC
;
vlc_mutex_unlock
((
vlc_mutex_t
*
)
lockval
.
p_address
);
if
(
config_GetInt
(
obj
,
"embedded-video"
)
<=
0
)
{
(
*
miP
)
->
requestNotEmbeddedVideo
(
wnd
->
vout
);
return
VLC_EGENERIC
;
}
wnd
->
handle
=
(
*
miP
)
->
requestVideo
(
wnd
->
vout
,
&
wnd
->
pos_x
,
&
wnd
->
pos_y
,
&
wnd
->
width
,
&
wnd
->
height
);
windowLock
.
unlock
();
wnd
->
control
=
ControlWindow
;
wnd
->
control
=
ControlWindow
;
wnd
->
p_private
=
intf
;
wnd
->
p_private
=
miP
;
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
static
int
ControlWindow
(
vout_window_t
*
wnd
,
int
query
,
va_list
args
)
static
int
ControlWindow
(
vout_window_t
*
wnd
,
int
query
,
va_list
args
)
{
{
intf_thread_t
*
intf
=
(
intf_thread_t
*
)
wnd
->
p_private
;
QPointer
<
MainInterface
>
*
miP
=
(
QPointer
<
MainInterface
>
*
)
wnd
->
p_private
;
intf
->
p_sys
->
p_mi
->
controlVideo
(
wnd
->
handle
,
query
,
args
);
QMutexLocker
locker
(
&
windowLock
);
if
(
miP
->
isNull
())
return
VLC_EGENERIC
;
return
(
*
miP
)
->
controlVideo
(
wnd
->
handle
,
query
,
args
);
}
}
static
void
CloseWindow
(
vlc_object_t
*
obj
)
static
void
CloseWindow
(
vlc_object_t
*
obj
)
{
{
vout_window_t
*
wnd
=
(
vout_window_t
*
)
obj
;
vout_window_t
*
wnd
=
(
vout_window_t
*
)
obj
;
intf_thread_t
*
intf
=
(
intf_thread_t
*
)
obj
->
p_private
;
QPointer
<
MainInterface
>
*
miP
=
(
QPointer
<
MainInterface
>
*
)
wnd
->
p_private
;
QMutexLocker
locker
(
&
windowLock
);
intf
->
p_sys
->
p_mi
->
releaseVideo
(
wnd
->
handle
);
if
(
!
miP
->
isNull
())
vlc_object_release
(
intf
);
(
*
miP
)
->
releaseVideo
(
wnd
->
handle
);
delete
miP
;
}
}
modules/gui/qt4/ui/open_capture.ui
View file @
e2a614c8
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<x>0</x>
<x>0</x>
<y>0</y>
<y>0</y>
<width>358</width>
<width>358</width>
<height>1
63
</height>
<height>1
77
</height>
</rect>
</rect>
</property>
</property>
<layout class="QGridLayout" >
<layout class="QGridLayout" >
...
@@ -52,16 +52,6 @@
...
@@ -52,16 +52,6 @@
</property>
</property>
</widget>
</widget>
</item>
</item>
<item row="4" column="0" >
<widget class="QPushButton" name="advancedButton" >
<property name="toolTip" >
<string>_("Access advanced options to tweak the device")</string>
</property>
<property name="text" >
<string>_("Advanced options...")</string>
</property>
</widget>
</item>
<item row="5" column="0" colspan="4" >
<item row="5" column="0" colspan="4" >
<spacer>
<spacer>
<property name="orientation" >
<property name="orientation" >
...
@@ -70,7 +60,7 @@
...
@@ -70,7 +60,7 @@
<property name="sizeType" >
<property name="sizeType" >
<enum>QSizePolicy::MinimumExpanding</enum>
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
</property>
<property name="sizeHint" >
<property name="sizeHint"
stdset="0"
>
<size>
<size>
<width>20</width>
<width>20</width>
<height>30</height>
<height>30</height>
...
@@ -78,6 +68,16 @@
...
@@ -78,6 +68,16 @@
</property>
</property>
</spacer>
</spacer>
</item>
</item>
<item row="4" column="3" >
<widget class="QPushButton" name="advancedButton" >
<property name="toolTip" >
<string>_("Access advanced options to tweak the device")</string>
</property>
<property name="text" >
<string>_("Advanced options...")</string>
</property>
</widget>
</item>
</layout>
</layout>
</widget>
</widget>
<resources/>
<resources/>
...
...
modules/gui/qt4/ui/open_net.ui
View file @
e2a614c8
...
@@ -79,7 +79,8 @@
...
@@ -79,7 +79,8 @@
<item row="1" column="1" >
<item row="1" column="1" >
<widget class="QLineEdit" name="addressText" >
<widget class="QLineEdit" name="addressText" >
<property name="toolTip" >
<property name="toolTip" >
<string>_("Enter the URL of the network stream here,\nwith or without the protocol.")</string>
<string>_("Enter the URL of the network stream here,
with or without the protocol.")</string>
</property>
</property>
</widget>
</widget>
</item>
</item>
...
...
modules/video_filter/rss.c
View file @
e2a614c8
...
@@ -291,7 +291,7 @@ static int CreateFilter( vlc_object_t *p_this )
...
@@ -291,7 +291,7 @@ static int CreateFilter( vlc_object_t *p_this )
if
(
p_sys
->
b_images
==
true
&&
p_sys
->
p_style
->
i_font_size
==
-
1
)
if
(
p_sys
->
b_images
==
true
&&
p_sys
->
p_style
->
i_font_size
==
-
1
)
{
{
msg_Warn
(
p_filter
,
"r
r
s-size wasn't specified. Feed images will thus be displayed without being resized"
);
msg_Warn
(
p_filter
,
"r
s
s-size wasn't specified. Feed images will thus be displayed without being resized"
);
}
}
if
(
FetchRSS
(
p_filter
)
)
if
(
FetchRSS
(
p_filter
)
)
...
...
src/input/stream.c
View file @
e2a614c8
...
@@ -535,7 +535,6 @@ static void UStreamDestroy( stream_t *s )
...
@@ -535,7 +535,6 @@ static void UStreamDestroy( stream_t *s )
{
{
access_t
*
p_access
=
(
access_t
*
)
s
->
p_parent
;
access_t
*
p_access
=
(
access_t
*
)
s
->
p_parent
;
AStreamDestroy
(
s
);
AStreamDestroy
(
s
);
vlc_object_release
(
p_access
);
access_Delete
(
p_access
);
access_Delete
(
p_access
);
}
}
...
...
src/libvlc-module.c
View file @
e2a614c8
...
@@ -1477,13 +1477,8 @@ vlc_module_begin();
...
@@ -1477,13 +1477,8 @@ vlc_module_begin();
add_bool
(
"fullscreen"
,
0
,
NULL
,
FULLSCREEN_TEXT
,
add_bool
(
"fullscreen"
,
0
,
NULL
,
FULLSCREEN_TEXT
,
FULLSCREEN_LONGTEXT
,
false
);
FULLSCREEN_LONGTEXT
,
false
);
change_short
(
'f'
);
change_short
(
'f'
);
#ifndef __APPLE__
add_bool
(
"embedded-video"
,
1
,
NULL
,
EMBEDDED_TEXT
,
EMBEDDED_LONGTEXT
,
add_bool
(
"embedded-video"
,
false
,
NULL
,
EMBEDDED_TEXT
,
EMBEDDED_LONGTEXT
,
true
);
#else
add_bool
(
"embedded-video"
,
true
,
NULL
,
EMBEDDED_TEXT
,
EMBEDDED_LONGTEXT
,
true
);
true
);
#endif
#ifdef __APPLE__
#ifdef __APPLE__
add_deprecated_alias
(
"macosx-embedded"
);
/*deprecated since 0.9.0 */
add_deprecated_alias
(
"macosx-embedded"
);
/*deprecated since 0.9.0 */
#endif
#endif
...
...
src/misc/update.c
View file @
e2a614c8
...
@@ -1049,6 +1049,9 @@ update_t *__update_New( vlc_object_t *p_this )
...
@@ -1049,6 +1049,9 @@ update_t *__update_New( vlc_object_t *p_this )
p_update
->
release
.
psz_url
=
NULL
;
p_update
->
release
.
psz_url
=
NULL
;
p_update
->
release
.
psz_desc
=
NULL
;
p_update
->
release
.
psz_desc
=
NULL
;
p_update
->
p_download
=
NULL
;
p_update
->
p_check
=
NULL
;
p_update
->
p_pkey
=
NULL
;
p_update
->
p_pkey
=
NULL
;
vlc_gcrypt_init
();
vlc_gcrypt_init
();
...
@@ -1065,6 +1068,21 @@ void update_Delete( update_t *p_update )
...
@@ -1065,6 +1068,21 @@ void update_Delete( update_t *p_update )
{
{
assert
(
p_update
);
assert
(
p_update
);
vlc_mutex_lock
(
&
p_update
->
lock
);
if
(
p_update
->
p_check
)
{
assert
(
!
p_update
->
p_download
);
vlc_object_kill
(
p_update
->
p_check
);
vlc_thread_join
(
p_update
->
p_check
);
}
else
if
(
p_update
->
p_download
)
{
vlc_object_kill
(
p_update
->
p_download
);
vlc_thread_join
(
p_update
->
p_download
);
}
vlc_mutex_unlock
(
&
p_update
->
lock
);
vlc_mutex_destroy
(
&
p_update
->
lock
);
vlc_mutex_destroy
(
&
p_update
->
lock
);
free
(
p_update
->
release
.
psz_url
);
free
(
p_update
->
release
.
psz_url
);
...
@@ -1336,19 +1354,7 @@ error:
...
@@ -1336,19 +1354,7 @@ error:
return
false
;
return
false
;
}
}
static
void
update_CheckReal
(
update_check_thread_t
*
p_uct
);
/**
* Struct to launch the check in an other thread
*/
typedef
struct
{
VLC_COMMON_MEMBERS
update_t
*
p_update
;
void
(
*
pf_callback
)(
void
*
,
bool
);
void
*
p_data
;
}
update_check_thread_t
;
void
update_CheckReal
(
update_check_thread_t
*
p_uct
);
/**
/**
* Check for updates
* Check for updates
...
@@ -1367,6 +1373,7 @@ void update_Check( update_t *p_update, void (*pf_callback)( void*, bool ), void
...
@@ -1367,6 +1373,7 @@ void update_Check( update_t *p_update, void (*pf_callback)( void*, bool ), void
if
(
!
p_uct
)
return
;
if
(
!
p_uct
)
return
;
p_uct
->
p_update
=
p_update
;
p_uct
->
p_update
=
p_update
;
p_update
->
p_check
=
p_uct
;
p_uct
->
pf_callback
=
pf_callback
;
p_uct
->
pf_callback
=
pf_callback
;
p_uct
->
p_data
=
p_data
;
p_uct
->
p_data
=
p_data
;
...
@@ -1385,6 +1392,10 @@ void update_CheckReal( update_check_thread_t *p_uct )
...
@@ -1385,6 +1392,10 @@ void update_CheckReal( update_check_thread_t *p_uct )
if
(
p_uct
->
pf_callback
)
if
(
p_uct
->
pf_callback
)
(
p_uct
->
pf_callback
)(
p_uct
->
p_data
,
b_ret
);
(
p_uct
->
pf_callback
)(
p_uct
->
p_data
,
b_ret
);
p_uct
->
p_update
->
p_check
=
NULL
;
vlc_object_release
(
p_uct
);
}
}
/**
/**
...
@@ -1425,18 +1436,7 @@ static char *size_str( long int l_size )
...
@@ -1425,18 +1436,7 @@ static char *size_str( long int l_size )
return
i_retval
==
-
1
?
NULL
:
psz_tmp
;
return
i_retval
==
-
1
?
NULL
:
psz_tmp
;
}
}
static
void
update_DownloadReal
(
update_download_thread_t
*
p_udt
);
/**
* Struct to launch the download in a thread
*/
typedef
struct
{
VLC_COMMON_MEMBERS
update_t
*
p_update
;
char
*
psz_destdir
;
}
update_download_thread_t
;
void
update_DownloadReal
(
update_download_thread_t
*
p_udt
);
/**
/**
* Download the file given in the update_t
* Download the file given in the update_t
...
@@ -1455,13 +1455,14 @@ void update_Download( update_t *p_update, const char *psz_destdir )
...
@@ -1455,13 +1455,14 @@ void update_Download( update_t *p_update, const char *psz_destdir )
return
;
return
;
p_udt
->
p_update
=
p_update
;
p_udt
->
p_update
=
p_update
;
p_update
->
p_download
=
p_udt
;
p_udt
->
psz_destdir
=
psz_destdir
?
strdup
(
psz_destdir
)
:
NULL
;
p_udt
->
psz_destdir
=
psz_destdir
?
strdup
(
psz_destdir
)
:
NULL
;
vlc_thread_create
(
p_udt
,
"download update"
,
update_DownloadReal
,
vlc_thread_create
(
p_udt
,
"download update"
,
update_DownloadReal
,
VLC_THREAD_PRIORITY_LOW
,
false
);
VLC_THREAD_PRIORITY_LOW
,
false
);
}
}
void
update_DownloadReal
(
update_download_thread_t
*
p_udt
)
static
void
update_DownloadReal
(
update_download_thread_t
*
p_udt
)
{
{
int
i_progress
=
0
;
int
i_progress
=
0
;
long
int
l_size
;
long
int
l_size
;
...
@@ -1523,9 +1524,12 @@ void update_DownloadReal( update_download_thread_t *p_udt )
...
@@ -1523,9 +1524,12 @@ void update_DownloadReal( update_download_thread_t *p_udt )
free
(
psz_status
);
free
(
psz_status
);
}
}
while
(
(
i_read
=
stream_Read
(
p_stream
,
p_buffer
,
1
<<
10
)
)
&&
vlc_object_lock
(
p_udt
);
!
intf_ProgressIsCancelled
(
p_udt
,
i_progress
)
)
while
(
vlc_object_alive
(
p_udt
)
&&
(
i_read
=
stream_Read
(
p_stream
,
p_buffer
,
1
<<
10
)
)
&&
!
intf_ProgressIsCancelled
(
p_udt
,
i_progress
)
)
{
{
vlc_object_unlock
(
p_udt
);
if
(
fwrite
(
p_buffer
,
i_read
,
1
,
p_file
)
<
1
)
if
(
fwrite
(
p_buffer
,
i_read
,
1
,
p_file
)
<
1
)
{
{
msg_Err
(
p_udt
,
"Failed to write into %s"
,
psz_destfile
);
msg_Err
(
p_udt
,
"Failed to write into %s"
,
psz_destfile
);
...
@@ -1544,14 +1548,17 @@ void update_DownloadReal( update_download_thread_t *p_udt )
...
@@ -1544,14 +1548,17 @@ void update_DownloadReal( update_download_thread_t *p_udt )
free
(
psz_status
);
free
(
psz_status
);
}
}
free
(
psz_downloaded
);
free
(
psz_downloaded
);
vlc_object_lock
(
p_udt
);
}
}
/* Finish the progress bar or delete the file if the user had canceled */
/* Finish the progress bar or delete the file if the user had canceled */
fclose
(
p_file
);
fclose
(
p_file
);
p_file
=
NULL
;
p_file
=
NULL
;
if
(
!
intf_ProgressIsCancelled
(
p_udt
,
i_progress
)
)
if
(
vlc_object_alive
(
p_udt
)
&&
!
intf_ProgressIsCancelled
(
p_udt
,
i_progress
)
)
{
{
vlc_object_unlock
(
p_udt
);
if
(
asprintf
(
&
psz_status
,
"%s
\n
Done %s (100.0%%)"
,
if
(
asprintf
(
&
psz_status
,
"%s
\n
Done %s (100.0%%)"
,
p_update
->
release
.
psz_url
,
psz_size
)
!=
-
1
)
p_update
->
release
.
psz_url
,
psz_size
)
!=
-
1
)
{
{
...
@@ -1561,6 +1568,7 @@ void update_DownloadReal( update_download_thread_t *p_udt )
...
@@ -1561,6 +1568,7 @@ void update_DownloadReal( update_download_thread_t *p_udt )
}
}
else
else
{
{
vlc_object_unlock
(
p_udt
);
utf8_unlink
(
psz_destfile
);
utf8_unlink
(
psz_destfile
);
goto
end
;
goto
end
;
}
}
...
@@ -1652,6 +1660,10 @@ end:
...
@@ -1652,6 +1660,10 @@ end:
free
(
psz_destfile
);
free
(
psz_destfile
);
free
(
p_buffer
);
free
(
p_buffer
);
free
(
psz_size
);
free
(
psz_size
);
p_udt
->
p_update
->
p_download
=
NULL
;
vlc_object_release
(
p_udt
);
}
}
update_release_t
*
update_GetRelease
(
update_t
*
p_update
)
update_release_t
*
update_GetRelease
(
update_t
*
p_update
)
...
...
src/misc/update.h
View file @
e2a614c8
...
@@ -142,6 +142,26 @@ struct public_key_t
...
@@ -142,6 +142,26 @@ struct public_key_t
typedef
struct
public_key_t
public_key_t
;
typedef
struct
public_key_t
public_key_t
;
/**
* Non blocking binary download
*/
typedef
struct
{
VLC_COMMON_MEMBERS
update_t
*
p_update
;
char
*
psz_destdir
;
}
update_download_thread_t
;
/**
* Non blocking update availability verification
*/
typedef
struct
{
VLC_COMMON_MEMBERS
update_t
*
p_update
;
void
(
*
pf_callback
)(
void
*
,
bool
);
void
*
p_data
;
}
update_check_thread_t
;
/**
/**
* The update object. Stores (and caches) all information relative to updates
* The update object. Stores (and caches) all information relative to updates
*/
*/
...
@@ -151,5 +171,7 @@ struct update_t
...
@@ -151,5 +171,7 @@ struct update_t
vlc_mutex_t
lock
;
vlc_mutex_t
lock
;
struct
update_release_t
release
;
///< Release (version)
struct
update_release_t
release
;
///< Release (version)
public_key_t
*
p_pkey
;
public_key_t
*
p_pkey
;
update_download_thread_t
*
p_download
;
update_check_thread_t
*
p_check
;
};
};
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