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

« back to all changes in this revision

Viewing changes to modules/codec/cmml/cmml.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:
5
5
 *                         Organisation (CSIRO) Australia
6
6
 * Copyright (C) 2004 the VideoLAN team
7
7
 *
8
 
 * $Id: 2b6e6ca17cf286e7b0b5ce7a7f52a2351f6a279c $
 
8
 * $Id$
9
9
 *
10
10
 * Author: Andre Pang <Andre.Pang@csiro.au>
11
11
 *
27
27
/*****************************************************************************
28
28
 * Preamble
29
29
 *****************************************************************************/
30
 
#include <vlc/vlc.h>
31
 
#include <vlc/decoder.h>
32
 
#include <vlc/intf.h>
 
30
#ifdef HAVE_CONFIG_H
 
31
# include "config.h"
 
32
#endif
33
33
 
 
34
#include <vlc_common.h>
 
35
#include <vlc_plugin.h>
 
36
#include <vlc_input.h>
 
37
#include <vlc_codec.h>
34
38
#include <vlc_osd.h>
35
 
 
36
 
#include "charset.h"
37
 
 
 
39
#include <vlc_charset.h>
 
40
#include <vlc_interface.h>
38
41
#include "xtag.h"
39
42
 
40
43
#undef  CMML_DEBUG
60
63
/*****************************************************************************
61
64
 * Exported prototypes
62
65
 *****************************************************************************/
63
 
int  E_(OpenIntf)  ( vlc_object_t * );
64
 
void E_(CloseIntf) ( vlc_object_t * );
 
66
int  OpenIntf  ( vlc_object_t * );
 
67
void CloseIntf ( vlc_object_t * );
65
68
 
66
69
/*****************************************************************************
67
70
 * Module descriptor.
68
71
 *****************************************************************************/
69
72
vlc_module_begin();
70
 
    set_description( _("CMML annotations decoder") );
 
73
    set_description( N_("CMML annotations decoder") );
71
74
    set_capability( "decoder", 50 );
72
75
    set_callbacks( OpenDecoder, CloseDecoder );
73
76
    add_shortcut( "cmml" );
74
77
 
75
78
    add_submodule();
76
79
        set_capability( "interface", 0 );
77
 
        set_callbacks( E_(OpenIntf), E_(CloseIntf) );
 
80
        set_callbacks( OpenIntf, CloseIntf );
78
81
vlc_module_end();
79
82
 
80
83
/*****************************************************************************
105
108
    if( ( p_dec->p_sys = p_sys =
106
109
          (decoder_sys_t *)malloc(sizeof(decoder_sys_t)) ) == NULL )
107
110
    {
108
 
        msg_Err( p_dec, "out of memory" );
109
111
        return VLC_EGENERIC;
110
112
    }
111
113
 
128
130
    vlc_object_release( p_input );
129
131
 
130
132
    /* initialise the CMML responder interface */
131
 
    p_sys->p_intf = intf_Create( p_dec, "cmml", 0, NULL );
132
 
    p_sys->p_intf->b_block = VLC_FALSE;
 
133
    p_sys->p_intf = intf_Create( p_dec, "cmml" );
133
134
    intf_RunThread( p_sys->p_intf );
134
135
 
135
136
    return VLC_SUCCESS;
187
188
        intf_StopThread( p_intf );
188
189
        vlc_object_detach( p_intf );
189
190
        vlc_object_release( p_intf );
190
 
        intf_Destroy( p_intf );
 
191
        vlc_object_release( p_intf );
191
192
    }
192
193
 
193
194
    p_sys->p_intf = NULL;
229
230
#ifdef CMML_DEBUG
230
231
    msg_Dbg( p_dec, "psz_cmml is \"%s\"", psz_cmml );
231
232
#endif
232
 
    
 
233
 
233
234
    /* Parse the <clip> part of the CMML */
234
235
    p_clip_parser = xtag_new_parse( psz_cmml, p_block->i_buffer );
235
236
    if( !p_clip_parser )
262
263
    if( psz_url )
263
264
    {
264
265
        char *psz_tmp = strdup( psz_url );
265
 
        
 
266
 
266
267
        val.p_address = psz_tmp;
267
268
        if( var_Set( p_dec, "psz-current-anchor-url", val ) != VLC_SUCCESS )
268
269
        {
290
291
 
291
292
    }
292
293
 
293
 
    if( psz_subtitle ) free( psz_subtitle );
294
 
    if( psz_cmml ) free( psz_cmml );
295
 
    if( p_anchor ) free( p_anchor );
296
 
    if( p_clip_parser ) free( p_clip_parser );
297
 
    if( psz_url ) free( psz_url );
 
294
    free( psz_subtitle );
 
295
    free( psz_cmml );
 
296
    free( p_anchor );
 
297
    free( p_clip_parser );
 
298
    free( psz_url );
298
299
}
299
300