]> git.sesse.net Git - vlc/blobdiff - modules/access/decklink.cpp
libmp4: don't parse twice the file in MP4_BoxGetRoot
[vlc] / modules / access / decklink.cpp
index 6b97246465c5eaf7693ce034f12c838567d8661f..0b60995c895f054d095a1d3a1b5c1024cda3b968 100644 (file)
@@ -5,20 +5,19 @@
  *
  * Authors: Steinar H. Gunderson <steinar+vlc@gunderson.no>
  *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
  *
  * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #define __STDC_CONSTANT_MACROS 1
@@ -51,11 +50,6 @@ static void Close( vlc_object_t * );
     "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 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 DeckLink captures. " \
@@ -86,6 +80,13 @@ static const char *const ppsz_videoconns_text[] = {
     N_("SDI"), N_("HDMI"), N_("Optical SDI"), N_("Component"), N_("Composite"), N_("S-video")
 };
 
+static const char *const ppsz_audioconns[] = {
+    "embedded", "aesebu", "analog"
+};
+static const char *const ppsz_audioconns_text[] = {
+    N_("Embedded"), N_("AES/EBU"), N_("Analog")
+};
+
 #define ASPECT_RATIO_TEXT N_("Aspect ratio")
 #define ASPECT_RATIO_LONGTEXT N_( \
     "Aspect ratio (4:3, 16:9). Default assumes square pixels." )
@@ -100,17 +101,16 @@ vlc_module_begin ()
                  CARD_INDEX_TEXT, CARD_INDEX_LONGTEXT, true )
     add_string( "decklink-mode", "pal ",
                  MODE_TEXT, MODE_LONGTEXT, true )
-    add_integer( "decklink-caching", DEFAULT_PTS_DELAY / 1000,
-                 CACHING_TEXT, CACHING_LONGTEXT, true )
     add_string( "decklink-audio-connection", 0,
                  AUDIO_CONNECTION_TEXT, AUDIO_CONNECTION_LONGTEXT, true )
+        change_string_list( ppsz_audioconns, ppsz_audioconns_text )
     add_integer( "decklink-audio-rate", 48000,
                  RATE_TEXT, RATE_LONGTEXT, true )
     add_integer( "decklink-audio-channels", 2,
                  CHANNELS_TEXT, CHANNELS_LONGTEXT, true )
     add_string( "decklink-video-connection", 0,
                  VIDEO_CONNECTION_TEXT, VIDEO_CONNECTION_LONGTEXT, true )
-        change_string_list( ppsz_videoconns, ppsz_videoconns_text, 0 )
+        change_string_list( ppsz_videoconns, ppsz_videoconns_text )
     add_string( "decklink-aspect-ratio", NULL,
                 ASPECT_RATIO_TEXT, ASPECT_RATIO_LONGTEXT, true )
 
@@ -640,7 +640,8 @@ 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_InheritInteger( p_demux, "decklink-caching" ) * 1000;
+            *pi64 =
+                INT64_C(1000) * var_InheritInteger( p_demux, "live-caching" );
             return VLC_SUCCESS;
 
         case DEMUX_GET_TIME: