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 <vlc/libvlc.h>
25 #include <vlc_demux.h>
26 #include <vlc_input.h>
27 #include "libvlc_internal.h"
31 input_state_changed( vlc_object_t * p_this, char const * psz_cmd,
32 vlc_value_t oldval, vlc_value_t newval,
35 input_position_changed( vlc_object_t * p_this, char const * psz_cmd,
36 vlc_value_t oldval, vlc_value_t newval,
39 input_time_changed( vlc_object_t * p_this, char const * psz_cmd,
40 vlc_value_t oldval, vlc_value_t newval,
43 static const libvlc_state_t vlc_to_libvlc_state_array[] =
45 [INIT_S] = libvlc_Opening,
46 [OPENING_S] = libvlc_Opening,
47 [BUFFERING_S] = libvlc_Buffering,
48 [PLAYING_S] = libvlc_Playing,
49 [PAUSE_S] = libvlc_Paused,
50 [END_S] = libvlc_Ended,
51 [ERROR_S] = libvlc_Error,
53 static inline libvlc_state_t vlc_to_libvlc_state( int vlc_state )
55 if( vlc_state < 0 || vlc_state > 6 )
56 return libvlc_Stopped;
58 return vlc_to_libvlc_state_array[vlc_state];
62 * Release the associated input thread
64 * Object lock is NOT held.
66 static void release_input_thread( libvlc_media_instance_t *p_mi )
68 input_thread_t *p_input_thread;
70 if( !p_mi || p_mi->i_input_id == -1 )
73 p_input_thread = (input_thread_t*)vlc_object_get(
74 p_mi->p_libvlc_instance->p_libvlc_int,
77 p_mi->i_input_id = -1;
82 /* release for previous vlc_object_get */
83 vlc_object_release( p_input_thread );
85 /* release for initial p_input_thread yield (see _new()) */
86 vlc_object_release( p_input_thread );
88 /* No one is tracking this input_thread appart us. Destroy it */
89 if( p_mi->b_own_its_input_thread )
91 var_DelCallback( p_input_thread, "state", input_state_changed, p_mi );
92 var_DelCallback( p_input_thread, "seekable", input_state_changed, p_mi );
93 var_DelCallback( p_input_thread, "pausable", input_state_changed, p_mi );
94 var_DelCallback( p_input_thread, "intf-change", input_position_changed, p_mi );
95 var_DelCallback( p_input_thread, "intf-change", input_time_changed, p_mi );
96 /* We owned this one */
97 input_StopThread( p_input_thread );
98 var_Destroy( p_input_thread, "drawable" );
99 //input_DestroyThread( p_input_thread );
103 /* XXX: hack the playlist doesn't retain the input thread,
104 * so we did it for the playlist (see _new_from_input_thread),
105 * revert that here. This will be deleted with the playlist API */
106 vlc_object_release( p_input_thread );
112 * Retrieve the input thread. Be sure to release the object
113 * once you are done with it. (libvlc Internal)
115 * Object lock is held.
117 input_thread_t *libvlc_get_input_thread( libvlc_media_instance_t *p_mi,
118 libvlc_exception_t *p_e )
120 input_thread_t *p_input_thread;
122 vlc_mutex_lock( &p_mi->object_lock );
124 if( !p_mi || p_mi->i_input_id == -1 )
126 vlc_mutex_unlock( &p_mi->object_lock );
127 RAISENULL( "Input is NULL" );
130 p_input_thread = (input_thread_t*)vlc_object_get(
131 p_mi->p_libvlc_instance->p_libvlc_int,
133 if( !p_input_thread )
135 vlc_mutex_unlock( &p_mi->object_lock );
136 RAISENULL( "Input does not exist" );
139 vlc_mutex_unlock( &p_mi->object_lock );
140 return p_input_thread;
144 * input_state_changed (Private) (input var "state" Callback)
147 input_state_changed( vlc_object_t * p_this, char const * psz_cmd,
148 vlc_value_t oldval, vlc_value_t newval,
151 libvlc_media_instance_t * p_mi = p_userdata;
152 libvlc_event_t event;
153 libvlc_event_type_t type = newval.i_int;
155 if( strcmp( psz_cmd, "state" ) )
156 type = var_GetInteger( p_this, "state" );
161 libvlc_media_descriptor_set_state( p_mi->p_md, libvlc_NothingSpecial, NULL);
162 event.type = libvlc_MediaInstanceReachedEnd;
165 libvlc_media_descriptor_set_state( p_mi->p_md, libvlc_Playing, NULL);
166 event.type = libvlc_MediaInstancePaused;
169 libvlc_media_descriptor_set_state( p_mi->p_md, libvlc_Playing, NULL);
170 event.type = libvlc_MediaInstancePlayed;
173 libvlc_media_descriptor_set_state( p_mi->p_md, libvlc_Error, NULL);
174 event.type = libvlc_MediaInstanceEncounteredError;
180 libvlc_event_send( p_mi->p_event_manager, &event );
185 * input_position_changed (Private) (input var "intf-change" Callback)
188 input_position_changed( vlc_object_t * p_this, char const * psz_cmd,
189 vlc_value_t oldval, vlc_value_t newval,
192 libvlc_media_instance_t * p_mi = p_userdata;
195 if (!strncmp(psz_cmd, "intf", 4 /* "-change" no need to go further */))
197 input_thread_t * p_input = (input_thread_t *)p_this;
199 var_Get( p_input, "state", &val );
200 if( val.i_int != PLAYING_S )
201 return VLC_SUCCESS; /* Don't send the position while stopped */
203 var_Get( p_input, "position", &val );
206 val.i_time = newval.i_time;
208 libvlc_event_t event;
209 event.type = libvlc_MediaInstancePositionChanged;
210 event.u.media_instance_position_changed.new_position = val.f_float;
212 libvlc_event_send( p_mi->p_event_manager, &event );
217 * input_time_changed (Private) (input var "intf-change" Callback)
220 input_time_changed( vlc_object_t * p_this, char const * psz_cmd,
221 vlc_value_t oldval, vlc_value_t newval,
224 libvlc_media_instance_t * p_mi = p_userdata;
227 if (!strncmp(psz_cmd, "intf", 4 /* "-change" no need to go further */))
229 input_thread_t * p_input = (input_thread_t *)p_this;
231 var_Get( p_input, "state", &val );
232 if( val.i_int != PLAYING_S )
233 return VLC_SUCCESS; /* Don't send the position while stopped */
235 var_Get( p_input, "time", &val );
238 val.i_time = newval.i_time;
240 libvlc_event_t event;
241 event.type = libvlc_MediaInstanceTimeChanged;
242 event.u.media_instance_time_changed.new_time = val.i_time;
243 libvlc_event_send( p_mi->p_event_manager, &event );
247 /**************************************************************************
248 * Create a Media Instance object
249 **************************************************************************/
250 libvlc_media_instance_t *
251 libvlc_media_instance_new( libvlc_instance_t * p_libvlc_instance,
252 libvlc_exception_t * p_e )
254 libvlc_media_instance_t * p_mi;
256 if( !p_libvlc_instance )
258 libvlc_exception_raise( p_e, "invalid libvlc instance" );
262 p_mi = malloc( sizeof(libvlc_media_instance_t) );
265 p_mi->p_libvlc_instance = p_libvlc_instance;
266 p_mi->i_input_id = -1;
267 /* refcount strategy:
268 * - All items created by _new start with a refcount set to 1
269 * - Accessor _release decrease the refcount by 1, if after that
270 * operation the refcount is 0, the object is destroyed.
271 * - Accessor _retain increase the refcount by 1 (XXX: to implement) */
272 p_mi->i_refcount = 1;
273 p_mi->b_own_its_input_thread = VLC_TRUE;
274 /* object_lock strategy:
275 * - No lock held in constructor
276 * - Lock when accessing all variable this lock is held
277 * - Lock when attempting to destroy the object the lock is also held */
278 vlc_mutex_init( p_mi->p_libvlc_instance->p_libvlc_int,
279 &p_mi->object_lock );
280 p_mi->p_event_manager = libvlc_event_manager_new( p_mi,
281 p_libvlc_instance, p_e );
282 if( libvlc_exception_raised( p_e ) )
288 libvlc_event_manager_register_event_type( p_mi->p_event_manager,
289 libvlc_MediaInstanceReachedEnd, p_e );
290 libvlc_event_manager_register_event_type( p_mi->p_event_manager,
291 libvlc_MediaInstanceEncounteredError, p_e );
292 libvlc_event_manager_register_event_type( p_mi->p_event_manager,
293 libvlc_MediaInstancePaused, p_e );
294 libvlc_event_manager_register_event_type( p_mi->p_event_manager,
295 libvlc_MediaInstancePlayed, p_e );
296 libvlc_event_manager_register_event_type( p_mi->p_event_manager,
297 libvlc_MediaInstancePositionChanged, p_e );
298 libvlc_event_manager_register_event_type( p_mi->p_event_manager,
299 libvlc_MediaInstanceTimeChanged, p_e );
304 /**************************************************************************
305 * Create a Media Instance object with a media descriptor
306 **************************************************************************/
307 libvlc_media_instance_t *
308 libvlc_media_instance_new_from_media_descriptor(
309 libvlc_media_descriptor_t * p_md,
310 libvlc_exception_t *p_e )
312 libvlc_media_instance_t * p_mi;
313 p_mi = libvlc_media_instance_new( p_md->p_libvlc_instance, p_e );
318 libvlc_media_descriptor_retain( p_md );
324 /**************************************************************************
325 * Create a new media instance object from an input_thread (Libvlc Internal)
326 **************************************************************************/
327 libvlc_media_instance_t * libvlc_media_instance_new_from_input_thread(
328 struct libvlc_instance_t *p_libvlc_instance,
329 input_thread_t *p_input,
330 libvlc_exception_t *p_e )
332 libvlc_media_instance_t * p_mi;
336 libvlc_exception_raise( p_e, "invalid input thread" );
340 p_mi = libvlc_media_instance_new( p_libvlc_instance, p_e );
345 p_mi->p_md = libvlc_media_descriptor_new_from_input_item(
347 input_GetItem( p_input ), p_e );
351 libvlc_media_instance_destroy( p_mi );
355 p_mi->i_input_id = p_input->i_object_id;
356 p_mi->b_own_its_input_thread = VLC_FALSE;
358 /* will be released in media_instance_release() */
359 vlc_object_yield( p_input );
361 /* XXX: Hack as the playlist doesn't yield the input thread we retain
362 * the input for the playlist. (see corresponding hack in _release) */
363 vlc_object_yield( p_input );
368 /**************************************************************************
369 * Destroy a Media Instance object (libvlc internal)
371 * Warning: No lock held here, but hey, this is internal.
372 **************************************************************************/
373 void libvlc_media_instance_destroy( libvlc_media_instance_t *p_mi )
375 input_thread_t *p_input_thread;
376 libvlc_exception_t p_e;
378 libvlc_exception_init( &p_e );
383 p_input_thread = libvlc_get_input_thread( p_mi, &p_e );
385 if( libvlc_exception_raised( &p_e ) )
387 libvlc_event_manager_release( p_mi->p_event_manager );
388 libvlc_exception_clear( &p_e );
390 return; /* no need to worry about no input thread */
392 vlc_mutex_destroy( &p_mi->object_lock );
394 input_DestroyThread( p_input_thread );
396 libvlc_media_descriptor_release( p_mi->p_md );
401 /**************************************************************************
402 * Release a Media Instance object
403 **************************************************************************/
404 void libvlc_media_instance_release( libvlc_media_instance_t *p_mi )
409 vlc_mutex_lock( &p_mi->object_lock );
413 if( p_mi->i_refcount > 0 )
415 vlc_mutex_unlock( &p_mi->object_lock );
418 vlc_mutex_unlock( &p_mi->object_lock );
419 vlc_mutex_destroy( &p_mi->object_lock );
421 release_input_thread( p_mi );
423 libvlc_event_manager_release( p_mi->p_event_manager );
425 libvlc_media_descriptor_release( p_mi->p_md );
430 /**************************************************************************
431 * Retain a Media Instance object
432 **************************************************************************/
433 void libvlc_media_instance_retain( libvlc_media_instance_t *p_mi )
441 /**************************************************************************
442 * Set the Media descriptor associated with the instance
443 **************************************************************************/
444 void libvlc_media_instance_set_media_descriptor(
445 libvlc_media_instance_t *p_mi,
446 libvlc_media_descriptor_t *p_md,
447 libvlc_exception_t *p_e )
454 vlc_mutex_lock( &p_mi->object_lock );
456 release_input_thread( p_mi );
459 libvlc_media_descriptor_set_state( p_mi->p_md, libvlc_NothingSpecial, NULL );
461 libvlc_media_descriptor_release( p_mi->p_md );
466 vlc_mutex_unlock( &p_mi->object_lock );
467 return; /* It is ok to pass a NULL md */
470 libvlc_media_descriptor_retain( p_md );
473 /* The policy here is to ignore that we were created using a different
474 * libvlc_instance, because we don't really care */
475 p_mi->p_libvlc_instance = p_md->p_libvlc_instance;
477 vlc_mutex_unlock( &p_mi->object_lock );
480 /**************************************************************************
481 * Get the Media descriptor associated with the instance
482 **************************************************************************/
483 libvlc_media_descriptor_t *
484 libvlc_media_instance_get_media_descriptor(
485 libvlc_media_instance_t *p_mi,
486 libvlc_exception_t *p_e )
493 libvlc_media_descriptor_retain( p_mi->p_md );
497 /**************************************************************************
498 * Get the event Manager
499 **************************************************************************/
500 libvlc_event_manager_t *
501 libvlc_media_instance_event_manager(
502 libvlc_media_instance_t *p_mi,
503 libvlc_exception_t *p_e )
507 return p_mi->p_event_manager;
510 /**************************************************************************
512 **************************************************************************/
513 void libvlc_media_instance_play( libvlc_media_instance_t *p_mi,
514 libvlc_exception_t *p_e )
516 input_thread_t * p_input_thread;
518 if( (p_input_thread = libvlc_get_input_thread( p_mi, p_e )) )
520 /* A thread alread exists, send it a play message */
521 input_Control( p_input_thread, INPUT_SET_STATE, PLAYING_S );
522 vlc_object_release( p_input_thread );
526 /* Ignore previous exception */
527 libvlc_exception_clear( p_e );
529 vlc_mutex_lock( &p_mi->object_lock );
533 libvlc_exception_raise( p_e, "no associated media descriptor" );
534 vlc_mutex_unlock( &p_mi->object_lock );
538 p_mi->i_input_id = input_Read( p_mi->p_libvlc_instance->p_libvlc_int,
539 p_mi->p_md->p_input_item, VLC_FALSE );
541 /* Released in _release() */
542 p_input_thread = (input_thread_t*)vlc_object_get( p_mi->p_libvlc_instance->p_libvlc_int,
545 if( !p_input_thread )
548 vlc_mutex_unlock( &p_mi->object_lock );
554 val.i_int = p_mi->drawable;
555 var_Create( p_input_thread, "drawable", VLC_VAR_DOINHERIT );
556 var_Set( p_input_thread, "drawable", val );
558 var_AddCallback( p_input_thread, "state", input_state_changed, p_mi );
559 var_AddCallback( p_input_thread, "seekable", input_state_changed, p_mi );
560 var_AddCallback( p_input_thread, "pausable", input_state_changed, p_mi );
561 var_AddCallback( p_input_thread, "intf-change", input_position_changed, p_mi );
562 var_AddCallback( p_input_thread, "intf-change", input_time_changed, p_mi );
564 vlc_mutex_unlock( &p_mi->object_lock );
567 /**************************************************************************
569 **************************************************************************/
570 void libvlc_media_instance_pause( libvlc_media_instance_t *p_mi,
571 libvlc_exception_t *p_e )
573 input_thread_t * p_input_thread = libvlc_get_input_thread( p_mi, p_e );
575 if( !p_input_thread )
578 int state = var_GetInteger( p_input_thread, "state" );
580 if( state == PLAYING_S )
582 if( libvlc_media_instance_can_pause( p_mi, p_e ) )
583 input_Control( p_input_thread, INPUT_SET_STATE, PAUSE_S );
585 libvlc_media_instance_stop( p_mi, p_e );
588 input_Control( p_input_thread, INPUT_SET_STATE, PLAYING_S );
590 vlc_object_release( p_input_thread );
593 /**************************************************************************
595 **************************************************************************/
596 void libvlc_media_instance_stop( libvlc_media_instance_t *p_mi,
597 libvlc_exception_t *p_e )
599 if( p_mi->b_own_its_input_thread )
600 release_input_thread( p_mi ); /* This will stop the input thread */
603 input_thread_t * p_input_thread = libvlc_get_input_thread( p_mi, p_e );
605 if( !p_input_thread )
608 input_StopThread( p_input_thread );
609 vlc_object_release( p_input_thread );
613 /**************************************************************************
615 **************************************************************************/
616 void libvlc_media_instance_set_drawable( libvlc_media_instance_t *p_mi,
617 libvlc_drawable_t drawable,
618 libvlc_exception_t *p_e )
620 p_mi->drawable = drawable;
623 /**************************************************************************
625 **************************************************************************/
627 libvlc_media_instance_get_drawable ( libvlc_media_instance_t *p_mi, libvlc_exception_t *p_e )
629 return p_mi->drawable;
632 /**************************************************************************
633 * Getters for stream information
634 **************************************************************************/
635 libvlc_time_t libvlc_media_instance_get_length(
636 libvlc_media_instance_t *p_mi,
637 libvlc_exception_t *p_e )
639 input_thread_t *p_input_thread;
642 p_input_thread = libvlc_get_input_thread ( p_mi, p_e);
643 if( !p_input_thread )
646 var_Get( p_input_thread, "length", &val );
647 vlc_object_release( p_input_thread );
649 return (val.i_time+500LL)/1000LL;
652 libvlc_time_t libvlc_media_instance_get_time(
653 libvlc_media_instance_t *p_mi,
654 libvlc_exception_t *p_e )
656 input_thread_t *p_input_thread;
659 p_input_thread = libvlc_get_input_thread ( p_mi, p_e );
660 if( !p_input_thread )
663 var_Get( p_input_thread , "time", &val );
664 vlc_object_release( p_input_thread );
665 return (val.i_time+500LL)/1000LL;
668 void libvlc_media_instance_set_time(
669 libvlc_media_instance_t *p_mi,
671 libvlc_exception_t *p_e )
673 input_thread_t *p_input_thread;
676 p_input_thread = libvlc_get_input_thread ( p_mi, p_e );
677 if( !p_input_thread )
680 value.i_time = time*1000LL;
681 var_Set( p_input_thread, "time", value );
682 vlc_object_release( p_input_thread );
685 void libvlc_media_instance_set_position(
686 libvlc_media_instance_t *p_mi,
688 libvlc_exception_t *p_e )
690 input_thread_t *p_input_thread;
692 val.f_float = position;
694 p_input_thread = libvlc_get_input_thread ( p_mi, p_e);
695 if( !p_input_thread )
698 var_Set( p_input_thread, "position", val );
699 vlc_object_release( p_input_thread );
702 float libvlc_media_instance_get_position(
703 libvlc_media_instance_t *p_mi,
704 libvlc_exception_t *p_e )
706 input_thread_t *p_input_thread;
709 p_input_thread = libvlc_get_input_thread ( p_mi, p_e );
710 if( !p_input_thread )
713 var_Get( p_input_thread, "position", &val );
714 vlc_object_release( p_input_thread );
719 void libvlc_media_instance_set_chapter(
720 libvlc_media_instance_t *p_mi,
722 libvlc_exception_t *p_e )
724 input_thread_t *p_input_thread;
728 p_input_thread = libvlc_get_input_thread ( p_mi, p_e);
729 if( !p_input_thread )
732 var_Set( p_input_thread, "chapter", val );
733 vlc_object_release( p_input_thread );
736 int libvlc_media_instance_get_chapter(
737 libvlc_media_instance_t *p_mi,
738 libvlc_exception_t *p_e )
740 input_thread_t *p_input_thread;
743 p_input_thread = libvlc_get_input_thread ( p_mi, p_e );
744 if( !p_input_thread )
747 var_Get( p_input_thread, "chapter", &val );
748 vlc_object_release( p_input_thread );
753 int libvlc_media_instance_get_chapter_count(
754 libvlc_media_instance_t *p_mi,
755 libvlc_exception_t *p_e )
757 input_thread_t *p_input_thread;
760 p_input_thread = libvlc_get_input_thread ( p_mi, p_e );
761 if( !p_input_thread )
764 var_Change( p_input_thread, "chapter", VLC_VAR_CHOICESCOUNT, &val, NULL );
765 vlc_object_release( p_input_thread );
770 float libvlc_media_instance_get_fps(
771 libvlc_media_instance_t *p_mi,
772 libvlc_exception_t *p_e)
774 input_thread_t *p_input_thread = libvlc_get_input_thread ( p_mi, p_e );
779 if( input_Control( p_input_thread, INPUT_GET_VIDEO_FPS, &f_fps ) )
781 vlc_object_release( p_input_thread );
786 vlc_bool_t libvlc_media_instance_will_play(
787 libvlc_media_instance_t *p_mi,
788 libvlc_exception_t *p_e)
790 input_thread_t *p_input_thread =
791 libvlc_get_input_thread ( p_mi, p_e);
792 if ( !p_input_thread )
795 if ( !p_input_thread->b_die && !p_input_thread->b_dead )
797 vlc_object_release( p_input_thread );
800 vlc_object_release( p_input_thread );
804 void libvlc_media_instance_set_rate(
805 libvlc_media_instance_t *p_mi,
807 libvlc_exception_t *p_e )
809 input_thread_t *p_input_thread;
813 RAISEVOID( "Rate value is invalid" );
815 val.i_int = 1000.0f/rate;
817 p_input_thread = libvlc_get_input_thread ( p_mi, p_e);
818 if ( !p_input_thread )
821 var_Set( p_input_thread, "rate", val );
822 vlc_object_release( p_input_thread );
825 float libvlc_media_instance_get_rate(
826 libvlc_media_instance_t *p_mi,
827 libvlc_exception_t *p_e )
829 input_thread_t *p_input_thread;
832 p_input_thread = libvlc_get_input_thread ( p_mi, p_e);
833 if ( !p_input_thread )
836 var_Get( p_input_thread, "rate", &val );
837 vlc_object_release( p_input_thread );
839 return (float)1000.0f/val.i_int;
842 libvlc_state_t libvlc_media_instance_get_state(
843 libvlc_media_instance_t *p_mi,
844 libvlc_exception_t *p_e )
846 input_thread_t *p_input_thread;
849 p_input_thread = libvlc_get_input_thread ( p_mi, p_e );
850 if ( !p_input_thread )
852 /* We do return the right value, no need to throw an exception */
853 if( libvlc_exception_raised( p_e ) )
854 libvlc_exception_clear( p_e );
855 return libvlc_Stopped;
858 var_Get( p_input_thread, "state", &val );
859 vlc_object_release( p_input_thread );
861 return vlc_to_libvlc_state(val.i_int);
864 vlc_bool_t libvlc_media_instance_is_seekable(
865 libvlc_media_instance_t *p_mi,
866 libvlc_exception_t *p_e )
868 input_thread_t *p_input_thread;
871 p_input_thread = libvlc_get_input_thread ( p_mi, p_e );
872 if ( !p_input_thread )
874 /* We do return the right value, no need to throw an exception */
875 if( libvlc_exception_raised( p_e ) )
876 libvlc_exception_clear( p_e );
879 var_Get( p_input_thread, "seekable", &val );
880 vlc_object_release( p_input_thread );
885 vlc_bool_t libvlc_media_instance_can_pause(
886 libvlc_media_instance_t *p_mi,
887 libvlc_exception_t *p_e )
889 input_thread_t *p_input_thread;
892 p_input_thread = libvlc_get_input_thread ( p_mi, p_e );
893 if ( !p_input_thread )
895 /* We do return the right value, no need to throw an exception */
896 if( libvlc_exception_raised( p_e ) )
897 libvlc_exception_clear( p_e );
900 var_Get( p_input_thread, "can-pause", &val );
901 vlc_object_release( p_input_thread );