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

« back to all changes in this revision

Viewing changes to modules/codec/lpcm.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
 * lpcm.c: lpcm decoder/packetizer module
3
3
 *****************************************************************************
4
4
 * Copyright (C) 1999-2005 the VideoLAN team
5
 
 * $Id: 5d933c4982e52bee0096df93adea714f2a10f7be $
 
5
 * $Id$
6
6
 *
7
7
 * Authors: Samuel Hocevar <sam@zoy.org>
8
8
 *          Henri Fallon <henri@videolan.org>
27
27
/*****************************************************************************
28
28
 * Preamble
29
29
 *****************************************************************************/
30
 
#include <vlc/vlc.h>
31
 
#include <vlc/decoder.h>
 
30
#ifdef HAVE_CONFIG_H
 
31
# include "config.h"
 
32
#endif
 
33
 
 
34
#include <vlc_common.h>
 
35
#include <vlc_plugin.h>
 
36
#include <vlc_codec.h>
 
37
#include <vlc_aout.h>
32
38
 
33
39
/*****************************************************************************
34
40
 * decoder_sys_t : lpcm decoder descriptor
36
42
struct decoder_sys_t
37
43
{
38
44
    /* Module mode */
39
 
    vlc_bool_t b_packetizer;
 
45
    bool b_packetizer;
40
46
 
41
47
    /*
42
48
     * Output properties
79
85
 
80
86
    set_category( CAT_INPUT );
81
87
    set_subcategory( SUBCAT_INPUT_ACODEC );
82
 
    set_description( _("Linear PCM audio decoder") );
 
88
    set_description( N_("Linear PCM audio decoder") );
83
89
    set_capability( "decoder", 100 );
84
90
    set_callbacks( OpenDecoder, CloseDecoder );
85
91
 
86
92
    add_submodule();
87
 
    set_description( _("Linear PCM audio packetizer") );
 
93
    set_description( N_("Linear PCM audio packetizer") );
88
94
    set_capability( "packetizer", 100 );
89
95
    set_callbacks( OpenPacketizer, CloseDecoder );
90
96
 
100
106
 
101
107
    if( p_dec->fmt_in.i_codec != VLC_FOURCC('l','p','c','m')
102
108
         && p_dec->fmt_in.i_codec != VLC_FOURCC('l','p','c','b') )
103
 
    {   
 
109
    {
104
110
        return VLC_EGENERIC;
105
111
    }
106
112
 
107
113
    /* Allocate the memory needed to store the decoder's structure */
108
114
    if( ( p_dec->p_sys = p_sys =
109
115
          (decoder_sys_t *)malloc(sizeof(decoder_sys_t)) ) == NULL )
110
 
    {
111
 
        msg_Err( p_dec, "out of memory" );
112
 
        return VLC_EGENERIC;
113
 
    }
 
116
        return VLC_ENOMEM;
114
117
 
115
118
    /* Misc init */
116
 
    p_sys->b_packetizer = VLC_FALSE;
 
119
    p_sys->b_packetizer = false;
117
120
    aout_DateSet( &p_sys->end_date, 0 );
118
121
 
119
122
    /* Set output properties */
146
149
 
147
150
    if( i_ret != VLC_SUCCESS ) return i_ret;
148
151
 
149
 
    p_dec->p_sys->b_packetizer = VLC_TRUE;
 
152
    p_dec->p_sys->b_packetizer = true;
150
153
 
151
154
    p_dec->fmt_out.i_codec = VLC_FOURCC('l','p','c','m');
152
155