Exemplo n.º 1
0
        public static void __var_Get(IntPtr p_object, string name, ref vlc_value_t value)
        {
            if (name == null)
            {
                throw new ArgumentNullException("name");
            }
            IntPtr namePtr = Marshal.StringToHGlobalAnsi(name);

            try {
                __var_Get(p_object, namePtr, ref value);
            } finally {
                Marshal.FreeHGlobal(namePtr);
            }
        }
Exemplo n.º 2
0
 public static extern void __var_Get(IntPtr p_object, IntPtr psz_name, ref vlc_value_t value);
Exemplo n.º 3
0
 public static void __var_Set(IntPtr p_object, string name, vlc_value_t value) {
     if (name == null) {
         throw new ArgumentNullException("name");
     }
     IntPtr namePtr = Marshal.StringToHGlobalAnsi(name);
     try {
         __var_Set(p_object, namePtr, value);
     } finally {
         Marshal.FreeHGlobal(namePtr);
     }
 }
Exemplo n.º 4
0
 public static extern void __var_Set(IntPtr p_object, IntPtr psz_name, vlc_value_t value);
Exemplo n.º 5
0
 private void setAdjustValue(string valueName, vlc_value_t value) {
     libvlc_instance_t instance = internalObjectsFactory.GetInteropStructure();
     processChangeVlcObjectsVariable(instance.p_libvlc_int, ADJUST_FILTER_ALIAS, valueName, value);
 }
Exemplo n.º 6
0
        /// <summary>
        /// Processes the vlc core objects tree recoursively and sets <paramref name="valueName"/> variable
        /// to <paramref name="value"/>. Objects with name equal to <paramref name="objectNameToSearch"/> will be processed.
        /// </summary>
        /// <param name="pObject">Parent in VLC tree (for example, libvlc_instance_t -> p_libvlc_int)</param>
        /// <param name="objectNameToSearch">Object name to search.</param>
        /// <param name="valueName">Name of variable to set.</param>
        /// <param name="value">New value of <paramref name="valueName"/> variable.</param>
        private static void processChangeVlcObjectsVariable(IntPtr pObject, string objectNameToSearch, string valueName,
                                                            vlc_value_t value) {
            vlc_common_members common_members =
                (vlc_common_members) Marshal.PtrToStructure(pObject, typeof(vlc_common_members));

            if (common_members.ObjectName == objectNameToSearch) {
                LibVlcInterop.__var_Set(
                    pObject,
                    valueName,
                    value);
            }

            libvlc_list_t childs = LibVlcInterop.__vlc_list_children(pObject);
            foreach (libvlc_value_t val in childs.values) {
                processChangeVlcObjectsVariable(val.p_object, objectNameToSearch, valueName, value);
                LibVlcInterop.__vlc_object_release(val.p_object);
            }
        }
Exemplo n.º 7
0
        /// <summary>
        /// Apply adjust filter settings to current playing videos.
        /// </summary>
        private void applyAdjustFilterSettings() {
            if (!IsFilterAvailable) {
                return;
            }
            //
            vlc_value_t vlc_value = new vlc_value_t();

            vlc_value.f_float = Brightness;
            setAdjustValue("brightness", vlc_value);

            vlc_value.f_float = Contrast;
            setAdjustValue("contrast", vlc_value);

            vlc_value.f_float = Gamma;
            setAdjustValue("gamma", vlc_value);

            vlc_value.f_float = Saturation;
            setAdjustValue("saturation", vlc_value);

            vlc_value.i_int = Hue;
            setAdjustValue("hue", vlc_value);
        }