Commit ac8ad189 authored by Ronan's avatar Ronan

fix(misc): fix compilation on Windows (invalid casts)

parent 90d72aed
......@@ -155,31 +155,37 @@ struct _MSVideoConfiguration {
*/
typedef struct _MSVideoConfiguration MSVideoConfiguration;
#define MS_VIDEO_SIZE_UNKNOWN (MSVideoSize){ MS_VIDEO_SIZE_UNKNOWN_W, MS_VIDEO_SIZE_UNKNOWN_H }
#ifdef __cplusplus
#define MS_VIDEO_SIZE_TYPE MSVideoSize
#else
#define MS_VIDEO_SIZE_TYPE
#endif // ifdef __cplusplus
#define MS_VIDEO_SIZE_UNKNOWN MS_VIDEO_SIZE_TYPE{ MS_VIDEO_SIZE_UNKNOWN_W, MS_VIDEO_SIZE_UNKNOWN_H }
#define MS_VIDEO_SIZE_CIF (MSVideoSize){MS_VIDEO_SIZE_CIF_W,MS_VIDEO_SIZE_CIF_H}
#define MS_VIDEO_SIZE_QCIF (MSVideoSize){MS_VIDEO_SIZE_QCIF_W,MS_VIDEO_SIZE_QCIF_H}
#define MS_VIDEO_SIZE_4CIF (MSVideoSize){MS_VIDEO_SIZE_4CIF_W,MS_VIDEO_SIZE_4CIF_H}
#define MS_VIDEO_SIZE_CVD (MSVideoSize){MS_VIDEO_SIZE_CVD_W, MS_VIDEO_SIZE_CVD_H}
#define MS_VIDEO_SIZE_QQVGA (MSVideoSize){MS_VIDEO_SIZE_QQVGA_W,MS_VIDEO_SIZE_QQVGA_H}
#define MS_VIDEO_SIZE_QVGA (MSVideoSize){MS_VIDEO_SIZE_QVGA_W,MS_VIDEO_SIZE_QVGA_H}
#define MS_VIDEO_SIZE_VGA (MSVideoSize){MS_VIDEO_SIZE_VGA_W,MS_VIDEO_SIZE_VGA_H}
#define MS_VIDEO_SIZE_CIF MS_VIDEO_SIZE_TYPE{ MS_VIDEO_SIZE_CIF_W, MS_VIDEO_SIZE_CIF_H }
#define MS_VIDEO_SIZE_QCIF MS_VIDEO_SIZE_TYPE{ MS_VIDEO_SIZE_QCIF_W, MS_VIDEO_SIZE_QCIF_H }
#define MS_VIDEO_SIZE_4CIF MS_VIDEO_SIZE_TYPE{ MS_VIDEO_SIZE_4CIF_W, MS_VIDEO_SIZE_4CIF_H }
#define MS_VIDEO_SIZE_CVD MS_VIDEO_SIZE_TYPE{ MS_VIDEO_SIZE_CVD_W, MS_VIDEO_SIZE_CVD_H }
#define MS_VIDEO_SIZE_QQVGA MS_VIDEO_SIZE_TYPE{ MS_VIDEO_SIZE_QQVGA_W, MS_VIDEO_SIZE_QQVGA_H }
#define MS_VIDEO_SIZE_QVGA MS_VIDEO_SIZE_TYPE{ MS_VIDEO_SIZE_QVGA_W, MS_VIDEO_SIZE_QVGA_H }
#define MS_VIDEO_SIZE_VGA MS_VIDEO_SIZE_TYPE{ MS_VIDEO_SIZE_VGA_W, MS_VIDEO_SIZE_VGA_H }
#define MS_VIDEO_SIZE_IOS_MEDIUM (MSVideoSize){ MS_VIDEO_SIZE_IOS_MEDIUM_W, MS_VIDEO_SIZE_IOS_MEDIUM_H }
#define MS_VIDEO_SIZE_IOS_MEDIUM MS_VIDEO_SIZE_TYPE{ MS_VIDEO_SIZE_IOS_MEDIUM_W, MS_VIDEO_SIZE_IOS_MEDIUM_H }
#define MS_VIDEO_SIZE_720P (MSVideoSize){MS_VIDEO_SIZE_720P_W, MS_VIDEO_SIZE_720P_H}
#define MS_VIDEO_SIZE_720P {MS_VIDEO_SIZE_720P_W, MS_VIDEO_SIZE_720P_H}
#define MS_VIDEO_SIZE_1080P (MSVideoSize){ MS_VIDEO_SIZE_1080P_W, MS_VIDEO_SIZE_1080P_H }
#define MS_VIDEO_SIZE_1080P MS_VIDEO_SIZE_TYPE{ MS_VIDEO_SIZE_1080P_W, MS_VIDEO_SIZE_1080P_H }
#define MS_VIDEO_SIZE_NS1 (MSVideoSize){MS_VIDEO_SIZE_NS1_W,MS_VIDEO_SIZE_NS1_H}
#define MS_VIDEO_SIZE_NS1 MS_VIDEO_SIZE_TYPE{ MS_VIDEO_SIZE_NS1_W,MS_VIDEO_SIZE_NS1_H }
#define MS_VIDEO_SIZE_XGA (MSVideoSize){MS_VIDEO_SIZE_XGA_W, MS_VIDEO_SIZE_XGA_H}
#define MS_VIDEO_SIZE_XGA MS_VIDEO_SIZE_TYPE{ MS_VIDEO_SIZE_XGA_W, MS_VIDEO_SIZE_XGA_H }
#define MS_VIDEO_SIZE_SVGA (MSVideoSize){MS_VIDEO_SIZE_SVGA_W, MS_VIDEO_SIZE_SVGA_H}
#define MS_VIDEO_SIZE_SVGA MS_VIDEO_SIZE_TYPE{ MS_VIDEO_SIZE_SVGA_W, MS_VIDEO_SIZE_SVGA_H }
#define MS_VIDEO_SIZE_SXGA_MINUS (MSVideoSize){ MS_VIDEO_SIZE_SXGA_MINUS_W, MS_VIDEO_SIZE_SXGA_MINUS_H }
#define MS_VIDEO_SIZE_SXGA_MINUS MS_VIDEO_SIZE_TYPE{ MS_VIDEO_SIZE_SXGA_MINUS_W, MS_VIDEO_SIZE_SXGA_MINUS_H }
#define MS_VIDEO_SIZE_UXGA (MSVideoSize){ MS_VIDEO_SIZE_UXGA_W, MS_VIDEO_SIZE_UXGA_H }
#define MS_VIDEO_SIZE_UXGA MS_VIDEO_SIZE_TYPE{ MS_VIDEO_SIZE_UXGA_W, MS_VIDEO_SIZE_UXGA_H }
#ifdef _MSC_VER
#define MS_VIDEO_SIZE_ASSIGN(vsize,name) \
......
......@@ -731,8 +731,8 @@ if(ENABLE_SHARED)
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
endif()
if (ENABLE_SHARED AND IOS)
if (ENABLE_SHARED AND IOS)
#According to Apple documentation (https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPFrameworks/Tasks/IncludingFrameworks.html)
#Framework header files must be included in application code using the #include directive using the followin patern: #include <Framework_name/Header_filename.h>. Consequece for medistreamer2 is that the framework must be named mediastreamer2. The final solution is to replace both mediastreamer_voip and mediastreamer_base by mediastreamer2. To preserve backward compatibility, both mediastreamer_voip and mediastreamer_base are kept for now (2018-05-06)
add_library(mediastreamer2 SHARED ${MEDIASTREAMER2_HEADER_FILES})
......
......@@ -74,8 +74,7 @@ int DecodingFilterWrapper::onGetOutFmtCall(MSFilter *f, void *arg) {
int DecodingFilterWrapper::onEnableAvpfCall(MSFilter *f, void *arg) {
try {
const bool_t *enable = static_cast<bool_t *>(arg);
static_cast<DecoderFilter *>(f->data)->enableAvpf(*enable);
static_cast<DecoderFilter *>(f->data)->enableAvpf(*static_cast<bool *>(arg));
return 0;
} catch (const DecoderFilter::MethodCallFailed &) {
return -1;
......@@ -84,8 +83,7 @@ int DecodingFilterWrapper::onEnableAvpfCall(MSFilter *f, void *arg) {
int DecodingFilterWrapper::onEnableFreezeOnErrorCall(MSFilter *f, void *arg) {
try {
const bool_t *enable = static_cast<bool_t *>(arg);
static_cast<DecoderFilter *>(f->data)->enableFreezeOnError(*enable);
static_cast<DecoderFilter *>(f->data)->enableFreezeOnError(*static_cast<bool *>(arg));
return 0;
} catch (const DecoderFilter::MethodCallFailed &) {
return -1;
......
......@@ -55,8 +55,7 @@ int EncodingFilterWrapper::onSetConfigurationCall(MSFilter *f, void *arg) {
int EncodingFilterWrapper::onEnableAvpfCall(MSFilter *f, void *arg) {
try {
const bool_t *enable = static_cast<bool_t *>(arg);
static_cast<EncoderFilter *>(f->data)->enableAvpf(*enable);
static_cast<EncoderFilter *>(f->data)->enableAvpf(*static_cast<bool *>(arg));
return 0;
} catch (const EncoderFilter::MethodCallFailed &) {
return -1;
......
......@@ -27,7 +27,7 @@ namespace mediastreamer {
H26xDecoderFilter::H26xDecoderFilter(MSFilter *f, H26xDecoder *decoder):
DecoderFilter(f),
_vsize({0, 0}),
_vsize{ 0, 0 },
_unpacker(H26xToolFactory::get(decoder->getMime()).createNalUnpacker()),
_codec(decoder) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment