]> git.sesse.net Git - vlc/commitdiff
Merge branch 'master' into lpcm_encoder
authorSteinar H. Gunderson <steinar+vlc@gunderson.no>
Mon, 27 Sep 2010 23:18:38 +0000 (01:18 +0200)
committerSteinar H. Gunderson <steinar+vlc@gunderson.no>
Mon, 27 Sep 2010 23:18:38 +0000 (01:18 +0200)
Conflicts:
NEWS

14 files changed:
NEWS
configure.ac
extras/contrib/src/Makefile
modules/LIST
modules/access/Modules.am
modules/access/decklink.cpp [moved from modules/access/sdi.cpp with 79% similarity]
modules/gui/qt4/dialogs/errors.cpp
modules/gui/qt4/dialogs/extended.cpp
modules/gui/qt4/dialogs/help.cpp
modules/gui/qt4/dialogs/toolbar.cpp
modules/gui/qt4/dialogs/toolbar.hpp
modules/gui/qt4/ui/about.ui
modules/gui/qt4/ui/update.ui
po/POTFILES.in

diff --git a/NEWS b/NEWS
index 17d8522474d221d842fc455a9aed2ea0049150e4..dd935d46e97cc96ca80fd23a268dfb3c0937a402 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -18,6 +18,7 @@ Access
 
 Codecs
  * You can now use ffmpeg-mt in conjunction with vlc
+ * Important fixes for RealVideo 3.0 and 4.0 playback
  * Encode support for DVD LPCM
 
 Demuxers:
@@ -26,8 +27,9 @@ Demuxers:
 
 Interfaces
  * The telnet interface has been removed in the favour of the lua one
- * Skins2 / Qt: misc improvements
- * Qt: port to Mac platform
+ * Skins2 / Qt: misc improvements and usability fixes
+ * Qt: effects dialogs reordering
+ * Qt: port to MacOS X platform
 
 Video Output:
  * New video output based on Direct2D for Windows 7 and Vista (with Platform Update)
@@ -51,14 +53,32 @@ Stream output:
     index-url=http://url-to-iphonestreamfile-###.ts},mux=ts{use-key-frames},
     dst=public_html/iphonestreamfile-###.ts}"
 
-Translations:
- * New Armenian translation
-
 libVLC:
  * New capabilities for libVLC:
   ** libvlc_media_player_navigate for DVD navigation
 
 
+Changes between 1.1.4 and 1.1.4.1:
+----------------------------------
+
+Mac OS X:
+ * Fixed video output on PowerPC-based Macs for videos with widths divisible
+   by 16
+ * Fixed an issue with the Equalizer's 170Hz slider
+
+Demuxer:
+ * Fix crash when closing rtsp streams
+
+Qt interface:
+ * Fix Windows 7 jumplists with Unicode files
+ * Various fixes for Windows
+
+Translations:
+ * New Armenian translation
+ * Update translations for Dutch, Estonian, Lithuanian, Japanese, Nynorsk,
+   Brazillian Portuguese, Armenian, Wallon
+
+
 Changes between 1.1.3 and 1.1.4:
 --------------------------------
 
index f0db14862ad87f9ade7c568d498bc95aa2ed6af9..8fa684aab396e022c211ad9d6853289dcab4d596 100644 (file)
@@ -2136,21 +2136,21 @@ fi
 dnl
 dnl special access module for Blackmagic SDI cards
 dnl
-AC_ARG_ENABLE(sdi,
-  [  --enable-sdi            Blackmagic SDI access module (default disabled)])
-if test "${enable_sdi}" = "yes"
+AC_ARG_ENABLE(decklink,
+  [  --enable-decklink       Blackmagic DeckLink SDI access module (default enabled)])
+if test "${enable_decklink}" != "no"
 then
-  AC_ARG_WITH(sdi_sdk,
-    [  --with-sdi-sdk=DIR      Location of Blackmagic SDI SDK],[],[])
-  if test "${with_sdi_sdk}" != "no" -a -n "${with_sdi_sdk}"
+  AC_ARG_WITH(decklink_sdk,
+    [  --with-decklink-sdk=DIR      Location of Blackmagic DeckLink SDI SDK],[],[])
+  if test "${with_decklink_sdk}" != "no" -a -n "${with_decklink_sdk}"
   then
-    VLC_ADD_CPPFLAGS([sdi],[-I${with_sdi_sdk}/include])
+    VLC_ADD_CPPFLAGS([decklink],[-I${with_decklink_sdk}/include])
   fi
-  CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_sdi}"
+  CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_decklink}"
   AC_LANG_PUSH(C++)
   AC_CHECK_HEADERS(DeckLinkAPIDispatch.cpp, [
-    VLC_ADD_PLUGIN([sdi])
-  ],[AC_MSG_WARN(Blackmagic SDI include files not found, sdi disabled)])
+    VLC_ADD_PLUGIN([decklink])
+  ],[AC_MSG_WARN(Blackmagic DeckLink SDI include files not found, decklink disabled)])
   AC_LANG_POP(C++)
   CPPFLAGS="${CPPFLAGS_save}"
 fi
index 8e33f8570bb2c5d9d32efd0a2286f1e754c4a080..2e80d5a8d1158e499da95975f98893bd9fe2ed71 100644 (file)
@@ -1068,6 +1068,7 @@ FFMPEGCONF += \
        --disable-debug \
        --enable-gpl \
        --enable-postproc \
+       --disable-ffprobe \
        --disable-ffserver \
        --disable-ffmpeg \
        --disable-ffplay \
index 8a0314e0d10da756d266b33ecb6c396f446d7105..908a83dfa290c186b844a34e77e7b7df053a137f 100644 (file)
@@ -81,6 +81,7 @@ $Id$
  * cvdsub: CVD subtitles decoder
  * dbus: D-Bus control interface
  * dc1394: firewire input module
+ * decklink: input module to read from a Blackmagic SDI card
  * decomp: Decompression module
  * deinterlace: naive deinterlacing filter
  * demux_cdg: Demuxer for CD-G files (Karaoke)
@@ -264,7 +265,6 @@ $Id$
  * schroedinger: Schroedinger video decoder
  * screen: a input module that takes screenshots of the primary monitor
  * sdl_image: SDL-based image decoder
- * sdi: input module to read from a Blackmagic SDI card
  * sharpen: Sharpen video filter
  * shine: MP3 encoder using Shine, a fixed point implementation
  * simple_channel_mixer: channel mixer
index 05395778d6fe9b16b4aabb153b2a9836500d0e51..db45a5fc1b800cdfb61ea175423b005af238971f 100644 (file)
@@ -52,7 +52,7 @@ SOURCES_access_avio = avio.c avio.h
 SOURCES_access_attachment = attachment.c
 SOURCES_access_vdr = vdr.c
 SOURCES_libbluray = bluray.c
-SOURCES_sdi = sdi.cpp
+SOURCES_decklink = decklink.cpp
 
 SOURCES_access_rar = rar/rar.c rar/rar.h rar/access.c
 SOURCES_stream_filter_rar = rar/rar.c rar/rar.h rar/stream.c
similarity index 79%
rename from modules/access/sdi.cpp
rename to modules/access/decklink.cpp
index ec93c27cf677276bd8b8e5bd1676f38fa7bfa734..78ef54c5f695a062f7823c95e827271be344823a 100644 (file)
@@ -16,6 +16,7 @@
 #include <vlc_picture.h>
 #include <vlc_charset.h>
 #include <vlc_fs.h>
+#include <vlc_atomic.h>
 
 #include <arpa/inet.h>
 
@@ -27,39 +28,39 @@ static void Close( vlc_object_t * );
 
 #define CARD_INDEX_TEXT N_("Input card to use")
 #define CARD_INDEX_LONGTEXT N_( \
-    "SDI capture card to use, if multiple exist. " \
+    "DeckLink capture card to use, if multiple exist. " \
     "The cards are numbered from 0." )
 
 #define MODE_TEXT N_("Desired input video mode")
 #define MODE_LONGTEXT N_( \
-    "Desired input video mode for SDI captures. " \
+    "Desired input video mode for DeckLink captures. " \
     "This value should be a FOURCC code in textual " \
     "form, e.g. \"ntsc\"." )
 
 #define CACHING_TEXT N_("Caching value in ms")
 #define CACHING_LONGTEXT N_( \
-    "Caching value for SDI captures. This " \
+    "Caching value for DeckLink captures. This " \
     "value should be set in milliseconds." )
 
 #define AUDIO_CONNECTION_TEXT N_("Audio connection")
 #define AUDIO_CONNECTION_LONGTEXT N_( \
-    "Audio connection to use for SDI captures. " \
+    "Audio connection to use for DeckLink captures. " \
     "Valid choices: embedded, aesebu, analog. " \
     "Leave blank for card default." )
 
 #define RATE_TEXT N_("Audio sampling rate in Hz")
 #define RATE_LONGTEXT N_( \
-    "Audio sampling rate (in hertz) for SDI captures. " \
+    "Audio sampling rate (in hertz) for DeckLink captures. " \
     "0 disables audio input." )
 
 #define CHANNELS_TEXT N_("Number of audio channels")
 #define CHANNELS_LONGTEXT N_( \
-    "Number of input audio channels for SDI captures. " \
+    "Number of input audio channels for DeckLink captures. " \
     "Must be 2, 8 or 16. 0 disables audio input." )
 
 #define VIDEO_CONNECTION_TEXT N_("Video connection")
 #define VIDEO_CONNECTION_LONGTEXT N_( \
