]> git.sesse.net Git - vlc/blobdiff - modules/audio_output/mmdevice.h
auhal: another memleak fix
[vlc] / modules / audio_output / mmdevice.h
index 27365142831160a49eeae1315eb8c99b27a28e96..cb24282deea36b8cd00ddafbee98c8c8be9a8f90 100644 (file)
@@ -35,19 +35,22 @@ struct aout_stream
     HRESULT (*play)(aout_stream_t *, block_t *);
     HRESULT (*pause)(aout_stream_t *, bool);
     HRESULT (*flush)(aout_stream_t *);
+
+    struct
+    {
+        void *device;
+        HRESULT (*activate)(void *device, REFIID, PROPVARIANT *, void **);
+    } owner;
 };
 
 /**
  * Creates an audio output stream on a given Windows multimedia device.
- * \param parent parent VLC object
+ * \param s audio output stream object to be initialized
  * \param fmt audio output sample format [IN/OUT]
- * \param dev audio output device
  * \param sid audio output session GUID [IN]
  */
-aout_stream_t *aout_stream_Start(vlc_object_t *parent,
-                                 audio_sample_format_t *fmt,
-                                 IMMDevice *dev, const GUID *sid);
-#define aout_stream_Start(o,f,d,s) aout_stream_Start(VLC_OBJECT(o),f,d,s)
+HRESULT aout_stream_Start(aout_stream_t *s, audio_sample_format_t *fmt,
+                          const GUID *sid);
 
 /**
  * Destroys an audio output stream.
@@ -73,4 +76,11 @@ static inline HRESULT aout_stream_Flush(aout_stream_t *s)
 {
     return (s->flush)(s);
 }
+
+static inline
+HRESULT aout_stream_Activate(aout_stream_t *s, REFIID iid,
+                             PROPVARIANT *actparms, void **pv)
+{
+    return s->owner.activate(s->owner.device, iid, actparms, pv);
+}
 #endif