[vlc-devel] [PATCH 3/3] core: vout: notify when the viewpoint can change
Thomas Guillem
thomas at gllm.fr
Wed Nov 16 17:59:35 CET 2016
The boolean variable "viewpoint-changeable" will be used by interfaces in order to
know if 360° navigation should be handled.
---
src/video_output/display.c | 3 +++
src/video_output/event.h | 5 +++++
src/video_output/vout_intf.c | 1 +
3 files changed, 9 insertions(+)
diff --git a/src/video_output/display.c b/src/video_output/display.c
index 88e346a..996f978 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -1328,6 +1328,9 @@ static vout_display_t *DisplayNew(vout_thread_t *vout,
osys->sar.den != source->i_sar_den)
osys->ch_sar = true;
+ if (p_display->fmt.projection_mode != PROJECTION_MODE_RECTANGULAR)
+ vout_SendEventViewpointChangeable(osys->vout, true);
+
return p_display;
error:
vlc_mutex_destroy(&osys->lock);
diff --git a/src/video_output/event.h b/src/video_output/event.h
index 8f11250..a5e47da 100644
--- a/src/video_output/event.h
+++ b/src/video_output/event.h
@@ -100,6 +100,11 @@ static inline void vout_SendEventMouseHidden(vout_thread_t *vout)
/* TODO */
VLC_UNUSED(vout);
}
+static inline void vout_SendEventViewpointChangeable(vout_thread_t *vout,
+ bool b_can_change)
+{
+ var_SetBool(vout, "viewpoint-changeable", b_can_change);
+}
#if 0
static inline void vout_SendEventSnapshot(vout_thread_t *vout, const char *filename)
diff --git a/src/video_output/vout_intf.c b/src/video_output/vout_intf.c
index 1aa78be..262da21 100644
--- a/src/video_output/vout_intf.c
+++ b/src/video_output/vout_intf.c
@@ -306,6 +306,7 @@ void vout_IntfInit( vout_thread_t *p_vout )
/* Viewpoint */
var_Create( p_vout, "viewpoint", VLC_VAR_ADDRESS | VLC_VAR_DOINHERIT );
var_AddCallback( p_vout, "viewpoint", ViewpointCallback, NULL );
+ var_Create( p_vout, "viewpoint-changeable", VLC_VAR_BOOL );
vout_IntfReinit( p_vout );
}
--
2.9.3
More information about the vlc-devel
mailing list