static const long MaxQueuedItem = 300000;
long count = 0;
#endif
-
+
struct queue_elmt * elmt = malloc(sizeof(struct queue_elmt));
elmt->listener = *listener;
elmt->event = *event;
elmt->next = NULL;
-
+
/* Append to the end of the queue */
struct queue_elmt * iter = queue(p_em)->elements;
if(!iter)
*listener = queue(p_em)->elements->listener;
*event = queue(p_em)->elements->event;
-
+
struct queue_elmt * elmt = queue(p_em)->elements;
queue(p_em)->elements = elmt->next;
free(elmt);
**************************************************************************/
void
libvlc_event_async_fini(libvlc_event_manager_t * p_em)
-{
+{
if(!is_queue_initialized(p_em)) return;
if(current_thread_is_asynch_thread(p_em))
fprintf(stderr, "*** Error: releasing the last reference of the observed object from its callback thread is not (yet!) supported\n");
abort();
}
-
+
vlc_thread_t thread = queue(p_em)->thread;
if(thread)
{
iter = iter->next;
free(elemt_to_delete);
}
-
+
free(queue(p_em));
}
vlc_mutex_init(&queue(p_em)->lock);
vlc_cond_init(&queue(p_em)->signal);
vlc_cond_init(&queue(p_em)->signal_idle);
-
+
error = vlc_clone (&queue(p_em)->thread, event_async_loop, p_em, VLC_THREAD_PRIORITY_LOW);
if(error)
{
queue_lock(p_em);
pop_listener(p_em, listener);
-
+
// Wait for the asynch_loop to have processed all events.
if(!current_thread_is_asynch_thread(p_em))
{
vlc_cond_broadcast(&queue(p_em)->signal_idle); // We'll be idle
vlc_cond_wait(&queue(p_em)->signal, &queue(p_em)->lock);
vlc_cleanup_pop();
-
+
queue(p_em)->is_idle = false;
}
}
/* Ignore exception, we will assume a 0 time value */
l_pos = private_mediacontrol_unit_convert( p_media_player,
- pos->key,
- mediacontrol_MediaTime,
- pos->value );
+ pos->key,
+ mediacontrol_MediaTime,
+ pos->value );
return 1000 * ( l_time + l_pos );
break;
}
/* Ignore exception, we will assume a 0 time value */
l_pos = private_mediacontrol_unit_convert( p_media_player,
- pos->key,
- mediacontrol_MediaTime,
- pos->value );
+ pos->key,
+ mediacontrol_MediaTime,
+ pos->value );
return 1000 * ( ( l_time + l_pos ) % l_length );
break;
*/
mediacontrol_RGBPicture*
private_mediacontrol_createRGBPicture( int i_width, int i_height, long i_chroma, int64_t l_date,
- char* p_data, int i_datasize )
+ char* p_data, int i_datasize )
{
mediacontrol_RGBPicture *retval;