media: Declare wildcard fields const.
This is a source compatibility break from BeOS, but should not
be an ABI one (I checked, the symbols are identical.)
Also use "= {}" in the definitions of the fields. We use this
in plenty of places in the kernel, so it should be OK for GCC2.
Change-Id: Ibe05b2236d46024d7b4563ae16e1cc7140fed965
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4434
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
40793c1ef6
commit
64e742def3
@@ -278,7 +278,7 @@ struct media_raw_audio_format {
|
|||||||
uint32 byte_order; // B_MEDIA_LITTLE_ENDIAN or B_MEDIA_BIG_ENDIAN
|
uint32 byte_order; // B_MEDIA_LITTLE_ENDIAN or B_MEDIA_BIG_ENDIAN
|
||||||
size_t buffer_size; // size of each buffer
|
size_t buffer_size; // size of each buffer
|
||||||
|
|
||||||
static media_multi_audio_format wildcard;
|
static const media_multi_audio_format wildcard;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -304,7 +304,7 @@ struct media_multi_audio_info {
|
|||||||
struct media_multi_audio_format : public media_raw_audio_format,
|
struct media_multi_audio_format : public media_raw_audio_format,
|
||||||
public media_multi_audio_info {
|
public media_multi_audio_info {
|
||||||
|
|
||||||
static media_multi_audio_format wildcard;
|
static const media_multi_audio_format wildcard;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -323,7 +323,7 @@ struct media_encoded_audio_format {
|
|||||||
|
|
||||||
uint32 _reserved_[3];
|
uint32 _reserved_[3];
|
||||||
|
|
||||||
static media_encoded_audio_format wildcard;
|
static const media_encoded_audio_format wildcard;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -366,7 +366,7 @@ struct media_video_display_info {
|
|||||||
uint32 flags;
|
uint32 flags;
|
||||||
uint32 _reserved_[3];
|
uint32 _reserved_[3];
|
||||||
|
|
||||||
static media_video_display_info wildcard;
|
static const media_video_display_info wildcard;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -392,7 +392,7 @@ struct media_raw_video_format {
|
|||||||
|
|
||||||
media_video_display_info display;
|
media_video_display_info display;
|
||||||
|
|
||||||
static media_raw_video_format wildcard;
|
static const media_raw_video_format wildcard;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -443,7 +443,7 @@ struct media_encoded_video_format {
|
|||||||
// more than this (embedded)
|
// more than this (embedded)
|
||||||
// in media_format union
|
// in media_format union
|
||||||
|
|
||||||
static media_encoded_video_format wildcard;
|
static const media_encoded_video_format wildcard;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -522,7 +522,7 @@ struct media_multistream_format {
|
|||||||
avi_info avi;
|
avi_info avi;
|
||||||
} u;
|
} u;
|
||||||
|
|
||||||
static media_multistream_format wildcard;
|
static const media_multistream_format wildcard;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ public:
|
|||||||
port_id port;
|
port_id port;
|
||||||
uint32 kind;
|
uint32 kind;
|
||||||
|
|
||||||
static media_node null;
|
static const media_node null;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint32 _reserved_[3];
|
uint32 _reserved_[3];
|
||||||
|
|||||||
@@ -201,19 +201,27 @@ operator<(const media_node& a, const media_node& b)
|
|||||||
// #pragma mark -
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
media_multi_audio_format media_raw_audio_format::wildcard;
|
#if __GNUC__ == 2
|
||||||
|
const media_multi_audio_format media_raw_audio_format::wildcard
|
||||||
|
= media_multi_audio_format();
|
||||||
|
|
||||||
media_multi_audio_format media_multi_audio_format::wildcard;
|
const media_multi_audio_format media_multi_audio_format::wildcard
|
||||||
|
= media_multi_audio_format();
|
||||||
|
#else
|
||||||
|
const media_multi_audio_format media_raw_audio_format::wildcard = {};
|
||||||
|
|
||||||
media_encoded_audio_format media_encoded_audio_format::wildcard = {{0}};
|
const media_multi_audio_format media_multi_audio_format::wildcard = {};
|
||||||
|
#endif
|
||||||
|
|
||||||
media_video_display_info media_video_display_info::wildcard = {(color_space)0};
|
const media_encoded_audio_format media_encoded_audio_format::wildcard = {};
|
||||||
|
|
||||||
media_raw_video_format media_raw_video_format::wildcard = {0};
|
const media_video_display_info media_video_display_info::wildcard = {};
|
||||||
|
|
||||||
media_encoded_video_format media_encoded_video_format::wildcard = {{0}};
|
const media_raw_video_format media_raw_video_format::wildcard = {};
|
||||||
|
|
||||||
media_multistream_format media_multistream_format::wildcard = {0};
|
const media_encoded_video_format media_encoded_video_format::wildcard = {};
|
||||||
|
|
||||||
|
const media_multistream_format media_multistream_format::wildcard = {};
|
||||||
|
|
||||||
|
|
||||||
// #pragma mark - media_format::Matches() support
|
// #pragma mark - media_format::Matches() support
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ int32 BMediaNode::_m_changeTag = 0;
|
|||||||
|
|
||||||
// media_node
|
// media_node
|
||||||
|
|
||||||
media_node media_node::null;
|
const media_node media_node::null;
|
||||||
|
|
||||||
media_node::media_node()
|
media_node::media_node()
|
||||||
:
|
:
|
||||||
|
|||||||
Reference in New Issue
Block a user