some more changes, no longer using BMediaFormats

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5522 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
beveloper
2003-12-01 22:20:59 +00:00
parent 9af57a10a9
commit 572e60a481
5 changed files with 116 additions and 175 deletions
+11 -43
View File
@@ -66,6 +66,10 @@ typedef struct {
uint8 data[16];
} GUID;
enum beos_format {
B_BEOS_FORMAT_RAW_AUDIO = 'rawa',
B_BEOS_FORMAT_RAW_VIDEO = 'rawv'
};
typedef struct {
int32 format;
} media_beos_description;
@@ -146,19 +150,15 @@ typedef struct _media_format_description {
} u;
} media_format_description;
#if defined(__cplusplus)
namespace BPrivate {
class addon_list;
void dec_load_hook(void *arg, image_id imgid);
void extractor_load_hook(void *arg, image_id imgid);
class Extractor;
}
// temporary functionality, will go away...
status_t _get_format_for_description(media_format *out_format, const media_format_description &in_desc);
status_t _get_meta_description_for_format(media_format_description *out_desc, const media_format &in_format);
class BMediaFormats {
public:
BMediaFormats();
BMediaFormats();
virtual ~BMediaFormats();
status_t InitCheck();
@@ -213,41 +213,9 @@ virtual ~BMediaFormats();
const media_format & in_format,
media_format * out_format);
private:
friend class BPrivate::addon_list;
friend void BPrivate::dec_load_hook(void *arg, image_id imgid);
friend void BPrivate::extractor_load_hook(void * arg, image_id imgid);
friend class BMediaDecoder;
friend class BMediaTrack;
friend class BPrivate::Extractor;
char _reserved_messenger[24]; // sizeof(BMessenger) 24
char _reserved_list[28]; // sizeof(BList) 28
char _reserved_locker[32]; // sizeof(BLocker) 36
int32 m_lock_count;
static int32 s_cleared;
static BMessenger s_server;
static BList s_formats;
static BLocker s_lock;
int32 m_index;
void clear_formats();
static void ex_clear_formats_imp();
static void clear_formats_imp();
status_t get_formats();
static status_t get_formats_imp();
static BMessenger & get_server();
static status_t bind_addon(
const char * addon,
const media_format * formats,
int32 count);
static bool is_bound(
const char * addon,
const media_format * formats,
int32 count);
static status_t find_addons(
const media_format * format,
BPrivate::addon_list & addons);
BLocker * fLocker;
int32 fIndex;
uint32 _reserved[21];
};
_IMPEXP_MEDIA bool operator==(const media_format_description & a, const media_format_description & b);
+23 -1
View File
@@ -6,7 +6,7 @@
#ifndef _DATA_EXCHANGE_H
#define _DATA_EXCHANGE_H
#include <MediaDefs.h>
#include <MediaFormats.h>
#include <MediaNode.h>
#include <MediaAddOn.h>
#include <Messenger.h>
@@ -105,6 +105,8 @@ enum {
SERVER_SETREFFOR,
SERVER_REMOVEREFFOR,
SERVER_REMOVEITEM,
SERVER_GET_FORMAT_FOR_DESCRIPTION,
SERVER_GET_META_DESCRIPTION_FOR_FORMAT,
SERVER_MESSAGE_END,
NODE_MESSAGE_START = 0x200,
@@ -876,6 +878,26 @@ struct server_removeitem_reply : public reply_data
{
};
struct server_get_format_for_description_request : public request_data
{
media_format_description description;
};
struct server_get_format_for_description_reply : public reply_data
{
media_format format;
};
struct server_get_meta_description_for_format_request : public request_data
{
media_format format;
};
struct server_get_meta_description_for_format_reply : public reply_data
{
media_format_description description;
};
struct node_request_completed_command : public command_data
{
media_request_info info;