Changeset 3c230b2a0ee3bde44059d53b7917dd987e99606f

Show
Ignore:
Timestamp:
07/02/08 21:57:31 (2 months ago)
Author:
Laurent Aimar <fenrir@videolan.org>
git-committer:
Laurent Aimar <fenrir@videolan.org> 1215028651 +0000
git-parent:

[2536e65c1266d9ec992acf4c516d8eb90acc81b3]

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

Fixed definition of asf_object_t.
Simplicy asf_object_t use.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/demux/asf/libasf.c

    r2536e65 r3c230b2  
    155155static int ASF_ReadObjectCommon( stream_t *s, asf_object_t *p_obj ) 
    156156{ 
    157     asf_object_common_t *p_common = (asf_object_common_t*)p_obj
     157    asf_object_common_t *p_common = &p_obj->common
    158158    const uint8_t *p_peek; 
    159159 
     
    214214static int  ASF_ReadObject_Header( stream_t *s, asf_object_t *p_obj ) 
    215215{ 
    216     asf_object_header_t *p_hdr = (asf_object_header_t*)p_obj
     216    asf_object_header_t *p_hdr = &p_obj->header
    217217    asf_object_t        *p_subobj; 
    218218    int                 i_peek; 
     
    257257static int ASF_ReadObject_Data( stream_t *s, asf_object_t *p_obj ) 
    258258{ 
    259     asf_object_data_t *p_data = (asf_object_data_t*)p_obj
     259    asf_object_data_t *p_data = &p_obj->data
    260260    int               i_peek; 
    261261    const uint8_t     *p_peek; 
     
    282282static int ASF_ReadObject_Index( stream_t *s, asf_object_t *p_obj ) 
    283283{ 
    284     asf_object_index_t *p_index = (asf_object_index_t*)p_obj
     284    asf_object_index_t *p_index = &p_obj->index
    285285    const uint8_t      *p_peek; 
    286286    int                 i; 
     
    327327static void ASF_FreeObject_Index( asf_object_t *p_obj ) 
    328328{ 
    329     asf_object_index_t *p_index = (asf_object_index_t*)p_obj
     329    asf_object_index_t *p_index = &p_obj->index
    330330 
    331331    FREENULL( p_index->index_entry ); 
     
    334334static int ASF_ReadObject_file_properties( stream_t *s, asf_object_t *p_obj ) 
    335335{ 
    336     asf_object_file_properties_t *p_fp = (asf_object_file_properties_t*)p_obj
     336    asf_object_file_properties_t *p_fp = &p_obj->file_properties
    337337    int           i_peek; 
    338338    const uint8_t *p_peek; 
     
    373373static void ASF_FreeObject_metadata( asf_object_t *p_obj ) 
    374374{ 
    375     asf_object_metadata_t *p_meta = 
    376         (asf_object_metadata_t *)p_obj; 
     375    asf_object_metadata_t *p_meta = &p_obj->metadata; 
    377376    unsigned int i; 
    378377 
     
    387386static int ASF_ReadObject_metadata( stream_t *s, asf_object_t *p_obj ) 
    388387{ 
    389     asf_object_metadata_t *p_meta = 
    390         (asf_object_metadata_t *)p_obj; 
     388    asf_object_metadata_t *p_meta = &p_obj->metadata; 
    391389 
    392390    int i_peek; 
     
    495493static int ASF_ReadObject_header_extension( stream_t *s, asf_object_t *p_obj ) 
    496494{ 
    497     asf_object_header_extension_t *p_he = 
    498         (asf_object_header_extension_t *)p_obj; 
     495    asf_object_header_extension_t *p_he = &p_obj->header_extension; 
    499496    int     i_peek; 
    500497    const uint8_t *p_peek; 
     
    558555static void ASF_FreeObject_header_extension( asf_object_t *p_obj ) 
    559556{ 
    560     asf_object_header_extension_t *p_he = 
    561         (asf_object_header_extension_t *)p_obj; 
     557    asf_object_header_extension_t *p_he = &p_obj->header_extension; 
    562558 
    563559    FREENULL( p_he->p_header_extension_data ); 
     
    566562static int ASF_ReadObject_stream_properties( stream_t *s, asf_object_t *p_obj ) 
    567563{ 
    568     asf_object_stream_properties_t *p_sp = 
    569                     (asf_object_stream_properties_t*)p_obj; 
     564    asf_object_stream_properties_t *p_sp = &p_obj->stream_properties; 
    570565    size_t        i_peek; 
    571566    const uint8_t *p_peek; 
     
    647642static void ASF_FreeObject_stream_properties( asf_object_t *p_obj ) 
    648643{ 
    649     asf_object_stream_properties_t *p_sp = 
    650                 (asf_object_stream_properties_t*)p_obj; 
     644    asf_object_stream_properties_t *p_sp = &p_obj->stream_properties; 
    651645 
    652646    FREENULL( p_sp->p_type_specific_data ); 
     
    657651static int ASF_ReadObject_codec_list( stream_t *s, asf_object_t *p_obj ) 
    658652{ 
    659     asf_object_codec_list_t *p_cl = (asf_object_codec_list_t*)p_obj
     653    asf_object_codec_list_t *p_cl = &p_obj->codec_list
    660654    int     i_peek; 
    661655    const uint8_t *p_peek, *p_data; 
     
    737731static void ASF_FreeObject_codec_list( asf_object_t *p_obj ) 
    738732{ 
    739     asf_object_codec_list_t *p_cl = (asf_object_codec_list_t*)p_obj
     733    asf_object_codec_list_t *p_cl = &p_obj->codec_list
    740734    unsigned int i_codec; 
    741735 
     
    755749static int ASF_ReadObject_content_description(stream_t *s, asf_object_t *p_obj) 
    756750{ 
    757     asf_object_content_description_t *p_cd = 
    758         (asf_object_content_description_t *)p_obj; 
     751    asf_object_content_description_t *p_cd = &p_obj->content_description; 
    759752    const uint8_t *p_peek, *p_data; 
    760753    int i_peek, i_title, i_artist, i_copyright, i_description, i_rating; 
     
    822815static void ASF_FreeObject_content_description( asf_object_t *p_obj) 
    823816{ 
    824     asf_object_content_description_t *p_cd = 
    825         (asf_object_content_description_t *)p_obj; 
     817    asf_object_content_description_t *p_cd = &p_obj->content_description; 
    826818 
    827819    FREENULL( p_cd->psz_title ); 
     
    835827static int ASF_ReadObject_language_list(stream_t *s, asf_object_t *p_obj) 
    836828{ 
    837     asf_object_language_list_t *p_ll = 
    838         (asf_object_language_list_t*)p_obj; 
     829    asf_object_language_list_t *p_ll = &p_obj->language_list; 
    839830    const uint8_t *p_peek, *p_data; 
    840831    int i_peek; 
     
    872863static void ASF_FreeObject_language_list( asf_object_t *p_obj) 
    873864{ 
    874     asf_object_language_list_t *p_ll = 
    875         (asf_object_language_list_t *)p_obj; 
     865    asf_object_language_list_t *p_ll = &p_obj->language_list; 
    876866    int i; 
    877867 
     
    885875                                                     asf_object_t *p_obj) 
    886876{ 
    887     asf_object_stream_bitrate_properties_t *p_sb = 
    888         (asf_object_stream_bitrate_properties_t *)p_obj; 
     877    asf_object_stream_bitrate_properties_t *p_sb = &p_obj->stream_bitrate; 
    889878    const uint8_t *p_peek, *p_data; 
    890879    int i_peek; 
     
    927916                                                      asf_object_t *p_obj) 
    928917{ 
    929     asf_object_extended_stream_properties_t *p_esp = 
    930         (asf_object_extended_stream_properties_t*)p_obj; 
     918    asf_object_extended_stream_properties_t *p_esp = &p_obj->ext_stream; 
    931919    const uint8_t *p_peek, *p_data; 
    932920    int i_peek, i; 
     
    10251013static void ASF_FreeObject_extended_stream_properties( asf_object_t *p_obj) 
    10261014{ 
    1027     asf_object_extended_stream_properties_t *p_esp = 
    1028         (asf_object_extended_stream_properties_t *)p_obj; 
     1015    asf_object_extended_stream_properties_t *p_esp = &p_obj->ext_stream; 
    10291016    int i; 
    10301017 
     
    10391026                                                     asf_object_t *p_obj) 
    10401027{ 
    1041     asf_object_advanced_mutual_exclusion_t *p_ae = 
    1042         (asf_object_advanced_mutual_exclusion_t *)p_obj; 
     1028    asf_object_advanced_mutual_exclusion_t *p_ae = &p_obj->advanced_mutual_exclusion; 
    10431029    const uint8_t *p_peek, *p_data; 
    10441030    int i_peek; 
     
    10721058static void ASF_FreeObject_advanced_mutual_exclusion( asf_object_t *p_obj) 
    10731059{ 
    1074     asf_object_advanced_mutual_exclusion_t *p_ae = 
    1075         (asf_object_advanced_mutual_exclusion_t *)p_obj; 
     1060    asf_object_advanced_mutual_exclusion_t *p_ae = &p_obj->advanced_mutual_exclusion; 
    10761061 
    10771062    FREENULL( p_ae->pi_stream_number ); 
     
    10821067                                                 asf_object_t *p_obj) 
    10831068{ 
    1084     asf_object_stream_prioritization_t *p_sp = 
    1085         (asf_object_stream_prioritization_t *)p_obj; 
     1069    asf_object_stream_prioritization_t *p_sp = &p_obj->stream_prioritization; 
    10861070    const uint8_t *p_peek, *p_data; 
    10871071    int i_peek; 
     
    11191103static void ASF_FreeObject_stream_prioritization( asf_object_t *p_obj) 
    11201104{ 
    1121     asf_object_stream_prioritization_t *p_sp = 
    1122         (asf_object_stream_prioritization_t *)p_obj; 
     1105    asf_object_stream_prioritization_t *p_sp = &p_obj->stream_prioritization; 
    11231106 
    11241107    FREENULL( p_sp->pi_priority_stream_number ); 
     
    11311114{ 
    11321115    asf_object_extended_content_description_t *p_ec = 
    1133         (asf_object_extended_content_description_t *)p_obj
     1116                                        &p_obj->extended_content_description
    11341117    const uint8_t *p_peek, *p_data; 
    11351118    int i_peek; 
     
    12241207{ 
    12251208    asf_object_extended_content_description_t *p_ec = 
    1226         (asf_object_extended_content_description_t *)p_obj
     1209                                        &p_obj->extended_content_description
    12271210    int i; 
    12281211 
  • modules/demux/asf/libasf.h

    r8770fee r3c230b2  
    443443    asf_object_codec_list_t         codec_list; 
    444444    asf_object_marker_t             marker; 
    445     asf_object_language_list_t      lang
     445    asf_object_language_list_t      language_list
    446446    asf_object_stream_bitrate_properties_t stream_bitrate; 
    447447    asf_object_extended_stream_properties_t ext_stream; 
     448    asf_object_content_description_t content_description; 
     449    asf_object_advanced_mutual_exclusion_t advanced_mutual_exclusion; 
     450    asf_object_stream_prioritization_t stream_prioritization; 
     451    asf_object_extended_content_description_t extended_content_description; 
    448452 
    449453} asf_object_t;