]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
prop: introduce PO_PHIDDEN for transcoding code, PO_HIDDEN is mainly used as a hint...
authorJaroslav Kysela <perex@perex.cz>
Sat, 2 Sep 2017 16:01:15 +0000 (18:01 +0200)
committerJaroslav Kysela <perex@perex.cz>
Sat, 2 Sep 2017 16:01:15 +0000 (18:01 +0200)
src/prop.c
src/prop.h
src/transcoding/codec/codecs/libs/libfdk_aac.c
src/transcoding/codec/profile_audio_class.c
src/transcoding/codec/profile_class.c
src/transcoding/codec/profile_video_class.c
src/webui/static/app/idnode.js

index 654cd0284abafdeca987f6081d0ef22ff02113d0..afee4fa008496575868668a480da36e8ebc51d3a 100644 (file)
@@ -508,6 +508,8 @@ prop_serialize_value
     htsmsg_add_bool(m, "noui", 1);
   if (opts & PO_HIDDEN)
     htsmsg_add_bool(m, "hidden", 1);
+  if (opts & PO_PHIDDEN)
+    htsmsg_add_bool(m, "phidden", 1);
   if (opts & PO_PASSWORD)
     htsmsg_add_bool(m, "password", 1);
   if (opts & PO_DURATION)
