1 /*****************************************************************************
2 * media_instance.c: Libvlc API Media Instance management functions
3 *****************************************************************************
4 * Copyright (C) 2005 the VideoLAN team
7 * Authors: Clément Stenac <zorglub@videolan.org>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22 *****************************************************************************/
24 #include "libvlc_internal.h"
26 #include <vlc/libvlc.h>
27 #include <vlc_demux.h>
28 #include <vlc_input.h>
32 input_state_changed( vlc_object_t * p_this, char const * psz_cmd,
33 vlc_value_t oldval, vlc_value_t newval,
36 input_position_changed( vlc_object_t * p_this, char const * psz_cmd,
37 vlc_value_t oldval, vlc_value_t newval,
40 input_time_changed( vlc_object_t * p_this, char const * psz_cmd,
41 vlc_value_t oldval, vlc_value_t newval,
44 static const libvlc_state_t vlc_to_libvlc_state_array[] =
46 [INIT_S] = libvlc_Opening,
47 [OPENING_S] = libvlc_Opening,
48 [BUFFERING_S] = libvlc_Buffering,
49 [PLAYING_S] = libvlc_Playing,
50 [PAUSE_S] = libvlc_Paused,
51 [END_S] = libvlc_Ended,
52 [ERROR_S] = libvlc_Error,
54 static inline libvlc_state_t vlc_to_libvlc_state( int vlc_state )
56 if( vlc_state < 0 || vlc_state > 6 )
57 return libvlc_Stopped;
59 return vlc_to_libvlc_state_array[vlc_state];
63 * Release the associated input thread
65 * Object lock is NOT held.
67 static void release_input_thread( libvlc_media_instance_t *p_mi )
69 input_thread_t *p_input_thread;
71 if( !p_mi || p_mi->i_input_id == -1 )
74 p_input_thread = (input_thread_t*)vlc_object_get(
75 p_mi->p_libvlc_instance->p_libvlc_int,
78 p_mi->i_input_id = -1;
83 /* release for previous vlc_object_get */
84 vlc_object_release( p_input_thread );
86 /* release for initial p_input_thread yield (see _new()) */
87 vlc_object_release( p_input_thread );
89 /* No one is tracking this input_thread appart us. Destroy it */
90 if( p_mi->b_own_its_input_thread )
92 var_DelCallback( p_input_thread, "state", input_state_changed, p_mi );
93 var_DelCallback( p_input_thread, "seekable", input_state_changed, p_mi );
94 var_DelCallback( p_input_thread, "pausable", input_state_changed, p_mi );
95 var_DelCallback( p_input_thread, "intf-change", input_position_changed, p_mi );
96 var_DelCallback( p_input_thread, "intf-change", input_time_changed, p_mi );
97 /* We owned this one */
98 input_StopThread( p_input_thread );
99 var_Destroy( p_input_thread, "drawable" );
100 //input_DestroyThread( p_input_thread );
104 /* XXX: hack the playlist doesn't retain the input thread,
105 * so we did it for the playlist (see _new_from_input_thread),
106 * revert that here. This will be deleted with the playlist API */
107 vlc_object_release( p_input_thread );
113 * Retrieve the input thread. Be sure to release the object
114 * once you are done with it. (libvlc Internal)
116 * Object lock is held.
118 input_thread_t *libvlc_get_input_thread( libvlc_media_instance_t *p_mi,
119 libvlc_exception_t *p_e )
121 input_thread_t *p_input_thread;
123 vlc_mutex_lock( &p_mi->object_lock );
125 if( !p_mi || p_mi->i_input_id == -1 )
127 vlc_mutex_unlock( &p_mi->object_lock );
128 RAISENULL( "Input is NULL" );
131 p_input_thread = (input_thread_t*)vlc_object_get(
132 p_mi->p_libvlc_instance->p_libvlc_int,
134 if( !p_input_thread )
136 vlc_mutex_unlock( &p_mi->object_lock );
137 RAISENULL( "Input does not exist" );
140 vlc_mutex_unlock( &p_mi->object_lock );
141 return p_input_thread;
145 * input_state_changed (Private) (input var "state" Callback)
148 input_state_changed( vlc_object_t * p_this, char const * psz_cmd,
149 vlc_value_t oldval, vlc_value_t newval,
152 libvlc_media_instance_t * p_mi = p_userdata;
153 libvlc_event_t event;
154 libvlc_event_type_t type = newval.i_int;
156 if( strcmp( psz_cmd, "state" ) )
157 type = var_GetInteger( p_this, "state" );
162 libvlc_media_descriptor_set_state( p_mi->p_md, libvlc_NothingSpecial, NULL);
163 event.type = libvlc_MediaInstanceReachedEnd;
166 libvlc_media_descriptor_set_state( p_mi->p_md, libvlc_Playing, NULL);
167 event.type = libvlc_MediaInstancePaused;
170 libvlc_media_descriptor_set_state( p_mi->p_md, libvlc_Playing, NULL);
171 event.type = libvlc_MediaInstancePlayed;
174 libvlc_media_descriptor_set_state( p_mi->p_md, libvlc_Error, NULL);
175 event.type = libvlc_MediaInstanceEncounteredError;
181 libvlc_event_send( p_mi->p_event_manager, &event );
186 * input_position_changed (Private) (input var "intf-change" Callback)
189 input_position_changed( vlc_object_t * p_this, char const * psz_cmd,
190 vlc_value_t oldval, vlc_value_t newval,
193 libvlc_media_instance_t * p_mi = p_userdata;
196 if (!strncmp(psz_cmd, "intf", 4 /* "-change" no need to go further */))
198 input_thread_t * p_input = (input_thread_t *)p_this;
200 var_Get( p_input, "state", &val );
201 if( val.i_int != PLAYING_S )
202 return VLC_SUCCESS; /* Don't send the position while stopped */
204 var_Get( p_input, "position", &val );
207 val.i_time = newval.i_time;
209 libvlc_event_t event;
210 event.type = libvlc_MediaInstancePositionChanged;
211 event.u.media_instance_position_changed.new_position = val.f_float;
213 libvlc_event_send( p_mi->p_event_manager, &event );
218 * input_time_changed (Private) (input var "intf-change" Callback)
221 input_time_changed( vlc_object_t * p_this, char const * psz_cmd,
222 vlc_value_t oldval, vlc_value_t newval,
225 libvlc_media_instance_t * p_mi = p_userdata;
228 if (!strncmp(psz_cmd, "intf", 4 /* "-change" no need to go further */))
230 input_thread_t * p_input = (input_thread_t *)p_this;
232 var_Get( p_input, "state", &val );
233 if( val.i_int != PLAYING_S )
234 return VLC_SUCCESS; /* Don't send the position while stopped */
236 var_Get( p_input, "time", &val );
239 val.i_time = newval.i_time;
241 libvlc_event_t event;
242 event.type = libvlc_MediaInstanceTimeChanged;
243 event.u.media_instance_time_changed.new_time = val.i_time;
244 libvlc_event_send( p_mi->p_event_manager, &event );
248 /**************************************************************************
249 * Create a Media Instance object
250 **************************************************************************/
251 libvlc_media_instance_t *
252 libvlc_media_instance_new( libvlc_instance_t * p_libvlc_instance,
253 libvlc_exception_t * p_e )
255 libvlc_media_instance_t * p_mi;
257 if( !p_libvlc_instance )
259 libvlc_exception_raise( p_e, "invalid libvlc instance" );
263 p_mi = malloc( sizeof(libvlc_media_instance_t) );
266 p_mi->p_libvlc_instance = p_libvlc_instance;
267 p_mi->i_input_id = -1;
268 /* refcount strategy:
269 * - All items created by _new start with a refcount set to 1
270 * - Accessor _release decrease the refcount by 1, if after that
271 * operation the refcount is 0, the object is destroyed.
272 * - Accessor _retain increase the refcount by 1 (XXX: to implement) */
273 p_mi->i_refcount = 1;
274 p_mi->b_own_its_input_thread = VLC_TRUE;
275 /* object_lock strategy:
276 * - No lock held in constructor
277 * - Lock when accessing all variable this lock is held
278 * - Lock when attempting to destroy the object the lock is also held */
279 vlc_mutex_init( p_mi->p_libvlc_instance->p_libvlc_int,
280 &p_mi->object_lock );
281 p_mi->p_event_manager = libvlc_event_manager_new( p_mi,
282 p_libvlc_instance, p_e );
283 if( libvlc_exception_raised( p_e ) )
289 libvlc_event_manager_register_event_type( p_mi->p_event_manager,
290 libvlc_MediaInstanceReachedEnd, p_e );
291 libvlc_event_manager_register_event_type( p_mi->p_event_manager,
292 libvlc_MediaInstanceEncounteredError, p_e );
293 libvlc_event_manager_register_event_type( p_mi->p_event_manager,
294 libvlc_MediaInstancePaused, p_e );
295 libvlc_event_manager_register_event_type( p_mi->p_event_manager,
296 libvlc_MediaInstancePlayed, p_e );
297 libvlc_event_manager_register_event_type( p_mi->p_event_manager,
298 libvlc_MediaInstancePositionChanged, p_e );
299 libvlc_event_manager_register_event_type( p_mi->p_event_manager,
300 libvlc_MediaInstanceTimeChanged, p_e );
305 /**************************************************************************
306 * Create a Media Instance object with a media descriptor
307 **************************************************************************/
308 libvlc_media_instance_t *
309 libvlc_media_instance_new_from_media_descriptor(
310 libvlc_media_descriptor_t * p_md,
311 libvlc_exception_t *p_e )
313 libvlc_media_instance_t * p_mi;
314 p_mi = libvlc_media_instance_new( p_md->p_libvlc_instance, p_e );
319 libvlc_media_descriptor_retain( p_md );
325 /**************************************************************************
326 * Create a new media instance object from an input_thread (Libvlc Internal)
327 **************************************************************************/
328 libvlc_media_instance_t * libvlc_media_instance_new_from_input_thread(
329 struct libvlc_instance_t *p_libvlc_instance,
330 input_thread_t *p_input,
331 libvlc_exception_t *p_e )
333 libvlc_media_instance_t * p_mi;
337 libvlc_exception_raise( p_e, "invalid input thread" );
341 p_mi = libvlc_media_instance_new( p_libvlc_instance, p_e );
346 p_mi->p_md = libvlc_media_descriptor_new_from_input_item(
348 input_GetItem( p_input ), p_e );
352 libvlc_media_instance_destroy( p_mi );
356 p_mi->i_input_id = p_input->i_object_id;
357 p_mi->b_own_its_input_thread = VLC_FALSE;
359 /* will be released in media_instance_release() */
360 vlc_object_yield( p_input );
362 /* XXX: Hack as the playlist doesn't yield the input thread we retain
363 * the input for the playlist. (see corresponding hack in _release) */
364 vlc_object_yield( p_input );
369 /**************************************************************************
370 * Destroy a Media Instance object (libvlc internal)
372 * Warning: No lock held here, but hey, this is internal.
373 **************************************************************************/
374 void libvlc_media_instance_destroy( libvlc_media_instance_t *p_mi )
376 input_thread_t *p_input_thread;
377 libvlc_exception_t p_e;
379 libvlc_exception_init( &p_e );
384 p_input_thread = libvlc_get_input_thread( p_mi, &p_e );
386 if( libvlc_exception_raised( &p_e ) )
388 libvlc_event_manager_release( p_mi->p_event_manager );
389 libvlc_exception_clear( &p_e );
391 return; /* no need to worry about no input thread */
393 vlc_mutex_destroy( &p_mi->object_lock );
395 input_DestroyThread( p_input_thread );
397 libvlc_media_descriptor_release( p_mi->p_md );
402 /**************************************************************************
403 * Release a Media Instance object
404 **************************************************************************/
405 void libvlc_media_instance_release( libvlc_media_instance_t *p_mi )
410 vlc_mutex_lock( &p_mi->object_lock );
414 if( p_mi->i_refcount > 0 )
416 vlc_mutex_unlock( &p_mi->object_lock );
419 vlc_mutex_unlock( &p_mi->object_lock );
420 vlc_mutex_destroy( &p_mi->object_lock );
422 release_input_thread( p_mi );
424 libvlc_event_manager_release( p_mi->p_event_manager );
426 libvlc_media_descriptor_release( p_mi->p_md );
431 /**************************************************************************
432 * Retain a Media Instance object
433 **************************************************************************/
434 void libvlc_media_instance_retain( libvlc_media_instance_t *p_mi )
442 /**************************************************************************
443 * Set the Media descriptor associated with the instance
444 **************************************************************************/
445 void libvlc_media_instance_set_media_descriptor(
446 libvlc_media_instance_t *p_mi,
447 libvlc_media_descriptor_t *p_md,
448 libvlc_exception_t *p_e )
455 vlc_mutex_lock( &p_mi->object_lock );
457 release_input_thread( p_mi );
460 libvlc_media_descriptor_set_state( p_mi->p_md, libvlc_NothingSpecial, NULL );
462 libvlc_media_descriptor_release( p_mi->p_md );
467 vlc_mutex_unlock( &p_mi->object_lock );
468 return; /* It is ok to pass a NULL md */
471 libvlc_media_descriptor_retain( p_md );
474 /* The policy here is to ignore that we were created using a different
475 * libvlc_instance, because we don't really care */
476 p_mi->p_libvlc_instance = p_md->p_libvlc_instance;
478 vlc_mutex_unlock( &p_mi->object_lock );
481 /**************************************************************************
482 * Get the Media descriptor associated with the instance
483 **************************************************************************/
484 libvlc_media_descriptor_t *
485 libvlc_media_instance_get_media_descriptor(
486 libvlc_media_instance_t *p_mi,
487 libvlc_exception_t *p_e )
494 libvlc_media_descriptor_retain( p_mi->p_md );
498 /**************************************************************************
499 * Get the event Manager
500 **************************************************************************/
501 libvlc_event_manager_t *
502 libvlc_media_instance_event_manager(
503 libvlc_media_instance_t *p_mi,
504 libvlc_exception_t *p_e )
508 return p_mi->p_event_manager;
511 /**************************************************************************
513 **************************************************************************/
514 void libvlc_media_instance_play( libvlc_media_instance_t *p_mi,
515 libvlc_exception_t *p_e )
517 input_thread_t * p_input_thread;
519 if( (p_input_thread = libvlc_get_input_thread( p_mi, p_e )) )
521 /* A thread alread exists, send it a play message */
522 input_Control( p_input_thread, INPUT_SET_STATE, PLAYING_S );
523 vlc_object_release( p_input_thread );
527 /* Ignore previous exception */
528 libvlc_exception_clear( p_e );
530 vlc_mutex_lock( &p_mi->object_lock );
534 libvlc_exception_raise( p_e, "no associated media descriptor" );
535 vlc_mutex_unlock( &p_mi->object_lock );
539 p_mi->i_input_id = input_Read( p_mi->p_libvlc_instance->p_libvlc_int,
540 p_mi->p_md->p_input_item, VLC_FALSE );
542 /* Released in _release() */
543 p_input_thread = (input_thread_t*)vlc_object_get( p_mi->p_libvlc_instance->p_libvlc_int,
546 if( !p_input_thread )
549 vlc_mutex_unlock( &p_mi->object_lock );
555 val.i_int = p_mi->drawable;
556 var_Create( p_input_thread, "drawable", VLC_VAR_DOINHERIT );
557 var_Set( p_input_thread, "drawable", val );
559 var_AddCallback( p_input_thread, "state", input_state_changed, p_mi );
560 var_AddCallback( p_input_thread, "seekable", input_state_changed, p_mi );
561 var_AddCallback( p_input_thread, "pausable", input_state_changed, p_mi );
562 var_AddCallback( p_input_thread, "intf-change", input_position_changed, p_mi );
563 var_AddCallback( p_input_thread, "intf-change", input_time_changed, p_mi );
565 vlc_mutex_unlock( &p_mi->object_lock );
568 /**************************************************************************
570 **************************************************************************/
571 void libvlc_media_instance_pause( libvlc_media_instance_t *p_mi,
572 libvlc_exception_t *p_e )
574 input_thread_t * p_input_thread = libvlc_get_input_thread( p_mi, p_e );
576 if( !p_input_thread )
579 int state = var_GetInteger( p_input_thread, "state" );
581 if( state == PLAYING_S )
583 if( libvlc_media_instance_can_pause( p_mi, p_e ) )
584 input_Control( p_input_thread, INPUT_SET_STATE, PAUSE_S );
586 libvlc_media_instance_stop( p_mi, p_e );
589 input_Control( p_input_thread, INPUT_SET_STATE, PLAYING_S );
591 vlc_object_release( p_input_thread );
594 /**************************************************************************
596 **************************************************************************/
597 void libvlc_media_instance_stop( libvlc_media_instance_t *p_mi,
598 libvlc_exception_t *p_e )
600 if( p_mi->b_own_its_input_thread )
601 release_input_thread( p_mi ); /* This will stop the input thread */
604 input_thread_t * p_input_thread = libvlc_get_input_thread( p_mi, p_e );
606 if( !p_input_thread )
609 input_StopThread( p_input_thread );
610 vlc_object_release( p_input_thread );
614 /**************************************************************************
616 **************************************************************************/
617 void libvlc_media_instance_set_drawable( libvlc_media_instance_t *p_mi,
618 libvlc_drawable_t drawable,
619 libvlc_exception_t *p_e )
621 p_mi->drawable = drawable;
624 /**************************************************************************
626 **************************************************************************/
628 libvlc_media_instance_get_drawable ( libvlc_media_instance_t *p_mi, libvlc_exception_t *p_e )
630 return p_mi->drawable;
633 /**************************************************************************
634 * Getters for stream information
635 **************************************************************************/
636 libvlc_time_t libvlc_media_instance_get_length(
637 libvlc_media_instance_t *p_mi,
638 libvlc_exception_t *p_e )
640 input_thread_t *p_input_thread;
643 p_input_thread = libvlc_get_input_thread ( p_mi, p_e);
644 if( !p_input_thread )
647 var_Get( p_input_thread, "length", &val );
648 vlc_object_release( p_input_thread );
650 return (val.i_time+500LL)/1000LL;
653 libvlc_time_t libvlc_media_instance_get_time(
654 libvlc_media_instance_t *p_mi,
655 libvlc_exception_t *p_e )
657 input_thread_t *p_input_thread;
660 p_input_thread = libvlc_get_input_thread ( p_mi, p_e );
661 if( !p_input_thread )
664 var_Get( p_input_thread , "time", &val );
665 vlc_object_release( p_input_thread );
666 return (val.i_time+500LL)/1000LL;
669 void libvlc_media_instance_set_time(
670 libvlc_media_instance_t *p_mi,
672 libvlc_exception_t *p_e )
674 input_thread_t *p_input_thread;
677 p_input_thread = libvlc_get_input_thread ( p_mi, p_e );
678 if( !p_input_thread )
681 value.i_time = time*1000LL;
682 var_Set( p_input_thread, "time", value );
683 vlc_object_release( p_input_thread );
686 void libvlc_media_instance_set_position(
687 libvlc_media_instance_t *p_mi,
689 libvlc_exception_t *p_e )
691 input_thread_t *p_input_thread;
693 val.f_float = position;
695 p_input_thread = libvlc_get_input_thread ( p_mi, p_e);
696 if( !p_input_thread )
699 var_Set( p_input_thread, "position", val );
700 vlc_object_release( p_input_thread );
703 float libvlc_media_instance_get_position(
704 libvlc_media_instance_t *p_mi,
705 libvlc_exception_t *p_e )
707 input_thread_t *p_input_thread;
710 p_input_thread = libvlc_get_input_thread ( p_mi, p_e );
711 if( !p_input_thread )
714 var_Get( p_input_thread, "position", &val );
715 vlc_object_release( p_input_thread );
720 void libvlc_media_instance_set_chapter(
721 libvlc_media_instance_t *p_mi,
723 libvlc_exception_t *p_e )
725 input_thread_t *p_input_thread;
729 p_input_thread = libvlc_get_input_thread ( p_mi, p_e);
730 if( !p_input_thread )
733 var_Set( p_input_thread, "chapter", val );
734 vlc_object_release( p_input_thread );
737 int libvlc_media_instance_get_chapter(
738 libvlc_media_instance_t *p_mi,
739 libvlc_exception_t *p_e )
741 input_thread_t *p_input_thread;
744 p_input_thread = libvlc_get_input_thread ( p_mi, p_e );
745 if( !p_input_thread )
748 var_Get( p_input_thread, "chapter", &val );
749 vlc_object_release( p_input_thread );
754 int libvlc_media_instance_get_chapter_count(
755 libvlc_media_instance_t *p_mi,
756 libvlc_exception_t *p_e )
758 input_thread_t *p_input_thread;
761 p_input_thread = libvlc_get_input_thread ( p_mi, p_e );
762 if( !p_input_thread )
765 var_Change( p_input_thread, "chapter", VLC_VAR_CHOICESCOUNT, &val, NULL );
766 vlc_object_release( p_input_thread );
771 float libvlc_media_instance_get_fps(
772 libvlc_media_instance_t *p_mi,
773 libvlc_exception_t *p_e)
775 input_thread_t *p_input_thread = libvlc_get_input_thread ( p_mi, p_e );
780 if( input_Control( p_input_thread, INPUT_GET_VIDEO_FPS, &f_fps ) )
782 vlc_object_release( p_input_thread );
787 vlc_bool_t libvlc_media_instance_will_play(
788 libvlc_media_instance_t *p_mi,
789 libvlc_exception_t *p_e)
791 input_thread_t *p_input_thread =
792 libvlc_get_input_thread ( p_mi, p_e);
793 if ( !p_input_thread )
796 if ( !p_input_thread->b_die && !p_input_thread->b_dead )
798 vlc_object_release( p_input_thread );
801 vlc_object_release( p_input_thread );
805 void libvlc_media_instance_set_rate(
806 libvlc_media_instance_t *p_mi,
808 libvlc_exception_t *p_e )
810 input_thread_t *p_input_thread;
814 RAISEVOID( "Rate value is invalid" );
816 val.i_int = 1000.0f/rate;
818 p_input_thread = libvlc_get_input_thread ( p_mi, p_e);
819 if ( !p_input_thread )
822 var_Set( p_input_thread, "rate", val );
823 vlc_object_release( p_input_thread );
826 float libvlc_media_instance_get_rate(
827 libvlc_media_instance_t *p_mi,
828 libvlc_exception_t *p_e )
830 input_thread_t *p_input_thread;
833 p_input_thread = libvlc_get_input_thread ( p_mi, p_e);
834 if ( !p_input_thread )
837 var_Get( p_input_thread, "rate", &val );
838 vlc_object_release( p_input_thread );
840 return (float)1000.0f/val.i_int;
843 libvlc_state_t libvlc_media_instance_get_state(
844 libvlc_media_instance_t *p_mi,
845 libvlc_exception_t *p_e )
847 input_thread_t *p_input_thread;
850 p_input_thread = libvlc_get_input_thread ( p_mi, p_e );
851 if ( !p_input_thread )
853 /* We do return the right value, no need to throw an exception */
854 if( libvlc_exception_raised( p_e ) )
855 libvlc_exception_clear( p_e );
856 return libvlc_Stopped;
859 var_Get( p_input_thread, "state", &val );
860 vlc_object_release( p_input_thread );
862 return vlc_to_libvlc_state(val.i_int);
865 vlc_bool_t libvlc_media_instance_is_seekable(
866 libvlc_media_instance_t *p_mi,
867 libvlc_exception_t *p_e )
869 input_thread_t *p_input_thread;
872 p_input_thread = libvlc_get_input_thread ( p_mi, p_e );
873 if ( !p_input_thread )
875 /* We do return the right value, no need to throw an exception */
876 if( libvlc_exception_raised( p_e ) )
877 libvlc_exception_clear( p_e );
880 var_Get( p_input_thread, "seekable", &val );
881 vlc_object_release( p_input_thread );
886 vlc_bool_t libvlc_media_instance_can_pause(
887 libvlc_media_instance_t *p_mi,
888 libvlc_exception_t *p_e )
890 input_thread_t *p_input_thread;
893 p_input_thread = libvlc_get_input_thread ( p_mi, p_e );
894 if ( !p_input_thread )
896 /* We do return the right value, no need to throw an exception */
897 if( libvlc_exception_raised( p_e ) )
898 libvlc_exception_clear( p_e );
901 var_Get( p_input_thread, "can-pause", &val );
902 vlc_object_release( p_input_thread );