openTRI
0.1
pmp
pmp_read.h
1
/*
2
PMP Mod
3
Copyright (C) 2006 jonny
4
5
Homepage: http://jonny.leffe.dnsalias.com
6
E-mail: jonny@leffe.dnsalias.com
7
8
This program is free software; you can redistribute it and/or modify
9
it under the terms of the GNU General Public License as published by
10
the Free Software Foundation; either version 2 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 General Public License for more details.
17
18
You should have received a copy of the GNU General Public License
19
along with this program; if not, write to the Free Software
20
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21
*/
22
23
/*
24
basic layer for reading av frames
25
*/
26
27
28
#ifndef pmp_read_h
29
#define pmp_read_h
30
31
32
#include <string.h>
33
#include <pspiofilemgr.h>
34
#include "pmp_file.h"
35
#include "mem64.h"
36
37
38
#define minimum_buffer_size 262144/2
39
#define maximum_number_of_packets 1024
40
41
42
struct
asynchronous_buffer
43
{
44
unsigned
int
first_packet;
45
unsigned
int
last_packet;
46
unsigned
int
packets_size;
47
unsigned
int
first_packet_position;
48
unsigned
int
next_packet_position;
49
void
*buffer;
50
void
*packet_buffer[maximum_number_of_packets];
51
};
52
53
54
struct
pmp_read_struct
55
{
56
struct
pmp_file_struct
file;
57
58
SceUID f;
59
unsigned
int
buffer_size;
60
void
*buffer_0;
61
void
*buffer_1;
62
63
unsigned
int
*packet_header;
64
65
struct
asynchronous_buffer
asynchronous_buffer_0;
66
struct
asynchronous_buffer
asynchronous_buffer_1;
67
68
struct
asynchronous_buffer
*current_asynchronous_buffer;
69
struct
asynchronous_buffer
*next_asynchronous_buffer;
70
};
71
72
73
struct
pmp_read_output_struct
74
{
75
unsigned
int
number_of_audio_frames;
76
77
int
first_delay;
78
int
last_delay;
79
80
unsigned
int
video_length;
81
unsigned
int
*audio_length;
82
83
void
*video_buffer;
84
void
*audio_buffer;
85
};
86
87
88
void
pmp_read_safe_constructor(
struct
pmp_read_struct
*p);
89
void
pmp_read_close(
struct
pmp_read_struct
*p);
90
char
*pmp_read_open(
struct
pmp_read_struct
*p,
unsigned
int
padding,
char
*s);
91
char
*pmp_read_get(
struct
pmp_read_struct
*p,
unsigned
int
packet,
unsigned
int
audio_stream,
struct
pmp_read_output_struct
*output);
92
93
94
#endif
asynchronous_buffer
Definition
pmp_read.h:43
pmp_file_struct
Definition
pmp_file.h:74
pmp_read_output_struct
Definition
pmp_read.h:74
pmp_read_struct
Definition
pmp_read.h:55
Generated by
1.12.0