Commit e2a614c8 authored by Ilkka Ollakka's avatar Ilkka Ollakka

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

parents 51f898a0 c617646c
......@@ -5,6 +5,7 @@ Changes between 0.8.6 and 0.9.0-git (not released yet):
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.
If you want to make it available from other machines, you will have to
edit the ".hosts" file.
......@@ -15,9 +16,9 @@ Important notes:
C:\Program Files\VideoLAN\VLC\http\old\.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
* This version of VLC contains a new interface for Windows and Linux. This
interface lacks the "Streaming Wizard" that used to be present in VLC 0.8.6.
It will be replaced by a better alternative in the next version.
* This version of VLC contains a new interface for Windows and Linux.
This interface has a fullscreen controller. This interface lacks the
"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.
* 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
......@@ -37,10 +38,11 @@ Important notes:
udp:@239.255.12.12 -> udp://@239.255.12.12
* 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.
* The web plugins ActiveX (IE)/Firefox/Mozilla/Safari now recognize the following
states: IDLE/CLOSE=0, OPENING=1, BUFFERING=2, PLAYING=3, PAUSED=4, STOPPING=5,
FORWARD=6, BACKWARD=7, ENDED=8, ERROR=9. With FORWARD and BACKWARD being
reserved for future implementations and are thus not functional atm.
* The web plugins ActiveX (IE)/Firefox/Mozilla/Safari now recognize the
following states: IDLE/CLOSE=0, OPENING=1, BUFFERING=2, PLAYING=3, PAUSED=4,
STOPPING=5, FORWARD=6, BACKWARD=7, ENDED=8, ERROR=9. With FORWARD and
BACKWARD being reserved for future implementations and are thus not
functional atm.
* Croping and padding in transcode are now done using the croppadd video
filter. For example:
transcode{vcodec=mp2v,vfilter=croppadd{cropttop=20,cropbottom=30,paddleft=100}}
......@@ -56,7 +58,7 @@ Security updates:
Playlist:
* Vastly improved playlist support:
* Media library support
* Media library creation to save all your playlist items
* "Live search"
* Shoutcast TV listings
* Audioscrobbler/Last.FM support
......@@ -77,12 +79,12 @@ Inputs:
* Re-written Screen access module for Mac OS X
using OpenGL instead of QuickDraw
* 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
(available as a separate download).
* RTMP input support
* QTKit-based Input module for Mac OS X allowing display and streaming of video
taken from all QuickTime-compatible video devices (no audio yet)
taken from all iSight-labelled video cameras (no audio support)
* HTTP access now supports gzip compressed data and Digest Access
Authentication.
* New options to reduce latency between arrival of raw data and display of
......@@ -102,6 +104,7 @@ Demuxers:
* TiVo Series 2 support
* CD+G karaoke Files support
* MXF files support
* OMA support
Decoders:
* VP60/VP61/VP6F/VP62 support
......@@ -113,15 +116,15 @@ Decoders:
* Fluidsynth MIDI software synthesis (with external sound fonts)
* New codec FOURCCs to support more specific files:
Avid, FCP, Sony, Samsung, ...
* Closed Caption Decoder (DVD, ReplayTV, TiVo, DVB/ATSC)
* H.264 PAFF support
* DNxHD / VC-3 support
* NellyMoser ASAO support
* APE (Monkey audio) support
* VBI & EBU (Teletext) support
* RealVideo support (with the RealVideo run-time)
Subtitles:
* Closed Caption Decoder (DVD, ReplayTV, TiVo, DVB/ATSC)
* VBI & EBU (Teletext) support (*nix, Mac OS)
* Ogg/Kate subtitles support
* AQTitle subtitles support
* MKV USF subtitles support
......@@ -141,7 +144,7 @@ Encoders:
* Improved H.264 encoding speed
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
Psychedelic) video filters can now be streamed
* New puzzle video output filter
......@@ -180,8 +183,6 @@ Stream output:
* RTMP output
Interfaces:
* Windows/Linux
* Brand new interface for Linux and Windows, based on the Qt toolkit
* All
* New Simple Preferences dialogs showing the most important settings in an
end-user suitable way.
......@@ -189,12 +190,16 @@ Interfaces:
* Improved mouse gestures
* Vastly improved Update checker
* 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
* Improved video output features
* Online access to VideoLAN's Help Wiki within VLC
* New setting to disable the "Recent Items" service
* When playing Radio (live) streams, the current track is shown correctly
* Correct appearance on Macs using Aqua's graphite theme
* Simplified Extended Controls panel
* Ncurses:
* Correctly displays wide characters when using an UTF-8 locale,
if libncursesw is available.
......@@ -216,12 +221,12 @@ Linux Port:
(which means that VLC doesn't use the $HOME/.vlc directory anymore)
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)
* New text renderer based on Quartz replacing the existing Freetype solution
* Complete compatibility with Mac OS X 10.5 Leopard
* 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:
* Event management and various improvements in libvlc
......
......@@ -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
Loox Thefuture <loox.thefuture at gmail dot com> - Media key in X11 vout
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
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
......
......@@ -5589,16 +5589,6 @@ then
VLC_ADD_PLUGIN([test4])
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 gtk_main plugin
dnl
......
......@@ -5,7 +5,7 @@ all: .iconv .intl .freetype .fribidi .zlib \
.live .goom2k4 .caca .mod .x264 .xml .twolame \
.png .gpg-error .gcrypt .opencdk .gnutls .mpcdec \
.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 \
.aclocal
# .daap .cddb .cdio .vcdimager
......@@ -2311,25 +2311,6 @@ DISTCLEAN_PKG += yasm-$(YASM_VERSION).tar.bz2
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
# ***************************************************************************
......
......@@ -208,8 +208,6 @@ EXPAT_VERSION=2.0.0
EXPAT_URL=$(SF)/expat/expat-$(EXPAT_VERSION).tar.gz
PTHREADS_VERSION=2-8-0
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_URL=$(SF)/zapping/zvbi-$(ZVBI_VERSION).tar.bz2
TAGLIB_VERSION=1.5
......
......@@ -637,13 +637,6 @@ Function .onInit
done:
!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
;; End function
......
......@@ -177,7 +177,8 @@ typedef enum vlc_dialog {
#define INTF_ABOUT_MSG LICENSE_MSG
#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;" \
"*.m4v;*.mkv;*.mov;*.mp2;*.mp4;*.mpeg;*.mpeg1;" \
......
File mode changed from 100755 to 100644
......@@ -65,6 +65,7 @@ VideoWidget::VideoWidget( intf_thread_t *_p_i ) : QFrame( NULL ), p_intf( _p_i )
hide(); setMinimumSize( 16, 16 );
videoSize.rwidth() = -1;
videoSize.rheight() = -1;
setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
/* Black background is more coherent for a Video Widget IMVHO */
QPalette plt = palette();
......@@ -74,10 +75,17 @@ VideoWidget::VideoWidget( intf_thread_t *_p_i ) : QFrame( NULL ), p_intf( _p_i )
setAttribute( Qt::WA_PaintOnScreen, true );
/* 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)
......@@ -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 )
{
msg_Dbg( p_intf, "Video was requested %i, %i", *pi_x, *pi_y );
emit askVideoWidgetToShow();
emit askVideoWidgetToShow( *pi_width, *pi_height );
if( p_vout )
{
msg_Dbg( p_intf, "embedded video already in use" );
......@@ -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 );
videoSize.rwidth() = w;
videoSize.rheight() = h;
if( isHidden() ) show();
updateGeometry(); // Needed for deinterlace
}
......@@ -461,7 +470,7 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
BUTTON_SET_IMG( prevSectionButton, "", previous.png, "" );
BUTTON_SET_IMG( nextSectionButton, "", next.png, "" );
BUTTON_SET_IMG( menuButton, "", previous.png, "" );
BUTTON_SET_IMG( menuButton, "", previous.png, qtr( "Menu" ) );
discFrame->hide();
......@@ -721,11 +730,8 @@ void ControlsWidget::next()
void ControlsWidget::setNavigation( int navigation )
{
#define HELP_MENU N_( "Menu" )
#define HELP_PCH N_( "Previous 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
if( navigation == 0 )
......@@ -872,7 +878,7 @@ FullscreenControllerWidget::FullscreenControllerWidget( intf_thread_t *_p_i,
MainInterface *_p_mi, bool b_advControls, bool b_shiny )
: ControlsWidget( _p_i, _p_mi, b_advControls, b_shiny, true ),
i_lastPosX( -1 ), i_lastPosY( -1 ), i_hideTimeout( 1 ),
b_mouseIsOver( false )
b_mouseIsOver( false ), b_isFullscreen( false )
{
setWindowFlags( Qt::ToolTip );
......@@ -970,7 +976,11 @@ void FullscreenControllerWidget::slowHideFSC()
}
else
{
#ifdef WIN32TRICK
if ( windowOpacity() > 0.0 && !fscHidden )
#else
if ( windowOpacity() > 0.0 )
#endif
{
/* we should use 0.01 because of 100 pieces ^^^
but than it cannt be done in time */
......@@ -1007,7 +1017,7 @@ void FullscreenControllerWidget::customEvent( QEvent *event )
{
int type = event->type();
if ( type == FullscreenControlShow_Type )
if ( type == FullscreenControlShow_Type && b_isFullscreen )
{
#ifdef WIN32TRICK
// 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,
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",
showFullscreenControllCallback, (void *) p_fs );
b_registered = true;
......@@ -1152,14 +1163,13 @@ static int regMouseMoveCallback( vlc_object_t *vlc_object, const char *variable,
if ( !var_GetBool( p_vout, "fullscreen" ) && b_registered )
{
p_fs->setIsFullscreen( false );
p_fs->hide();
var_DelCallback( p_vout, "mouse-moved",
showFullscreenControllCallback, (void *) p_fs );
b_registered = false;
}
if ( !var_GetBool( p_vout, "fullscreen" ) )
p_fs->hide();
return VLC_SUCCESS;
}
......
......@@ -91,8 +91,7 @@ private:
QSize videoSize;
signals:
void askVideoWidgetToShow();
//void askResize();
void askVideoWidgetToShow( unsigned int, unsigned int );
public slots:
void SetSizing( unsigned int, unsigned int );
......@@ -251,7 +250,8 @@ public:
FullscreenControllerWidget( intf_thread_t *, MainInterface*, bool, bool );
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 );
bool isFSCHidden();
......@@ -284,6 +284,7 @@ private:
int i_lastPosY;
int i_hideTimeout; /* FSC hiding timeout, same as mouse hiding timeout */
bool b_mouseIsOver;
bool b_isFullscreen;
#ifdef WIN32TRICK
bool fscHidden;
......
......@@ -410,13 +410,14 @@ NetOpenPanel::NetOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
ui.setupUi( this );
/* CONNECTs */
CONNECT( ui.protocolCombo, currentIndexChanged( int ),
CONNECT( ui.protocolCombo, activated( int ),
this, updateProtocol( int ) );
CONNECT( ui.portSpin, valueChanged( int ), this, updateMRL() );
CONNECT( ui.addressText, textChanged( QString ), this, updateMRL());
CONNECT( ui.timeShift, clicked(), this, updateMRL());
CONNECT( ui.ipv6, clicked(), this, updateMRL());
ui.protocolCombo->addItem( "" );
ui.protocolCombo->addItem("HTTP", QVariant("http"));
ui.protocolCombo->addItem("HTTPS", QVariant("https"));
ui.protocolCombo->addItem("FTP", QVariant("ftp"));
......@@ -424,6 +425,7 @@ NetOpenPanel::NetOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
ui.protocolCombo->addItem("RTSP", QVariant("rtsp"));
ui.protocolCombo->addItem("UDP/RTP (unicast)", QVariant("udp"));
ui.protocolCombo->addItem("UDP/RTP (multicast)", QVariant("udp"));
ui.protocolCombo->addItem("RTMP", QVariant("rtmp"));
}
NetOpenPanel::~NetOpenPanel()
......@@ -433,19 +435,26 @@ void NetOpenPanel::clear()
{}
/* 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 proto = ui.protocolCombo->itemData( idx ).toString();
QString proto = ui.protocolCombo->itemData( idx_proto ).toString();
ui.timeShift->setEnabled( idx >= 5 );
ui.ipv6->setEnabled( idx == 5 );
ui.addressText->setEnabled( idx != 5 );
ui.portSpin->setEnabled( idx >= 5 );
ui.timeShift->setEnabled( idx_proto == UDP_PROTO ||
idx_proto == UDPM_PROTO );
ui.ipv6->setEnabled( idx_proto == UDP_PROTO );
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( addr.contains( "://")) {
msg_Err( p_intf, "replace");
addr.replace( QRegExp("^.*://"), proto + "://");
if( addr.contains( "://"))
{
if( idx_proto != UDPM_PROTO )
addr.replace( QRegExp("^.*://@*"), proto + "://");
else
addr.replace( QRegExp("^.*://"), proto + "://@");
ui.addressText->setText( addr );
}
updateMRL();
......@@ -455,36 +464,41 @@ void NetOpenPanel::updateMRL() {
QString mrl = "";
QString addr = ui.addressText->text();
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( "://"))
{
/* 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
{
switch( proto ) {
case 0:
switch( idx_proto ) {
case HTTP_PROTO:
mrl = "http://" + addr;
emit methodChanged("http-caching");
break;
case 1:
case HTTPS_PROTO:
mrl = "https://" + addr;
emit methodChanged("http-caching");
break;
case 3:
case MMS_PROTO:
mrl = "mms://" + addr;
emit methodChanged("mms-caching");
break;
case 2:
case FTP_PROTO:
mrl = "ftp://" + addr;
emit methodChanged("ftp-caching");
break;
case 4: /* RTSP */
case RTSP_PROTO:
mrl = "rtsp://" + addr;
emit methodChanged("rtsp-caching");
break;
case 5:
case UDP_PROTO:
mrl = "udp://@";
if( ui.ipv6->isEnabled() && ui.ipv6->isChecked() )
{
......@@ -493,7 +507,7 @@ void NetOpenPanel::updateMRL() {
mrl += QString(":%1").arg( ui.portSpin->value() );
emit methodChanged("udp-caching");
break;
case 6: /* UDP multicast */
case UDPM_PROTO: /* UDP multicast */
mrl = "udp://@";
/* Add [] to IPv6 */
if ( addr.contains(':') && !addr.contains('[') )
......@@ -503,6 +517,11 @@ void NetOpenPanel::updateMRL() {
else mrl += addr;
mrl += QString(":%1").arg( ui.portSpin->value() );
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 ) :
screenDevLayout->addWidget( screenLabel, 0, 0 );
/* General connects */
connect( ui.deviceCombo, SIGNAL( activated( int ) ),
stackedDevLayout, SLOT( setCurrentIndex( int ) ) );
connect( ui.deviceCombo, SIGNAL( activated( int ) ),
stackedPropLayout, SLOT( setCurrentIndex( int ) ) );
CONNECT( ui.deviceCombo, activated( int ) ,
stackedDevLayout, setCurrentIndex( int ) );
CONNECT( ui.deviceCombo, activated( int ),
stackedPropLayout, setCurrentIndex( int ) );
CONNECT( ui.deviceCombo, activated( int ), this, updateMRL() );
CONNECT( ui.deviceCombo, activated( int ), this, updateButtons() );
......@@ -1114,7 +1133,7 @@ void CaptureOpenPanel::advancedDialog()
advButtonBox->addButton( closeButton, QDialogButtonBox::AcceptRole );
advButtonBox->addButton( cancelButton, QDialogButtonBox::RejectRole );
gLayout->addWidget( advButtonBox, i_confsize + 1, 0, 1, -1 );
mainLayout->addWidget( advButtonBox );
/* Creation of the MRL */
if( adv->exec() )
......
......@@ -48,6 +48,20 @@
#define setSpinBoxFreq( spinbox ){ spinbox->setRange ( 0, INT_MAX ); \
spinbox->setAccelerated( true ); }
enum
{
NO_PROTO,
HTTP_PROTO,
HTTPS_PROTO,
MMS_PROTO,
FTP_PROTO,
RTSP_PROTO,
UDP_PROTO,
UDPM_PROTO,
RTMP_PROTO
};
enum
{
V4L_DEVICE,
......
......@@ -292,6 +292,9 @@ void UpdateDialog::updateNotify( bool b_result )
updateButton->setText( "Download" );
updateLabel->setText( qtr( "There is a new version of VLC :\n" )
+ qfu( p_release->psz_desc ) );
/* Force the dialog to be shown */
this->show();
}
else
updateLabel->setText( qtr( "You have the latest version of VLC" ) );
......
......@@ -436,12 +436,7 @@ void MainInterface::handleMainUi( QSettings *settings )
if( videoEmbeddedFlag )
{
videoWidget = new VideoWidget( p_intf );
mainLayout->insertWidget( 0, videoWidget );
var_Create( p_intf, "window_widget", VLC_VAR_ADDRESS );
vlc_value_t val;
val.p_address = this;
var_Set( p_intf, "window_widget", val );
mainLayout->insertWidget( 0, videoWidget, 10 );
}
/* Finish the sizing */
......@@ -659,8 +654,6 @@ private:
* 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
**/
/* 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,
int *pi_y, unsigned int *pi_width,
unsigned int *pi_height )
......@@ -692,7 +685,7 @@ void *MainInterface::requestVideo( vout_thread_t *p_nvout, int *pi_x,
#endif
videoIsActive = true;
emit askVideoToResize( *pi_width, *pi_height );
// emit askVideoToResize( *pi_width, *pi_height );
emit askUpdate();
fullscreenControls->regFullscreenCallback( p_nvout );
......@@ -700,8 +693,6 @@ void *MainInterface::requestVideo( vout_thread_t *p_nvout, int *pi_x,
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 )
{
fullscreenControls->regFullscreenCallback( p_nvout );
......
......@@ -29,6 +29,10 @@
#include <QLocale>
#include <QTranslator>
#include <QDate>
#include <QMutex>
#include <QMutexLocker>
#include <QWaitCondition>
#include <QPointer>
#include "qt4.hpp"
#include "dialogs_provider.hpp"
......@@ -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_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 " \
"X11 with composite extensions." )
......@@ -228,6 +232,7 @@ static int Open( vlc_object_t *p_this )
XCloseDisplay( p_display );
#endif
/* Allocations */
p_intf->p_sys = (intf_sys_t *)malloc( sizeof( intf_sys_t ) );
if( !p_intf->p_sys )
return VLC_ENOMEM;
......@@ -235,9 +240,12 @@ static int Open( vlc_object_t *p_this )
p_intf->pf_run = Run;
/* Access to the playlist */
p_intf->p_sys->p_playlist = pl_Yield( p_intf );
/* Listen to the messages */
p_intf->p_sys->p_sub = msg_Subscribe( p_intf );
var_Create( p_this, "window_widget", VLC_VAR_ADDRESS );
return VLC_SUCCESS;
}
......@@ -288,8 +296,12 @@ static void Run( intf_thread_t *p_intf )
Init( p_intf );
}
static QMutex windowLock;
static QWaitCondition windowWait;
static void Init( intf_thread_t *p_intf )
{
vlc_value_t val;
char dummy[] = "";
char *argv[] = { dummy };
int argc = 1;
......@@ -309,23 +321,33 @@ static void Init( intf_thread_t *p_intf )
/* Start the QApplication here */
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 )
app->setWindowIcon( QIcon( QPixmap(vlc_christmas_xpm) ) );
else
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 );
// Create the normal interface
QPointer<MainInterface> *miP = NULL;
/* Create the normal interface in non-DP mode */
if( !p_intf->pf_show_dialog )
{
MainInterface *p_mi = new MainInterface( p_intf );
p_intf->p_sys->p_mi = p_mi;
p_intf->p_sys->p_mi = new MainInterface( p_intf );
/* We don't show it because it is done in the MainInterface constructor
p_mi->show(); */
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
{
......@@ -333,6 +355,8 @@ static void Init( intf_thread_t *p_intf )
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
// Translation - get locale
......@@ -353,13 +377,10 @@ static void Init( intf_thread_t *p_intf )
app->installTranslator( &qtTranslator );
#endif //ENABLE_NLS
/* Explain to the core how to show a dialog :D */
p_intf->pf_show_dialog = ShowDialog;
/* Last settings */
app->setQuitOnLastWindowClosed( false );
/* retrieve last known path used in file browsing */
/* Retrieve last known path used in file browsing */
char *psz_path = config_GetPsz( p_intf, "qt-filedialog-path" );
p_intf->p_sys->psz_filepath = EMPTY_STR( psz_path ) ? psz_path
: config_GetHomeDir();
......@@ -385,6 +406,14 @@ static void Init( intf_thread_t *p_intf )
/* 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
in the MainInputManager */
delete p_intf->p_sys->p_mi;
......@@ -396,8 +425,10 @@ static void Init( intf_thread_t *p_intf )
/* Destroy the MainInputManager */
MainInputManager::killInstance();
/* Delete the application */
delete app;
/* Save the path */
config_PutPsz( p_intf, "qt-filedialog-path", p_intf->p_sys->psz_filepath );
free( psz_path );
}
......@@ -436,53 +467,65 @@ static int OpenWindow (vlc_object_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 *)
vlc_object_find_name (obj, "qt4", FIND_ANYWHERE);
if (intf == NULL)
return VLC_EGENERIC; /* Qt4 not in use */
assert (intf->i_object_type == VLC_OBJECT_INTF);
var_Create (intf, "window_mutex", VLC_VAR_MUTEX);
var_Create (intf, "window_widget", VLC_VAR_ADDRESS);
vlc_value_t lockval, ptrval;
var_Get (intf, "window_mutex", &lockval);
vlc_value_t ptrval;
vlc_mutex_lock ((vlc_mutex_t *)lockval.p_address);
windowLock.lock ();
msg_Dbg (obj, "waiting for interface...");
do
for (;;)
{
var_Get (intf, "window_widget", &ptrval);
/* FIXME A condition variable would be way more appropriate. */
msleep (INTF_IDLE_SLEEP);
} while (ptrval.p_address == NULL);
if (ptrval.p_address != NULL)
break;
windowWait.wait (&windowLock);
}
msg_Dbg (obj, "requestiong window...");
MainInterface *mi = (MainInterface *)ptrval.p_address;
msg_Dbg (obj, "requesting window...");
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 ())
return VLC_EGENERIC;
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);
vlc_mutex_unlock ((vlc_mutex_t *)lockval.p_address);
windowLock.unlock ();
wnd->control = ControlWindow;
wnd->p_private = intf;
wnd->p_private = miP;
return VLC_SUCCESS;
}
static int ControlWindow (vout_window_t *wnd, int query, va_list args)
{
intf_thread_t *intf = (intf_thread_t *)wnd->p_private;
intf->p_sys->p_mi->controlVideo (wnd->handle, query, args);
QPointer<MainInterface> *miP = (QPointer<MainInterface> *)wnd->p_private;
QMutexLocker locker (&windowLock);
if (miP->isNull ())
return VLC_EGENERIC;
return (*miP)->controlVideo (wnd->handle, query, args);
}
static void CloseWindow (vlc_object_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);
vlc_object_release (intf);
if (!miP->isNull ())
(*miP)->releaseVideo (wnd->handle);
delete miP;
}
......@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>358</width>
<height>163</height>
<height>177</height>
</rect>
</property>
<layout class="QGridLayout" >
......@@ -52,16 +52,6 @@
</property>
</widget>
</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" >
<spacer>
<property name="orientation" >
......@@ -70,7 +60,7 @@
<property name="sizeType" >
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>30</height>
......@@ -78,6 +68,16 @@
</property>
</spacer>
</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>
</widget>
<resources/>
......
......@@ -79,7 +79,8 @@
<item row="1" column="1" >
<widget class="QLineEdit" name="addressText" >
<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>
</widget>
</item>
......
......@@ -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 )
{
msg_Warn( p_filter, "rrs-size wasn't specified. Feed images will thus be displayed without being resized" );
msg_Warn( p_filter, "rss-size wasn't specified. Feed images will thus be displayed without being resized" );
}
if( FetchRSS( p_filter ) )
......
......@@ -535,7 +535,6 @@ static void UStreamDestroy( stream_t *s )
{
access_t *p_access = (access_t *)s->p_parent;
AStreamDestroy( s );
vlc_object_release( p_access );
access_Delete( p_access );
}
......
......@@ -1477,13 +1477,8 @@ vlc_module_begin();
add_bool( "fullscreen", 0, NULL, FULLSCREEN_TEXT,
FULLSCREEN_LONGTEXT, false );
change_short('f');
#ifndef __APPLE__
add_bool( "embedded-video", false, NULL, EMBEDDED_TEXT, EMBEDDED_LONGTEXT,
true );
#else
add_bool( "embedded-video", true, NULL, EMBEDDED_TEXT, EMBEDDED_LONGTEXT,
add_bool( "embedded-video", 1, NULL, EMBEDDED_TEXT, EMBEDDED_LONGTEXT,
true );
#endif
#ifdef __APPLE__
add_deprecated_alias( "macosx-embedded" ); /*deprecated since 0.9.0 */
#endif
......
......@@ -1049,6 +1049,9 @@ update_t *__update_New( vlc_object_t *p_this )
p_update->release.psz_url = NULL;
p_update->release.psz_desc = NULL;
p_update->p_download = NULL;
p_update->p_check = NULL;
p_update->p_pkey = NULL;
vlc_gcrypt_init();
......@@ -1065,6 +1068,21 @@ void update_Delete( update_t *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 );
free( p_update->release.psz_url );
......@@ -1336,19 +1354,7 @@ error:
return false;
}
/**
* 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 );
static void update_CheckReal( update_check_thread_t *p_uct );
/**
* Check for updates
......@@ -1367,6 +1373,7 @@ void update_Check( update_t *p_update, void (*pf_callback)( void*, bool ), void
if( !p_uct ) return;
p_uct->p_update = p_update;
p_update->p_check = p_uct;
p_uct->pf_callback = pf_callback;
p_uct->p_data = p_data;
......@@ -1385,6 +1392,10 @@ void update_CheckReal( update_check_thread_t *p_uct )
if( p_uct->pf_callback )
(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 )
return i_retval == -1 ? NULL : psz_tmp;
}
/**
* 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 );
static void update_DownloadReal( update_download_thread_t *p_udt );
/**
* Download the file given in the update_t
......@@ -1455,13 +1455,14 @@ void update_Download( update_t *p_update, const char *psz_destdir )
return;
p_udt->p_update = p_update;
p_update->p_download = p_udt;
p_udt->psz_destdir = psz_destdir ? strdup( psz_destdir ) : NULL;
vlc_thread_create( p_udt, "download update", update_DownloadReal,
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;
long int l_size;
......@@ -1523,9 +1524,12 @@ void update_DownloadReal( update_download_thread_t *p_udt )
free( psz_status );
}
while( ( i_read = stream_Read( p_stream, p_buffer, 1 << 10 ) ) &&
vlc_object_lock( p_udt );
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 )
{
msg_Err( p_udt, "Failed to write into %s", psz_destfile );
......@@ -1544,14 +1548,17 @@ void update_DownloadReal( update_download_thread_t *p_udt )
free( psz_status );
}
free( psz_downloaded );
vlc_object_lock( p_udt );
}
/* Finish the progress bar or delete the file if the user had canceled */
fclose( p_file );
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\nDone %s (100.0%%)",
p_update->release.psz_url, psz_size ) != -1 )
{
......@@ -1561,6 +1568,7 @@ void update_DownloadReal( update_download_thread_t *p_udt )
}
else
{
vlc_object_unlock( p_udt );
utf8_unlink( psz_destfile );
goto end;
}
......@@ -1652,6 +1660,10 @@ end:
free( psz_destfile );
free( p_buffer );
free( psz_size );
p_udt->p_update->p_download = NULL;
vlc_object_release( p_udt );
}
update_release_t *update_GetRelease( update_t *p_update )
......
......@@ -142,6 +142,26 @@ struct 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
*/
......@@ -151,5 +171,7 @@ struct update_t
vlc_mutex_t lock;
struct update_release_t release; ///< Release (version)
public_key_t *p_pkey;
update_download_thread_t *p_download;
update_check_thread_t *p_check;
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment