~ubuntu-branches/ubuntu/maverick/vlc/maverick

« back to all changes in this revision

Viewing changes to modules/access/vcd/vcd.c

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2008-09-17 21:56:14 UTC
  • mfrom: (1.1.17 upstream)
  • Revision ID: james.westby@ubuntu.com-20080917215614-tj0vx8xzd57e52t8
Tags: 0.9.2-1ubuntu1
* New Upstream Release, exception granted by
    - dktrkranz, norsetto, Hobbsee (via irc). LP: #270404

Changes done in ubuntu:

* add libxul-dev to build-depends
* make sure that vlc is build against libxul in configure. This doesn't
  change anything in the package, but makes it more robust if building
  in an 'unclean' chroot or when modifying the package.
* debian/control: make Vcs-* fields point to the motumedia branch
* add libx264-dev and libass-dev to build-depends
  LP: #210354, #199870
* actually enable libass support by passing --enable-libass to configure
* enable libdca: add libdca-dev to build depends and --enable-libdca
* install the x264 plugin.

Changes already in the pkg-multimedia branch in debian:

* don't install usr/share/vlc/mozilla in debian/mozilla-plugin-vlc.install  
* new upstream .desktop file now registers flash video mimetype LP: #261567
* add Xb-Npp-Applications to mozilla-plugin-vlc
* remove duplicate entries in debian/vlc-nox.install

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * vcd.c : VCD input module for vlc
3
3
 *****************************************************************************
4
4
 * Copyright (C) 2000-2004 the VideoLAN team
5
 
 * $Id: 71299959af5b8a2210d24655dbbe159bf83a9d2f $
 
5
 * $Id$
6
6
 *
7
7
 * Author: Johan Bilien <jobi@via.ecp.fr>
8
8
 *
24
24
/*****************************************************************************
25
25
 * Preamble
26
26
 *****************************************************************************/
27
 
#include <stdlib.h>
28
 
 
29
 
#include <vlc/vlc.h>
30
 
#include <vlc/input.h>
 
27
 
 
28
#ifdef HAVE_CONFIG_H
 
29
# include "config.h"
 
30
#endif
 
31
 
 
32
#include <vlc_common.h>
 
33
#include <vlc_plugin.h>
 
34
#include <vlc_input.h>
 
35
#include <vlc_access.h>
 
36
#include <vlc_charset.h>
31
37
 
32
38
#include "cdrom.h"
33
39
 
43
49
    "value should be set in milliseconds." )
44
50
 
45
51
vlc_module_begin();
46
 
    set_shortname( _("VCD"));
47
 
    set_description( _("VCD input") );
48
 
    set_capability( "access2", 60 );
 
52
    set_shortname( N_("VCD"));
 
53
    set_description( N_("VCD input") );
 
54
    set_capability( "access", 60 );
49
55
    set_callbacks( Open, Close );
50
56
    set_category( CAT_INPUT );
51
57
    set_subcategory( SUBCAT_INPUT_ACCESS );
52
58
 
53
59
    add_usage_hint( N_("[vcd:][device][@[title][,[chapter]]]") );
54
60
    add_integer( "vcd-caching", DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT,
55
 
                 CACHING_LONGTEXT, VLC_TRUE );
 
61
                 CACHING_LONGTEXT, true );
56
62
    add_shortcut( "vcd" );
57
63
    add_shortcut( "svcd" );
58
64
vlc_module_end();
90
96
{
91
97
    access_t     *p_access = (access_t *)p_this;
92
98
    access_sys_t *p_sys;
93
 
    char *psz_dup = strdup( p_access->psz_path );
 
99
    char *psz_dup = ToLocaleDup( p_access->psz_path );
94
100
    char *psz;
95
101
    int i_title = 0;
96
102
    int i_chapter = 0;
145
151
    p_access->info.i_update = 0;
146
152
    p_access->info.i_size = 0;
147
153
    p_access->info.i_pos = 0;
148
 
    p_access->info.b_eof = VLC_FALSE;
 
154
    p_access->info.b_eof = false;
149
155
    p_access->info.i_title = 0;
150
156
    p_access->info.i_seekpoint = 0;
151
157
    p_access->p_sys = p_sys = malloc( sizeof( access_sys_t ) );
205
211
    p_access->info.i_pos = ( p_sys->i_sector - p_sys->p_sectors[1+i_title] ) *
206
212
        VCD_DATA_SIZE;
207
213
 
 
214
    free( p_access->psz_demux );
208
215
    p_access->psz_demux = strdup( "ps" );
209
216
 
210
217
    return VLC_SUCCESS;
233
240
static int Control( access_t *p_access, int i_query, va_list args )
234
241
{
235
242
    access_sys_t *p_sys = p_access->p_sys;
236
 
    vlc_bool_t   *pb_bool;
 
243
    bool   *pb_bool;
237
244
    int          *pi_int;
238
245
    int64_t      *pi_64;
239
246
    input_title_t ***ppp_title;
246
253
        case ACCESS_CAN_FASTSEEK:
247
254
        case ACCESS_CAN_PAUSE:
248
255
        case ACCESS_CAN_CONTROL_PACE:
249
 
            pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t* );
250
 
            *pb_bool = VLC_TRUE;
 
256
            pb_bool = (bool*)va_arg( args, bool* );
 
257
            *pb_bool = true;
251
258
            break;
252
259
 
253
260
        /* */
314
321
        }
315
322
 
316
323
        case ACCESS_SET_PRIVATE_ID_STATE:
 
324
        case ACCESS_GET_CONTENT_TYPE:
317
325
            return VLC_EGENERIC;
318
326
 
319
327
        default:
342
350
    {
343
351
        if( p_access->info.i_title + 2 >= p_sys->i_titles )
344
352
        {
345
 
            p_access->info.b_eof = VLC_TRUE;
 
353
            p_access->info.b_eof = true;
346
354
            return NULL;
347
355
        }
348
356
 
435
443
    }
436
444
 
437
445
    /* Reset eof */
438
 
    p_access->info.b_eof = VLC_FALSE;
 
446
    p_access->info.b_eof = false;
439
447
 
440
448
    return VLC_SUCCESS;
441
449
}