Commit 64bae949 authored by Victorien Le Couviour--Tuffet's avatar Victorien Le Couviour--Tuffet Committed by Jean-Baptiste Kempf

macosx: helpers: add getVouts

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <>
parent 441bac0a
......@@ -44,6 +44,35 @@ static inline vout_thread_t *getVout(void)
return p_vout;
* Returns an array containing all the vouts.
* \return all vouts or nil if none is found
static inline NSArray<NSValue *> *getVouts(void)
input_thread_t *p_input = getInput();
vout_thread_t **pp_vouts;
size_t i_num_vouts;
if (!p_input
|| input_Control(p_input, INPUT_GET_VOUTS, &pp_vouts, &i_num_vouts)
|| !i_num_vouts)
return nil;
NSMutableArray<NSValue *> *vouts =
[NSMutableArray arrayWithCapacity:i_num_vouts];
for (size_t i = 0; i < i_num_vouts; ++i)
[vouts addObject:[NSValue valueWithPointer:pp_vouts[i]]];
return vouts;
static inline vout_thread_t *getVoutForActiveWindow(void)
vout_thread_t *p_vout = nil;
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