index 8404ad297cd9cd03d497350e38017d55dbd43dae..d27752b3eea7c1000272cccf804ba308ec82cffb 100644 (file)
@@ -52,20 +52,21 @@ typedef enum {
 #define PO_ADVANCED  (1<<4)  // Property is advanced
 #define PO_EXPERT    (1<<5)  // Property is for experts
 #define PO_NOUI      (1<<6)  // Property should not be presented in the user interface
-#define PO_HIDDEN    (1<<7)  // Property is hidden (by default)
-#define PO_USERAW    (1<<8)  // Only save the RAW (off) value if it exists
-#define PO_SORTKEY   (1<<9)  // Sort using key (not display value)
-#define PO_PASSWORD  (1<<10) // String is a password
-#define PO_DURATION  (1<<11) // For PT_TIME - differentiate between duration and datetime
-#define PO_HEXA      (1<<12) // Hexadecimal value
-#define PO_DATE      (1<<13) // Show date only
-#define PO_LOCALE    (1<<14) // Call tvh_locale_lang on string
-#define PO_LORDER    (1<<15) // Manage order in lists
-#define PO_MULTILINE (1<<16) // Multiline string
-#define PO_PERSIST   (1<<17) // Persistent value (return back on save)
-#define PO_DOC       (1<<18) // Use doc callback instead description if exists
-#define PO_DOC_NLIST (1<<19) // Do not show list in doc
-#define PO_TRIM      (1<<20) // Trim whitespaces (left & right) on load
+#define PO_HIDDEN    (1<<7)  // Property column is hidden (by default)
+#define PO_PHIDDEN   (1<<8)  // Property is permanently hidden
+#define PO_USERAW    (1<<9)  // Only save the RAW (off) value if it exists
+#define PO_SORTKEY   (1<<10) // Sort using key (not display value)
+#define PO_PASSWORD  (1<<11) // String is a password
+#define PO_DURATION  (1<<12) // For PT_TIME - differentiate between duration and datetime
+#define PO_HEXA      (1<<13) // Hexadecimal value
+#define PO_DATE      (1<<14) // Show date only
+#define PO_LOCALE    (1<<15) // Call tvh_locale_lang on string
+#define PO_LORDER    (1<<16) // Manage order in lists
+#define PO_MULTILINE (1<<17) // Multiline string
+#define PO_PERSIST   (1<<18) // Persistent value (return back on save)
+#define PO_DOC       (1<<19) // Use doc callback instead description if exists
+#define PO_DOC_NLIST (1<<20) // Do not show list in doc
+#define PO_TRIM      (1<<21) // Trim whitespaces (left & right) on load
 
 /*
  * min/max/step helpers
index 27ef945d27ffb3141333e5fc69343a9469818d62..2a062af6628f8f4dfa63e947ea1a3a56f36033e3 100644 (file)
@@ -108,7 +108,7 @@ static const codec_profile_class_t codec_profile_libfdk_aac_class = {
                 .name     = N_("Enable SBR for ELD"),
                 .desc     = N_("Enable SBR for ELD."),
                 .group    = 5,
-                .opts     = PO_EXPERT | PO_HIDDEN,
+                .opts     = PO_EXPERT | PO_PHIDDEN,
                 .get_opts = codec_profile_class_profile_get_opts,
                 .off      = offsetof(tvh_codec_profile_libfdk_aac_t, eld_sbr),
                 .def.i    = 0,
@@ -119,7 +119,7 @@ static const codec_profile_class_t codec_profile_libfdk_aac_class = {
                 .name     = N_("Signaling"),
                 .desc     = N_("SBR/PS signaling style."),
                 .group    = 5,
-                .opts     = PO_EXPERT | PO_HIDDEN,
+                .opts     = PO_EXPERT | PO_PHIDDEN,
                 .get_opts = codec_profile_class_profile_get_opts,
                 .off      = offsetof(tvh_codec_profile_libfdk_aac_t, signaling),
                 .list     = codec_profile_libfdk_aac_class_signaling_list,
index ee3f5bf38508d1dea7db6b1d0d3c9f31ea9c4324..667565cd9ffb20464cbb38b6bae39e6cd1487b42 100644 (file)
@@ -297,7 +297,7 @@ const codec_profile_class_t codec_profile_audio_class = {
                 .name     = N_("Sample format"),
                 .desc     = N_("Audio sample format."),
                 .group    = 4,
-                .opts     = PO_ADVANCED | PO_HIDDEN,
+                .opts     = PO_ADVANCED | PO_PHIDDEN,
                 .get_opts = codec_profile_audio_class_sample_fmt_get_opts,
                 .off      = offsetof(TVHAudioCodecProfile, sample_fmt),
                 .list     = codec_profile_audio_class_sample_fmt_list,
@@ -309,7 +309,7 @@ const codec_profile_class_t codec_profile_audio_class = {
                 .name     = N_("Sample rate"),
                 .desc     = N_("Samples per second."),
                 .group    = 4,
-                .opts     = PO_ADVANCED | PO_HIDDEN,
+                .opts     = PO_ADVANCED | PO_PHIDDEN,
                 .get_opts = codec_profile_audio_class_sample_rate_get_opts,
                 .off      = offsetof(TVHAudioCodecProfile, sample_rate),
                 .list     = codec_profile_audio_class_sample_rate_list,
@@ -321,7 +321,7 @@ const codec_profile_class_t codec_profile_audio_class = {
                 .name     = N_("Channel layout"),
                 .desc     = N_("Audio channel layout."),
                 .group    = 4,
-                .opts     = PO_ADVANCED | PO_HIDDEN,
+                .opts     = PO_ADVANCED | PO_PHIDDEN,
                 .get_opts = codec_profile_audio_class_channel_layout_get_opts,
                 .off      = offsetof(TVHAudioCodecProfile, channel_layout),
                 .list     = codec_profile_audio_class_channel_layout_list,
index 79147b7645318865ba14986544883a328ae23374..8a2236c9080d75261f426035e1bcd1c88731c77f 100644 (file)
@@ -32,7 +32,7 @@ tvh_codec_base_get_opts(TVHCodec *self, uint32_t opts, int visible)
         opts |= PO_RDONLY;
     }
     else if (visible) {
-        opts &= ~(PO_HIDDEN);
+        opts &= ~(PO_PHIDDEN);
     }
     return opts;
 }
@@ -257,7 +257,7 @@ const codec_profile_class_t codec_profile_class = {
                 .name     = N_("Profile"),
                 .desc     = N_("Profile."),
                 .group    = 4,
-                .opts     = PO_ADVANCED | PO_HIDDEN,
+                .opts     = PO_ADVANCED | PO_PHIDDEN,
                 .get_opts = codec_profile_class_profile_get_opts,
                 .off      = offsetof(TVHCodecProfile, profile),
                 .list     = codec_profile_class_profile_list,
index 7768db731934d79f405722aaa32d86975f5eb0c6..ec99f009871b20b33901eae212680c1fef99a875 100644 (file)
@@ -180,7 +180,7 @@ const codec_profile_class_t codec_profile_video_class = {
                 .name     = N_("Pixel format"),
                 .desc     = N_("Video pixel format."),
                 .group    = 4,
-                .opts     = PO_ADVANCED | PO_HIDDEN,
+                .opts     = PO_ADVANCED | PO_PHIDDEN,
                 .get_opts = codec_profile_video_class_pix_fmt_get_opts,
                 .off      = offsetof(TVHVideoCodecProfile, pix_fmt),
                 .list     = codec_profile_video_class_pix_fmt_list,
index 3cd86c1b5af39c9539f82f6c2b1d25d546022303..ab23bbea44efb37c18c3a30cad2bec797eac5e2f 100644 (file)
@@ -242,7 +242,8 @@ tvheadend.IdNodeField = function(conf)
     this.wronly = conf.wronly;
     this.wronce = conf.wronce;
     this.noui = conf.noui;
-    this.hidden = conf.hidden;
+    this.hidden = conf.hidden || conf.phidden;
+    this.phidden = conf.phidden;
     this.uilevel = conf.expert ? 'expert' : (conf.advanced ? 'advanced' : 'basic');
     this.password = conf.showpwd ? false : conf.password;
     this.duration = conf.duration;
@@ -920,7 +921,7 @@ tvheadend.idnode_editor_form = function(uilevel, d, meta, panel, conf)
                 ]
             });
         }
-        if (p.hidden) {
+        if (p.phidden) {
             hiddenFields.push(f);
         } else if (p.group && meta && meta.groups) {
             f.tvh_uilevel = p.expert ? 'expert' : (p.advanced ? 'advanced' : 'basic');