Commit dcd95ba9 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Use void* for window ids so that pointers can be passed on 64 bits...

Use void* for window ids so that pointers can be passed on 64 bits architectures where the unsigned long is 32 bits (Windows 64 bits).
parent 4cb17521
......@@ -697,8 +697,8 @@ struct _VideoStream
VideoStreamEventCallback eventcb;
void *event_pointer;
char *display_name;
unsigned long window_id;
unsigned long preview_window_id;
void *window_id;
void *preview_window_id;
VideoStreamDir dir;
MSWebCam *cam;
RtpSession *rtp_io_session; /**< The RTP session used for RTP input/output. */
......@@ -904,10 +904,10 @@ MS2_PUBLIC float video_stream_get_received_framerate(const VideoStream *stream);
MS2_PUBLIC const char *video_stream_get_default_video_renderer(void);
MS2_PUBLIC void video_stream_enable_self_view(VideoStream *stream, bool_t val);
MS2_PUBLIC unsigned long video_stream_get_native_window_id(VideoStream *stream);
MS2_PUBLIC void video_stream_set_native_window_id(VideoStream *stream, unsigned long id);
MS2_PUBLIC void video_stream_set_native_preview_window_id(VideoStream *stream, unsigned long id);
MS2_PUBLIC unsigned long video_stream_get_native_preview_window_id(VideoStream *stream);
MS2_PUBLIC void * video_stream_get_native_window_id(VideoStream *stream);
MS2_PUBLIC void video_stream_set_native_window_id(VideoStream *stream, void *id);
MS2_PUBLIC void video_stream_set_native_preview_window_id(VideoStream *stream, void *id);
MS2_PUBLIC void * video_stream_get_native_preview_window_id(VideoStream *stream);
MS2_PUBLIC void video_stream_use_preview_video_window(VideoStream *stream, bool_t yesno);
MS2_PUBLIC void video_stream_set_device_rotation(VideoStream *stream, int orientation);
MS2_PUBLIC void video_stream_show_video(VideoStream *stream, bool_t show);
......
......@@ -69,12 +69,12 @@ struct _MSVideoDisplayDecodingSupport {
/**returns a platform dependant window id where the video is drawn */
#define MS_VIDEO_DISPLAY_GET_NATIVE_WINDOW_ID \
MS_FILTER_METHOD(MSFilterVideoDisplayInterface,3,long)
MS_FILTER_METHOD(MSFilterVideoDisplayInterface,3,void*)
/**Sets an external native window id where the video is to be drawn */
#define MS_VIDEO_DISPLAY_SET_NATIVE_WINDOW_ID \
MS_FILTER_METHOD(MSFilterVideoDisplayInterface,4,long)
MS_FILTER_METHOD(MSFilterVideoDisplayInterface,4,void*)
/**scale factor of the local view */
......
......@@ -1324,8 +1324,8 @@ void video_stream_show_video(VideoStream *stream, bool_t show){
}
unsigned long video_stream_get_native_window_id(VideoStream *stream){
unsigned long id;
void * video_stream_get_native_window_id(VideoStream *stream){
void *id;
if (stream->output){
if (ms_filter_call_method(stream->output,MS_VIDEO_DISPLAY_GET_NATIVE_WINDOW_ID,&id)==0)
return id;
......@@ -1333,14 +1333,14 @@ unsigned long video_stream_get_native_window_id(VideoStream *stream){
return stream->window_id;
}
void video_stream_set_native_window_id(VideoStream *stream, unsigned long id){
void video_stream_set_native_window_id(VideoStream *stream, void *id){
stream->window_id=id;
if (stream->output){
ms_filter_call_method(stream->output,MS_VIDEO_DISPLAY_SET_NATIVE_WINDOW_ID,&id);
}
}
void video_stream_set_native_preview_window_id(VideoStream *stream, unsigned long id){
void video_stream_set_native_preview_window_id(VideoStream *stream, void *id){
stream->preview_window_id=id;
#ifndef __ios
if (stream->output2){
......@@ -1352,8 +1352,8 @@ void video_stream_set_native_preview_window_id(VideoStream *stream, unsigned lon
}
}
unsigned long video_stream_get_native_preview_window_id(VideoStream *stream){
unsigned long id=0;
void * video_stream_get_native_preview_window_id(VideoStream *stream){
void *id=0;
if (stream->output2){
if (ms_filter_call_method(stream->output2,MS_VIDEO_DISPLAY_GET_NATIVE_WINDOW_ID,&id)==0)
return id;
......
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