[vlc-devel] FIX #17915:Introduce Icecast for macOS

David Fuhrmann david.fuhrmann at gmail.com
Sat Mar 17 11:53:46 CET 2018



> Am 15.03.2018 um 13:30 schrieb Vibhoothi <vibhoothiiaanand at gmail.com>:
> 
> Introduces Icecast as a new entry for the streaming option.
> There are 3 new entries in Convert & Stream menu
>             - Mount Point: Here user needs to enter mountpoint.
>             - Username       : Here user needs to enter his username.
>             - Password       : Here user needs to enter his password.
> In other versions of VLCs, there are no separate entries for username and password instead.
> In other versions of VLCs which support Icecast, there is only a  single entry "Login:pass" for inputting username and password for icecast which is really hard for the user to input, to prevent that there is a separate entry to input username and password this
> will make more user-friendly and enriches the User Experience.
> 
> Resolves: #17915.

Hello Vibhoothi,

Great to see the patches from you. I’ll try to give some comments below.
It would be great if you can think a bit more how the UI could be improved here as well. Your new fields are only useful for Icecast currently, so maybe you can group them a bit better, or make more clear when they can be used and when not?

> From ca06042c5670b98397cae9cab91eba5354db30ab Mon Sep 17 00:00:00 2001
> From: vibhoothiiaanand <vibhoothiiaanand at gmail.com>
> Date: Wed, 14 Mar 2018 22:13:33 +0530
> Subject: [PATCH 1/2] FIX #17915:Introduce Icecast for macOS

Please prefix patches with the module in question, in this case „macosx:“. The information which ticket this fixes should go in an extra line after the last paragraph.

> 
> Introduces Icecast as a new entry for the streaming option.
> There are 3 new entries in Convert & Stream menu
> 	- Mount Point: Here user needs to enter mountpoint.
> 	- Username	 : Here user needs to enter his username.
> 	- Password	 : Here user needs to enter his password.
> In other versions of VLCs, there are no separate entries for username and password
> instead
> In other versions of VLCs which support icecast,there is only a  single entry
> "Login:pass" for inputting username and password for icecast which is really hard for
> user to input,to prevent that there is separate entry to input username and password
> this will  make more user-friendly and enriches the User Experience.
> resolves: #17915.
> ---
>  modules/gui/macosx/UI/ConvertAndSave.xib           | 219 +++++++++++++--------
>  .../gui/macosx/VLCConvertAndSaveWindowController.h |   6 +
>  .../gui/macosx/VLCConvertAndSaveWindowController.m |  31 ++-
>  3 files changed, 168 insertions(+), 88 deletions(-)
> 
> diff --git a/modules/gui/macosx/UI/ConvertAndSave.xib b/modules/gui/macosx/UI/ConvertAndSave.xib
> index 8a0578362d..1424ff5a04 100644
> --- a/modules/gui/macosx/UI/ConvertAndSave.xib
> +++ b/modules/gui/macosx/UI/ConvertAndSave.xib
> @@ -1,9 +1,9 @@
>  <?xml version="1.0" encoding="UTF-8"?>
> -<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10117" systemVersion="16G29" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
> +<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="13771" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
>      <dependencies>
> -        <development version="7000" identifier="xcode"/>
> -        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="10117"/>
> +        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="13771"/>
>          <capability name="box content view" minToolsVersion="7.0"/>
> +        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
>      </dependencies>
>      <objects>
>          <customObject id="-2" userLabel="File's Owner" customClass="VLCConvertAndSaveWindowController">
> @@ -63,6 +63,8 @@
>                  <outlet property="fileDestinationFileNameStub" destination="49" id="559"/>
>                  <outlet property="fileDestinationIcon" destination="48" id="556"/>
>                  <outlet property="fileDestinationView" destination="387" id="555"/>
> +                <outlet property="mountPoint" destination="dMz-bA-LNV" id="4EW-33-mSL“/>

Consistency wise, why not also name it xxxField and xxxLabel, as below?

