openTRI 0.1
pmp_decode.h
1/*
2PMP Mod
3Copyright (C) 2006 jonny
4Copyright (C) 2007 Raphael <raphael@fx-world.org>
5
6Homepage: http://jonny.leffe.dnsalias.com
7 http://wordpress.fx-world.org
8E-mail: jonny@leffe.dnsalias.com
9
10This program is free software; you can redistribute it and/or modify
11it under the terms of the GNU General Public License as published by
12the Free Software Foundation; either version 2 of the License, or
13(at your option) any later version.
14
15This program is distributed in the hope that it will be useful,
16but WITHOUT ANY WARRANTY; without even the implied warranty of
17MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18GNU General Public License for more details.
19
20You should have received a copy of the GNU General Public License
21along with this program; if not, write to the Free Software
22Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23*/
24
25/*
26av decoding in a ring buffer
27*/
28
29
30#ifndef pmp_decode_h
31#define pmp_decode_h
32
33
34#include <pspkernel.h>
35#include <pspdisplay.h>
36#include "pmp_read.h"
37#include "audiodecoder.h"
38#include "mem64.h"
39#include "avc.h"
40
41#define FF_INPUT_BUFFER_PADDING_SIZE 8
42
43#define maximum_frame_buffers 16
44#define number_of_free_video_frame_buffers 4
45
46
48 {
49 void *video_frame;
50 void *audio_frame;
51
52 unsigned int number_of_audio_frames;
53
54 int first_delay;
55 int last_delay;
56 };
57
58
60 {
61 struct pmp_read_struct reader;
62
63 struct avc_struct avc;
64
65 int audio_decoder;
66
67
68 void *video_frame_buffers[maximum_frame_buffers];
69 void *audio_frame_buffers[maximum_frame_buffers];
70
71
72 unsigned int video_decode_format;
73 unsigned int video_frame_size;
74 unsigned int video_frame_width;
75 unsigned int video_frame_height;
76 unsigned int video_buffer_width;
77 void* current_video_frame;
78
79
80 unsigned int audio_frame_size;
81 unsigned int number_of_frame_buffers;
82
83
84 struct pmp_decode_buffer_struct output_frame_buffers[maximum_frame_buffers];
85
86 unsigned int last_buffer_number;
87 unsigned int current_buffer_number;
88 };
89
90
91void pmp_decode_safe_constructor(struct pmp_decode_struct *p);
92char *pmp_decode_open(struct pmp_decode_struct *p, char *s, int format);
93void pmp_decode_close(struct pmp_decode_struct *p);
94char *pmp_decode_get(struct pmp_decode_struct *p, unsigned int frame_number, unsigned int audio_stream, int decode_audio, unsigned int volume_boost);
95
96
97#endif
Definition avc.h:46
Definition pmp_decode.h:48
Definition pmp_decode.h:60
Definition pmp_read.h:55