input_manager.cpp 18.3 KB
Newer Older
zorglub's avatar
zorglub committed
1
2
3
/*****************************************************************************
 * input_manager.cpp : Manage an input and interact with its GUI elements
 ****************************************************************************
4
 * Copyright (C) 2006-2008 the VideoLAN team
5
 * $Id$
zorglub's avatar
zorglub committed
6
7
 *
 * Authors: Clément Stenac <zorglub@videolan.org>
8
 *          Ilkka Ollakka  <ileoo@videolan.org>
9
 *          Jean-Baptiste <jb@videolan.org>
zorglub's avatar
zorglub committed
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
 *****************************************************************************/
25
26
27
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
zorglub's avatar
zorglub committed
28

zorglub's avatar
zorglub committed
29
#include "qt4.hpp"
zorglub's avatar
zorglub committed
30
31
32
#include "input_manager.hpp"
#include "dialogs_provider.hpp"

33
34
35
36
static int ChangeVideo( vlc_object_t *p_this, const char *var, vlc_value_t o,
                        vlc_value_t n, void *param );
static int ChangeAudio( vlc_object_t *p_this, const char *var, vlc_value_t o,
                        vlc_value_t n, void *param );
37
38
static int ItemChanged( vlc_object_t *, const char *,
                        vlc_value_t, vlc_value_t, void * );
39
static int PLItemChanged( vlc_object_t *, const char *,
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
40
                        vlc_value_t, vlc_value_t, void * );
41
42
43
44
45
46
47
48
static int InterfaceChanged( vlc_object_t *, const char *,
                            vlc_value_t, vlc_value_t, void * );
static int ItemStateChanged( vlc_object_t *, const char *,
                        vlc_value_t, vlc_value_t, void * );
static int ItemRateChanged( vlc_object_t *, const char *,
                        vlc_value_t, vlc_value_t, void * );
static int ItemTitleChanged( vlc_object_t *, const char *,
                        vlc_value_t, vlc_value_t, void * );
49
50
static int VolumeChanged( vlc_object_t *, const char *,
                        vlc_value_t, vlc_value_t, void * );
51

52
53
/**********************************************************************
 * InputManager implementation
54
55
56
 **********************************************************************
 * The Input Manager can be the main one around the playlist
 * But can also be used for VLM dialog or similar
57
58
 **********************************************************************/

zorglub's avatar
zorglub committed
59
60
61
InputManager::InputManager( QObject *parent, intf_thread_t *_p_intf) :
                           QObject( parent ), p_intf( _p_intf )
{
62
    i_old_playing_status = END_S;
63
    old_name = "";
zorglub's avatar
zorglub committed
64
    p_input = NULL;
65
    i_rate = 0;
zorglub's avatar
zorglub committed
66
67
68
69
}

InputManager::~InputManager()
{
70
    delInput();
zorglub's avatar
zorglub committed
71
72
}

73
74
75
/* Define the Input used.
   Add the callbacks on input
   p_input is yield once here */
zorglub's avatar
zorglub committed
76
77
void InputManager::setInput( input_thread_t *_p_input )
{
78
    delInput();
zorglub's avatar
zorglub committed
79
    p_input = _p_input;
80
81
82
    b_had_audio = b_had_video = b_has_audio = b_has_video = false;
    if( p_input )
    {
83
        vlc_object_yield( p_input );
84
85
        emit statusChanged( PLAYING_S );
        addCallbacks();
86
87
    }
}
88

89
90
91
/* delete Input if it ever existed.
   Delete the callbacls on input
   p_input is released once here */
92
93
94
95
void InputManager::delInput()
{
    if( p_input )
    {
96
        delCallbacks();
97
        vlc_object_release( p_input );
98
99
100
101
102
103
104
105
        i_old_playing_status = END_S;

        old_name=qfu("");
        artUrl = qfu("");
        emit positionUpdated( 0.0, 0 ,0 );
        emit statusChanged( END_S );
        emit nameChanged( "" );
        emit artChanged( "" );
106
        p_input = NULL;
107
    }
zorglub's avatar
zorglub committed
108
109
}

110
/* Add the callbacks on Input. Self explanatory */
111
void InputManager::addCallbacks()
112
{
113
114
115
116
117
118
119
120
121
    /* We don't care about:
       - spu-es
       - chapter
       - programs
       - audio-delay
       - spu-delay
       - bookmark
       - position, time, length, because they are included in intf-change
     */
122
123
    /* src/input/input.c:1629 */
    var_AddCallback( p_input, "state", ItemStateChanged, this );
124
    /* src/input/es-out.c:550 */
125
    var_AddCallback( p_input, "audio-es", ChangeAudio, this );
126
    /* src/input/es-out.c:551 */
127
128
129
130
131
132
133
134
135
    var_AddCallback( p_input, "video-es", ChangeVideo, this );
    /* src/input/input.c:1765 */
    var_AddCallback( p_input, "rate", ItemRateChanged, this );
    /* src/input/input.c:2003 */
    var_AddCallback( p_input, "title", ItemTitleChanged, this );
    /* src/input/input.c:734 for timers update*/
    var_AddCallback( p_input, "intf-change", InterfaceChanged, this );
}

136
/* Delete the callbacks on Input. Self explanatory */
137
void InputManager::delCallbacks()
138
{
139
140
141
142
143
144
    var_DelCallback( p_input, "audio-es", ChangeAudio, this );
    var_DelCallback( p_input, "video-es", ChangeVideo, this );
    var_DelCallback( p_input, "state", ItemStateChanged, this );
    var_DelCallback( p_input, "rate", ItemRateChanged, this );
    var_DelCallback( p_input, "title", ItemTitleChanged, this );
    var_DelCallback( p_input, "intf-change", InterfaceChanged, this );
145
146
}

147
/* Convert the event from the callbacks in actions */
148
149
150
void InputManager::customEvent( QEvent *event )
{
    int type = event->type();
151
    //msg_Dbg( p_intf, "New IM Event of type: %i", type );
152
153
154
155
    if ( type != PositionUpdate_Type &&
         type != ItemChanged_Type &&
         type != ItemRateChanged_Type &&
         type != ItemTitleChanged_Type &&
156
157
158
         type != ItemStateChanged_Type )
        return;

159
    /* Delete the input */
160
    if( !p_input || p_input->b_dead || p_input->b_die )
161
    {
162
163
         delInput();
         return;
164
165
    }

166
    /* Actions */
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
167
    switch( type )
168
    {
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
169
    case PositionUpdate_Type:
170
        UpdatePosition();
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
171
172
        break;
    case ItemChanged_Type:
173
        UpdateMeta();
174
        UpdateTracks();
175
        UpdateTitle();
176
        UpdateArt();
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
177
178
179
180
181
182
183
184
        break;
    case ItemRateChanged_Type:
        UpdateRate();
        break;
    case ItemTitleChanged_Type:
        UpdateTitle();
        break;
    case ItemStateChanged_Type:
185
       UpdateStatus();
186
       UpdateTracks();
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
187
       break;
188
    }
189
}
190

191
void InputManager::UpdatePosition()
192
193
194
195
196
197
198
199
200
201
{
     /* Update position */
     int i_length, i_time; /* Int is enough, since we store seconds */
     float f_pos;
     i_length = var_GetTime(  p_input , "length" ) / 1000000;
     i_time = var_GetTime(  p_input , "time") / 1000000;
     f_pos = var_GetFloat(  p_input , "position" );
     emit positionUpdated( f_pos, i_time, i_length );
}

202
void InputManager::UpdateTitle()
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
{
     /* Update navigation status */
     vlc_value_t val; val.i_int = 0;
     var_Change( p_input, "title", VLC_VAR_CHOICESCOUNT, &val, NULL );
     if( val.i_int > 0 )
     {
         val.i_int = 0;
         var_Change( p_input, "chapter", VLC_VAR_CHOICESCOUNT, &val, NULL );
         emit navigationChanged( (val.i_int > 0) ? 1 : 2 );
     }
     else
     {
         emit navigationChanged( 0 );
     }
}

219
void InputManager::UpdateStatus()
220
221
222
223
224
225
226
227
228
229
230
{
     /* Update playing status */
     vlc_value_t val; val.i_int = 0;
     var_Get( p_input, "state", &val );
     if( i_old_playing_status != val.i_int )
     {
         i_old_playing_status = val.i_int;
         emit statusChanged( val.i_int );
     }
}

231
void InputManager::UpdateRate()
232
233
234
235
236
237
238
239
{
     /* Update Rate */
     int i_new_rate = var_GetInteger( p_input, "rate");
     if( i_new_rate != i_rate )
     {
         i_rate = i_new_rate;
         /* Update rate */
         emit rateChanged( i_rate );
240
     }
241
242
}

243
void InputManager::UpdateMeta()
244
{
245
246
    /* Update text, name and nowplaying */
    QString text;
247

248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
    char *psz_name = input_item_GetTitle( input_GetItem( p_input ) );
    if( EMPTY_STR( psz_name ) )
    {
        free( psz_name );
        psz_name = input_item_GetName( input_GetItem( p_input ) );
    }

    char *psz_nowplaying =
        input_item_GetNowPlaying( input_GetItem( p_input ) );
    if( !EMPTY_STR( psz_nowplaying ) )
    {
        text.sprintf( "%s - %s", psz_nowplaying, psz_name );
    }
    else
    {
        char *psz_artist = input_item_GetArtist( input_GetItem( p_input ) );
        if( !EMPTY_STR( psz_artist ) )
        {
            text.sprintf( "%s - %s", psz_artist, psz_name );
        }
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
268
269
270
        else
        {
            text.sprintf( "%s", psz_name );
271
272
        }
        free( psz_artist );
273
274
275
276
277
278
279
280
281
    }
    free( psz_name );
    free( psz_nowplaying );

    if( old_name != text )
    {
        emit nameChanged( text );
        old_name=text;
    }
282
}
283

284
285
void InputManager::UpdateTracks()
{
286
287
288
289
290
291
292
    /* Has Audio, has Video Tracks ? */
    vlc_value_t val;
    var_Change( p_input, "audio-es", VLC_VAR_CHOICESCOUNT, &val, NULL );
    b_has_audio = val.i_int > 0;
    var_Change( p_input, "video-es", VLC_VAR_CHOICESCOUNT, &val, NULL );
    b_has_video = val.i_int > 0;

293
    /* Update ZVBI status */
294
#ifdef ZVBI_COMPILED
295
296
    /* Update teletext status*/
    emit teletextEnabled( true );/* FIXME */
297
298
299
#endif
}

Jean-Baptiste Kempf's avatar
   
Jean-Baptiste Kempf committed
300
void InputManager::UpdateArt()
301
302
303
304
305
306
307
308
309
{
    /* Update Art meta */
    QString url;
    char *psz_art = input_item_GetArtURL( input_GetItem( p_input ) );
    url.sprintf("%s", psz_art );
    free( psz_art );
    if( artUrl != url )
    {
        artUrl = url.replace( "file://",QString("" ) );
310
311
        /* Taglib seems to define a attachment://, It won't work yet */
        artUrl = url.replace( "attachment://",QString("" ) );
312
313
314
315
316
        emit artChanged( artUrl );
        msg_Dbg( p_intf, "Art:  %s", qtu( artUrl ) );
    }
}

317
/* User update of the slider */
zorglub's avatar
zorglub committed
318
319
void InputManager::sliderUpdate( float new_pos )
{
320
321
    if( hasInput() )
        var_SetFloat( p_input, "position", new_pos );
zorglub's avatar
zorglub committed
322
}
323

324
/* User togglePlayPause */
325
326
327
328
void InputManager::togglePlayPause()
{
    vlc_value_t state;
    var_Get( p_input, "state", &state );
329
    state.i_int = ( state.i_int != PLAYING_S ) ? PLAYING_S : PAUSE_S;
330
331
332
333
    var_Set( p_input, "state", state );
    emit statusChanged( state.i_int );
}

334
335
336
337
void InputManager::sectionPrev()
{
    if( hasInput() )
    {
338
        int i_type = var_Type( p_input, "next-chapter" );
339
340
341
342
343
344
345
346
347
348
        vlc_value_t val; val.b_bool = VLC_TRUE;
        var_Set( p_input, (i_type & VLC_VAR_TYPE) != 0 ?
                            "prev-chapter":"prev-title", val );
    }
}

void InputManager::sectionNext()
{
    if( hasInput() )
    {
349
        int i_type = var_Type( p_input, "next-chapter" );
350
351
352
353
354
355
356
357
358
        vlc_value_t val; val.b_bool = VLC_TRUE;
        var_Set( p_input, (i_type & VLC_VAR_TYPE) != 0 ?
                            "next-chapter":"next-title", val );
    }
}

void InputManager::sectionMenu()
{
    if( hasInput() )
359
        var_SetInteger( p_input, "title 0", 2 );
360
361
}

362
#ifdef ZVBI_COMPILED
363
364
void InputManager::telexGotoPage( int page )
{
365
    if( hasInput() )
366
367
368
369
370
371
372
373
374
375
    {
        vlc_object_t *p_vbi;
        p_vbi = (vlc_object_t *) vlc_object_find_name( p_input,
                    "zvbi", FIND_ANYWHERE );
        if( p_vbi )
        {
            var_SetInteger( p_vbi, "vbi-page", page );
            vlc_object_release( p_vbi );
        }
    }
376
377
378
379
}

