asf.h
上传用户:kjfoods
上传日期:2020-07-06
资源大小:29949k
文件大小:4k
源码类别:

midi

开发平台:

Unix_Linux

  1. /*****************************************************************************
  2.  * asf.h: MMS access plug-in
  3.  *****************************************************************************
  4.  * Copyright (C) 2001-2004 the VideoLAN team
  5.  * $Id: 049328c9244b34f783f7d986ad69b63180a7f526 $
  6.  *
  7.  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  8.  *
  9.  * This program is free software; you can redistribute it and/or modify
  10.  * it under the terms of the GNU General Public License as published by
  11.  * the Free Software Foundation; either version 2 of the License, or
  12.  * (at your option) any later version.
  13.  *
  14.  * This program is distributed in the hope that it will be useful,
  15.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17.  * GNU General Public License for more details.
  18.  *
  19.  * You should have received a copy of the GNU General Public License
  20.  * along with this program; if not, write to the Free Software
  21.  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  22.  *****************************************************************************/
  23. /****************************************************************************
  24.  * XXX:
  25.  *  Definitions and data duplicated from asf demuxers but I want access
  26.  * and demux plugins to be independent
  27.  *
  28.  ****************************************************************************/
  29. #ifndef _ASF_H_
  30. #define _ASF_H_ 1
  31. #define ASF_STREAM_VIDEO    0x0001
  32. #define ASF_STREAM_AUDIO    0x0002
  33. #define ASF_STREAM_UNKNOWN  0xffff
  34. typedef struct
  35. {
  36.     int i_cat;      /* ASF_STREAM_VIDEO, ASF_STREAM_AUDIO */
  37.     int i_bitrate;  /* -1 if unknown */
  38.     int i_selected;
  39. } asf_stream_t;
  40. typedef struct
  41. {
  42.     int64_t      i_file_size;
  43.     int64_t      i_data_packets_count;
  44.     int32_t      i_min_data_packet_size;
  45.     asf_stream_t stream[128];
  46. } asf_header_t;
  47. typedef struct guid_s
  48. {
  49.     uint32_t v1; /* le */
  50.     uint16_t v2; /* le */
  51.     uint16_t v3; /* le */
  52.     uint8_t  v4[8];
  53. } guid_t;
  54. void  GenerateGuid      ( guid_t * );
  55. void  asf_HeaderParse   ( asf_header_t *, uint8_t *, int );
  56. void  asf_StreamSelect  ( asf_header_t *,
  57.                               int i_bitrate_max, bool b_all, bool b_audio,
  58.                               bool b_video );
  59. #define GUID_FMT "%8.8x-%4.4x-%4.4x-%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x"
  60. #define GUID_PRINT( guid )  
  61.     (guid).v1,              
  62.     (guid).v2,              
  63.     (guid).v3,              
  64.     (guid).v4[0],(guid).v4[1],(guid).v4[2],(guid).v4[3],    
  65.     (guid).v4[4],(guid).v4[5],(guid).v4[6],(guid).v4[7]
  66. static const guid_t asf_object_header_guid =
  67. {
  68.     0x75B22630,
  69.     0x668E,
  70.     0x11CF,
  71.     { 0xA6,0xD9, 0x00,0xAA,0x00,0x62,0xCE,0x6C }
  72. };
  73. static const guid_t asf_object_file_properties_guid =
  74. {
  75.     0x8cabdca1,
  76.     0xa947,
  77.     0x11cf,
  78.     { 0x8e,0xe4, 0x00,0xC0,0x0C,0x20,0x53,0x65 }
  79. };
  80. static const guid_t asf_object_stream_properties_guid =
  81. {
  82.     0xB7DC0791,
  83.     0xA9B7,
  84.     0x11CF,
  85.     { 0x8E,0xE6, 0x00,0xC0,0x0C,0x20,0x53,0x65 }
  86. };
  87. static const guid_t asf_object_stream_type_audio =
  88. {
  89.     0xF8699E40,
  90.     0x5B4D,
  91.     0x11CF,
  92.     { 0xA8,0xFD, 0x00,0x80,0x5F,0x5C,0x44,0x2B }
  93. };
  94. static const guid_t asf_object_stream_type_video =
  95. {
  96.     0xbc19efc0,
  97.     0x5B4D,
  98.     0x11CF,
  99.     { 0xA8,0xFD, 0x00,0x80,0x5F,0x5C,0x44,0x2B }
  100. };
  101. static const guid_t asf_object_bitrate_properties_guid =
  102. {
  103.     0x7BF875CE,
  104.     0x468D,
  105.     0x11D1,
  106.     { 0x8D,0x82,0x00,0x60,0x97,0xC9,0xA2,0xB2 }
  107. };
  108. static const guid_t asf_object_bitrate_mutual_exclusion_guid =
  109. {
  110.     0xD6E229DC,
  111.     0x35DA,
  112.     0x11D1,
  113.     { 0x90,0x34,0x00,0xA0,0xC9,0x03,0x49,0xBE }
  114. };
  115. static const guid_t asf_object_extended_stream_properties_guid =
  116. {
  117.     0x14E6A5CB,
  118.     0xC672,
  119.     0x4332,
  120.     { 0x83, 0x99, 0xA9, 0x69, 0x52, 0x06, 0x5B, 0x5A }
  121. };
  122. static const guid_t asf_object_header_extension_guid =
  123. {
  124.     0x5FBF03B5,
  125.     0xA92E,
  126.     0x11CF,
  127.     { 0x8E, 0xE3, 0x00, 0xC0, 0x0C, 0x20, 0x53, 0x65 }
  128. };
  129. #endif