pspsdk-1.0+beta2
pspasfparser.h
Go to the documentation of this file.
1 /*
2  * PSP Software Development Kit - http://www.pspdev.org
3  * -----------------------------------------------------------------------
4  * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
5  *
6  * pspasfparser.h - Prototypes for the sceAsfParser library.
7  * usage: see
8  * http://code.google.com/p/xreader/source/browse/branches/trunk-alpha-me/src/wmaplayer.c
9  * for detail
10  *
11  * Copyright (c) 2009 hrimfaxi <outmatch@gmail.com>
12  * Copyright (c) 2009 cooleyes <eyes.cooleyes@gmail.com>
13  *
14  */
15 #ifndef __SCELIBASFPARSER_H__
16 #define __SCELIBASFPARSER_H__
17 
18 #include <psptypes.h>
19 
20 #ifdef __cplusplus
21 extern "C"
22 {
23 #endif
24 
26 typedef struct SceAsfFrame
27 {
28  ScePVoid pData; // frame data buffer, alloc by yourself
29  SceUInt32 iFrameMs; // current frame ms
31  SceUInt32 iUnk2; // 0~7
32  SceUInt32 iUnk3; // maybe frame data size
33  SceUInt32 iUnk4; // first frame is 1, other is 0
34  SceUInt32 iUnk5; // 128 256 512 1024 2048
35  SceUInt32 iUnk6; // 128 256 512 1024 2048
36  SceUChar8 u8Unknown[32]; // unknown
37 } SceAsfFrame;
38 
40 typedef struct _SceAsfParser
41 {
52 // SceUInt32 iUnk10_3626[3616]; // 10 - 3626
53  SceUInt32 iUnk10_20[10]; // 10 - 20
54  SceUInt64 iDuration; // 20 - 22
55  SceUInt32 iUnk22_3626[3604]; // 22 - 3626
56  SceAsfFrame sFrame; //3626 - 3345
57  SceUInt32 iUnk3345_3643[298]; //3345 - 3643
60 } SceAsfParser;
61 
63 typedef SceInt64(*SceAsfParserReadCB) (void *user_data, void *buf,
64  SceSize size);
65 
67 typedef SceInt64(*SceAsfParserSeekCB) (void *user_data, void *buf,
68  SceOff offset, int whence);
69 
77 int sceAsfCheckNeedMem(SceAsfParser * parser);
78 
89 int sceAsfInitParser(SceAsfParser * parser, ScePVoid user_data,
90  SceAsfParserReadCB read_cb,
91  SceAsfParserSeekCB seek_cb);
92 
102 int sceAsfGetFrameData(SceAsfParser * parser, int unknown,
103  SceAsfFrame * frame);
104 
114 int sceAsfSeekTime(SceAsfParser * parser, int unknown, SceUInt32 * ms);
115 
131 int sceAsfParser_685E0DA7(SceAsfParser * asf, void *ptr, int flag,
132  void *arg4, SceUInt64 * start, SceUInt64 * size);
133 
143 int sceAsfParser_C6D98C54(SceAsfParser * asf, void *unk, SceUInt64 * start,
144  SceUInt64 * size);
145 
146 #ifdef __cplusplus
147 }
148 #endif
149 
150 #endif