void InputManager::telexToggle( bool b_enabled )
{
Jean-Paul Saman's avatar
Jean-Paul Saman committed
380
381
382
383
384
    int i_page = 0;

    if( b_enabled )
        i_page = 100;
    telexGotoPage( i_page );
385
386
387
388
}

void InputManager::telexSetTransparency( bool b_transp )
{
389
    if( hasInput() )
390
391
392
393
394
395
396
397
398
399
    {
        vlc_object_t *p_vbi;
        p_vbi = (vlc_object_t *) vlc_object_find_name( p_input,
                    "zvbi", FIND_ANYWHERE );
        if( p_vbi )
        {
            var_SetBool( p_input->p_libvlc, "vbi-opaque", b_transp );
            vlc_object_release( p_vbi );
        }
    }
400
}
401
#endif
402

zorglub's avatar
zorglub committed
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
void InputManager::slower()
{
    if( hasInput() )
        var_SetVoid( p_input, "rate-slower" );
}

void InputManager::faster()
{
    if( hasInput() )
        var_SetVoid( p_input, "rate-faster" );
}

void InputManager::normalRate()
{
    if( hasInput() )
        var_SetInteger( p_input, "rate", INPUT_RATE_DEFAULT );
}

421
422
423
424
425
426
void InputManager::setRate( int new_rate )
{
    if( hasInput() )
        var_SetInteger( p_input, "rate", new_rate );
}

427
428
/**********************************************************************
 * MainInputManager implementation. Wrap an input manager and
429
430
 * take care of updating the main playlist input.
 * Used in the main playlist Dialog
431
432
433
 **********************************************************************/
MainInputManager * MainInputManager::instance = NULL;

434
435
MainInputManager::MainInputManager( intf_thread_t *_p_intf )
                 : QObject(NULL), p_intf( _p_intf )
436
437
438
{
    p_input = NULL;
    im = new InputManager( this, p_intf );
439

440
441
442
    var_AddCallback( THEPL, "item-change", PLItemChanged, this );
    var_AddCallback( THEPL, "playlist-current", PLItemChanged, this );
    var_AddCallback( THEPL, "activity", PLItemChanged, this );
443

444
445
    var_AddCallback( THEPL, "playlist-current", ItemChanged, im );

446
    var_AddCallback( p_intf->p_libvlc, "volume-change", VolumeChanged, this );
447

448
449
450
    // No necessary, I think TODO REMOVE ME at the end
    //var_AddCallback( THEPL, "intf-change", ItemChanged, im );

451
    /* Warn our embedded IM about input changes */
zorglub's avatar
zorglub committed
452
    CONNECT( this, inputChanged( input_thread_t * ),
453
             im, setInput( input_thread_t * ) );
454
455
}

zorglub's avatar
zorglub committed
456
457
MainInputManager::~MainInputManager()
{
458
459
    if( p_input )
    {
460
461
       emit inputChanged( NULL );
    }
462

463
    var_DelCallback( p_intf->p_libvlc, "volume-change", VolumeChanged, this );
464
465
466
467
468

    var_DelCallback( THEPL, "playlist-current", PLItemChanged, this );
    var_DelCallback( THEPL, "activity", PLItemChanged, this );
    var_DelCallback( THEPL, "item-change", PLItemChanged, this );

469
    var_DelCallback( THEPL, "playlist-current", ItemChanged, im );
zorglub's avatar
zorglub committed
470
471
}

