mirror of
https://github.com/mpv-player/mpv
synced 2024-11-18 21:16:10 +01:00
f3e9b94622
Due to the COM Single-Threaded Apartment model, the thread owning the objects will still do all the actual method calls (in the form of message dispatches), but at least this will be COM's problem rather than having to set up several handles and adding extra code to the event thread. Since the event thread still needs to own the WASAPI handles to avoid waiting on another thread to dispatch the messages, the init and uninit code still has to run in the thread. This also removes a broken drain implementation and removes unused headers from each of the files split from the original ao_wasapi.c.
46 lines
1.4 KiB
C
Executable File
46 lines
1.4 KiB
C
Executable File
/*
|
|
* This file is part of mpv.
|
|
*
|
|
* Original author: Jonathan Yong <10walls@gmail.com>
|
|
*
|
|
* mpv is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* mpv is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along
|
|
* with mpv. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef MP_AO_WASAPI_UTILS_H_
|
|
#define MP_AO_WASAPI_UTILS_H_
|
|
|
|
#include "audio/out/ao_wasapi.h"
|
|
|
|
#include "options/m_option.h"
|
|
#include "common/msg.h"
|
|
#include "ao.h"
|
|
#include "internal.h"
|
|
|
|
int wasapi_fill_VistaBlob(wasapi_state *state);
|
|
|
|
const char *wasapi_explain_err(const HRESULT hr);
|
|
|
|
int wasapi_enumerate_devices(struct mp_log *log);
|
|
|
|
int wasapi_validate_device(struct mp_log *log, const m_option_t *opt,
|
|
struct bstr name, struct bstr param);
|
|
|
|
int wasapi_thread_init(struct ao *ao);
|
|
void wasapi_thread_uninit(wasapi_state *state);
|
|
|
|
HRESULT wasapi_setup_proxies(wasapi_state *state);
|
|
void wasapi_release_proxies(wasapi_state *state);
|
|
|
|
#endif
|