<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Felix,<div><br></div><div>thanks for your comments.</div><div><br></div><div><blockquote type="cite">- for - (NSString*) nameOfCurrentItem, lastComponent isn't the way to go. instead, you should do something like this:</blockquote></div><div><br></div><div>Did you mean this:</div><div><br></div><div>that function in <span class="Apple-style-span" style="color: rgb(81, 129, 135); font-family: Menlo; font-size: 11px; ">VLCCoreInteraction </span>can stay as it is</div><div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">- (NSString*)pathOfCurrentPlaylistItem</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">{</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span>input_thread_t *p_input = pl_CurrentInput( <span style="color: #77492d">VLCIntf</span> );<span class="Apple-tab-span" style="white-space:pre"> </span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span><span style="color: #b930a1">if</span> (!p_input) <span style="color: #b930a1">return</span> <span style="color: #b930a1">nil</span>;<span class="Apple-tab-span" style="white-space:pre"> </span></div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px"><span class="Apple-tab-span" style="white-space:pre"> </span><br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span>input_item_t *p_item = input_GetItem( p_input );<span class="Apple-tab-span" style="white-space:pre"> </span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span><span style="color: #b930a1">if</span> (!p_item) <span style="color: #b930a1">return</span> <span style="color: #b930a1">nil</span>;<span class="Apple-tab-span" style="white-space:pre"> </span></div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px"><span class="Apple-tab-span" style="white-space:pre"> </span><br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span><span style="color: #b930a1">char</span> *psz_uri = input_item_GetURI( p_item );<span class="Apple-tab-span" style="white-space:pre"> </span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span><span style="color: #b930a1">if</span> (!psz_uri) <span style="color: #b930a1">return</span> <span style="color: #b930a1">nil</span>;</div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px"><span class="Apple-tab-span" style="white-space:pre"> </span><br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span>NSString *o_name;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span>o_name = [[NSURL URLWithString:[NSString stringWithUTF8String:psz_uri]] path];<span class="Apple-tab-span" style="white-space:pre"> </span></div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px"><span class="Apple-tab-span" style="white-space:pre"> </span><br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span><span style="color: #b930a1">return</span> o_name;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">}</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; min-height: 13px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; min-height: 13px; "><span class="Apple-style-span" style="font-family: Helvetica; font-size: medium; ">that function should be added to </span><span class="Apple-style-span" style="font-size: medium; font-family: Helvetica; "><span class="Apple-style-span" style="color: rgb(81, 129, 135); font-family: Menlo; font-size: 11px; ">VLCCoreInteraction </span></span><span class="Apple-style-span" style="font-family: Helvetica; font-size: medium; ">???</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; min-height: 13px; "><span class="Apple-style-span" style="font-family: Helvetica; font-size: medium; "><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">- (NSString*)nameOfCurrentPlaylistItem</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">{</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span>input_thread_t *p_input = pl_CurrentInput( <span style="color: #77492d">VLCIntf</span> );<span class="Apple-tab-span" style="white-space:pre"> </span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span><span style="color: #b930a1">if</span> (!p_input) <span style="color: #b930a1">return</span> <span style="color: #b930a1">nil</span>;<span class="Apple-tab-span" style="white-space:pre"> </span></div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px"><span class="Apple-tab-span" style="white-space:pre"> </span><br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span>input_item_t *p_item = input_GetItem( p_input );<span class="Apple-tab-span" style="white-space:pre"> </span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span><span style="color: #b930a1">if</span> (!p_item) <span style="color: #b930a1">return</span> <span style="color: #b930a1">nil</span>;<span class="Apple-tab-span" style="white-space:pre"> </span></div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px"><span class="Apple-tab-span" style="white-space:pre"> </span><br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span><span style="color: #b930a1">char</span> *psz_uri = input_item_GetURI( p_item );<span class="Apple-tab-span" style="white-space:pre"> </span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span><span style="color: #b930a1">if</span> (!psz_uri) <span style="color: #b930a1">return</span> <span style="color: #b930a1">nil</span>;</div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px"><span class="Apple-tab-span" style="white-space:pre"> </span><br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span>NSString *o_name;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span><span style="color: #b930a1">char</span> *format = var_InheritString( <span style="color: #77492d">VLCIntf</span>, <span style="color: #ce2f24">"input-title-format"</span> );</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span><span style="color: #b930a1">char</span> *formated = str_format_meta( p_input, format );</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span>free( format );</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span>o_name = [NSString stringWithUTF8String:formated];</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span>free( formated );</div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px"><span class="Apple-tab-span" style="white-space:pre"> </span><br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span>NSURL * o_url = [NSURL URLWithString: [NSString stringWithUTF8String: psz_uri]];</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span>free( psz_uri );</div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px"><span class="Apple-tab-span" style="white-space:pre"> </span><br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span><span style="color: #b930a1">if</span> ([aString isEqualToString:<span style="color: #ce2f24">@""</span>])</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span>{</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span><span style="color: #b930a1">if</span> ([o_url isFileURL]) </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span>o_name = [[NSFileManager defaultManager] displayNameAtPath: [o_url path]];</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(185, 48, 161); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre"> </span></span>else</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span>o_name = [o_url absoluteString];</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span>}</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span><span style="color: #b930a1">return</span> o_name;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">}</div></div><div><br></div><div><br></div><div><blockquote type="cite">Additionally, setAudioVolume will need to be re-written, since the core's volume scale was changed to be cubic with a maximum of 200 % as far as I remember. However, this change wasn't reflected in the OS X UI so far.</blockquote><br></div><div>Does that mean that <span class="Apple-style-span" style="color: rgb(51, 89, 93); font-family: Menlo; font-size: 11px; "><span style="color: #000000">[[</span></span><span class="Apple-style-span" style="color: rgb(51, 89, 93); font-family: Menlo; font-size: 11px; "><span style="color: #518187">VLCCoreInteraction</span></span><span class="Apple-style-span" style="color: rgb(51, 89, 93); font-family: Menlo; font-size: 11px; "><span style="color: #000000"> </span></span><span class="Apple-style-span" style="color: rgb(51, 89, 93); font-family: Menlo; font-size: 11px; ">sharedInstance</span><span class="Apple-style-span" style="color: rgb(51, 89, 93); font-family: Menlo; font-size: 11px; "><span style="color: #000000">] </span></span><span class="Apple-style-span" style="color: rgb(51, 89, 93); font-family: Menlo; font-size: 11px; ">setVolume</span><span class="Apple-style-span" style="color: rgb(51, 89, 93); font-family: Menlo; font-size: 11px; "><span style="color: #000000">:i_parameter] stays the same, I have to adjust the function in applescript.m? Is it enough to limit the scale to 200% or do you mean with cubic a non-linear scale?</span></span></div><div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">- (<span style="color: #b930a1">void</span>) setAudioVolume: (<span style="color: #b930a1">double</span>) d_audioVolume {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(0, 131, 17); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre"> </span></span>//1 = 100%, 4 = 400%; 0 <= d_audioVolume <= 4 </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(0, 131, 17); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre"> </span></span>//0-1024 (but AOUT_VOLUME_MAX == 512)???</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(0, 131, 17); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre"> </span></span>//AOUT_VOLUME_DEFAULT = 256 = 100%</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(0, 131, 17); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre"> </span></span>//somehow [[VLCCoreInteraction sharedInstance] setVolume:i_parameter] has 0-32 steps with 32 as stepWidth (0 - 1024)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span><span style="color: #b930a1">if</span> (d_audioVolume < <span style="color: #3031d5">0</span>)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span>d_audioVolume = <span style="color: #3031d5">0</span>;</div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px"><span class="Apple-tab-span" style="white-space:pre"> </span><br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span><span style="color: #b930a1">if</span> (d_audioVolume > <span style="color: #3031d5">4</span>)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span>d_audioVolume = <span style="color: #3031d5">4</span>;</div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px"><span class="Apple-tab-span" style="white-space:pre"> </span><br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span>intf_thread_t * p_intf = <span style="color: #77492d">VLCIntf</span>;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span>playlist_t * p_playlist = pl_Get( <span style="color: #77492d">VLCIntf</span> );</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span><span style="color: #b930a1">int</span> i_volume_step = config_GetInt( <span style="color: #77492d">VLCIntf</span>->p_libvlc, <span style="color: #ce2f24">"volume-step"</span> );</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; min-height: 13px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"> </span><span style="color: #b930a1">int</span> i_parameter = (<span style="color: #b930a1">int</span>) ( d_audioVolume * i_volume_step / <span style="color: #3031d5">4</span> );</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(51, 89, 93); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre"> </span>[[</span><span style="color: #518187">VLCCoreInteraction</span><span style="color: #000000"> </span>sharedInstance<span style="color: #000000">] </span>setVolume<span style="color: #000000">:i_parameter];</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">}</div></div><div><br></div><div><br></div><div>Do you've got a hint for me how to use one of the functions like <span class="Apple-style-span" style="font-family: Menlo; font-size: 11px; ">libvlc_audio_get_track_count </span>in libvlc_media_player.h ?</div><div><br></div><div>I tried <a href="http://s.th">s.th</a>. like:</div><div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">libvlc_media_player_t *p_media_player = mediacontrol_get_media_player( <span style="color: #77492d">???</span> );</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span style="color: #b930a1">int</span> i = libvlc_audio_get_track_count( p_media_player );</div></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><font class="Apple-style-span" face="Helvetica" size="3">but I don't know how to get a mediacontrol_instance and I also get compile errors, because </font><span class="Apple-style-span" style="font-family: Helvetica; font-size: medium; ">libvlc_media_player.h can't be found…</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-style-span" style="font-family: Helvetica; font-size: medium; ">Any hints would be really appreciated, cause I spent some hours without effort finding my way :(</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-style-span" style="font-family: Helvetica; font-size: medium; "><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-style-span" style="font-family: Helvetica; font-size: medium; ">Thanks</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-style-span" style="font-family: Helvetica; font-size: medium; ">Jan</span></div><div><br></div><div><br></div><div><br></div></body></html>