-    "Video connection to use for SDI captures. " \
+    "Video connection to use for DeckLink captures. " \
     "Valid choices: sdi, hdmi, opticalsdi, component, " \
     "composite, svideo. " \
     "Leave blank for card default." )
@@ -69,29 +70,29 @@ static void Close( vlc_object_t * );
     "Aspect ratio (4:3, 16:9). Default assumes square pixels." )
 
 vlc_module_begin ()
-    set_shortname( N_("SDI") )
-    set_description( N_("Blackmagic SDI input") )
+    set_shortname( N_("DeckLink") )
+    set_description( N_("Blackmagic DeckLink SDI input") )
     set_category( CAT_INPUT )
     set_subcategory( SUBCAT_INPUT_ACCESS )
 
-    add_integer( "sdi-card-index", 0, NULL,
+    add_integer( "decklink-card-index", 0, NULL,
                  CARD_INDEX_TEXT, CARD_INDEX_LONGTEXT, true )
-    add_string( "sdi-mode", "pal ", NULL,
+    add_string( "decklink-mode", "pal ", NULL,
                  MODE_TEXT, MODE_LONGTEXT, true )
-    add_integer( "sdi-caching", DEFAULT_PTS_DELAY / 1000, NULL,
+    add_integer( "decklink-caching", DEFAULT_PTS_DELAY / 1000, NULL,
                  CACHING_TEXT, CACHING_LONGTEXT, true )
-    add_string( "sdi-audio-connection", 0, NULL,
+    add_string( "decklink-audio-connection", 0, NULL,
                  AUDIO_CONNECTION_TEXT, AUDIO_CONNECTION_LONGTEXT, true )
-    add_integer( "sdi-audio-rate", 48000, NULL,
+    add_integer( "decklink-audio-rate", 48000, NULL,
                  RATE_TEXT, RATE_LONGTEXT, true )
-    add_integer( "sdi-audio-channels", 2, NULL,
+    add_integer( "decklink-audio-channels", 2, NULL,
                  CHANNELS_TEXT, CHANNELS_LONGTEXT, true )
-    add_string( "sdi-video-connection", 0, NULL,
+    add_string( "decklink-video-connection", 0, NULL,
                  VIDEO_CONNECTION_TEXT, VIDEO_CONNECTION_LONGTEXT, true )
-    add_string( "sdi-aspect-ratio", NULL, NULL,
+    add_string( "decklink-aspect-ratio", NULL, NULL,
                 ASPECT_RATIO_TEXT, ASPECT_RATIO_LONGTEXT, true )
 
-    add_shortcut( "sdi" )
+    add_shortcut( "decklink" )
     set_capability( "access_demux", 10 )
     set_callbacks( Open, Close )
 vlc_module_end ()
@@ -126,32 +127,31 @@ struct demux_sys_t
 class DeckLinkCaptureDelegate : public IDeckLinkInputCallback
 {
 public:
-    DeckLinkCaptureDelegate( demux_t *p_demux ) : m_ref_(1), p_demux_(p_demux) {}
+    DeckLinkCaptureDelegate( demux_t *p_demux ) : p_demux_(p_demux)
+    {
+        vlc_atomic_set( &m_ref_, 1 );
+    }
 
     virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, LPVOID *ppv) { return E_NOINTERFACE; }
 
-    /* Note: AddRef() and Release() here are not thread safe. */
-
     virtual ULONG STDMETHODCALLTYPE AddRef(void)
     {
-        return ++m_ref_;
+        return vlc_atomic_inc( &m_ref_ );
     }
 
     virtual ULONG STDMETHODCALLTYPE Release(void)
     {
-        if ( --m_ref_ == 0 )
-        {
+        uintptr_t new_ref = vlc_atomic_dec( &m_ref_ );
+        if ( new_ref == 0 )
             delete this;
-            return 0;
-        }
-        return m_ref_;
+        return new_ref;
     }
 
     virtual HRESULT STDMETHODCALLTYPE VideoInputFormatChanged(BMDVideoInputFormatChangedEvents, IDeckLinkDisplayMode*, BMDDetectedVideoInputFormatFlags);
     virtual HRESULT STDMETHODCALLTYPE VideoInputFrameArrived(IDeckLinkVideoInputFrame*, IDeckLinkAudioInputPacket*);
 
 private:
-    int m_ref_;
+    vlc_atomic_t m_ref_;
     demux_t *p_demux_;
 };
 
@@ -255,6 +255,13 @@ static int Open( vlc_object_t *p_this )
 {
     demux_t     *p_demux = (demux_t*)p_this;
     demux_sys_t *p_sys;
+    int         ret = VLC_SUCCESS;
+    char        *psz_aspect;
+    char        *psz_display_mode = NULL;
+    char        *psz_video_connection = NULL;
+    char        *psz_audio_connection = NULL;
+    bool        b_found_mode;
+    int         i_card_index;
 
     /* Only when selected */
     if( *p_demux->psz_access == '\0' )
@@ -278,14 +285,13 @@ static int Open( vlc_object_t *p_this )
     if( !decklink_iterator )
     {
         msg_Err( p_demux, "DeckLink drivers not found." );
-        decklink_iterator->Release();
-        Close( p_this );
-        return VLC_EGENERIC;
+        ret = VLC_EGENERIC;
+        goto finish;
     }
 
     HRESULT result;
 
-    int i_card_index = var_CreateGetInteger( p_demux, "sdi-card-index" );
+    i_card_index = var_InheritInteger( p_demux, "decklink-card-index" );
     for( int i = 0; i <= i_card_index; ++i )
     {
         if( p_sys->p_card )
@@ -295,13 +301,11 @@ static int Open( vlc_object_t *p_this )
             break;
     }
 
-    decklink_iterator->Release();
-
     if( result != S_OK )
     {
         msg_Err( p_demux, "DeckLink PCI card %d not found", i_card_index );
-        Close( p_this );
-        return VLC_EGENERIC;
+        ret = VLC_EGENERIC;
+        goto finish;
     }
 
     const char *psz_model_name;
@@ -310,8 +314,8 @@ static int Open( vlc_object_t *p_this )
     if( result != S_OK )
     {
         msg_Err( p_demux, "Could not get model name" );
-        Close( p_this );
-        return VLC_EGENERIC;
+        ret = VLC_EGENERIC;
+        goto finish;
     }
 
     msg_Dbg( p_demux, "Opened DeckLink PCI card %d (%s)", i_card_index, psz_model_name );
@@ -319,8 +323,8 @@ static int Open( vlc_object_t *p_this )
     if( p_sys->p_card->QueryInterface( IID_IDeckLinkInput, (void**)&p_sys->p_input) != S_OK )
     {
         msg_Err( p_demux, "Card has no inputs" );
-        Close( p_this );
-        return VLC_EGENERIC;
+        ret = VLC_EGENERIC;
+        goto finish;
     }
 
     /* Set up the video and audio sources. */
@@ -328,104 +332,91 @@ static int Open( vlc_object_t *p_this )
     if( p_sys->p_card->QueryInterface( IID_IDeckLinkConfiguration, (void**)&p_config) != S_OK )
     {
         msg_Err( p_demux, "Failed to get configuration interface" );
-        Close( p_this );
-        return VLC_EGENERIC;
+        ret = VLC_EGENERIC;
+        goto finish;
     }
 
-    char *psz_tmp = var_CreateGetNonEmptyString( p_demux, "sdi-video-connection" );
-    if( psz_tmp )
+    psz_video_connection = var_CreateGetNonEmptyString( p_demux, "decklink-video-connection" );
+    if( psz_video_connection )
     {
         BMDVideoConnection conn;
-        if ( !strcmp( psz_tmp, "sdi" ) )
+        if ( !strcmp( psz_video_connection, "sdi" ) )
             conn = bmdVideoConnectionSDI;
-        else if ( !strcmp( psz_tmp, "hdmi" ) )
+        else if ( !strcmp( psz_video_connection, "hdmi" ) )
             conn = bmdVideoConnectionHDMI;
-        else if ( !strcmp( psz_tmp, "opticalsdi" ) )
+        else if ( !strcmp( psz_video_connection, "opticalsdi" ) )
             conn = bmdVideoConnectionOpticalSDI;
-        else if ( !strcmp( psz_tmp, "component" ) )
+        else if ( !strcmp( psz_video_connection, "component" ) )
             conn = bmdVideoConnectionComponent;
-        else if ( !strcmp( psz_tmp, "composite" ) )
+        else if ( !strcmp( psz_video_connection, "composite" ) )
             conn = bmdVideoConnectionComposite;
-        else if ( !strcmp( psz_tmp, "svideo" ) )
+        else if ( !strcmp( psz_video_connection, "svideo" ) )
             conn = bmdVideoConnectionSVideo;
         else
         {
-            msg_Err( p_demux, "Invalid --sdi-video-connection specified; choose one of " \
+            msg_Err( p_demux, "Invalid --decklink-video-connection specified; choose one of " \
                               "sdi, hdmi, opticalsdi, component, composite, or svideo." );
-            p_config->Release();
-            free( psz_tmp );
-            Close( p_this );
-            return VLC_EGENERIC;
+            ret = VLC_EGENERIC;
+            goto finish;
         }
-        free( psz_tmp );
 
         msg_Dbg( p_demux, "Setting video input format to 0x%x", conn);
         result = p_config->SetVideoInputFormat( conn );
         if( result != S_OK )
         {
             msg_Err( p_demux, "Failed to set video input connection" );
-            p_config->Release();
-            Close( p_this );
-            return VLC_EGENERIC;
+            ret = VLC_EGENERIC;
+            goto finish;
         }
     }
 
-    psz_tmp = var_CreateGetNonEmptyString( p_demux, "sdi-audio-connection" );
-    if( psz_tmp )
+    psz_audio_connection = var_CreateGetNonEmptyString( p_demux, "decklink-audio-connection" );
+    if( psz_audio_connection )
     {
         BMDAudioConnection conn;
-        if ( !strcmp( psz_tmp, "embedded" ) )
+        if ( !strcmp( psz_audio_connection, "embedded" ) )
             conn = bmdAudioConnectionEmbedded;
-        else if ( !strcmp( psz_tmp, "aesebu" ) )
+        else if ( !strcmp( psz_audio_connection, "aesebu" ) )
             conn = bmdAudioConnectionAESEBU;
-        else if ( !strcmp( psz_tmp, "analog" ) )
+        else if ( !strcmp( psz_audio_connection, "analog" ) )
             conn = bmdAudioConnectionAnalog;
         else
         {
-            msg_Err( p_demux, "Invalid --sdi-audio-connection specified; choose one of " \
+            msg_Err( p_demux, "Invalid --decklink-audio-connection specified; choose one of " \
                               "embedded, aesebu, or analog." );
-            free( psz_tmp );
-            p_config->Release();
-            Close( p_this );
-            return VLC_EGENERIC;
+            ret = VLC_EGENERIC;
+            goto finish;
         }
-        free( psz_tmp );
 
         msg_Dbg( p_demux, "Setting audio input format to 0x%x", conn);
         result = p_config->SetAudioInputFormat( conn );
         if( result != S_OK )
         {
             msg_Err( p_demux, "Failed to set audio input connection" );
-            p_config->Release();
-            Close( p_this );
-            return VLC_EGENERIC;
+            ret = VLC_EGENERIC;
+            goto finish;
         }
     }
 
-    p_config->Release();
-
     /* Get the list of display modes. */
     IDeckLinkDisplayModeIterator *p_display_iterator;
     result = p_sys->p_input->GetDisplayModeIterator( &p_display_iterator );
     if( result != S_OK )
     {
         msg_Err( p_demux, "Failed to enumerate display modes" );
-        p_display_iterator->Release();
-        Close( p_this );
-        return VLC_EGENERIC;
+        ret = VLC_EGENERIC;
+        goto finish;
     }
 
-    char *psz_display_mode = var_CreateGetString( p_demux, "sdi-mode" );
+    psz_display_mode = var_InheritString( p_demux, "decklink-mode" );
     if( !psz_display_mode || strlen( psz_display_mode ) == 0 || strlen( psz_display_mode ) > 4 ) {
-        msg_Err( p_demux, "Missing or invalid --sdi-mode string" );
-        free( psz_display_mode );
-        p_display_iterator->Release();
-        Close( p_this );
-        return VLC_EGENERIC;
+        msg_Err( p_demux, "Missing or invalid --decklink-mode string" );
+        ret = VLC_EGENERIC;
+        goto finish;
     }
 
     /*
-     * Pad the --sdi-mode string to four characters, so the user can specify e.g. "pal"
+     * Pad the --decklink-mode string to four characters, so the user can specify e.g. "pal"
      * without having to add the trailing space.
      */
     char sz_display_mode_padded[5];
@@ -433,12 +424,10 @@ static int Open( vlc_object_t *p_this )
     for( int i = 0; i < strlen( psz_display_mode ); ++i )
         sz_display_mode_padded[i] = psz_display_mode[i];
 
-    free( psz_display_mode );
-
     BMDDisplayMode wanted_mode_id;
     memcpy( &wanted_mode_id, &sz_display_mode_padded, sizeof(wanted_mode_id) );
 
-    bool b_found_mode = false;
+    b_found_mode = false;
 
     for (;;)
     {
@@ -457,9 +446,8 @@ static int Open( vlc_object_t *p_this )
         {
             msg_Err( p_demux, "Failed to get display mode name" );
             p_display_mode->Release();
-            p_display_iterator->Release();
-            Close( p_this );
-            return VLC_EGENERIC;
+            ret = VLC_EGENERIC;
+            goto finish;
         }
 
         BMDTimeValue frame_duration, time_scale;
@@ -468,9 +456,8 @@ static int Open( vlc_object_t *p_this )
         {
             msg_Err( p_demux, "Failed to get frame rate" );
             p_display_mode->Release();
-            p_display_iterator->Release();
-            Close( p_this );
-            return VLC_EGENERIC;
+            ret = VLC_EGENERIC;
+            goto finish;
         }
 
         const char *psz_field_dominance;
@@ -515,36 +502,34 @@ static int Open( vlc_object_t *p_this )
         p_display_mode->Release();
     }
 
-    p_display_iterator->Release();
-
     if( !b_found_mode )
     {
-        msg_Err( p_demux, "Unknown SDI mode specified. " \
-                          "Run VLC with -v --verbose-objects=-all,+sdi " \
+        msg_Err( p_demux, "Unknown video mode specified. " \
+                          "Run VLC with -v --verbose-objects=-all,+decklink " \
                           "to get a list of supported modes." );
-        Close( p_this );
-        return VLC_EGENERIC;
+        ret = VLC_EGENERIC;
+        goto finish;
     }
 
     result = p_sys->p_input->EnableVideoInput( htonl( wanted_mode_id ), bmdFormat8BitYUV, 0 );
     if( result != S_OK )
     {
         msg_Err( p_demux, "Failed to enable video input" );
-        Close( p_this );
-        return VLC_EGENERIC;
+        ret = VLC_EGENERIC;
+        goto finish;
     }
 
     /* Set up audio. */
-    p_sys->i_rate = var_CreateGetInteger( p_demux, "sdi-audio-rate" );
-    p_sys->i_channels = var_CreateGetInteger( p_demux, "sdi-audio-channels" );
+    p_sys->i_rate = var_InheritInteger( p_demux, "decklink-audio-rate" );
+    p_sys->i_channels = var_InheritInteger( p_demux, "decklink-audio-channels" );
     if( p_sys->i_rate > 0 && p_sys->i_channels > 0 )
     {
         result = p_sys->p_input->EnableAudioInput( p_sys->i_rate, bmdAudioSampleType16bitInteger, p_sys->i_channels );
         if( result != S_OK )
         {
             msg_Err( p_demux, "Failed to enable audio input" );
-            Close( p_this );
-            return VLC_EGENERIC;
+            ret = VLC_EGENERIC;
+            goto finish;
         }
     }
 
@@ -554,9 +539,10 @@ static int Open( vlc_object_t *p_this )
     result = p_sys->p_input->StartStreams();
     if( result != S_OK )
     {
-        msg_Err( p_demux, "Failed to start streams" );
-        Close( p_this );
-        return VLC_EGENERIC;
+        msg_Err( p_demux, "Could not start streaming from SDI card. This could be caused "
+                          "by invalid video mode or flags, access denied, or card already in use." );
+        ret = VLC_EGENERIC;
+        goto finish;
     }
 
     /* Declare elementary streams */
@@ -570,17 +556,17 @@ static int Open( vlc_object_t *p_this )
     video_fmt.video.i_frame_rate_base = p_sys->i_fps_den;
     video_fmt.i_bitrate = video_fmt.video.i_width * video_fmt.video.i_height * video_fmt.video.i_frame_rate * 2 * 8;
 
-    psz_tmp = var_CreateGetNonEmptyString( p_demux, "sdi-aspect-ratio" );
-    if( psz_tmp )
+    psz_aspect = var_CreateGetNonEmptyString( p_demux, "decklink-aspect-ratio" );
+    if( psz_aspect )
     {
-        char *psz_denominator = strchr( psz_tmp, ':' );
+        char *psz_denominator = strchr( psz_aspect, ':' );
         if( psz_denominator )
         {
             *psz_denominator++ = '\0';
-            video_fmt.video.i_sar_num = atoi( psz_tmp )         * video_fmt.video.i_height;
+            video_fmt.video.i_sar_num = atoi( psz_aspect )      * video_fmt.video.i_height;
             video_fmt.video.i_sar_den = atoi( psz_denominator ) * video_fmt.video.i_width;
         }
-        free( psz_tmp );
+        free( psz_aspect );
     }
 
     msg_Dbg( p_demux, "added new video es %4.4s %dx%d",
@@ -600,9 +586,26 @@ static int Open( vlc_object_t *p_this )
     p_sys->p_audio_es = es_out_Add( p_demux->out, &audio_fmt );
 
     /* Update default_pts to a suitable value for access */
-    var_Create( p_demux, "sdi-caching", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
+    var_Create( p_demux, "decklink-caching", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
+
+finish:
+    if( decklink_iterator )
+        decklink_iterator->Release();
+
+    if( p_config )
+        p_config->Release();
+
+    free( psz_video_connection );
+    free( psz_audio_connection );
+    free( psz_display_mode );
+
+    if( p_display_iterator )
+        p_display_iterator->Release();
+
+    if( ret != VLC_SUCCESS )
+        Close( p_this );
 
-    return VLC_SUCCESS;
+    return ret;
 }
 
 static void Close( vlc_object_t *p_this )
@@ -649,7 +652,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
 
         case DEMUX_GET_PTS_DELAY:
             pi64 = (int64_t*)va_arg( args, int64_t * );
-            *pi64 = var_GetInteger( p_demux, "sdi-caching" ) * 1000;
+            *pi64 = var_GetInteger( p_demux, "decklink-caching" ) * 1000;
             return VLC_SUCCESS;
 
         case DEMUX_GET_TIME:
index 797a67e14bfac59bb1d902e0365d5a2b56f7b796..698c4c7d91f461a88cabacddd5cb518772104585 100644 (file)
@@ -43,10 +43,10 @@ ErrorsDialog::ErrorsDialog( intf_thread_t *_p_intf )
 
     QGridLayout *layout = new QGridLayout( this );
 
-    QDialogButtonBox *buttonBox =
-        new QDialogButtonBox( QDialogButtonBox::Close, Qt::Horizontal, this );
-    QPushButton *clearButton = new QPushButton( qtr( "&Clear" ) );
+    QDialogButtonBox *buttonBox = new QDialogButtonBox( Qt::Horizontal, this );
+    QPushButton *clearButton = new QPushButton( qtr( "Cl&ear" ), this );
     buttonBox->addButton( clearButton, QDialogButtonBox::ActionRole );
+    buttonBox->addButton( new QPushButton( qtr("&Close"), this ), QDialogButtonBox::RejectRole );
 
     messages = new QTextEdit();
     messages->setReadOnly( true );
index b527b4a254a4a9a001ccb07659c078651f18c41a..11342f15e75baa32afea0eade5de3aea03fd0af6 100644 (file)
@@ -33,6 +33,7 @@
 #include <QTabWidget>
 #include <QGridLayout>
 #include <QDialogButtonBox>
+#include <QPushButton>
 #include <vlc_modules.h>
 
 ExtendedDialog::ExtendedDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
@@ -87,8 +88,9 @@ ExtendedDialog::ExtendedDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
 
     layout->addWidget( mainTabW );
 
-    QDialogButtonBox *closeButtonBox =
-        new QDialogButtonBox( QDialogButtonBox::Close, Qt::Horizontal, this );
+    QDialogButtonBox *closeButtonBox = new QDialogButtonBox( Qt::Horizontal, this );
+    closeButtonBox->addButton(
+        new QPushButton( qtr("&Close"), this ), QDialogButtonBox::RejectRole );
     layout->addWidget( closeButtonBox );
     CONNECT( closeButtonBox, rejected(), this, close() );
 
index fce2509c3ea90ec92a63c57001106ca7dd6ba1ab..3fef481ff20cf6f472cd49e01b3f276406abcc22 100644 (file)
@@ -59,8 +59,9 @@ HelpDialog::HelpDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
     QTextBrowser *helpBrowser = new QTextBrowser( this );
     helpBrowser->setOpenExternalLinks( true );
     helpBrowser->setHtml( qtr(I_LONGHELP) );
-    QDialogButtonBox *closeButtonBox =
-         new QDialogButtonBox( QDialogButtonBox::Close, Qt::Horizontal, this );
+    QDialogButtonBox *closeButtonBox = new QDialogButtonBox( Qt::Horizontal, this );
+    closeButtonBox->addButton(
+        new QPushButton( qtr("&Close"), this ), QDialogButtonBox::RejectRole );
     closeButtonBox->setFocus();
 
     layout->addWidget( helpBrowser );
@@ -85,6 +86,8 @@ AboutDialog::AboutDialog( intf_thread_t *_p_intf)
 {
     /* Build UI */
     ui.setupUi( this );
+    ui.closeButtonBox->addButton(
+        new QPushButton( qtr("&Close"), this ), QDialogButtonBox::RejectRole );
 
     setWindowTitle( qtr( "About" ) );
     setWindowRole( "vlc-about" );
@@ -161,23 +164,20 @@ UpdateDialog::UpdateDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
 {
     /* build Ui */
     ui.setupUi( this );
+    ui.updateDialogButtonBox->addButton( new QPushButton( qtr("&Close"), this ),
+                                         QDialogButtonBox::RejectRole );
+    QPushButton *recheckButton = new QPushButton( qtr("&Recheck version"), this );
+    ui.updateDialogButtonBox->addButton( recheckButton, QDialogButtonBox::ActionRole );
+
+    ui.updateNotifyButtonBox->addButton( new QPushButton( qtr("&Yes"), this ),
+                                         QDialogButtonBox::AcceptRole );
+    ui.updateNotifyButtonBox->addButton( new QPushButton( qtr("&No"), this ),
+                                         QDialogButtonBox::RejectRole );
+
     setWindowTitle( qtr( "VLC media player updates" ) );
     setWindowRole( "vlc-update" );
 
-    QList<QAbstractButton *> buttonsList = ui.updateDialogButtonBox->buttons();
-    QAbstractButton *currentButton;
-    for ( int i = 0; i < buttonsList.size() ; ++i )
-    {
-        currentButton = buttonsList.at( i );
-        if ( ui.updateDialogButtonBox->standardButton( currentButton )
-            == QDialogButtonBox::Retry )
-        {
-            currentButton->setText( qtr( "&Recheck version" ) );
-            qobject_cast<QPushButton *>(currentButton)->setDefault( true );
-        }
-    }
-
-    CONNECT( ui.updateDialogButtonBox, accepted(), this, UpdateOrDownload() );
+    BUTTONACT( recheckButton, UpdateOrDownload() );
     CONNECT( ui.updateDialogButtonBox, rejected(), this, close() );
 
     CONNECT( ui.updateNotifyButtonBox, accepted(), this, UpdateOrDownload() );
index 17ec24da8fe5a1d3c3ee1e16a7f694001454afd9..72cf40776d95eb5474e25412a1159e55be9aacc1 100644 (file)
@@ -672,6 +672,11 @@ void DroppingController::dropEvent( QDropEvent *event )
 {
     int i = getParentPosInLayout( event->pos() );
 
+    /* Workaround: do not let the item move to its current
+       position + 1 as it breaks the widgetList */
+    if ( i - 1 == i_dragIndex )
+        --i;
+
     QByteArray data = event->mimeData()->data( "vlc/button-bar" );
     QDataStream dataStream(&data, QIODevice::ReadOnly);
 
@@ -727,6 +732,8 @@ bool DroppingController::eventFilter( QObject *obj, QEvent *event )
             }
 
             if( i == -1 ) return true;
+            i_dragIndex = i;
+
             doubleInt *dI = widgetList.at( i );
 
             int i_type = dI->i_type;
index 6a436d806c2d60c9f39f38a21bdfef2110f835cf..52f4241eff32bd2bf61935fd647299d3f4b9908d 100644 (file)
@@ -112,6 +112,7 @@ private:
     };
     QRubberBand *rubberband;
     QList <doubleInt *> widgetList;
+    int i_dragIndex;
 
     int getParentPosInLayout( QPoint point);
 
index 6b6d990ad74930ed53758cb9f4c6fe208a3a3287..109853b06144148d70634fb7cab09f73546c1559 100644 (file)
@@ -149,6 +149,7 @@ p, li { white-space: pre-wrap; }
 &lt;tr&gt;
 &lt;td style=&quot;border: none;&quot;&gt;
 &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
 &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans'; font-size:10pt;&quot;&gt;&lt;/p&gt;
 &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans'; font-size:10pt;&quot;&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string>
          </property>
@@ -167,7 +168,7 @@ p, li { white-space: pre-wrap; }
    <item row="1" column="0">
     <widget class="QDialogButtonBox" name="closeButtonBox">
      <property name="standardButtons">
-      <set>QDialogButtonBox::Close</set>
+      <set>QDialogButtonBox::NoButton</set>
      </property>
     </widget>
    </item>
index 24011736917dd5e2fd70fab2945c272ce3b91e37..ecfa28a483cebd43379209a757b7314d0a4403aa 100644 (file)
@@ -34,7 +34,7 @@
        <item>
         <widget class="QDialogButtonBox" name="updateDialogButtonBox">
          <property name="standardButtons">
-          <set>QDialogButtonBox::Close|QDialogButtonBox::Retry</set>
+          <set>QDialogButtonBox::NoButton</set>
          </property>
         </widget>
        </item>
        <item>
         <widget class="QDialogButtonBox" name="updateNotifyButtonBox">
          <property name="standardButtons">
-          <set>QDialogButtonBox::No|QDialogButtonBox::Yes</set>
+          <set>QDialogButtonBox::NoButton</set>
          </property>
         </widget>
        </item>
index 747dd50ca22ff4d32d18dc85995d28b5470a3570..273f6764e9f4512719969199fd5f2a58310c0676 100644 (file)
@@ -205,6 +205,7 @@ modules/access/bda/bdagraph.cpp
 modules/access/bda/bdagraph.h
 modules/access/cdda.c
 modules/access/dc1394.c
+modules/access/decklink.cpp
 modules/access/directory.c
 modules/access/dshow/common.h
 modules/access/dshow/crossbar.cpp
@@ -271,7 +272,6 @@ modules/access/screen/screen.c
 modules/access/screen/screen.h
 modules/access/screen/win32.c
 modules/access/screen/xcb.c
-modules/access/sdi.cpp
 modules/access/sftp.c
 modules/access/smb.c
 modules/access/tcp.c