472
void MainInputManager::customEvent( QEvent *event )
473
{
474
    int type = event->type();
475
    //msg_Dbg( p_intf, "New MainIM Event of type: %i", type );
476
477
478
479
480
481
    if ( type != ItemChanged_Type && type != VolumeChanged_Type )
        return;

    if( type == VolumeChanged_Type )
    {
        emit volumeChanged();
482
        return;
483
    }
484

485
    /* Should be PLItemChanged Event */
486
    if( VLC_OBJECT_INTF == p_intf->i_object_type )
487
    {
488
        vlc_mutex_lock( &p_intf->change_lock );
489
        if( p_input && ( p_input->b_dead || p_input->b_die ) )
490
        {
491
            im->delInput();
492
            emit inputChanged( NULL );
493
            p_input = NULL;
494
        }
495

496
497
498
499
        if( !p_input )
        {
            QPL_LOCK;
            p_input = THEPL->p_input;
500
            if( p_input && !( p_input->b_die || p_input->b_dead) )
501
502
503
            {
                emit inputChanged( p_input );
            }
504
505
            else
                p_input = NULL;
506
507
508
509
            QPL_UNLOCK;
        }
        vlc_mutex_unlock( &p_intf->change_lock );
    }
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
510
511
    else
    {
512
        /* we are working as a dialogs provider */
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
513
514
        playlist_t *p_playlist = (playlist_t *) vlc_object_find( p_intf,
                                       VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
515
        if( p_playlist )
516
        {
517
            p_input = p_playlist->p_input;
518
519
520
521
            emit inputChanged( p_input );
        }
    }
}
522

523
/* Playlist Control functions */
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
void MainInputManager::stop()
{
   playlist_Stop( THEPL );
}

void MainInputManager::next()
{
   playlist_Next( THEPL );
}

void MainInputManager::prev()
{
   playlist_Prev( THEPL );
}

539
540
541
542
543
544
545
546
547
void MainInputManager::togglePlayPause()
{
    if( p_input == NULL )
    {
        playlist_Play( THEPL );
        return;
    }
    getIM()->togglePlayPause();
}
548

Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
549
550
551
/* Static callbacks */

/* IM */
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
static int InterfaceChanged( vlc_object_t *p_this, const char *psz_var,
                           vlc_value_t oldval, vlc_value_t newval, void *param )
{
    static int counter = 0;
    InputManager *im = (InputManager*)param;

    counter = counter++ % 4;
    if(!counter)
        return VLC_SUCCESS;
    IMEvent *event = new IMEvent( PositionUpdate_Type, 0 );
    QApplication::postEvent( im, static_cast<QEvent*>(event) );
    return VLC_SUCCESS;
}

static int ItemStateChanged( vlc_object_t *p_this, const char *psz_var,
                            vlc_value_t oldval, vlc_value_t newval, void *param )
{
    InputManager *im = (InputManager*)param;

    IMEvent *event = new IMEvent( ItemStateChanged_Type, 0 );
    QApplication::postEvent( im, static_cast<QEvent*>(event) );
    return VLC_SUCCESS;
}

static int ItemRateChanged( vlc_object_t *p_this, const char *psz_var,
                            vlc_value_t oldval, vlc_value_t newval, void *param )
{
    InputManager *im = (InputManager*)param;
580

581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
    IMEvent *event = new IMEvent( ItemRateChanged_Type, 0 );
    QApplication::postEvent( im, static_cast<QEvent*>(event) );
    return VLC_SUCCESS;
}

static int ItemTitleChanged( vlc_object_t *p_this, const char *psz_var,
                            vlc_value_t oldval, vlc_value_t newval, void *param )
{
    InputManager *im = (InputManager*)param;

    IMEvent *event = new IMEvent( ItemTitleChanged_Type, 0 );
    QApplication::postEvent( im, static_cast<QEvent*>(event) );
    return VLC_SUCCESS;
}

static int ItemChanged( vlc_object_t *p_this, const char *psz_var,
                        vlc_value_t oldval, vlc_value_t newval, void *param )
{
    InputManager *im = (InputManager*)param;

    IMEvent *event = new IMEvent( ItemChanged_Type, newval.i_int );
    QApplication::postEvent( im, static_cast<QEvent*>(event) );
    return VLC_SUCCESS;
}
605

Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
606

607
608
609
610
611
static int ChangeAudio( vlc_object_t *p_this, const char *var, vlc_value_t o,
                        vlc_value_t n, void *param )
{
    InputManager *im = (InputManager*)param;
    im->b_has_audio = true;
612
    return VLC_SUCCESS;
613
}
zorglub's avatar
zorglub committed
614

615
616
617
618
619
static int ChangeVideo( vlc_object_t *p_this, const char *var, vlc_value_t o,
                        vlc_value_t n, void *param )
{
    InputManager *im = (InputManager*)param;
    im->b_has_video = true;
620
    return VLC_SUCCESS;
621
}
622

Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
623
/* MIM */
624
static int PLItemChanged( vlc_object_t *p_this, const char *psz_var,
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
625
626
                        vlc_value_t oldval, vlc_value_t newval, void *param )
{
627
    MainInputManager *mim = (MainInputManager*)param;
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
628
629

    IMEvent *event = new IMEvent( ItemChanged_Type, newval.i_int );
630
    QApplication::postEvent( mim, static_cast<QEvent*>(event) );
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
631
632
633
634
635
636
    return VLC_SUCCESS;
}

static int VolumeChanged( vlc_object_t *p_this, const char *psz_var,
                        vlc_value_t oldval, vlc_value_t newval, void *param )
{
637
    MainInputManager *mim = (MainInputManager*)param;
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
638
639

    IMEvent *event = new IMEvent( VolumeChanged_Type, newval.i_int );
640
    QApplication::postEvent( mim, static_cast<QEvent*>(event) );
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
641
642
643
    return VLC_SUCCESS;
}