Changeset bfc4f0f588c0c68c557a8f5cbadc19818ac9484f

Show
Ignore:
Timestamp:
10/24/02 01:17:45 (6 years ago)
Author:
Gildas Bazin <gbazin@videolan.org>
git-committer:
Gildas Bazin <gbazin@videolan.org> 1035415065 +0000
git-parent:

[0330bbedd98672af4f6321c595d89b75615d1fc3]

git-author:
Gildas Bazin <gbazin@videolan.org> 1035415065 +0000
Message:

* ALL: New ogg demux and vorbis codec modules for preliminary support of

ogg/vorbis streams.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • AUTHORS

    re0c8e06 rbfc4f0f  
    4949D: mingw32 port, various win32 fixes 
    5050D: DirectX audio and video output, win32 WaveOut audio output 
    51 D: a52 decoder using liba52 
     51D: a52 decoder using liba52 and vorbis decoder using libvorbis 
     52D: ogg demultiplexer 
    5253D: Configuration file infrastructure 
    5354S: France 
  • MAINTAINERS

    rd71af1d rbfc4f0f  
    1 # $Id: MAINTAINERS,v 1.2 2002/08/16 14:30:39 bozo Exp $ 
     1# $Id: MAINTAINERS,v 1.3 2002/10/23 23:17:45 gbazin Exp $ 
    22# 
    33#                            VLC MAINTAINERS 
     
    8080  - A/52 : [gibalou] ([meuuh]) 
    8181  - SPU : [sam] 
    82   - Ogg/Vorbis : Xavier Maillard 
     82  - Ogg/Vorbis : [gibalou] 
    8383 
    8484* DOCUMENTATION 
  • STATUS

    rd71af1d rbfc4f0f  
    1 # $Id: STATUS,v 1.4 2002/08/16 14:30:39 bozo Exp $ 
     1# $Id: STATUS,v 1.5 2002/10/23 23:17:45 gbazin Exp $ 
    22# 
    33#                              VLC STATUS 
     
    4747    - Xinerama fullscreen support 
    4848      ETA : completed 
    49     - Ogg/Vorbis decoder plug-in 
    50       ETA : soon 
    5149 
    5250Christophe Massiot <massiot@via.ecp.fr> : 
  • TODO

    r2cbb6da rbfc4f0f  
    479479 MP3 format. The system packets are quite different than the MPEG ones, so 
    480480 adding support for it would require a lot of code rewrite. 
    481 Status: In the works (Xavier Maillard
     481Status: Done 24 Nov 2002 (gbazin
    482482 
    483483Task: 0x23 
  • configure.ac.in

    r4e9d790 rbfc4f0f  
    10731073 
    10741074dnl 
     1075dnl  ogg plugin 
     1076dnl 
     1077AC_ARG_ENABLE(ogg, 
     1078  [  --enable-ogg            Ogg demux support (default enabled)]) 
     1079if test "x${enable_ogg}" != "xno" 
     1080then 
     1081  AC_CHECK_HEADERS(ogg/ogg.h, [ 
     1082    PLUGINS="${PLUGINS} ogg" 
     1083    LDFLAGS_ogg="${LDFLAGS_ogg} -logg" 
     1084   ],[]) 
     1085fi 
     1086 
     1087dnl 
    10751088dnl  Codec plugins 
    10761089dnl 
     
    13571370 
    13581371dnl 
    1359 dnl  ogg vorbis plugin 
    1360 dnl 
    1361 AC_ARG_ENABLE(vorbis, 
    1362   [  --enable-vorbis         Ogg/Vorbis decoder support (default enabled)]) 
    1363 if test "x${enable_vorbis}" != "xno" 
    1364 then 
    1365   AC_CHECK_HEADERS(ogg/ogg.h, [ 
    1366     dnl disabled for the moment 
    1367     #PLUGINS="${PLUGINS} ogg vorbis" 
    1368     LDFLAGS_vorbis="${LDFLAGS_vorbis} -lvorbis" 
    1369    ],[]) 
    1370 fi 
    1371  
    1372 dnl 
    13731372dnl  DV plugin 
    13741373dnl 
     
    13801379    PLUGINS="${PLUGINS} dv" 
    13811380    LDFLAGS_dv="${LDFLAGS_dv} -ldv" 
     1381   ],[]) 
     1382fi 
     1383 
     1384dnl 
     1385dnl  Vorbis plugin 
     1386dnl 
     1387AC_ARG_ENABLE(vorbis, 
     1388  [  --enable-vorbis            Vorbis decoder support (default enabled)]) 
     1389if test "x${enable_vorbis}" != "xno" 
     1390then 
     1391  AC_CHECK_HEADERS(vorbis/codec.h, [ 
     1392    PLUGINS="${PLUGINS} vorbis" 
     1393    LDFLAGS_vorbis="${LDFLAGS_vorbis} -lvorbis" 
    13821394   ],[]) 
    13831395fi 
  • include/input_ext-dec.h

    rc0cab76 rbfc4f0f  
    33 ***************************************************************************** 
    44 * Copyright (C) 1999-2001 VideoLAN 
    5  * $Id: input_ext-dec.h,v 1.72 2002/10/21 10:46:34 fenrir Exp $ 
     5 * $Id: input_ext-dec.h,v 1.73 2002/10/23 23:17:45 gbazin Exp $ 
    66 * 
    77 * Authors: Christophe Massiot <massiot@via.ecp.fr> 
     
    210210VLC_EXPORT( void, InitBitstream,  ( bit_stream_t *, decoder_fifo_t *, void ( * )( bit_stream_t *, vlc_bool_t ), void * p_callback_arg ) ); 
    211211VLC_EXPORT( vlc_bool_t, NextDataPacket,    ( decoder_fifo_t *, data_packet_t ** ) ); 
     212VLC_EXPORT( pes_packet_t *, GetPES,        ( decoder_fifo_t * ) ); 
     213VLC_EXPORT( pes_packet_t *, NextPES,       ( decoder_fifo_t * ) ); 
    212214VLC_EXPORT( void, BitstreamNextDataPacket, ( bit_stream_t * ) ); 
    213215VLC_EXPORT( u32,  UnalignedShowBits,       ( bit_stream_t *, unsigned int ) ); 
  • modules/LIST

    rba57d25 rbfc4f0f  
    11List of vlc plugins 
    2 $Id: LIST,v 1.2 2002/09/15 20:54:12 jpsaman Exp $ 
     2$Id: LIST,v 1.3 2002/10/23 23:17:45 gbazin Exp $ 
    33 
    44 * a52_system: input module for A52 decapsulation. 
     
    126126 * null: a module with no capabilities. 
    127127 
     128 * ogg: input module for OGG decapsulation. 
     129 
    128130 * qt: interface module using the Qt widget set. 
    129131 
     
    138140 * vcd: input module for accessing Video CDs. 
    139141 
     142 * vorbis: a vorbis audio decoder using the libvorbis library. 
     143 
    140144 * waveout: simple audio output module for Windows. 
    141145 
  • modules/codec/Modules.am

    r9a5df48 rbfc4f0f  
    22SOURCES_lpcm = modules/codec/lpcm.c 
    33SOURCES_araw = modules/codec/araw.c 
     4SOURCES_vorbis = modules/codec/vorbis.c 
  • modules/demux/Modules.am

    r8641281 rbfc4f0f  
    11SOURCES_a52sys = modules/demux/a52sys.c 
     2SOURCES_ogg = modules/demux/ogg.c 
  • src/input/input_ext-dec.c

    rc0cab76 rbfc4f0f  
    33 ***************************************************************************** 
    44 * Copyright (C) 1998-2001 VideoLAN 
    5  * $Id: input_ext-dec.c,v 1.35 2002/10/21 10:46:34 fenrir Exp $ 
     5 * $Id: input_ext-dec.c,v 1.36 2002/10/23 23:17:44 gbazin Exp $ 
    66 * 
    77 * Authors: Christophe Massiot <massiot@via.ecp.fr> 
     
    112112 
    113113/***************************************************************************** 
     114 * GetPES: return the first PES from the fifo 
     115 *****************************************************************************/ 
     116static inline pes_packet_t *_GetPES( decoder_fifo_t * p_fifo ) 
     117{ 
     118    pes_packet_t * p_pes; 
     119 
     120    vlc_mutex_lock( &p_fifo->data_lock ); 
     121 
     122    if( p_fifo->p_first == NULL ) 
     123    { 
     124        /* No PES in the FIFO. p_last is no longer valid. */ 
     125        p_fifo->pp_last = &p_fifo->p_first; 
     126 
     127        if( p_fifo->b_die ) 
     128        { 
     129            vlc_mutex_unlock( &p_fifo->data_lock ); 
     130            return NULL; 
     131        } 
     132 
     133        /* Signal the input thread we're waiting. This is only 
     134         * needed in case of slave clock (ES plug-in)  but it won't 
     135         * harm. */ 
     136        vlc_cond_signal( &p_fifo->data_wait ); 
     137 
     138        /* Wait for the input to tell us when we receive a packet. */ 
     139        vlc_cond_wait( &p_fifo->data_wait, &p_fifo->data_lock ); 
     140    } 
     141 
     142    p_pes = p_fifo->p_first; 
     143 
     144    vlc_mutex_unlock( &p_fifo->data_lock ); 
     145 
     146    return p_pes; 
     147} 
     148 
     149pes_packet_t * GetPES( decoder_fifo_t * p_fifo ) 
     150{ 
     151    return( _GetPES( p_fifo ) ); 
     152} 
     153 
     154/***************************************************************************** 
     155 * NextPES: free the current PES and return the next one 
     156 *****************************************************************************/ 
     157static inline pes_packet_t * _NextPES( decoder_fifo_t * p_fifo ) 
     158{ 
     159    pes_packet_t * p_next; 
     160 
     161    vlc_mutex_lock( &p_fifo->data_lock ); 
     162 
     163    /* Free the previous PES packet. */ 
     164    p_next = p_fifo->p_first->p_next; 
     165    p_fifo->p_first->p_next = NULL; 
     166    input_DeletePES( p_fifo->p_packets_mgt, p_fifo->p_first ); 
     167    p_fifo->p_first = p_next; 
     168    p_fifo->i_depth--; 
     169 
     170    vlc_mutex_unlock( &p_fifo->data_lock ); 
     171 
     172    return _GetPES( p_fifo ); 
     173} 
     174 
     175pes_packet_t * NextPES( decoder_fifo_t * p_fifo ) 
     176{ 
     177    return( _NextPES( p_fifo ) ); 
     178} 
     179 
     180/***************************************************************************** 
    114181 * NextDataPacket: go to the data packet after *pp_data, return 1 if we 
    115182 * changed PES 
     
    128195        if( (*pp_data)->p_next == NULL ) 
    129196        { 
    130             pes_packet_t * p_next; 
    131  
    132             vlc_mutex_lock( &p_fifo->data_lock ); 
    133  
    134             /* Free the previous PES packet. */ 
    135             p_next = p_fifo->p_first->p_next; 
    136             p_fifo->p_first->p_next = NULL; 
    137             input_DeletePES( p_fifo->p_packets_mgt, p_fifo->p_first ); 
    138             p_fifo->p_first = p_next; 
    139             p_fifo->i_depth--; 
    140  
    141             if( p_fifo->p_first == NULL ) 
    142             { 
    143                 /* No PES in the FIFO. p_last is no longer valid. */ 
    144                 p_fifo->pp_last = &p_fifo->p_first; 
    145  
    146                 /* Signal the input thread we're waiting. This is only 
    147                  * needed in case of slave clock (ES plug-in)  but it won't 
    148                  * harm. */ 
    149                 vlc_cond_signal( &p_fifo->data_wait ); 
    150  
    151                 /* Wait for the input to tell us when we receive a packet. */ 
    152                 vlc_cond_wait( &p_fifo->data_wait, &p_fifo->data_lock ); 
    153             } 
    154  
    155197            /* The next packet could be found in the next PES packet */ 
    156             *pp_data = p_fifo->p_first->p_first; 
    157  
    158             vlc_mutex_unlock( &p_fifo->data_lock ); 
     198            *pp_data = (_NextPES( p_fifo ))->p_first; 
    159199 
    160200            b_new_pes = 1;