> +                <outlet property="mountPointField" destination="dMz-bA-LNV" id="Pwg-bv-Fle"/>
>                  <outlet property="okButton" destination="21" id="551"/>
>                  <outlet property="profileLabel" destination="11" id="544"/>
>                  <outlet property="profilePopup" destination="13" id="545"/>
> @@ -76,8 +78,14 @@
>                  <outlet property="streamDestinationLabel" destination="356" id="609"/>
>                  <outlet property="streamDestinationURLLabel" destination="300" id="561"/>
>                  <outlet property="streamDestinationView" destination="388" id="560"/>
> +                <outlet property="streamLoginPassField" destination="umM-an-G08" id="Jp6-hy-3fM"/>
> +                <outlet property="streamLoginPassLabel" destination="umM-an-G08" id="b24-MF-N6M"/>
> +                <outlet property="streamMountPointField" destination="dMz-bA-LNV" id="dA0-WS-4bR"/>
> +                <outlet property="streamMountPointLabel" destination="QJQ-Pq-rw0" id="gbO-Th-jDn"/>
>                  <outlet property="streamOkButton" destination="360" id="621"/>
>                  <outlet property="streamPanel" destination="308" id="608"/>
> +                <outlet property="streamPasswordField" destination="PoR-21-dj4" id="wOH-yD-xQF"/>
> +                <outlet property="streamPasswordLabel" destination="rhq-qR-z3e" id="ztk-bx-MXh"/>
>                  <outlet property="streamPortField" destination="312" id="626"/>
>                  <outlet property="streamPortLabel" destination="316" id="625"/>
>                  <outlet property="streamSAPCheckbox" destination="345" id="615"/>
> @@ -90,6 +98,8 @@
>                  <outlet property="streamTTLStepper" destination="319" id="624"/>
>                  <outlet property="streamTypeLabel" destination="310" id="610"/>
>                  <outlet property="streamTypePopup" destination="315" id="612"/>
> +                <outlet property="streamUsernameField" destination="2Vk-or-GKu" id="PZh-4t-0jm"/>
> +                <outlet property="streamUsernameLabel" destination="umM-an-G08" id="MFm-gf-f2w"/>
>                  <outlet property="window" destination="1" id="540"/>
>              </connections>
>          </customObject>
> @@ -99,7 +109,7 @@
>              <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>
>              <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
>              <rect key="contentRect" x="196" y="20" width="663" height="490"/>
> -            <rect key="screenRect" x="0.0" y="0.0" width="1280" height="778"/>
> +            <rect key="screenRect" x="0.0" y="0.0" width="1280" height="777"/>
>              <value key="minSize" type="size" width="663" height="490"/>
>              <value key="maxSize" type="size" width="663" height="490"/>
>              <view key="contentView" id="2">
> @@ -159,8 +169,6 @@
>                              <constraint firstAttribute="width" constant="623" id="1e9-iK-lfq"/>
>                              <constraint firstAttribute="height" constant="211" id="S51-zL-3hZ"/>
>                          </constraints>
> -                        <color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/>
> -                        <color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
>                      </box>
>                      <box autoresizesSubviews="NO" borderType="line" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="10">
>                          <rect key="frame" x="17" y="161" width="629" height="92"/>
> @@ -232,8 +240,6 @@
>                              <constraint firstAttribute="width" constant="623" id="pcx-Hn-9BS"/>
>                              <constraint firstAttribute="height" constant="86" id="tky-N9-PlT"/>
>                          </constraints>
> -                        <color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/>
> -                        <color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
>                      </box>
>                      <box autoresizesSubviews="NO" borderType="line" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="32">
>                          <rect key="frame" x="17" y="58" width="629" height="100"/>
> @@ -304,8 +310,6 @@
>                              <constraint firstAttribute="height" constant="94" id="136-J5-OdM"/>
>                              <constraint firstAttribute="width" constant="623" id="iQT-Dj-N9b"/>
>                          </constraints>
> -                        <color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/>
> -                        <color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
>                      </box>
>                      <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="21">
>                          <rect key="frame" x="579" y="13" width="70" height="32"/>
> @@ -367,7 +371,7 @@ DQ
>              <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
>              <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
>              <rect key="contentRect" x="340" y="255" width="558" height="382"/>
> -            <rect key="screenRect" x="0.0" y="0.0" width="1280" height="778"/>
> +            <rect key="screenRect" x="0.0" y="0.0" width="1280" height="800"/>
>              <view key="contentView" id="132">
>                  <rect key="frame" x="0.0" y="0.0" width="558" height="382"/>
>                  <autoresizingMask key="autoresizingMask"/>
> @@ -605,7 +609,7 @@ DQ
>                                                              <binding destination="-2" name="value" keyPath="self.vidFramerate" id="666"/>
>                                                          </connections>
>                                                      </stepper>
> -                                                    <box autoresizesSubviews="NO" title="Resolution" borderType="line" translatesAutoresizingMaskIntoConstraints="NO" id="206">
> +                                                    <box autoresizesSubviews="NO" borderType="line" title="Resolution" translatesAutoresizingMaskIntoConstraints="NO" id="206">
>                                                          <rect key="frame" x="52" y="10" width="394" height="133"/>
>                                                          <view key="contentView" id="4gP-3n-rkP">
>                                                              <rect key="frame" x="1" y="1" width="392" height="117"/>
> @@ -716,8 +720,6 @@ DQ
>                                                              <constraint firstAttribute="width" constant="388" id="6iM-rk-euR"/>
>                                                              <constraint firstAttribute="height" constant="129" id="L8c-wr-hjr"/>
>                                                          </constraints>
> -                                                        <color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/>
> -                                                        <color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
>                                                      </box>
>                                                  </subviews>
>                                                  <constraints>
> @@ -746,8 +748,6 @@ DQ
>                                                  <constraint firstAttribute="height" constant="244" id="dnU-6L-fqV"/>
>                                                  <constraint firstAttribute="width" constant="494" id="oMu-fT-rAi"/>
>                                              </constraints>
> -                                            <color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/>
> -                                            <color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
>                                          </box>
>                                      </subviews>
>                                      <constraints>
> @@ -775,7 +775,7 @@ DQ
>                                                  <action selector="audioSettingsChanged:" target="-2" id="638"/>
>                                              </connections>
>                                          </button>
> -                                        <button translatesAutoresizingMaskIntoConstraints="NO" id="208">
> +                                        <button misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="208">
>                                              <rect key="frame" x="15" y="248" width="153" height="18"/>
>                                              <buttonCell key="cell" type="check" title="Keep original audio track" bezelStyle="regularSquare" imagePosition="left" alignment="left" controlSize="small" state="on" inset="2" id="209">
>                                                  <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
> @@ -940,8 +940,6 @@ DQ
>                                                  <constraint firstAttribute="height" constant="140" id="lh4-g7-y9H"/>
>                                                  <constraint firstAttribute="width" constant="494" id="nFc-2s-PeV"/>
>                                              </constraints>
> -                                            <color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/>
> -                                            <color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
>                                          </box>
>                                      </subviews>
>                                      <constraints>
> @@ -1060,20 +1058,20 @@ Gw
>          <window title="Stream Panel" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" restorable="NO" oneShot="NO" releasedWhenClosed="NO" showsToolbarButton="NO" visibleAtLaunch="NO" animationBehavior="default" id="308" userLabel="Stream">
>              <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
>              <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
> -            <rect key="contentRect" x="131" y="60" width="532" height="368"/>
> -            <rect key="screenRect" x="0.0" y="0.0" width="1280" height="778"/>
> +            <rect key="contentRect" x="131" y="60" width="607" height="451"/>
> +            <rect key="screenRect" x="0.0" y="0.0" width="1280" height="777"/>
>              <view key="contentView" id="309">
> -                <rect key="frame" x="0.0" y="0.0" width="532" height="368"/>
> +                <rect key="frame" x="0.0" y="0.0" width="607" height="451"/>
>                  <autoresizingMask key="autoresizingMask"/>
>                  <subviews>
> -                    <box autoresizesSubviews="NO" title="Stream Destination" borderType="line" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="336">
> -                        <rect key="frame" x="17" y="227" width="498" height="122"/>
> +                    <box autoresizesSubviews="NO" borderType="line" title="Stream Destination" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="336">
> +                        <rect key="frame" x="55" y="227" width="498" height="205"/>
>                          <view key="contentView" id="gfn-LW-3Zl">
> -                            <rect key="frame" x="1" y="1" width="496" height="120"/>
> +                            <rect key="frame" x="1" y="1" width="496" height="203"/>
>                              <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
>                              <subviews>
>                                  <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="312">
> -                                    <rect key="frame" x="407" y="13" width="50" height="22"/>
> +                                    <rect key="frame" x="405" y="90" width="50" height="22"/>
>                                      <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="right" title="1234" drawsBackground="YES" id="332">
>                                          <font key="font" metaFont="system"/>
>                                          <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
> @@ -1084,7 +1082,7 @@ Gw
>                                      </connections>
>                                  </textField>
>                                  <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="317">
> -                                    <rect key="frame" x="407" y="46" width="50" height="22"/>
> +                                    <rect key="frame" x="405" y="123" width="50" height="22"/>
>                                      <constraints>
>                                          <constraint firstAttribute="width" constant="50" id="Ueo-G3-TfK"/>
>                                      </constraints>
> @@ -1094,20 +1092,12 @@ Gw
>                                          <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
>                                      </textFieldCell>
>                                  </textField>
> -                                <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="316">
> -                                    <rect key="frame" x="372" y="15" width="30" height="17"/>
> -                                    <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="right" title="Port" id="323">
> -                                        <font key="font" metaFont="system"/>
> -                                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
> -                                        <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
> -                                    </textFieldCell>
> -                                </textField>
>                                  <stepper horizontalHuggingPriority="750" verticalHuggingPriority="750" tag="1" translatesAutoresizingMaskIntoConstraints="NO" id="314">
> -                                    <rect key="frame" x="462" y="10" width="19" height="27"/>
> +                                    <rect key="frame" x="460" y="87" width="19" height="27"/>
>                                      <stepperCell key="cell" continuous="YES" alignment="left" tag="1" maxValue="65535" doubleValue="1234" valueWraps="YES" id="330"/>
>                                  </stepper>
>                                  <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="313">
> -                                    <rect key="frame" x="15" y="15" width="54" height="17"/>
> +                                    <rect key="frame" x="15" y="93" width="54" height="17"/>
>                                      <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="left" title="Address" id="331">
>                                          <font key="font" metaFont="system"/>
>                                          <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
> @@ -1115,7 +1105,7 @@ Gw
>                                      </textFieldCell>
>                                  </textField>
>                                  <popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="315">
> -                                    <rect key="frame" x="92" y="43" width="78" height="26"/>
> +                                    <rect key="frame" x="114" y="121" width="81" height="26"/>
>                                      <popUpButtonCell key="cell" type="push" title="HTTP" bezelStyle="rounded" alignment="left" lineBreakMode="clipping" state="on" borderStyle="borderAndBezel" inset="2" arrowPosition="arrowAtCenter" preferredEdge="maxY" selectedItem="329" id="324">
>                                          <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
>                                          <font key="font" metaFont="menu"/>
> @@ -1125,6 +1115,7 @@ Gw
>                                                  <menuItem title="MMSH" id="326"/>
>                                                  <menuItem title="RTP" id="328"/>
>                                                  <menuItem title="UDP" id="327"/>
> +                                                <menuItem title="Icecast" id="6RK-6i-sV4"/>
>                                              </items>
>                                          </menu>
>                                      </popUpButtonCell>
> @@ -1133,7 +1124,7 @@ Gw
>                                      </connections>
>                                  </popUpButton>
>                                  <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="310">
> -                                    <rect key="frame" x="15" y="48" width="34" height="17"/>
> +                                    <rect key="frame" x="15" y="126" width="34" height="17"/>
>                                      <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="left" title="Type" id="334">
>                                          <font key="font" metaFont="system"/>
>                                          <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
> @@ -1141,9 +1132,9 @@ Gw
>                                      </textFieldCell>
>                                  </textField>
>                                  <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="311">
> -                                    <rect key="frame" x="94" y="13" width="205" height="22"/>
> +                                    <rect key="frame" x="116" y="91" width="219" height="22"/>
>                                      <constraints>
> -                                        <constraint firstAttribute="width" constant="205" id="bzu-Kr-nS8"/>
> +                                        <constraint firstAttribute="width" constant="219" id="bzu-Kr-nS8"/>
>                                      </constraints>
>                                      <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" alignment="left" drawsBackground="YES" id="333">
>                                          <font key="font" metaFont="system"/>
> @@ -1152,7 +1143,7 @@ Gw
>                                      </textFieldCell>
>                                  </textField>
>                                  <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="318">
> -                                    <rect key="frame" x="374" y="48" width="28" height="17"/>
> +                                    <rect key="frame" x="372" y="127" width="28" height="17"/>
>                                      <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="right" title="TTL" id="321">
>                                          <font key="font" metaFont="system"/>
>                                          <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
> @@ -1160,38 +1151,103 @@ Gw
>                                      </textFieldCell>
>                                  </textField>
>                                  <stepper horizontalHuggingPriority="750" verticalHuggingPriority="750" tag="1" translatesAutoresizingMaskIntoConstraints="NO" id="319">
> -                                    <rect key="frame" x="462" y="43" width="19" height="27"/>
> +                                    <rect key="frame" x="460" y="120" width="19" height="27"/>
>                                      <stepperCell key="cell" continuous="YES" alignment="left" tag="1" minValue="1" maxValue="65535" doubleValue="1" valueWraps="YES" id="320"/>
>                                  </stepper>
>                                  <textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="356">
> -                                    <rect key="frame" x="15" y="85" width="159" height="22"/>
> +                                    <rect key="frame" x="15" y="161" width="159" height="22"/>
>                                      <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="left" title="Stream Destination" id="357">
>                                          <font key="font" metaFont="system" size="18"/>
>                                          <color key="textColor" name="headerColor" catalog="System" colorSpace="catalog"/>
>                                          <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
>                                      </textFieldCell>
>                                  </textField>
> +                                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="QJQ-Pq-rw0">
> +                                    <rect key="frame" x="15" y="65" width="78" height="17"/>
> +                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
> +                                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Mount Point" id="pLJ-la-ocQ">
> +                                        <font key="font" metaFont="system"/>
> +                                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
> +                                        <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
> +                                    </textFieldCell>
> +                                </textField>
> +                                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="umM-an-G08">
> +                                    <rect key="frame" x="15" y="38" width="66" height="17"/>
> +                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
> +                                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Username" id="xj8-Q2-G6S">
> +                                        <font key="font" metaFont="system"/>
> +                                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
> +                                        <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
> +                                    </textFieldCell>
> +                                </textField>
> +                                <textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="dMz-bA-LNV">
> +                                    <rect key="frame" x="116" y="62" width="219" height="22"/>
> +                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
> +                                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="LDl-c9-9bZ">
> +                                        <font key="font" metaFont="system"/>
> +                                        <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
> +                                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
> +                                    </textFieldCell>
> +                                </textField>
> +                                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="rhq-qR-z3e">
> +                                    <rect key="frame" x="15" y="12" width="63" height="17"/>
> +                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
> +                                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Password" id="pqt-sc-Mbg">
> +                                        <font key="font" metaFont="system"/>
> +                                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
> +                                        <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
> +                                    </textFieldCell>
> +                                </textField>
> +                                <textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="2Vk-or-GKu">
> +                                    <rect key="frame" x="116" y="35" width="163" height="22"/>
> +                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
> +                                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="Rvv-yZ-gnh">
> +                                        <font key="font" metaFont="system"/>
> +                                        <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
> +                                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
> +                                    </textFieldCell>
> +                                </textField>
> +                                <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="316">
> +                                    <rect key="frame" x="370" y="95" width="30" height="17"/>
> +                                    <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="right" title="Port" id="323">
> +                                        <font key="font" metaFont="system"/>
> +                                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
> +                                        <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
> +                                    </textFieldCell>
> +                                </textField>
> +                                <secureTextField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="PoR-21-dj4">
> +                                    <rect key="frame" x="116" y="7" width="163" height="22"/>
> +                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
> +                                    <secureTextFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" usesSingleLineMode="YES" id="q70-FT-7NN">
> +                                        <font key="font" metaFont="system"/>
> +                                        <color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
> +                                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
> +                                        <allowedInputSourceLocales>
> +                                            <string>NSAllRomanInputSourcesLocaleIdentifier</string>
> +                                        </allowedInputSourceLocales>
> +                                    </secureTextFieldCell>
> +                                </secureTextField>
>                              </subviews>
>                              <constraints>
>                                  <constraint firstItem="319" firstAttribute="leading" secondItem="317" secondAttribute="trailing" constant="8" id="1J1-fz-uqL"/>
> -                                <constraint firstAttribute="bottom" secondItem="311" secondAttribute="bottom" constant="13" id="9db-uY-dLu"/>
> +                                <constraint firstAttribute="bottom" secondItem="311" secondAttribute="bottom" constant="91" id="9db-uY-dLu"/>
>                                  <constraint firstItem="317" firstAttribute="leading" secondItem="312" secondAttribute="leading" id="B24-Xh-2YT"/>
>                                  <constraint firstItem="311" firstAttribute="top" secondItem="315" secondAttribute="bottom" constant="11" id="EEV-RU-fKU"/>
> -                                <constraint firstItem="356" firstAttribute="top" secondItem="gfn-LW-3Zl" secondAttribute="top" constant="13" id="EUx-Vr-JKJ"/>
> +                                <constraint firstItem="356" firstAttribute="top" secondItem="gfn-LW-3Zl" secondAttribute="top" constant="20" id="EUx-Vr-JKJ"/>
>                                  <constraint firstItem="313" firstAttribute="leading" secondItem="gfn-LW-3Zl" secondAttribute="leading" constant="17" id="G13-rA-ECe"/>
> -                                <constraint firstItem="312" firstAttribute="centerY" secondItem="311" secondAttribute="centerY" id="HHB-Fo-vCn"/>
> -                                <constraint firstAttribute="trailing" secondItem="314" secondAttribute="trailing" constant="18" id="I11-8g-N92"/>
> +                                <constraint firstItem="312" firstAttribute="centerY" secondItem="311" secondAttribute="centerY" constant="1" id="HHB-Fo-vCn"/>
> +                                <constraint firstAttribute="trailing" secondItem="314" secondAttribute="trailing" constant="20" id="I11-8g-N92"/>
>                                  <constraint firstItem="310" firstAttribute="centerY" secondItem="315" secondAttribute="centerY" id="J0J-Yp-kdf"/>
> -                                <constraint firstItem="312" firstAttribute="centerY" secondItem="316" secondAttribute="centerY" id="Klv-C0-qsH"/>
> +                                <constraint firstItem="312" firstAttribute="centerY" secondItem="316" secondAttribute="centerY" constant="2.5" id="Klv-C0-qsH"/>
>                                  <constraint firstItem="310" firstAttribute="leading" secondItem="313" secondAttribute="leading" id="LOo-Sy-AK0"/>
> -                                <constraint firstItem="311" firstAttribute="leading" secondItem="313" secondAttribute="trailing" constant="27" id="PSk-Ee-ahr"/>
> +                                <constraint firstItem="311" firstAttribute="leading" secondItem="313" secondAttribute="trailing" constant="49" id="PSk-Ee-ahr"/>
>                                  <constraint firstItem="313" firstAttribute="centerY" secondItem="311" secondAttribute="centerY" id="UUs-0L-ljX"/>
>                                  <constraint firstItem="312" firstAttribute="top" secondItem="317" secondAttribute="bottom" constant="11" id="Vy2-og-cY7"/>
>                                  <constraint firstItem="317" firstAttribute="width" secondItem="312" secondAttribute="width" id="Wkm-g7-FEr"/>
>                                  <constraint firstItem="312" firstAttribute="centerY" secondItem="314" secondAttribute="centerY" id="Zro-Ez-WqJ"/>
>                                  <constraint firstItem="317" firstAttribute="centerY" secondItem="319" secondAttribute="centerY" id="hlN-QB-SyW"/>
>                                  <constraint firstItem="315" firstAttribute="leading" secondItem="311" secondAttribute="leading" id="ivq-3S-Xod"/>
> -                                <constraint firstItem="317" firstAttribute="centerY" secondItem="318" secondAttribute="centerY" id="o0w-qr-6dp"/>
> +                                <constraint firstItem="317" firstAttribute="centerY" secondItem="318" secondAttribute="centerY" constant="1.5" id="o0w-qr-6dp"/>
>                                  <constraint firstItem="312" firstAttribute="leading" secondItem="316" secondAttribute="trailing" constant="7" id="qH3-sx-ytI"/>
>                                  <constraint firstItem="314" firstAttribute="leading" secondItem="312" secondAttribute="trailing" constant="8" id="wJP-rr-NJH"/>
>                                  <constraint firstItem="356" firstAttribute="leading" secondItem="gfn-LW-3Zl" secondAttribute=„leading"

