Changeset 6d3ce5936ac1416669df68a547be91d3db6c33ad

Show
Ignore:
Timestamp:
25/05/07 20:37:45 (2 years ago)
Author:
Laurent Aimar <fenrir@videolan.org>
git-committer:
Laurent Aimar <fenrir@videolan.org> 1180118265 +0000
git-parent:

[d6cacb46b2c13b651a53286f713fff12bc470503]

git-author:
Laurent Aimar <fenrir@videolan.org> 1180118265 +0000
Message:

Added meta parsing (close #624)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/demux/mpeg/m4a.c

    rd6cacb4 r6d3ce59  
    2929#include <vlc/vlc.h> 
    3030#include <vlc_demux.h> 
     31#include <vlc_meta.h> 
    3132#include "vlc_codec.h" 
    3233 
     
    5556    vlc_bool_t  b_start; 
    5657    es_out_id_t *p_es; 
     58    vlc_meta_t  *meta; 
    5759 
    5860    decoder_t   *p_packetizer; 
     
    7779    demux_t     *p_demux = (demux_t*)p_this; 
    7880    demux_sys_t *p_sys; 
     81    module_t    *p_id3; 
    7982    uint8_t     *p_peek; 
    8083    int         b_forced = VLC_FALSE; 
     
    122125    LOAD_PACKETIZER_OR_FAIL( p_sys->p_packetizer, "mp4 audio" ); 
    123126 
     127    /* Parse possible id3 header */ 
     128    if( ( p_id3 = module_Need( p_demux, "meta reader", NULL, 0 ) ) ) 
     129    { 
     130        p_sys->meta = (vlc_meta_t *)p_demux->p_private; 
     131        p_demux->p_private = NULL; 
     132        module_Unneed( p_demux, p_id3 ); 
     133    } 
    124134    return VLC_SUCCESS; 
    125135} 
     
    194204{ 
    195205    demux_sys_t *p_sys = p_demux->p_sys; 
     206    vlc_meta_t *p_meta; 
     207 
    196208    int64_t *pi64; 
    197209    int i_ret; 
     
    199211    switch( i_query ) 
    200212    { 
     213    case DEMUX_GET_META: 
     214        p_meta = (vlc_meta_t *)va_arg( args, vlc_meta_t* ); 
     215        vlc_meta_Merge( p_meta, p_sys->meta ); 
     216        return VLC_SUCCESS; 
     217 
    201218    case DEMUX_GET_TIME: 
    202219        pi64 = (int64_t*)va_arg( args, int64_t * );