1 /***************************************************************************** 2 * asfpacket.h : 3 ***************************************************************************** 4 * Copyright © 2001-2004, 2011, 2014 VLC authors and VideoLAN 5 * 6 * Authors: Laurent Aimar <fenrir@via.ecp.fr> 7 * 8 * This program is free software; you can redistribute it and/or modify it 9 * under the terms of the GNU Lesser General Public License as published by 10 * the Free Software Foundation; either version 2.1 of the License, or 11 * (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU Lesser General Public License for more details. 17 * 18 * You should have received a copy of the GNU Lesser General Public License 19 * along with this program; if not, write to the Free Software Foundation, 20 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 *****************************************************************************/ 22 #ifndef VLC_ASF_ASFPACKET_H_ 23 #define VLC_ASF_ASFPACKET_H_ 24 25 #include <vlc_demux.h> 26 #include <vlc_es.h> 27 #include "libasf.h" 28 29 #define ASFPACKET_PREROLL_FROM_CURRENT -1 30 31 typedef struct 32 { 33 block_t *p_frame; /* used to gather complete frame */ 34 asf_object_stream_properties_t *p_sp; 35 asf_object_extended_stream_properties_t *p_esp; 36 int i_cat; 37 } asf_track_info_t; 38 39 typedef struct asf_packet_sys_s asf_packet_sys_t; 40 41 struct asf_packet_sys_s 42 { 43 demux_t *p_demux; 44 45 /* global stream info */ 46 uint64_t *pi_preroll; 47 int64_t *pi_preroll_start; 48 49 /* callbacks */ 50 void (*pf_send)(asf_packet_sys_t *, uint8_t, block_t **); 51 asf_track_info_t * (*pf_gettrackinfo)(asf_packet_sys_t *, uint8_t); 52 53 /* optional callbacks */ 54 bool (*pf_doskip)(asf_packet_sys_t *, uint8_t, bool); 55 void (*pf_updatesendtime)(asf_packet_sys_t *, mtime_t); 56 void (*pf_updatetime)(asf_packet_sys_t *, uint8_t, mtime_t); 57 void (*pf_setaspectratio)(asf_packet_sys_t *, uint8_t, uint8_t, uint8_t); 58 }; 59 60 int DemuxASFPacket( asf_packet_sys_t *, uint32_t, uint32_t, uint64_t, uint64_t ); 61 #endif 62