[vlc-devel] [PATCH 12/14] libvlc: add a variable for forcing stereo 3D mode

Felix Abecassis felix.abecassis at gmail.com
Tue Sep 9 19:08:31 CEST 2014


---
 src/libvlc-module.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/src/libvlc-module.c b/src/libvlc-module.c
index 539d52e..ff2eea2 100644
--- a/src/libvlc-module.c
+++ b/src/libvlc-module.c
@@ -357,6 +357,28 @@ static const char * const ppsz_deinterlace_mode_text[] = {
     N_("Film NTSC (IVTC)")
 };
 
+#define STEREO3D_MODE_TEXT N_("Stereo 3D mode")
+#define STEREO3D_MODE_LONGTEXT N_("Stereo 3D mode")
+/* We negate the stereo3d mode when eyes are swapped */
+static const int pi_stereo3d_mode[] = {
+    VLC_STEREO3D_2D,
+    VLC_STEREO3D_SBS, -VLC_STEREO3D_SBS,
+    VLC_STEREO3D_TB, -VLC_STEREO3D_TB,
+    VLC_STEREO3D_ROW, -VLC_STEREO3D_ROW,
+    VLC_STEREO3D_COL, -VLC_STEREO3D_COL,
+    VLC_STEREO3D_FRAME, -VLC_STEREO3D_FRAME,
+    VLC_STEREO3D_CHECKERBOARD, -VLC_STEREO3D_CHECKERBOARD
+};
+static const char * const ppsz_stereo3d_mode_text[] = {
+    "2D",
+    "Side-By-Side (Left-Right)", "Side-By-Side (Right-Left)",
+    "Top-Bottom (Left-Right)", "Top-Bottom (Right-Left)",
+    "Row interleaved (Left-Right)", "Row interleaved (Right-Left)",
+    "Column interleaved (Left-Right)", "Column interleaved (Right-Left)",
+    "Frame sequential (Left-Right)", "Frame sequential (Right-Left)",
+    "Checkerboard (Left-Right)", "Checkerboard (Right-Left)"
+};
+
 static const int pi_pos_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 };
 static const char *const ppsz_pos_descriptions[] =
 { N_("Center"), N_("Left"), N_("Right"), N_("Top"), N_("Bottom"),
@@ -1591,6 +1613,10 @@ vlc_module_begin ()
                 DEINTERLACE_MODE_TEXT, DEINTERLACE_MODE_LONGTEXT, false )
         change_string_list( ppsz_deinterlace_mode, ppsz_deinterlace_mode_text )
         change_safe()
+    add_integer( "stereo3d-mode", VLC_STEREO3D_2D,
+                 STEREO3D_MODE_TEXT, STEREO3D_MODE_TEXT, false )
+        change_integer_list( pi_stereo3d_mode, ppsz_stereo3d_mode_text )
+        change_safe()
 
     set_subcategory( SUBCAT_VIDEO_VOUT )
     add_module( "vout", "vout display", NULL, VOUT_TEXT, VOUT_LONGTEXT, true )
-- 
1.9.1




More information about the vlc-devel mailing list