<br><br><div class="gmail_quote">On Wed, Feb 24, 2010 at 10:00 AM, Jakob Leben <span dir="ltr"><<a href="mailto:jakob.leben@gmail.com" target="_blank">jakob.leben@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><div></div><div><div class="gmail_quote">On Wed, Feb 24, 2010 at 12:34 AM, Fabio Ritrovato <span dir="ltr"><<a href="mailto:exsephiroth87@gmail.com" target="_blank">exsephiroth87@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
I worked on your patch a bit, that's as far as I could go at the<br>
moment in qt4...<br>
I'm still not really sure if it's useful, but if you're ok j-b said it<br>
can be merged...<br></blockquote></div><br></div></div><blockquote style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex" class="gmail_quote">+void<br>+services_discovery_SetLoading ( services_discovery_t * p_sd, bool loading )<br>


+{<br>+    vlc_event_t event;<br>+    event.type = vlc_ServicesDiscoveryLoadingChanged;<br>+    event.u.services_discovery_loading_changed.new_value = loading;<br>+<br>+    vlc_event_send( &p_sd->event_manager, &event );<br>


+}<br>+<br><br>+/* A certain sd is loading */<br>+static void playlist_sd_loading_changed( const vlc_event_t *p_event, void *user_data )<br>+{<br>+    bool isLoading = p_event->u.services_discovery_loading_changed.new_value;<br>


+    vlc_sd_internal_t *p_sds = user_data;<br>+    playlist_t *p_playlist = p_sds->p_node->p_playlist;<br>+    p_sds->p_sd->b_loading = isLoading;<br>+    var_SetAddress(  p_playlist, "sd-loading", p_sds->p_sd );<br>


+}<br></blockquote><br>Hi Fabio, here is my opinions on the patch:<br><br>I believe the services_discovery_t: b_loading
field should be
protected by some mutex, which services_discovery_t does not have yet.<br><br>I would suggest to:<br><br>A. Either move the b_loading field into playlist's struct vlc_sd_internal_t and use playlist lock to protect it, while adding a public function playlist_IsServicesDiscoveryLoading( ).<br>

</blockquote><div><br></div><div>Was going to suggest the same thing. Except, put it in the (just added) services_discovery's private member. And use services_discovery_IsLoading().</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
B: Or remove the b_loading field and pass the loading state as bool through callbacks all the way until Qt intf.<br></blockquote><div><br></div><div>As you want :)</div><div><br></div><div>Pierre. </div></div>