0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 03:52:22 +02:00

command: drop "audio-out-detected-device" property

Coreaudio stopped setting it a few releases ago (66a958bb4f). There is
not much of a user- or API-visible change, so remove it without
deprecation.
This commit is contained in:
wm4 2017-10-09 15:48:47 +02:00
parent 622610bad5
commit b6af3db568
7 changed files with 3 additions and 35 deletions

View File

@ -39,6 +39,8 @@ Interface changes
- remove the (deprecated) --vo=opengl-hq
- remove --opengl-es=force2 (use --opengl-es=yes --opengl-restrict=300)
- the --msg-level option now affects --log-file
- drop "audio-out-detected-device" property - this was unavailable on all
audio output drivers for quite a while (coreaudio used to provide it)
--- mpv 0.27.0 ---
- drop previously deprecated --field-dominance option
- drop previously deprecated "osd" command

View File

@ -2017,10 +2017,6 @@ Property list
``current-ao``
Current audio output driver (name as used with ``--ao``).
``audio-out-detected-device``
Return the audio device selected by the AO driver (only implemented for
some drivers: currently only ``coreaudio``).
``working-directory``
Return the working directory of the mpv process. Can be useful for JSON IPC
users, because the command line player usually works with relative paths.

View File

@ -6,8 +6,3 @@ mp.observe_property("audio-device-list", "native", function(name, val)
print(" - '" .. e.name .. "' (" .. e.description .. ")")
end
end)
mp.observe_property("audio-out-detected-device", "native", function(name, val)
print("Detected audio device changed:")
print(" - '" .. val)
end)

View File

@ -550,13 +550,6 @@ bool ao_hotplug_check_update(struct ao_hotplug *hp)
return false;
}
const char *ao_hotplug_get_detected_device(struct ao_hotplug *hp)
{
if (!hp || !hp->ao)
return NULL;
return hp->ao->detected_device;
}
// The return value is valid until the next call to this API.
struct ao_device_list *ao_hotplug_get_device_list(struct ao_hotplug *hp)
{

View File

@ -112,7 +112,6 @@ struct ao_hotplug *ao_hotplug_create(struct mpv_global *global,
void *wakeup_ctx);
void ao_hotplug_destroy(struct ao_hotplug *hp);
bool ao_hotplug_check_update(struct ao_hotplug *hp);
const char *ao_hotplug_get_detected_device(struct ao_hotplug *hp);
struct ao_device_list *ao_hotplug_get_device_list(struct ao_hotplug *hp);
void ao_print_devices(struct mpv_global *global, struct mp_log *log);

View File

@ -61,9 +61,6 @@ struct ao {
// default device should be used, this is set to NULL.
char *device;
// Device actually chosen by the AO
char *detected_device;
// Application name to report to the audio API.
char *client_name;

View File

@ -1970,17 +1970,6 @@ static int mp_property_ao(void *ctx, struct m_property *p, int action, void *arg
mpctx->ao ? ao_get_name(mpctx->ao) : NULL);
}
static int mp_property_ao_detected_device(void *ctx,struct m_property *prop,
int action, void *arg)
{
struct MPContext *mpctx = ctx;
struct command_ctx *cmd = mpctx->command_ctx;
create_hotplug(mpctx);
const char *d = ao_hotplug_get_detected_device(cmd->hotplug);
return m_property_strdup_ro(action, arg, d);
}
/// Audio delay (RW)
static int mp_property_audio_delay(void *ctx, struct m_property *prop,
int action, void *arg)
@ -3983,7 +3972,6 @@ static const struct m_property mp_properties_base[] = {
{"audio-device", mp_property_audio_device},
{"audio-device-list", mp_property_audio_devices},
{"current-ao", mp_property_ao},
{"audio-out-detected-device", mp_property_ao_detected_device},
// Video
{"fullscreen", mp_property_fullscreen},
@ -5773,10 +5761,8 @@ void handle_command_updates(struct MPContext *mpctx)
// This is a bit messy: ao_hotplug wakes up the player, and then we have
// to recheck the state. Then the client(s) will read the property.
if (ctx->hotplug && ao_hotplug_check_update(ctx->hotplug)) {
if (ctx->hotplug && ao_hotplug_check_update(ctx->hotplug))
mp_notify_property(mpctx, "audio-device-list");
mp_notify_property(mpctx, "audio-out-detected-device");
}
}
void mp_notify(struct MPContext *mpctx, int event, void *arg)