It looks like you did not add any additional layout constraints.
VLC is using Autolayout to position its widgets at runtime, if you did not do so far, you should take a more close look at it.

It is usually expected that for each new widget you add 4 constraints, describing the distance of the widget to its next left / right / top / bottom widget.

Please check out the current auto layout constraints, and add do the same for the new elements.

> constant="17" id="y7X-gF-I3k"/>
> @@ -1200,13 +1256,37 @@ Gw
>                          </view>
>                          <constraints>
>                              <constraint firstAttribute="width" constant="492" id="GA5-xc-ed7"/>
> -                            <constraint firstAttribute="height" constant="116" id="Hhe-6F-sqP"/>
> +                            <constraint firstAttribute="height" constant="199" id="Hhe-6F-sqP"/>
>                          </constraints>
> -                        <color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/>
> -                        <color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
>                      </box>
> +                    <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="360">
> +                        <rect key="frame" x="518" y="12" width="75" height="32"/>
> +                        <buttonCell key="cell" type="push" title="Apply" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="361">
> +                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
> +                            <font key="font" metaFont="system"/>
> +                            <string key="keyEquivalent" base64-UTF8="YES">
> +DQ
> +</string>
> +                        </buttonCell>
> +                        <connections>
> +                            <action selector="closeStreamPanel:" target="-2" id="643"/>
> +                        </connections>
> +                    </button>
> +                    <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="532">
> +                        <rect key="frame" x="436" y="12" width="82" height="32"/>
> +                        <buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="533">
> +                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
> +                            <font key="font" metaFont="system"/>
> +                            <string key="keyEquivalent" base64-UTF8="YES">
> +Gw
> +</string>
> +                        </buttonCell>
> +                        <connections>
> +                            <action selector="closeStreamPanel:" target="-2" id="642"/>
> +                        </connections>
> +                    </button>
>                      <box title="Stream Announcing" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="337">
> -                        <rect key="frame" x="17" y="56" width="498" height="169"/>
> +                        <rect key="frame" x="54" y="56" width="498" height="169"/>
>                          <view key="contentView" id="N8c-ne-PD9">
>                              <rect key="frame" x="2" y="2" width="494" height="165"/>
>                              <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
> @@ -1349,35 +1429,7 @@ Gw
>                              <constraint firstAttribute="width" constant="492" id="EiF-2M-nAp"/>
>                              <constraint firstAttribute="height" constant="163" id="rnv-0L-LCw"/>
>                          </constraints>
> -                        <color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/>
> -                        <color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
>                      </box>
> -                    <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="360">
> -                        <rect key="frame" x="443" y="12" width="75" height="32"/>
> -                        <buttonCell key="cell" type="push" title="Apply" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="361">
> -                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
> -                            <font key="font" metaFont="system"/>
> -                            <string key="keyEquivalent" base64-UTF8="YES">
> -DQ
> -</string>
> -                        </buttonCell>
> -                        <connections>
> -                            <action selector="closeStreamPanel:" target="-2" id="643"/>
> -                        </connections>
> -                    </button>
> -                    <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="532">
> -                        <rect key="frame" x="361" y="12" width="82" height="32"/>
> -                        <buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="533">
> -                            <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
> -                            <font key="font" metaFont="system"/>
> -                            <string key="keyEquivalent" base64-UTF8="YES">
> -Gw
> -</string>
> -                        </buttonCell>
> -                        <connections>
> -                            <action selector="closeStreamPanel:" target="-2" id="642"/>
> -                        </connections>
> -                    </button>
>                  </subviews>
>                  <constraints>
>                      <constraint firstItem="336" firstAttribute="top" secondItem="309" secondAttribute="top" constant="21" id="56g-ml-XeM"/>
> @@ -1393,6 +1445,7 @@ Gw
>              <connections>
>                  <outlet property="initialFirstResponder" destination="311" id="386"/>
>              </connections>
> +            <point key="canvasLocation" x="0.5" y="42.5"/>
>          </window>
>          <customView id="387" userLabel="File Dest">
>              <rect key="frame" x="0.0" y="0.0" width="531" height="72"/>
> diff --git a/modules/gui/macosx/VLCConvertAndSaveWindowController.h b/modules/gui/macosx/VLCConvertAndSaveWindowController.h
> index 930b086946..26cf860250 100644
> --- a/modules/gui/macosx/VLCConvertAndSaveWindowController.h
> +++ b/modules/gui/macosx/VLCConvertAndSaveWindowController.h
> @@ -123,6 +123,12 @@
>  @property (weak) IBOutlet NSTextField *streamChannelLabel;
>  @property (weak) IBOutlet NSTextField *streamChannelField;
>  @property (weak) IBOutlet NSMatrix *streamSDPMatrix;
> + at property (weak) IBOutlet NSTextField *streamMountPointLabel;
> + at property (weak) IBOutlet NSTextField *streamMountPointField;
> + at property (weak) IBOutlet NSTextField *streamUsernameLabel;
> + at property (weak) IBOutlet NSTextField *streamUsernameField;
> + at property (weak) IBOutlet NSTextField *streamPasswordLabel;
> + at property (weak) IBOutlet NSTextField *streamPasswordField;
>  @property (weak) IBOutlet NSButton *streamSDPFileBrowseButton;
>  @property (weak) IBOutlet NSTextField *streamSDPLabel;
>  @property (weak) IBOutlet NSTextField *streamSDPField;
> diff --git a/modules/gui/macosx/VLCConvertAndSaveWindowController.m b/modules/gui/macosx/VLCConvertAndSaveWindowController.m
> index b0efac7584..5b18be6521 100644
> --- a/modules/gui/macosx/VLCConvertAndSaveWindowController.m
> +++ b/modules/gui/macosx/VLCConvertAndSaveWindowController.m
> @@ -519,7 +519,7 @@
>          return;
>  
>      /* provide a summary of the user selections */
> -    NSMutableString * labelContent = [[NSMutableString alloc] initWithFormat:_NS("%@ stream to %@:%@"), [_streamTypePopup titleOfSelectedItem], [_streamAddressField stringValue], [_streamPortField stringValue]];
> +    NSMutableString * labelContent = [[NSMutableString alloc] initWithFormat:_NS("%@ stream to %@:%@"), [_streamTypePopup titleOfSelectedItem], [_streamAddressField stringValue] ];
>  
>      if ([_streamTypePopup indexOfSelectedItem] > 1)
>          [labelContent appendFormat:@" (\"%@\")", [_streamChannelField stringValue]];
> @@ -556,21 +556,39 @@
>  - (IBAction)streamTypeToggle:(id)sender
>  {
>      NSUInteger index = [_streamTypePopup indexOfSelectedItem];
> -    if (index <= 1) { // HTTP, MMSH
> +    if (index <= 1) { // HTTP , MMSH
>          [_streamTTLField setEnabled:NO];
>          [_streamTTLStepper setEnabled:NO];
>          [_streamSAPCheckbox setEnabled:NO];
>          [_streamSDPMatrix setEnabled:NO];
> +        [_streamMountPointField setEnabled:NO];
> +        [_streamUsernameField setEnabled:NO];
> +        [_streamPasswordField setEnabled:NO];

You should factor that out into a separate method to avoid repetition.

>      } else if (index == 2) { // RTP
>          [_streamTTLField setEnabled:YES];
>          [_streamTTLStepper setEnabled:YES];
>          [_streamSAPCheckbox setEnabled:YES];
>          [_streamSDPMatrix setEnabled:YES];
> -    } else { // UDP
> +        [_streamMountPointField setEnabled:NO];
> +        [_streamUsernameField setEnabled:NO];
> +        [_streamPasswordField setEnabled:NO];
> +    }else if(index == 3) { // UDP
>          [_streamTTLField setEnabled:YES];
>          [_streamTTLStepper setEnabled:YES];
>          [_streamSAPCheckbox setEnabled:YES];
>          [_streamSDPMatrix setEnabled:NO];
> +        [_streamMountPointField setEnabled:NO];
> +        [_streamUsernameField setEnabled:NO];
> +        [_streamPasswordField setEnabled:NO];
> +    }else { //Icecast
> +        [_streamTTLField setEnabled:NO];
> +        [_streamTTLStepper setEnabled:NO];
> +        [_streamSAPCheckbox setEnabled:NO];
> +        [_streamSDPMatrix setEnabled:NO];
> +        [_streamMountPointField setEnabled:YES];
> +        [_streamUsernameField setEnabled:YES];
> +        [_streamPasswordField setEnabled:YES];
> +       
>      }
>      [self streamAnnouncementToggle:sender];
>  }
> @@ -930,7 +948,7 @@
>          if ([[self.currentProfile objectAtIndex:15] intValue])
>              [composedOptions appendFormat:@",soverlay"];
>      }
> -
> +    

Please configure you Code editor to always trim trailing whitespaces, they should not be part of any patch set.

>      if (!b_streaming) {
>          /* file transcoding */
>          // add muxer
> @@ -942,11 +960,14 @@
>                                                                             withString:@"\\\""];
>          [composedOptions appendFormat:@",access=file{no-overwrite},dst=\"%@\"}", _outputDestination];
>      } else {
> +        [composedOptions appendString:@"}"];
>          /* streaming */
>          if ([[[_streamTypePopup selectedItem] title] isEqualToString:@"RTP"])
>              [composedOptions appendFormat:@":rtp{mux=ts,dst=%@,port=%@", _outputDestination, [_streamPortField stringValue]];
>          else if ([[[_streamTypePopup selectedItem] title] isEqualToString:@"UDP"])
>              [composedOptions appendFormat:@":standard{mux=ts,dst=%@,port=%@,access=udp", _outputDestination, [_streamPortField stringValue]];
> +        else if ([[[_streamTypePopup selectedItem] title] isEqualToString:@"Icecast"])
> +            [composedOptions appendFormat:@":standard{mux=ogg,dst=%@:%@@%@,access=shout",  [_streamUsernameField stringValue], [_streamPasswordField stringValue], _outputDestination];

Please check and fix escaping here. I presume that this will fail, if the user chooses a password which contains „@" for instance.

>          else if ([[[_streamTypePopup selectedItem] title] isEqualToString:@"MMSH"])
>              [composedOptions appendFormat:@":standard{mux=asfh,dst=%@,port=%@,access=mmsh", _outputDestination, [_streamPortField stringValue]];
>          else
> @@ -970,7 +991,7 @@
>              }
>          }
>  
> -        [composedOptions appendString:@"} :sout-keep"];
> +        [composedOptions appendString:@"}"];
>      }
>  
>      return [NSString stringWithString:composedOptions];
> -- 
> 2.15.1
> 

> From 4266cf7b9e8899954dbec6d7b6fc43113288d194 Mon Sep 17 00:00:00 2001
> From: vibhoothiiaanand <vibhoothiiaanand at gmail.com>
> Date: Wed, 14 Mar 2018 23:33:14 +0530
> Subject: [PATCH 2/2] FIX #17915:Introduce Icecast for macOS
> 
> ---
>  modules/access_output/shout.c | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/modules/access_output/shout.c b/modules/access_output/shout.c
> index 6bd0776ad9..3a6bf90c69 100644
> --- a/modules/access_output/shout.c
> +++ b/modules/access_output/shout.c
> @@ -202,12 +202,13 @@ static int Open( vlc_object_t *p_this )
>      psz_url = var_GetNonEmptyString( p_access, SOUT_CFG_PREFIX "url" );
>  
>      p_shout = p_sys->p_shout = shout_new();
> +    
>      if( !p_shout
>           || shout_set_host( p_shout, url.psz_host ) != SHOUTERR_SUCCESS
>           || shout_set_protocol( p_shout, SHOUT_PROTOCOL_ICY ) != SHOUTERR_SUCCESS
>           || shout_set_port( p_shout, url.i_port ) != SHOUTERR_SUCCESS
>           || shout_set_password( p_shout, url.psz_password ) != SHOUTERR_SUCCESS
> -         || shout_set_mount( p_shout, url.psz_path ) != SHOUTERR_SUCCESS
> +         || shout_set_mount(p_shout, (url.psz_path != NULL)?url.psz_path:"/") != SHOUTERR_SUCCESS

Please add whitespaces around „?“ and „:“.

>           || shout_set_user( p_shout, url.psz_username ) != SHOUTERR_SUCCESS
>           || shout_set_agent( p_shout, "VLC media player " VERSION ) != SHOUTERR_SUCCESS
>           || shout_set_name( p_shout, psz_name ) != SHOUTERR_SUCCESS
> @@ -217,16 +218,14 @@ static int Open( vlc_object_t *p_this )
>           /* || shout_set_nonblocking( p_shout, 1 ) != SHOUTERR_SUCCESS */
>        )
>      {
> -        msg_Err( p_access, "failed to initialize shout streaming to %s:%i/%s",
> -                 url.psz_host, url.i_port, url.psz_path );
> -
> +       	msg_Err( p_access, "failed to initialize shout streaming to s:%i/%s: %s; %s",
> +                 url.psz_host, url.i_port, url.psz_path,shout_get_error(p_shout) );

Add Whitespace after „,“. Maybe also describe in error message better what the last parameter is.

>          free( psz_name );
>          free( psz_description );
>          free( psz_genre );
>          free( psz_url );
>          goto error;
>      }
> -
>      free( psz_name );
>      free( psz_description );
>      free( psz_genre );
> -- 
> 2.15.1
> 


More information about the vlc-devel mailing list