openTRI 0.1
pmp_read.h
1/*
2PMP Mod
3Copyright (C) 2006 jonny
4
5Homepage: http://jonny.leffe.dnsalias.com
6E-mail: jonny@leffe.dnsalias.com
7
8This program is free software; you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation; either version 2 of the License, or
11(at your option) any later version.
12
13This program is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
19along with this program; if not, write to the Free Software
20Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21*/
22
23/*
24basic 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
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
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
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
88void pmp_read_safe_constructor(struct pmp_read_struct *p);
89void pmp_read_close(struct pmp_read_struct *p);
90char *pmp_read_open(struct pmp_read_struct *p, unsigned int padding, char *s);
91char *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
Definition pmp_read.h:43
Definition pmp_file.h:74
Definition pmp_read.h:74
Definition pmp_read.h:55