Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

887 lines
36 KiB

  1. /*
  2. * @DEC_COPYRIGHT@
  3. */
  4. /*
  5. * HISTORY
  6. * $Log: slib.h,v $
  7. * Revision 1.1.6.22 1996/12/13 18:19:02 Hans_Graves
  8. * Added SlibErrorNoBeginning enum
  9. * [1996/12/13 17:42:20 Hans_Graves]
  10. *
  11. * Revision 1.1.6.21 1996/12/10 19:21:51 Hans_Graves
  12. * Added Avg/VarVideoTimeDiff and SlibFrameToTime100() macro
  13. * [1996/12/10 19:17:53 Hans_Graves]
  14. *
  15. * Revision 1.1.6.20 1996/12/05 20:10:13 Hans_Graves
  16. * Added AvgVideoTimeDiff and AvgAudioTimeDiff to SlibInfo_t
  17. * [1996/12/05 20:07:53 Hans_Graves]
  18. *
  19. * Revision 1.1.6.19 1996/12/03 00:08:29 Hans_Graves
  20. * Added unit SLIB_UNIT_PERCENT100 and Seek type SLIB_SEEK_RESYNC.
  21. * [1996/12/03 00:02:47 Hans_Graves]
  22. *
  23. * Revision 1.1.6.18 1996/11/20 02:15:07 Hans_Graves
  24. * Added SEEK_AHEAD.
  25. * [1996/11/20 01:49:55 Hans_Graves]
  26. *
  27. * Revision 1.1.6.17 1996/11/18 23:07:14 Hans_Graves
  28. * Change operations to the time-based instead of frame-based.
  29. * [1996/11/18 22:56:34 Hans_Graves]
  30. *
  31. * Revision 1.1.6.16 1996/11/11 18:21:02 Hans_Graves
  32. * Added proto for slibRenamePin().
  33. * [1996/11/11 17:58:03 Hans_Graves]
  34. *
  35. * Revision 1.1.6.15 1996/11/08 21:50:59 Hans_Graves
  36. * Added AC3 stuff. Better seperation of stream types.
  37. * [1996/11/08 21:18:22 Hans_Graves]
  38. *
  39. * Revision 1.1.6.14 1996/10/31 00:08:53 Hans_Graves
  40. * Added SLIB_TIME_UNKNOWN
  41. * [1996/10/31 00:07:57 Hans_Graves]
  42. *
  43. * Revision 1.1.6.13 1996/10/28 17:32:23 Hans_Graves
  44. * MME-1402, 1431, 1435: Timestamp related changes.
  45. * [1996/10/28 17:19:38 Hans_Graves]
  46. *
  47. * Revision 1.1.6.12 1996/10/17 00:23:30 Hans_Graves
  48. * Added SLIB_PARAM_VIDEOFRAME and SLIB_PARAM_FRAMEDURATION.
  49. * [1996/10/17 00:17:53 Hans_Graves]
  50. *
  51. * Revision 1.1.6.11 1996/10/12 17:18:19 Hans_Graves
  52. * Added params HALFPEL and SKIPPEL. Seperated MPEG2_SYSTEMS into TRANSPORT and PROGRAM.
  53. * [1996/10/12 16:57:14 Hans_Graves]
  54. *
  55. * Revision 1.1.6.10 1996/10/03 19:14:19 Hans_Graves
  56. * Added PTimeCode and DTimeCode to Info struct.
  57. * [1996/10/03 19:08:35 Hans_Graves]
  58. *
  59. * Revision 1.1.6.9 1996/09/29 22:19:35 Hans_Graves
  60. * Added stride support. Added SlibQueryData().
  61. * [1996/09/29 21:28:25 Hans_Graves]
  62. *
  63. * Revision 1.1.6.8 1996/09/25 19:16:41 Hans_Graves
  64. * Reduce number of includes needed publicly by adding SLIB_INTERNAL ifdef.
  65. * [1996/09/25 19:02:38 Hans_Graves]
  66. *
  67. * Revision 1.1.6.7 1996/09/23 18:04:01 Hans_Graves
  68. * Added STATS params.
  69. * [1996/09/23 18:03:23 Hans_Graves]
  70. *
  71. * Revision 1.1.6.6 1996/09/18 23:46:20 Hans_Graves
  72. * Clean up. Added SlibAddBufferEx() and SlibReadData() protos.
  73. * [1996/09/18 21:59:36 Hans_Graves]
  74. *
  75. * Revision 1.1.6.5 1996/08/09 20:51:19 Hans_Graves
  76. * Fix proto for SlibRegisterVideoBuffer()
  77. * [1996/08/09 20:06:26 Hans_Graves]
  78. *
  79. * Revision 1.1.6.4 1996/07/19 02:11:05 Hans_Graves
  80. * New params. Added SlibRegisterVideoBuffer.
  81. * [1996/07/19 01:26:07 Hans_Graves]
  82. *
  83. * Revision 1.1.6.3 1996/05/10 21:16:53 Hans_Graves
  84. * Changes for Callback support.
  85. * [1996/05/10 20:59:56 Hans_Graves]
  86. *
  87. * Revision 1.1.6.2 1996/05/07 19:56:00 Hans_Graves
  88. * Added Callback framework.
  89. * [1996/05/07 17:23:12 Hans_Graves]
  90. *
  91. * Revision 1.1.4.13 1996/04/24 22:33:42 Hans_Graves
  92. * Added proto for slibValidateBitrates()
  93. * [1996/04/24 22:27:46 Hans_Graves]
  94. *
  95. * Revision 1.1.4.12 1996/04/23 21:01:41 Hans_Graves
  96. * Added SlibErrorSettingNotEqual
  97. * [1996/04/23 20:59:36 Hans_Graves]
  98. *
  99. * Revision 1.1.4.11 1996/04/22 15:04:50 Hans_Graves
  100. * Added protos for: slibValidateVideoParams, slibValidateAudioParams, SlibValidateParams
  101. * [1996/04/22 15:03:17 Hans_Graves]
  102. *
  103. * Revision 1.1.4.10 1996/04/19 21:52:20 Hans_Graves
  104. * Additions to SlibInfo: TotalBitRate, MuxBitRate, SystemTimeStamp, PacketCount
  105. * [1996/04/19 21:49:13 Hans_Graves]
  106. *
  107. * Revision 1.1.4.9 1996/04/15 14:18:35 Hans_Graves
  108. * Added temp audio buffer info
  109. * [1996/04/15 14:09:23 Hans_Graves]
  110. *
  111. * Revision 1.1.4.8 1996/04/10 21:47:36 Hans_Graves
  112. * Moved definition for EXTERN to SC.h
  113. * [1996/04/10 21:24:09 Hans_Graves]
  114. *
  115. * Added QUALITY and FAST params
  116. * [1996/04/10 20:41:21 Hans_Graves]
  117. *
  118. * Revision 1.1.4.7 1996/04/09 16:04:39 Hans_Graves
  119. * Added EXTERN define for cplusplus compatibility
  120. * [1996/04/09 14:49:16 Hans_Graves]
  121. *
  122. * Revision 1.1.4.6 1996/04/01 19:07:50 Hans_Graves
  123. * Change slibVerifyVideoParams() proto
  124. * [1996/04/01 19:05:31 Hans_Graves]
  125. *
  126. * Revision 1.1.4.5 1996/04/01 16:23:11 Hans_Graves
  127. * NT porting
  128. * [1996/04/01 16:15:51 Hans_Graves]
  129. *
  130. * Revision 1.1.4.4 1996/03/29 22:21:13 Hans_Graves
  131. * Added HeaderProcessed to SlibInfo
  132. * [1996/03/27 21:52:31 Hans_Graves]
  133. *
  134. * Revision 1.1.4.3 1996/03/12 16:15:42 Hans_Graves
  135. * Added SLIB_PARAM_FILEBUFSIZE parameter
  136. * [1996/03/12 16:11:55 Hans_Graves]
  137. *
  138. * Revision 1.1.4.2 1996/03/08 18:46:31 Hans_Graves
  139. * Added Imagebuf to SlibInfo_t
  140. * [1996/03/08 16:23:53 Hans_Graves]
  141. *
  142. * Revision 1.1.2.13 1996/02/19 18:03:53 Hans_Graves
  143. * Added more SEEK types.
  144. * [1996/02/19 17:59:12 Hans_Graves]
  145. *
  146. * Revision 1.1.2.12 1996/02/13 18:47:45 Hans_Graves
  147. * Fix some Seek related bugs
  148. * [1996/02/13 18:41:51 Hans_Graves]
  149. *
  150. * Revision 1.1.2.11 1996/02/07 23:23:51 Hans_Graves
  151. * Added slibCountCodesOnPin() prototype
  152. * [1996/02/07 23:19:11 Hans_Graves]
  153. *
  154. * Revision 1.1.2.10 1996/02/06 22:53:55 Hans_Graves
  155. * Prototype updates
  156. * [1996/02/06 22:44:06 Hans_Graves]
  157. *
  158. * Revision 1.1.2.9 1996/02/02 17:36:01 Hans_Graves
  159. * Updated prototypes
  160. * [1996/02/02 17:28:41 Hans_Graves]
  161. *
  162. * Revision 1.1.2.8 1996/01/30 22:23:06 Hans_Graves
  163. * Added AVI YUV support
  164. * [1996/01/30 22:22:00 Hans_Graves]
  165. *
  166. * Revision 1.1.2.7 1996/01/15 16:26:26 Hans_Graves
  167. * Added: TYPE_WAVE, more PARAMs, SlibWriteAudio()
  168. * [1996/01/15 15:44:44 Hans_Graves]
  169. *
  170. * Revision 1.1.2.6 1996/01/11 16:17:26 Hans_Graves
  171. * Added SlibGet/SetParam() prototypes
  172. * [1996/01/11 16:13:44 Hans_Graves]
  173. *
  174. * Revision 1.1.2.5 1996/01/08 16:41:25 Hans_Graves
  175. * Cleaned up prototypes
  176. * [1996/01/08 15:48:38 Hans_Graves]
  177. *
  178. * Revision 1.1.2.4 1995/12/07 19:31:27 Hans_Graves
  179. * Added JPEG Decoding and MPEG encoding support
  180. * [1995/12/07 18:28:11 Hans_Graves]
  181. *
  182. * Revision 1.1.2.3 1995/11/09 23:14:03 Hans_Graves
  183. * Added Time structure members and prototypes
  184. * [1995/11/09 23:10:32 Hans_Graves]
  185. *
  186. * Revision 1.1.2.2 1995/11/06 18:47:45 Hans_Graves
  187. * First time under SLIB
  188. * [1995/11/06 18:34:32 Hans_Graves]
  189. *
  190. * $EndLog$
  191. */
  192. /*****************************************************************************
  193. ** Copyright (c) Digital Equipment Corporation, 1995 **
  194. ** **
  195. ** All Rights Reserved. Unpublished rights reserved under the copyright **
  196. ** laws of the United States. **
  197. ** **
  198. ** The software contained on this media is proprietary to and embodies **
  199. ** the confidential technology of Digital Equipment Corporation. **
  200. ** Possession, use, duplication or dissemination of the software and **
  201. ** media is authorized only pursuant to a valid written license from **
  202. ** Digital Equipment Corporation. **
  203. ** **
  204. ** RESTRICTED RIGHTS LEGEND Use, duplication, or disclosure by the U.S. **
  205. ** Government is subject to restrictions as set forth in Subparagraph **
  206. ** (c)(1)(ii) of DFARS 252.227-7013, or in FAR 52.227-19, as applicable. **
  207. ******************************************************************************/
  208. #ifndef _SLIB_H_
  209. #define _SLIB_H_
  210. #ifdef WIN32
  211. #include <windows.h>
  212. #endif
  213. #include "SC.h"
  214. #ifdef SLIB_INTERNAL
  215. #include "SV.h"
  216. #include "SA.h"
  217. #include "scon.h"
  218. #endif /* SLIB_INTERNAL */
  219. typedef void *SlibHandle_t;
  220. typedef ScBoolean_t SlibBoolean_t;
  221. typedef int SlibStream_t;
  222. typedef qword SlibTime_t;
  223. typedef qword SlibPosition_t;
  224. #define SLIB_TIME_NONE (SlibTime_t)(-1)
  225. #define SLIB_TIME_UNKNOWN (SlibTime_t)(-2)
  226. /* units used in seeking */
  227. typedef enum {
  228. SLIB_UNIT_NONE,
  229. SLIB_UNIT_FRAMES, /* frames */
  230. SLIB_UNIT_MS, /* milliseconds */
  231. SLIB_UNIT_PERCENT100, /* one hundredth of percent */
  232. } SlibUnit_t;
  233. #define SlibTimeIsValid(stime) ((stime)>=0)
  234. #define SlibTimeIsInValid(stime) ((stime)<0)
  235. #define SlibTimeToFrame(Sh,vs,stime) \
  236. ((qword)((stime)*SlibGetParamFloat(Sh, vs, SLIB_PARAM_FPS))/1000)
  237. #define SlibFrameToTime(Sh,vs,frame) \
  238. ((SlibTime_t)((float)(frame*1000)/SlibGetParamFloat(Sh, vs, SLIB_PARAM_FPS)))
  239. #define SlibFrameToTime100(Sh,vs,frame) \
  240. ((SlibTime_t)((float)(frame*100000)/SlibGetParamFloat(Sh, vs, SLIB_PARAM_FPS)))
  241. typedef qword SlibListParam1_t;
  242. typedef qword SlibListParam2_t;
  243. typedef struct SlibList_s {
  244. int Enum; /* an enumerated value associated with the entry */
  245. char *Name; /* the name of an entry in the list. NULL = last entry */
  246. char *Desc; /* a lengthy description of the entry */
  247. SlibListParam1_t param1;
  248. SlibListParam2_t param2;
  249. } SlibList_t;
  250. typedef enum {
  251. SlibErrorNone = 0,
  252. SlibErrorInternal,
  253. SlibErrorMemory,
  254. SlibErrorBadArgument,
  255. SlibErrorBadHandle,
  256. SlibErrorBadStream,
  257. SlibErrorBadMode,
  258. SlibErrorUnsupportedFormat,
  259. SlibErrorReading,
  260. SlibErrorWriting,
  261. SlibErrorBufSize,
  262. SlibErrorEndOfStream,
  263. SlibErrorForwardOnly,
  264. SlibErrorUnsupportedParam,
  265. SlibErrorImageSize, /* Invalid image height and/or width */
  266. SlibErrorSettingNotEqual, /* The exact Parameter setting was not accepted */
  267. SlibErrorInit, /* initialization error */
  268. SlibErrorFileSize, /* file size unknown */
  269. SlibErrorBadPosition, /* position argument to seek is invalid */
  270. SlibErrorBadUnit, /* units are invalid */
  271. SlibErrorNoBeginning, /* couldn't begin the codecs */
  272. SlibErrorNoData, /* no data available */
  273. } SlibStatus_t;
  274. typedef enum {
  275. SLIB_MODE_NONE,
  276. SLIB_MODE_COMPRESS,
  277. SLIB_MODE_COMPRESS_APPEND,
  278. SLIB_MODE_DECOMPRESS,
  279. } SlibMode_t;
  280. typedef enum {
  281. SLIB_TYPE_UNKNOWN=0,
  282. /* MPEG elementary stream types */
  283. SLIB_TYPE_MPEG1_VIDEO=0x01,
  284. SLIB_TYPE_MPEG1_AUDIO=0x02,
  285. SLIB_TYPE_MPEG2_VIDEO=0x04,
  286. SLIB_TYPE_MPEG2_AUDIO=0x08,
  287. SLIB_TYPE_AC3_AUDIO=0x10,
  288. /* MPEG multiplex types */
  289. SLIB_TYPE_MPEG_SYSTEMS=0x100,
  290. SLIB_TYPE_MPEG_SYSTEMS_MPEG2=0x104, /* MPEG Systems with MPEG2 data */
  291. SLIB_TYPE_MPEG_TRANSPORT=0x200,
  292. SLIB_TYPE_MPEG_PROGRAM=0x400,
  293. /* H26? stream types */
  294. SLIB_TYPE_H261=0x800,
  295. SLIB_TYPE_RTP_H261=0x808,
  296. SLIB_TYPE_H263=0x810,
  297. SLIB_TYPE_RTP_H263=0x818,
  298. /* RIFF stream types */
  299. SLIB_TYPE_RIFF=0x1000,
  300. SLIB_TYPE_PCM_WAVE,
  301. SLIB_TYPE_AVI,
  302. SLIB_TYPE_MJPG_AVI,
  303. SLIB_TYPE_JPEG_AVI,
  304. SLIB_TYPE_YUV_AVI,
  305. /* Other stream types */
  306. SLIB_TYPE_JPEG_QUICKTIME=0x2000,
  307. SLIB_TYPE_JFIF,
  308. SLIB_TYPE_MJPG,
  309. SLIB_TYPE_JPEG,
  310. SLIB_TYPE_YUV,
  311. SLIB_TYPE_RGB,
  312. SLIB_TYPE_PCM,
  313. /* G72? stream types */
  314. SLIB_TYPE_G723=0x4000,
  315. /* Miscellaneous types */
  316. SLIB_TYPE_RASTER=0x8000,
  317. SLIB_TYPE_BMP,
  318. /* Test stream types */
  319. SLIB_TYPE_SLIB=0xC000,
  320. SLIB_TYPE_SHUFF
  321. } SlibType_t;
  322. #ifdef OLD_SLIB
  323. #define SLIB_TYPE_MPEG1_SYSTEMS SLIB_TYPE_MPEG_SYSTEMS
  324. #define SLIB_TYPE_MPEG2_SYSTEMS SLIB_TYPE_MPEG_TRANSPORT
  325. #define SLIB_TYPE_MPEG2_TRANSPORT SLIB_TYPE_MPEG_TRANSPORT
  326. #define SLIB_TYPE_MPEG2_PROGRAM SLIB_TYPE_MPEG_PROGRAM
  327. #endif /* OLD_SLIB */
  328. #define SlibTypeIsMPEG(stype) (stype>=SLIB_TYPE_MPEG1_VIDEO && \
  329. stype<=SLIB_TYPE_MPEG_PROGRAM)
  330. #define SlibTypeIsMPEGVideo(stype) (stype<=SLIB_TYPE_MPEG_PROGRAM && \
  331. (stype&0x705))
  332. #define SlibTypeIsMPEGAudio(stype) (stype<=SLIB_TYPE_MPEG_PROGRAM && \
  333. (stype&0x70A))
  334. #define SlibTypeIsMPEGMux(stype) (stype>=SLIB_TYPE_MPEG_SYSTEMS && \
  335. stype<=SLIB_TYPE_MPEG_PROGRAM)
  336. #define SlibTypeIsMPEG2(stype) (stype==SLIB_TYPE_MPEG2_VIDEO || \
  337. stype==SLIB_TYPE_MPEG_PROGRAM || \
  338. stype==SLIB_TYPE_MPEG_TRANSPORT || \
  339. stype==SLIB_TYPE_MPEG2_AUDIO)
  340. #define SlibTypeIsMPEG1(stype) (stype==SLIB_TYPE_MPEG1_VIDEO || \
  341. stype==SLIB_TYPE_MPEG1_AUDIO || \
  342. stype==SLIB_TYPE_MPEG_SYSTEMS)
  343. #define SlibTypeIsH26X(stype) ((stype&0xFF00)==0x0800)
  344. #define SlibTypeIsAVI(stype) (stype>=SLIB_TYPE_AVI && \
  345. stype<=SLIB_TYPE_YUV_AVI)
  346. #define SlibTypeIsAudioOnly(stype) (stype==SLIB_TYPE_MPEG1_AUDIO || \
  347. stype==SLIB_TYPE_AC3_AUDIO || \
  348. stype==SLIB_TYPE_G723 || \
  349. stype==SLIB_TYPE_PCM || \
  350. stype==SLIB_TYPE_PCM_WAVE)
  351. #define SlibTypeIsVideoOnly(stype) (stype==SLIB_TYPE_MPEG1_VIDEO || \
  352. stype==SLIB_TYPE_MPEG2_VIDEO || \
  353. SlibTypeIsH26X(stype) || \
  354. stype==SLIB_TYPE_YUV || \
  355. stype==SLIB_TYPE_RGB || \
  356. stype==SLIB_TYPE_BMP || \
  357. stype==SLIB_TYPE_RASTER)
  358. #define SlibTypeIsMux(stype) (SlibTypeIsMPEGMux(stype) || \
  359. SlibTypeIsAVI(stype))
  360. #define SlibTypeHasTimeStamps(stype) (SlibTypeIsMPEGMux(stype))
  361. typedef enum {
  362. SLIB_DATA_COMPRESSED=0,
  363. SLIB_DATA_AUDIO,
  364. SLIB_DATA_VIDEO,
  365. SLIB_DATA_PRIVATE
  366. } SlibDataType_t;
  367. typedef enum {
  368. SLIB_MSG_CONTINUE=0,
  369. SLIB_MSG_OPEN=0x01,
  370. SLIB_MSG_ENDOFDATA=0x10,
  371. SLIB_MSG_ENDOFSTREAM,
  372. SLIB_MSG_BUFDONE,
  373. SLIB_MSG_REPOSITION=0x20,
  374. SLIB_MSG_BADPOSITION,
  375. SLIB_MSG_CLOSE=0x80
  376. } SlibMessage_t;
  377. typedef qword SlibCBParam1_t;
  378. typedef qword SlibCBParam2_t;
  379. typedef enum {
  380. SLIB_QUERY_QUERIES,
  381. SLIB_QUERY_TYPES,
  382. SLIB_QUERY_COMP_TYPES,
  383. SLIB_QUERY_DECOMP_TYPES,
  384. SLIB_QUERY_MODES,
  385. SLIB_QUERY_PARAMETERS,
  386. SLIB_QUERY_ERRORS
  387. } SlibQueryType_t;
  388. typedef enum {
  389. /* these use position */
  390. SLIB_SEEK_EXACT=0x00, /* jump to the exact frame */
  391. SLIB_SEEK_KEY, /* jump to the closest key (I) frame */
  392. SLIB_SEEK_AHEAD, /* jump ahead by a certain amount */
  393. SLIB_SEEK_NEXT_NEAR=0x08, /* advance to a frame near the requested frame */
  394. SLIB_SEEK_NEXT_EXACT, /* advance to the exact requested frame */
  395. /* these don't use position */
  396. SLIB_SEEK_NEXT_KEY=0x10, /* advance to the next key (I) frame */
  397. SLIB_SEEK_NEXT_SUBKEY, /* advance to the next key (I) or subkey (P) frame */
  398. SLIB_SEEK_NEXT, /* advance one frame */
  399. SLIB_SEEK_RESET=0x100, /* reset the streams */
  400. SLIB_SEEK_RESYNC /* sync up all the streams */
  401. } SlibSeekType_t;
  402. #define SlibSeekTypeUsesPosition(seektype) (seektype<SLIB_SEEK_NEXT_KEY)
  403. typedef struct SlibSeekInfo_s {
  404. SlibTime_t VideoTimeStamp;
  405. SlibTime_t AudioTimeStamp;
  406. qword FramesSkipped;
  407. } SlibSeekInfo_t;
  408. typedef enum {
  409. /* SLIB Parameters */
  410. SLIB_PARAM_VERSION=0x00, /* SLIB version number */
  411. SLIB_PARAM_VERSION_DATE, /* SLIB build date */
  412. SLIB_PARAM_NEEDACCURACY, /* need accurate frame counts and audio lengths */
  413. SLIB_PARAM_DEBUG, /* debug handle */
  414. SLIB_PARAM_TYPE, /* stream type */
  415. SLIB_PARAM_OVERFLOWSIZE, /* pin overflowing size */
  416. SLIB_PARAM_KEY, /* SLIB security key */
  417. /* Video Parameters */
  418. SLIB_PARAM_FPS=0x100,
  419. SLIB_PARAM_WIDTH,
  420. SLIB_PARAM_HEIGHT,
  421. SLIB_PARAM_IMAGESIZE,
  422. SLIB_PARAM_VIDEOBITRATE,
  423. SLIB_PARAM_VIDEOFORMAT,
  424. SLIB_PARAM_VIDEOBITS,
  425. SLIB_PARAM_VIDEOSTREAMS,
  426. SLIB_PARAM_VIDEOLENGTH, /* total video length in miliiseconds */
  427. SLIB_PARAM_VIDEOFRAMES, /* total video frames */
  428. SLIB_PARAM_VIDEOQUALITY, /* video quality */
  429. SLIB_PARAM_VIDEOASPECTRATIO, /* video aspect ratio: height/width */
  430. SLIB_PARAM_NATIVEVIDEOFORMAT, /* native/compressed format */
  431. SLIB_PARAM_NATIVEWIDTH, /* native/compressed width */
  432. SLIB_PARAM_NATIVEHEIGHT, /* native/compress height */
  433. SLIB_PARAM_VIDEOPROGRAM, /* Video Program ID (Transport) */
  434. SLIB_PARAM_STRIDE, /* bytes between scan lines */
  435. SLIB_PARAM_VIDEOFRAME, /* video frame */
  436. SLIB_PARAM_FRAMEDURATION, /* video frame duration in 100-nanosec units */
  437. SLIB_PARAM_VIDEOMAINSTREAM, /* Main Video Stream (Systems+Program) */
  438. SLIB_PARAM_FRAMETYPE, /* frame type - I, P, B or D */
  439. /* Audio Parameters */
  440. SLIB_PARAM_AUDIOFORMAT=0x200,
  441. SLIB_PARAM_AUDIOBITRATE,
  442. SLIB_PARAM_AUDIOSTREAMS,
  443. SLIB_PARAM_AUDIOCHANNELS,
  444. SLIB_PARAM_AUDIOLENGTH, /* milliseconds of audio */
  445. SLIB_PARAM_AUDIOQUALITY, /* audio quality */
  446. SLIB_PARAM_SAMPLESPERSEC,
  447. SLIB_PARAM_BITSPERSAMPLE,
  448. SLIB_PARAM_NATIVESAMPLESPERSEC,
  449. SLIB_PARAM_NATIVEBITSPERSAMPLE,
  450. SLIB_PARAM_AUDIOPROGRAM, /* Audio Program ID (Transport) */
  451. SLIB_PARAM_AUDIOMAINSTREAM, /* Main Audio Stream (Systems+Program) */
  452. /* Common Codec Parameters */
  453. SLIB_PARAM_FASTENCODE=0x400,/* fast encoding desired */
  454. SLIB_PARAM_FASTDECODE, /* fast decoding desired */
  455. SLIB_PARAM_KEYSPACING, /* I frames */
  456. SLIB_PARAM_SUBKEYSPACING, /* P frames */
  457. SLIB_PARAM_MOTIONALG=0x420, /* Motion estimation algorithm */
  458. SLIB_PARAM_MOTIONSEARCH, /* Motion search limit */
  459. SLIB_PARAM_MOTIONTHRESH, /* Motion threshold */
  460. SLIB_PARAM_ALGFLAGS, /* Algorithm flags */
  461. SLIB_PARAM_FORMATEXT, /* Format Extensions */
  462. SLIB_PARAM_QUANTI=0x480, /* Intra-frame Quantization Step */
  463. SLIB_PARAM_QUANTP, /* Inter-frame Quantization Step */
  464. SLIB_PARAM_QUANTB, /* Bi-directional frame Quantization Step */
  465. SLIB_PARAM_QUANTD, /* D (preview) frame Quantization Step */
  466. /* File/Stream Parameters */
  467. SLIB_PARAM_BITRATE=0x800, /* overall bitrate */
  468. SLIB_PARAM_TIMECODE, /* actual timecode */
  469. SLIB_PARAM_CALCTIMECODE, /* calculated timecode - 0 based */
  470. SLIB_PARAM_FILESIZE,
  471. SLIB_PARAM_FILEBUFSIZE, /* file read/write buffer size */
  472. SLIB_PARAM_PTIMECODE, /* presentation timestamp */
  473. SLIB_PARAM_DTIMECODE, /* decoding timestamp */
  474. SLIB_PARAM_PERCENT100, /* position in 100th of percent units */
  475. /* Buffering/delay Parameters */
  476. SLIB_PARAM_VBVBUFFERSIZE=0x1000, /* Video Buffer Verifier buf size in bytes */
  477. SLIB_PARAM_VBVDELAY, /* Video Buffer Verifier delay */
  478. SLIB_PARAM_PACKETSIZE, /* Packet size (RTP) */
  479. SLIB_PARAM_MININPUTSIZE, /* Minimum input sample size */
  480. SLIB_PARAM_INPUTSIZE, /* Suggested input sample size */
  481. SLIB_PARAM_COMPBUFSIZE, /* Slib Internal compressed buffer size */
  482. /* Stats Parameters */
  483. SLIB_PARAM_STATS=0x1800, /* Turn stats recording on/off */
  484. SLIB_PARAM_STATS_RESET, /* Reset stats */
  485. SLIB_PARAM_STATS_TIME, /* Ellapsed time */
  486. SLIB_PARAM_STATS_FRAMES, /* Frames encoded/decoded/skipped */
  487. SLIB_PARAM_STATS_FRAMESPROCESSED, /* Frames encoded/decoded */
  488. SLIB_PARAM_STATS_FRAMESSKIPPED, /* Frames skipped */
  489. SLIB_PARAM_STATS_FPS, /* Frames per second */
  490. /* Miscellaneous Parameters */
  491. SLIB_PARAM_CB_IMAGE=0x1C00, /* Turn image callbacks on/off */
  492. SLIB_PARAM_CB_TIMESTAMP, /* Turn timestamp callbacks on/off */
  493. } SlibParameter_t;
  494. typedef enum {
  495. SLIB_CODEC_STATE_NONE, /* codec is unopened */
  496. SLIB_CODEC_STATE_OPEN, /* codec is opened */
  497. SLIB_CODEC_STATE_INITED, /* codec is opened and inited */
  498. SLIB_CODEC_STATE_BEGUN, /* codec is opened, inited and begun */
  499. SLIB_CODEC_STATE_REPOSITIONING, /* codec is opened, inited and begun,
  500. but stream is being repositioned */
  501. } SlibCodecState_t;
  502. /*
  503. ** Stream selections
  504. */
  505. #define SLIB_STREAM_ALL -1
  506. #define SLIB_STREAM_MAINVIDEO 0
  507. #define SLIB_STREAM_MAINAUDIO 1
  508. typedef struct SlibQueryInfo_s {
  509. SlibType_t Type;
  510. dword HeaderStart;
  511. dword HeaderSize;
  512. dword Bitrate; /* overall bitrate */
  513. /* Video info */
  514. int VideoStreams;
  515. short Width;
  516. short Height;
  517. dword VideoBitrate;
  518. float FramesPerSec;
  519. qword VideoLength;
  520. /* Audio info */
  521. int AudioStreams;
  522. unsigned int SamplesPerSec;
  523. int BitsPerSample;
  524. int Channels;
  525. dword AudioBitrate;
  526. qword AudioLength;
  527. } SlibQueryInfo_t;
  528. #ifdef SLIB_INTERNAL
  529. typedef struct SlibBuffer_s {
  530. qword offset;
  531. unsigned dword size;
  532. unsigned char *address;
  533. SlibTime_t time;
  534. struct SlibBuffer_s *next;
  535. } SlibBuffer_t;
  536. typedef struct SlibPin_s {
  537. int ID;
  538. char name[15];
  539. qword Offset;
  540. SlibBuffer_t *Buffers;
  541. SlibBuffer_t *BuffersTail;
  542. dword BufferCount;
  543. qword DataSize; /* total amount of data on pin */
  544. struct SlibPin_s *next;
  545. } SlibPin_t;
  546. typedef struct SlibStats_s {
  547. SlibBoolean_t Record; /* stats recording on/off */
  548. SlibTime_t StartTime;
  549. SlibTime_t StopTime;
  550. qword FramesProcessed;
  551. qword FramesSkipped;
  552. } SlibStats_t;
  553. typedef struct SlibInfo_s {
  554. SlibType_t Type;
  555. SlibMode_t Mode;
  556. /* Handles */
  557. SvHandle_t Svh; /* video */
  558. SaHandle_t Sah; /* audio */
  559. SconHandle_t Sch; /* conversion */
  560. SlibBoolean_t NeedAccuracy;
  561. dword TotalBitRate;/* overall bitrate: video+audio+mux */
  562. dword MuxBitRate; /* bitrate required by multiplexing codes */
  563. SlibTime_t SystemTimeStamp; /* timestamp for next data on pins */
  564. int VideoPID; /* MPEG II Video Program ID */
  565. int VideoMainStream; /* Main Stream used for video */
  566. SlibType_t VideoType; /* Video Stream type */
  567. /* Audio parameters */
  568. int AudioStreams;
  569. unsigned int SamplesPerSec;
  570. int BitsPerSample;
  571. int Channels;
  572. dword AudioBitRate;
  573. int AudioPID; /* MPEG II Audio Program ID */
  574. int AudioMainStream; /* Main Stream used for audio */
  575. SlibType_t AudioType; /* Audio Stream type */
  576. /* Video parameters */
  577. int VideoStreams;
  578. word Width;
  579. word Height;
  580. dword Stride;
  581. dword VideoBitRate;
  582. float FramesPerSec;
  583. /* Data Exchange */
  584. SlibPin_t *Pins;
  585. int PinCount;
  586. dword Offset;
  587. SlibBoolean_t IOError; /* file read/write error - EOF */
  588. unsigned dword MaxBytesInput; /* used with slibSetMaxInput */
  589. unsigned qword InputMarker; /* used with slibSetMaxInput */
  590. /* stream dependent stuff */
  591. SlibTime_t VideoLength;
  592. SlibBoolean_t VideoLengthKnown;
  593. SlibTime_t VideoTimeStamp; /* current video time */
  594. SlibTime_t VideoFrameDuration; /* time between frames in 100th ms */
  595. qword VideoFramesProcessed;/* frames processed since key points */
  596. SlibTime_t AudioLength;
  597. SlibBoolean_t AudioLengthKnown;
  598. SlibTime_t AudioTimeStamp; /* current audio time */
  599. SlibTime_t LastAudioTimeStamp; /* used when compressing */
  600. int KeySpacing;
  601. int SubKeySpacing;
  602. SlibTime_t AudioPTimeBase; /* statring presentation timecode */
  603. SlibTime_t AudioPTimeCode; /* presentation timecode */
  604. SlibTime_t AudioDTimeCode; /* decoding timecode */
  605. SlibTime_t LastAudioPTimeCode; /* last encoded decoding timecode */
  606. SlibTime_t VideoPTimeBase; /* starting presentation timecode */
  607. SlibTime_t VideoPTimeCode; /* presentation timecode */
  608. SlibTime_t VideoDTimeCode; /* decoding timecode */
  609. SlibTime_t LastVideoPTimeCode; /* last encoded decoding timecode */
  610. SlibTime_t LastVideoDTimeCode; /* last encoded decoding timecode */
  611. SlibTime_t AvgVideoTimeDiff; /* video times differences */
  612. SlibTime_t VarVideoTimeDiff; /* video times differences variation */
  613. unsigned qword BytesProcessed; /* bytes input or output */
  614. /* Encoding info */
  615. SlibBoolean_t HeaderProcessed;
  616. int PacketCount;
  617. unsigned qword BytesSincePack;
  618. /* Miscellaneous */
  619. SlibMessage_t (*SlibCB)(SlibHandle_t, /* Callback to supply Bufs */
  620. SlibMessage_t, SlibCBParam1_t, SlibCBParam2_t, void *);
  621. void *SlibCBUserData;
  622. int Fd; /* file descriptor */
  623. unsigned qword FileSize; /* total file length in bytes */
  624. unsigned dword FileBufSize; /* file read/write buffer size */
  625. unsigned dword CompBufSize; /* compressed buffer size */
  626. unsigned dword PacketSize; /* RTP */
  627. BITMAPINFOHEADER *VideoFormat;
  628. WAVEFORMATEX *AudioFormat;
  629. BITMAPINFOHEADER *CodecVideoFormat;
  630. BITMAPINFOHEADER *CompVideoFormat;
  631. WAVEFORMATEX *CompAudioFormat;
  632. SlibBoolean_t VideoCodecState;
  633. SlibBoolean_t AudioCodecState;
  634. unsigned char *Multibuf; /* multiple image buffer - MPEG, H261 */
  635. dword MultibufSize;
  636. unsigned char *Imagebuf; /* temp image buffer - for conversions */
  637. dword ImageSize;
  638. unsigned char *CodecImagebuf; /* temp image buffer - for scaling */
  639. dword CodecImageSize;
  640. unsigned char *IntImagebuf; /* intermediate image buffer - for scaling */
  641. dword IntImageSize;
  642. unsigned char *Audiobuf; /* temp audio buffer - for conversions */
  643. unsigned dword AudiobufSize; /* temp audio buffer - for conversions */
  644. unsigned dword AudiobufUsed; /* byte used in audio buffer */
  645. unsigned dword OverflowSize; /* max number of bytes on a stream */
  646. unsigned dword VBVbufSize; /* video buffer verifier size */
  647. SlibStats_t *stats;
  648. void *dbg; /* debug handle */
  649. } SlibInfo_t;
  650. #define slibTimeToFrame(Info,stime) ((qword)((stime)*Info->FramesPerSec)/1000)
  651. #define slibFrameToTime(Info,frame) \
  652. ((SlibTime_t)((float)(frame*1000)/Info->FramesPerSec))
  653. #define slibFrameToTime100(Info,frame) \
  654. ((SlibTime_t)((float)(frame*100000)/Info->FramesPerSec))
  655. #define slibHasAudio(Info) (Info->AudioStreams>0 || Info->Sah)
  656. #define slibHasVideo(Info) (Info->VideoStreams>0 || Info->Svh)
  657. #define slibHasTimeCode(Info) (slibHasVideo(Info) && SlibTypeIsMPEG(Info->Type))
  658. #define slibInSyncMode(Info) (Info->Fd<0 && Info->SlibCB==NULL)
  659. #endif /* SLIB_INTERNAL */
  660. /********************** Public Prototypes ***********************/
  661. /*
  662. * slib_api.c
  663. */
  664. EXTERN SlibStatus_t SlibOpen(SlibHandle_t *handle, SlibMode_t smode,
  665. SlibType_t *stype, SlibMessage_t (*slibCB)(SlibHandle_t,
  666. SlibMessage_t, SlibCBParam1_t, SlibCBParam2_t, void *),
  667. void *cbuserdata);
  668. EXTERN SlibStatus_t SlibOpenSync(SlibHandle_t *handle, SlibMode_t smode,
  669. SlibType_t *stype, void *buffer, unsigned dword bufsize);
  670. EXTERN SlibStatus_t SlibOpenFile(SlibHandle_t *handle, SlibMode_t smode,
  671. SlibType_t *stype, char *filename);
  672. EXTERN SlibStatus_t SlibAddBuffer(SlibHandle_t handle, SlibDataType_t dtype,
  673. void *buffer, unsigned dword bufsize);
  674. EXTERN SlibStatus_t SlibAddBufferEx(SlibHandle_t handle, SlibDataType_t dtype,
  675. void *buffer, unsigned dword bufsize,
  676. void *userdata);
  677. EXTERN SlibStatus_t SlibRegisterVideoBuffer(SlibHandle_t handle,
  678. void *buffer, unsigned dword bufsize);
  679. EXTERN SlibStatus_t SlibReadAudio(SlibHandle_t handle, SlibStream_t stream,
  680. void *audiobuf, unsigned dword *audiobufsize);
  681. EXTERN SlibStatus_t SlibReadVideo(SlibHandle_t handle, SlibStream_t stream,
  682. void **videobuf, unsigned dword *videobufsize);
  683. EXTERN SlibStatus_t SlibWriteVideo(SlibHandle_t handle, SlibStream_t stream,
  684. void *videobuf, unsigned dword videobufsize);
  685. EXTERN SlibStatus_t SlibWriteAudio(SlibHandle_t handle, SlibStream_t stream,
  686. void *audiobuf, unsigned dword audiobufsize);
  687. EXTERN SlibStatus_t SlibReadData(SlibHandle_t handle, SlibStream_t stream,
  688. void **databuf, unsigned dword *databufsize,
  689. SlibStream_t *readstream);
  690. EXTERN SlibStatus_t SlibQueryData(void *databuf, unsigned dword databufsize,
  691. SlibQueryInfo_t *qinfo);
  692. EXTERN SlibStatus_t SlibSeek(SlibHandle_t handle, SlibStream_t stream,
  693. SlibSeekType_t seektype, SlibPosition_t frame);
  694. EXTERN SlibStatus_t SlibSeekEx(SlibHandle_t handle, SlibStream_t stream,
  695. SlibSeekType_t seektype, SlibPosition_t position,
  696. SlibUnit_t units, SlibSeekInfo_t *seekinfo);
  697. EXTERN SlibBoolean_t SlibIsEnd(SlibHandle_t handle, SlibStream_t stream);
  698. EXTERN SlibStatus_t SlibClose(SlibHandle_t handle);
  699. EXTERN char *SlibGetErrorText(SlibStatus_t status);
  700. EXTERN SlibList_t *SlibQueryList(SlibQueryType_t qtype);
  701. EXTERN char *SlibQueryForDesc(SlibQueryType_t qtype, int enumval);
  702. EXTERN int SlibQueryForEnum(SlibQueryType_t qtype, char *name);
  703. EXTERN SlibList_t *SlibFindEnumEntry(SlibList_t *list, int enumval);
  704. /*
  705. * slib_param.c
  706. */
  707. EXTERN qword SlibGetFrameNumber(SlibHandle_t handle, SlibStream_t stream);
  708. EXTERN SlibTime_t SlibGetAudioTime(SlibHandle_t handle, SlibStream_t stream);
  709. EXTERN SlibTime_t SlibGetVideoTime(SlibHandle_t handle, SlibStream_t stream);
  710. EXTERN SlibBoolean_t SlibCanSetParam(SlibHandle_t handle, SlibStream_t stream,
  711. SlibParameter_t param);
  712. EXTERN SlibBoolean_t SlibCanGetParam(SlibHandle_t handle, SlibStream_t stream,
  713. SlibParameter_t param);
  714. EXTERN SlibStatus_t SlibSetParamInt(SlibHandle_t handle, SlibStream_t stream,
  715. SlibParameter_t param, long value);
  716. EXTERN SlibStatus_t SlibSetParamLong(SlibHandle_t handle, SlibStream_t stream,
  717. SlibParameter_t param, qword value);
  718. EXTERN SlibStatus_t SlibSetParamFloat(SlibHandle_t handle, SlibStream_t stream,
  719. SlibParameter_t param, float value);
  720. EXTERN SlibStatus_t SlibSetParamBoolean(SlibHandle_t handle,
  721. SlibStream_t stream,
  722. SlibParameter_t param, SlibBoolean_t value);
  723. EXTERN SlibStatus_t SlibSetParamStruct(SlibHandle_t handle, SlibStream_t stream,
  724. SlibParameter_t param,
  725. void *data, unsigned dword datasize);
  726. EXTERN long SlibGetParamInt(SlibHandle_t handle, SlibStream_t stream,
  727. SlibParameter_t param);
  728. EXTERN qword SlibGetParamLong(SlibHandle_t handle, SlibStream_t stream,
  729. SlibParameter_t param);
  730. EXTERN float SlibGetParamFloat(SlibHandle_t handle, SlibStream_t stream,
  731. SlibParameter_t param);
  732. EXTERN SlibBoolean_t SlibGetParamBoolean(SlibHandle_t handle,
  733. SlibStream_t stream, SlibParameter_t param);
  734. EXTERN char *SlibGetParamString(SlibHandle_t handle, SlibStream_t stream,
  735. SlibParameter_t param);
  736. EXTERN SlibStatus_t SlibValidateParams(SlibHandle_t handle);
  737. /*
  738. * slib_buffer.c
  739. */
  740. EXTERN void *SlibAllocBuffer(unsigned int bytes);
  741. EXTERN void *SlibAllocBufferEx(SlibHandle_t handle, unsigned int bytes);
  742. EXTERN void *SlibAllocSharedBuffer(unsigned int bytes, int *shmid);
  743. EXTERN dword SlibGetSharedBufferID(void *address);
  744. EXTERN SlibStatus_t SlibAllocSubBuffer(void *address,
  745. unsigned int bytes);
  746. EXTERN SlibStatus_t SlibFreeBuffer(void *address);
  747. EXTERN SlibStatus_t SlibFreeBuffers(SlibHandle_t handle);
  748. EXTERN unsigned qword SlibMemUsed();
  749. #ifdef SLIB_INTERNAL
  750. /********************** Private Prototypes ***********************/
  751. /*
  752. * slib_api.c
  753. */
  754. SlibStatus_t slibStartVideo(SlibInfo_t *Info, SlibBoolean_t fillbuf);
  755. SlibBoolean_t slibUpdatePositions(SlibInfo_t *Info, SlibBoolean_t exactonly);
  756. void slibAdvancePositions(SlibInfo_t *Info, qword frames);
  757. SlibBoolean_t slibUpdateLengths(SlibInfo_t *Info);
  758. /*
  759. * slib_render.c
  760. */
  761. SlibStatus_t slibConvertAudio(SlibInfo_t *Info,
  762. void *inbuf, unsigned dword inbufsize,
  763. unsigned int insps, unsigned int inbps,
  764. void **poutbuf, unsigned dword *poutbufsize,
  765. unsigned int outsps, unsigned int outbps,
  766. unsigned int channels);
  767. SlibStatus_t slibRenderFrame(SlibInfo_t *Info, void *inbuf,
  768. unsigned dword informat, void **outbuf);
  769. /*
  770. * slib_video.c
  771. */
  772. void SlibUpdateVideoInfo(SlibInfo_t *Info);
  773. SlibStatus_t slibValidateVideoParams(SlibInfo_t *Info);
  774. int slibCalcBits(unsigned dword fourcc, int currentbits);
  775. /*
  776. * slib_audio.c
  777. */
  778. void SlibUpdateAudioInfo(SlibInfo_t *Info);
  779. SlibTime_t slibSkipAudio(SlibInfo_t *Info, SlibStream_t stream,
  780. SlibTime_t timems);
  781. SlibStatus_t slibValidateAudioParams(SlibInfo_t *Info);
  782. /*
  783. * slib_buffer.c
  784. */
  785. SlibBoolean_t SlibValidBuffer(void *address);
  786. SlibStatus_t slibManageUserBuffer(SlibInfo_t *Info, void *address,
  787. unsigned int bytes, void *userdata);
  788. unsigned char *SlibGetBuffer(SlibInfo_t *Info, int pinid,
  789. unsigned dword *size, SlibTime_t *time);
  790. unsigned char *SlibPeekBuffer(SlibInfo_t *Info, int pinid,
  791. unsigned dword *size, SlibTime_t *time);
  792. unsigned char *slibSearchBuffersOnPin(SlibInfo_t *Info, SlibPin_t *pin,
  793. unsigned char *lastbuf, unsigned dword *size,
  794. unsigned int code, int codebytes,
  795. ScBoolean_t discard);
  796. SlibTime_t slibGetNextTimeOnPin(SlibInfo_t *Info, SlibPin_t *pin,
  797. unsigned dword maxbytes);
  798. void slibSetMaxInput(SlibInfo_t *Info, unsigned dword maxbytes);
  799. SlibPosition_t slibGetPinPosition(SlibInfo_t *Info, int pinid);
  800. SlibPosition_t slibSetPinPosition(SlibInfo_t *Info, int pinid,
  801. SlibPosition_t pos);
  802. void slibRemovePins(SlibInfo_t *Info);
  803. void slibEmptyPins(SlibInfo_t *Info);
  804. SlibPin_t *slibRenamePin(SlibInfo_t *Info, int oldpinid,
  805. int newpinid, char *newname);
  806. SlibPin_t *slibGetPin(SlibInfo_t *Info, int pinid);
  807. SlibPin_t *slibAddPin(SlibInfo_t *Info, int pinid, char *name);
  808. SlibStatus_t slibAddBufferToPin(SlibPin_t *pin, void *buffer,
  809. unsigned dword size, SlibTime_t time);
  810. SlibStatus_t slibInsertBufferOnPin(SlibPin_t *pin, void *buffer,
  811. unsigned dword size, SlibTime_t time);
  812. SlibStatus_t slibRemovePin(SlibInfo_t *Info, int pinid);
  813. SlibStatus_t slibEmptyPin(SlibInfo_t *Info, int pinid);
  814. SlibPin_t *slibLoadPin(SlibInfo_t *Info, int pinid);
  815. SlibPin_t *slibPreLoadPin(SlibInfo_t *Info, SlibPin_t *pin);
  816. SlibStatus_t slibPutBuffer(SlibInfo_t *Info, unsigned char *buffer,
  817. unsigned dword bufsize);
  818. qword slibDataOnPin(SlibInfo_t *Info, int pinid);
  819. qword slibDataOnPins(SlibInfo_t *Info);
  820. unsigned char *slibGetBufferFromPin(SlibInfo_t *Info, SlibPin_t *pin,
  821. unsigned dword *size, SlibTime_t *time);
  822. unsigned char *slibPeekBufferOnPin(SlibInfo_t *Info, SlibPin_t *pin,
  823. unsigned dword *size, SlibTime_t *time);
  824. unsigned char *slibPeekNextBufferOnPin(SlibInfo_t *Info, SlibPin_t *pin,
  825. unsigned char *lastbuffer,
  826. unsigned dword *size, SlibTime_t *time);
  827. unsigned int slibFillBufferFromPin(SlibInfo_t *Info, SlibPin_t *pin,
  828. unsigned char *fillbuf, unsigned dword bufsize,
  829. SlibTime_t *time);
  830. word slibGetWordFromPin(SlibInfo_t *Info, SlibPin_t *pin);
  831. dword slibGetDWordFromPin(SlibInfo_t *Info, SlibPin_t *pin);
  832. dword slibCountCodesOnPin(SlibInfo_t *Info, SlibPin_t *pin,
  833. unsigned int code, int codebytes,
  834. unsigned dword maxlen);
  835. SlibStatus_t slibReposition(SlibInfo_t *Info, SlibPosition_t position);
  836. void slibPinPrepareReposition(SlibInfo_t *Info, int pinid);
  837. void slibPinFinishReposition(SlibInfo_t *Info, int pinid);
  838. SlibBoolean_t slibCommitBuffers(SlibInfo_t *Info, SlibBoolean_t flush);
  839. void slibValidateBitrates(SlibInfo_t *Info);
  840. qword slibGetSystemTime();
  841. #endif /* SLIB_INTERNAL */
  842. #endif /* _SLIB_H_ */