various gcc 4 related build fixes

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18876 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Marcus Overhagen
2006-09-17 17:34:22 +00:00
parent 3ec18e87d6
commit 891a127fec
21 changed files with 78 additions and 73 deletions
@@ -103,13 +103,13 @@ int avcodec(void* handle, avc_cmd_t cmd, void* pin, void* pout)
{
// pin char* codec name
private_handle_t* h = create_handle();
(private_handle_t**)pout = h;
*(private_handle_t***)&pout = h;
if (!h)
return -ENOMEM;
if (!h->avcodec)
{
destroy_handle(h);
(private_handle_t**)pout = NULL;
*(private_handle_t***)&pout = NULL;
return -1;// better error
}
return 0;
@@ -118,14 +118,14 @@ int avcodec(void* handle, avc_cmd_t cmd, void* pin, void* pout)
{
// pin uint32_t codec fourcc
private_handle_t* h = create_handle();
(private_handle_t**)pout = h;
*(private_handle_t***)&pout = h;
if (!h)
return -ENOMEM;
if (!h->avcodec)
{
destroy_handle(h);
(private_handle_t**)pout = NULL;
*(private_handle_t***)&pout = NULL;
return -1;// better error
}
return 0;
@@ -134,14 +134,14 @@ int avcodec(void* handle, avc_cmd_t cmd, void* pin, void* pout)
{
// pin uint32_t codec fourcc
private_handle_t* h = create_handle();
(private_handle_t**)pout = h;
*(private_handle_t***)&pout = h;
if (!h)
return -ENOMEM;
h->avcodec = avcodec_find_by_fcc((uint32_t) pin);
if (!h->avcodec)
{
destroy_handle(h);
(private_handle_t**)pout = NULL;
*(private_handle_t***)&pout = NULL;
return -1;// better error
}
return 0;
@@ -163,7 +163,7 @@ int avcodec(void* handle, avc_cmd_t cmd, void* pin, void* pout)
break;
case AVC_GET_VERSION:
(int*) pout = 500;
*(int**)&pout = 500;
default:
return -1;
@@ -1507,40 +1507,7 @@ typedef struct AVCodecContext {
} AVCodecContext;
/**
* AVOption.
*/
typedef struct AVOption {
/** options' name */
const char *name; /* if name is NULL, it indicates a link to next */
/** short English text help or const struct AVOption* subpointer */
const char *help; // const struct AVOption* sub;
/** offset to context structure where the parsed value should be stored */
int offset;
/** options' type */
int type;
#define FF_OPT_TYPE_BOOL 1 ///< boolean - true,1,on (or simply presence)
#define FF_OPT_TYPE_DOUBLE 2 ///< double
#define FF_OPT_TYPE_INT 3 ///< integer
#define FF_OPT_TYPE_STRING 4 ///< string (finished with \0)
#define FF_OPT_TYPE_MASK 0x1f ///< mask for types - upper bits are various flags
//#define FF_OPT_TYPE_EXPERT 0x20 // flag for expert option
#define FF_OPT_TYPE_FLAG (FF_OPT_TYPE_BOOL | 0x40)
#define FF_OPT_TYPE_RCOVERRIDE (FF_OPT_TYPE_STRING | 0x80)
/** min value (min == max -> no limits) */
double min;
/** maximum value for double/int */
double max;
/** default boo [0,1]l/double/int value */
double defval;
/**
* default string value (with optional semicolon delimited extra option-list
* i.e. option1;option2;option3
* defval might select other then first argument as default
*/
const char *defstr;
#define FF_OPT_MAX_DEPTH 10
} AVOption;
struct AVOption;
/**
* Parse option(s) and sets fields in passed structure
@@ -1548,7 +1515,7 @@ typedef struct AVOption {
* @param list list with AVOptions
* @param opts string with options for parsing
*/
int avoption_parse(void* strct, const AVOption* list, const char* opts);
int avoption_parse(void* strct, const struct AVOption* list, const char* opts);
/**
@@ -1565,7 +1532,7 @@ typedef struct AVCodec {
int (*decode)(AVCodecContext *, void *outdata, int *outdata_size,
uint8_t *buf, int buf_size);
int capabilities;
const AVOption *options;
const struct AVOption *options;
struct AVCodec *next;
void (*flush)(AVCodecContext *);
} AVCodec;
@@ -61,7 +61,43 @@
#define AVOPTION_SUB(ptr) { .name = NULL, .help = (const char*)ptr }
#define AVOPTION_END() AVOPTION_SUB(NULL)
struct AVOption;
/**
* AVOption.
*/
typedef struct AVOption {
/** options' name */
const char *name; /* if name is NULL, it indicates a link to next */
/** short English text help or const struct AVOption* subpointer */
const char *help; // const struct AVOption* sub;
/** offset to context structure where the parsed value should be stored */
int offset;
/** options' type */
int type;
#define FF_OPT_TYPE_BOOL 1 ///< boolean - true,1,on (or simply presence)
#define FF_OPT_TYPE_DOUBLE 2 ///< double
#define FF_OPT_TYPE_INT 3 ///< integer
#define FF_OPT_TYPE_STRING 4 ///< string (finished with \0)
#define FF_OPT_TYPE_MASK 0x1f ///< mask for types - upper bits are various flags
//#define FF_OPT_TYPE_EXPERT 0x20 // flag for expert option
#define FF_OPT_TYPE_FLAG (FF_OPT_TYPE_BOOL | 0x40)
#define FF_OPT_TYPE_RCOVERRIDE (FF_OPT_TYPE_STRING | 0x80)
/** min value (min == max -> no limits) */
double min;
/** maximum value for double/int */
double max;
/** default boo [0,1]l/double/int value */
double defval;
/**
* default string value (with optional semicolon delimited extra option-list
* i.e. option1;option2;option3
* defval might select other then first argument as default
*/
const char *defstr;
#define FF_OPT_MAX_DEPTH 10
} AVOption;
#ifdef HAVE_MMX
extern const struct AVOption avoptions_common[3 + 5];
#else
@@ -483,7 +483,7 @@ static int ra144_decode_frame(AVCodecContext * avctx,
*((int16_t *)data)=s;
if (s>32767) *((int16_t *)data)=32767;
if (s<-32767) *((int16_t *)data)=-32768;
((int16_t *)data)++;
data = (int16_t *)data + 1;
}
b+=30;
}
+1 -1
View File
@@ -7,4 +7,4 @@ const uint32 OGG_FILE_FORMAT = 'OggS';
//! for use in media_header.user_data_type
const uint32 OGG_PACKET_DATA_TYPE = 'OggP';
#endif _OGG_FORMATS_H
#endif // _OGG_FORMATS_H
@@ -106,7 +106,7 @@ retry:
TRACE("oggReader::GetPage: ogg_page_continued: continued page: not ogg\n");
return B_ERROR;
}
#endif STRICT_OGG
#endif //STRICT_OGG
// this is a beginning of stream page
ogg_stream_state stream;
if (ogg_stream_init(&stream, serialno) != 0) {
@@ -121,7 +121,7 @@ retry:
if (ogg_stream_packetout(&stream, &packet) != 1) {
#ifdef STRICT_OGG
return B_ERROR;
#endif STRICT_OGG
#endif //STRICT_OGG
}
if (fSeekable) {
fTracks[serialno] = OggSeekable::makeOggSeekable(fSeekable, &fSeekableLock, serialno, packet);
@@ -43,4 +43,4 @@ speex_encoded_media_format()
}
#endif _OGG_SPEEX_FORMATS_H
#endif //_OGG_SPEEX_FORMATS_H
@@ -40,4 +40,4 @@ theora_encoded_media_format()
}
#endif _OGG_THEORA_FORMATS_H
#endif //_OGG_THEORA_FORMATS_H
@@ -89,4 +89,4 @@ tobias_text_encoded_media_format()
}
#endif _OGG_TOBIAS_FORMATS_H
#endif // _OGG_TOBIAS_FORMATS_H
@@ -43,4 +43,4 @@ vorbis_encoded_media_format()
}
#endif _OGG_VORBIS_FORMATS_H
#endif //_OGG_VORBIS_FORMATS_H
@@ -43,4 +43,4 @@ public:
status_t GetSupportedFormats(media_format ** formats, size_t * count);
};
#endif _VORBIS_CODEC_PLUGIN_H_
#endif //_VORBIS_CODEC_PLUGIN_H_