blob: 3e84c3dc52f8824ce483b45245ecc5dd2a53b797 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
|
/* $Id: HBCommon.h,v 1.9 2003/08/24 19:28:18 titer Exp $ */
#ifndef _HB_COMMON_H
#define _HB_COMMON_H
/* standard headers */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
typedef uint8_t byte_t;
/* BeOS headers */
#include <Looper.h>
#include <MenuItem.h>
/* Internal headers */
class HBFifo;
class HBPictureWin;
/* Misc structures */
typedef struct dvdplay_s * dvdplay_ptr;
typedef struct iso639_lang_t
{
char * engName; /* Description in English */
char * nativeName; /* Description in native language */
char * iso639_1; /* ISO-639-1 (2 characters) code */
} iso639_lang_t;
/* BMessages */
#define MANAGER_CREATED 'macr'
#define PRINT_MESSAGE 'prme'
#define DETECT_VOLUMES 'devo'
#define START_CONVERT 'stac'
#define STOP_CONVERT 'stoc'
#define SUSPEND_CONVERT 'suco'
#define RESUME_CONVERT 'reco'
#define VOLUMES_DETECTED 'vode'
#define REFRESH_VOLUMES 'revo'
#define VIDEO_SLIDER 'visl'
#define AUDIO_SLIDER 'ausl'
#define PICTURE_WIN 'piwi'
#define NOT_IMPLEMENTED 'noim'
#define VOLUME_SELECTED 'vose'
#define TITLE_SELECTED 'tise'
#define LANGUAGE_SELECTED 'lase'
#define CHANGE_STATUS 'chst'
/* Handy macros */
#define EVEN( a ) ( ( (a) & 0x1 ) ? ( (a) + 1 ) : (a) )
#define MULTIPLE_16( a ) ( ( ( (a) % 16 ) < 8 ) ? ( (a) - ( (a) % 16 ) ) \
: ( (a) - ( (a) % 16 ) + 16 ) )
/* Global prototypes */
void Log( char * log, ... );
void Status( char * text, float pos, int mode );
char * LanguageForCode( int code );
/* Possible modes in Status() */
#define ENABLE_DETECTING 0x1
#define ENABLE_READY 0x2
#define ENABLE_ENCODING 0x4
/* Classes */
class HBAudioInfo : public BMenuItem
{
public:
/* Common methods and members */
HBAudioInfo( int id, char * description );
HBAudioInfo( HBAudioInfo * audioInfo );
~HBAudioInfo();
uint32_t fId;
HBFifo * fAc3Fifo;
HBFifo * fRawFifo;
HBFifo * fMp3Fifo;
int fInSampleRate;
int fOutSampleRate;
int fInBitrate;
int fOutBitrate;
};
class HBTitleInfo : public BMenuItem
{
public:
HBTitleInfo( dvdplay_ptr vmg, int index, char * device );
~HBTitleInfo();
bool InitCheck();
bool fInitOK;
char * fDevice;
int fIndex;
uint64_t fLength;
/* MPEG2-PS data */
HBFifo * fPSFifo;
/* Video info */
bool DecodeFrame( dvdplay_ptr vmg, int i );
HBFifo * fMpeg2Fifo;
HBFifo * fRawFifo;
HBFifo * fMpeg4Fifo;
/* Video input */
uint32_t fInWidth;
uint32_t fInHeight;
uint32_t fPixelWidth;
uint32_t fPixelHeight;
uint32_t fRate;
uint32_t fScale;
/* Video output */
bool fDeinterlace;
uint32_t fOutWidth;
uint32_t fOutHeight;
uint32_t fTopCrop;
uint32_t fBottomCrop;
uint32_t fLeftCrop;
uint32_t fRightCrop;
uint32_t fBitrate;
uint8_t * fPictures[10];
HBPictureWin * fPictureWin;
/* Audio infos */
BList * fAudioInfoList1;
BList * fAudioInfoList2;
};
class HBVolumeInfo : public BMenuItem
{
public:
HBVolumeInfo( char * name, char * device );
~HBVolumeInfo();
bool InitCheck();
bool fInitOK;
char * fName;
char * fDevice;
BList * fTitleList;
};
#endif
|