various: fix indentation

This commit is contained in:
nanahi 2024-03-19 22:23:23 -04:00 committed by Kacper Michajłow
parent f11002cef3
commit 9f5edd4eed
24 changed files with 353 additions and 353 deletions

View File

@ -181,7 +181,7 @@ static int init_filter(struct mp_filter *da)
goto fail;
void *buffer = av_mallocz(OUTBUF_SIZE);
MP_HANDLE_OOM(buffer);
MP_HANDLE_OOM(buffer);
lavf_ctx->pb = avio_alloc_context(buffer, OUTBUF_SIZE, 1, spdif_ctx, NULL,
write_packet, NULL);
if (!lavf_ctx->pb) {

View File

@ -236,20 +236,20 @@ void ca_print_asbd(struct ao *ao, const char *description,
int mpfmt = ca_asbd_to_mp_format(asbd);
MP_VERBOSE(ao,
"%s %7.1fHz %" PRIu32 "bit %s "
"[%" PRIu32 "][%" PRIu32 "bpp][%" PRIu32 "fbp]"
"[%" PRIu32 "bpf][%" PRIu32 "ch] "
"%s %s %s%s%s%s (%s)\n",
description, asbd->mSampleRate, asbd->mBitsPerChannel, format,
asbd->mFormatFlags, asbd->mBytesPerPacket, asbd->mFramesPerPacket,
asbd->mBytesPerFrame, asbd->mChannelsPerFrame,
(flags & kAudioFormatFlagIsFloat) ? "float" : "int",
(flags & kAudioFormatFlagIsBigEndian) ? "BE" : "LE",
(flags & kAudioFormatFlagIsSignedInteger) ? "S" : "U",
(flags & kAudioFormatFlagIsPacked) ? " packed" : "",
(flags & kAudioFormatFlagIsAlignedHigh) ? " aligned" : "",
(flags & kAudioFormatFlagIsNonInterleaved) ? " P" : "",
mpfmt ? af_fmt_to_str(mpfmt) : "-");
"%s %7.1fHz %" PRIu32 "bit %s "
"[%" PRIu32 "][%" PRIu32 "bpp][%" PRIu32 "fbp]"
"[%" PRIu32 "bpf][%" PRIu32 "ch] "
"%s %s %s%s%s%s (%s)\n",
description, asbd->mSampleRate, asbd->mBitsPerChannel, format,
asbd->mFormatFlags, asbd->mBytesPerPacket, asbd->mFramesPerPacket,
asbd->mBytesPerFrame, asbd->mChannelsPerFrame,
(flags & kAudioFormatFlagIsFloat) ? "float" : "int",
(flags & kAudioFormatFlagIsBigEndian) ? "BE" : "LE",
(flags & kAudioFormatFlagIsSignedInteger) ? "S" : "U",
(flags & kAudioFormatFlagIsPacked) ? " packed" : "",
(flags & kAudioFormatFlagIsAlignedHigh) ? " aligned" : "",
(flags & kAudioFormatFlagIsNonInterleaved) ? " P" : "",
mpfmt ? af_fmt_to_str(mpfmt) : "-");
}
// Return whether new is an improvement over old. Assume a higher value means

View File

@ -209,25 +209,25 @@ static pa_encoding_t map_digital_format(int format)
}
static const int speaker_map[][2] = {
{PA_CHANNEL_POSITION_FRONT_LEFT, MP_SPEAKER_ID_FL},
{PA_CHANNEL_POSITION_FRONT_RIGHT, MP_SPEAKER_ID_FR},
{PA_CHANNEL_POSITION_FRONT_CENTER, MP_SPEAKER_ID_FC},
{PA_CHANNEL_POSITION_REAR_CENTER, MP_SPEAKER_ID_BC},
{PA_CHANNEL_POSITION_REAR_LEFT, MP_SPEAKER_ID_BL},
{PA_CHANNEL_POSITION_REAR_RIGHT, MP_SPEAKER_ID_BR},
{PA_CHANNEL_POSITION_LFE, MP_SPEAKER_ID_LFE},
{PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER, MP_SPEAKER_ID_FLC},
{PA_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER, MP_SPEAKER_ID_FRC},
{PA_CHANNEL_POSITION_SIDE_LEFT, MP_SPEAKER_ID_SL},
{PA_CHANNEL_POSITION_SIDE_RIGHT, MP_SPEAKER_ID_SR},
{PA_CHANNEL_POSITION_TOP_CENTER, MP_SPEAKER_ID_TC},
{PA_CHANNEL_POSITION_TOP_FRONT_LEFT, MP_SPEAKER_ID_TFL},
{PA_CHANNEL_POSITION_TOP_FRONT_RIGHT, MP_SPEAKER_ID_TFR},
{PA_CHANNEL_POSITION_TOP_FRONT_CENTER, MP_SPEAKER_ID_TFC},
{PA_CHANNEL_POSITION_TOP_REAR_LEFT, MP_SPEAKER_ID_TBL},
{PA_CHANNEL_POSITION_TOP_REAR_RIGHT, MP_SPEAKER_ID_TBR},
{PA_CHANNEL_POSITION_TOP_REAR_CENTER, MP_SPEAKER_ID_TBC},
{PA_CHANNEL_POSITION_INVALID, -1}
{PA_CHANNEL_POSITION_FRONT_LEFT, MP_SPEAKER_ID_FL},
{PA_CHANNEL_POSITION_FRONT_RIGHT, MP_SPEAKER_ID_FR},
{PA_CHANNEL_POSITION_FRONT_CENTER, MP_SPEAKER_ID_FC},
{PA_CHANNEL_POSITION_REAR_CENTER, MP_SPEAKER_ID_BC},
{PA_CHANNEL_POSITION_REAR_LEFT, MP_SPEAKER_ID_BL},
{PA_CHANNEL_POSITION_REAR_RIGHT, MP_SPEAKER_ID_BR},
{PA_CHANNEL_POSITION_LFE, MP_SPEAKER_ID_LFE},
{PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER, MP_SPEAKER_ID_FLC},
{PA_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER, MP_SPEAKER_ID_FRC},
{PA_CHANNEL_POSITION_SIDE_LEFT, MP_SPEAKER_ID_SL},
{PA_CHANNEL_POSITION_SIDE_RIGHT, MP_SPEAKER_ID_SR},
{PA_CHANNEL_POSITION_TOP_CENTER, MP_SPEAKER_ID_TC},
{PA_CHANNEL_POSITION_TOP_FRONT_LEFT, MP_SPEAKER_ID_TFL},
{PA_CHANNEL_POSITION_TOP_FRONT_RIGHT, MP_SPEAKER_ID_TFR},
{PA_CHANNEL_POSITION_TOP_FRONT_CENTER, MP_SPEAKER_ID_TFC},
{PA_CHANNEL_POSITION_TOP_REAR_LEFT, MP_SPEAKER_ID_TBL},
{PA_CHANNEL_POSITION_TOP_REAR_RIGHT, MP_SPEAKER_ID_TBR},
{PA_CHANNEL_POSITION_TOP_REAR_CENTER, MP_SPEAKER_ID_TBC},
{PA_CHANNEL_POSITION_INVALID, -1}
};
static bool chmap_pa_from_mp(pa_channel_map *dst, struct mp_chmap *src)

View File

@ -33,195 +33,195 @@ struct key_name {
/// If you add some new keys, you also need to add them here
static const struct key_name key_names[] = {
{ ' ', "SPACE" },
{ '#', "SHARP" },
{ 0x3000, "IDEOGRAPHIC_SPACE" },
{ MP_KEY_ENTER, "ENTER" },
{ MP_KEY_TAB, "TAB" },
{ MP_KEY_BACKSPACE, "BS" },
{ MP_KEY_DELETE, "DEL" },
{ MP_KEY_INSERT, "INS" },
{ MP_KEY_HOME, "HOME" },
{ MP_KEY_END, "END" },
{ MP_KEY_PAGE_UP, "PGUP" },
{ MP_KEY_PAGE_DOWN, "PGDWN" },
{ MP_KEY_ESC, "ESC" },
{ MP_KEY_PRINT, "PRINT" },
{ MP_KEY_RIGHT, "RIGHT" },
{ MP_KEY_LEFT, "LEFT" },
{ MP_KEY_DOWN, "DOWN" },
{ MP_KEY_UP, "UP" },
{ MP_KEY_F+1, "F1" },
{ MP_KEY_F+2, "F2" },
{ MP_KEY_F+3, "F3" },
{ MP_KEY_F+4, "F4" },
{ MP_KEY_F+5, "F5" },
{ MP_KEY_F+6, "F6" },
{ MP_KEY_F+7, "F7" },
{ MP_KEY_F+8, "F8" },
{ MP_KEY_F+9, "F9" },
{ MP_KEY_F+10, "F10" },
{ MP_KEY_F+11, "F11" },
{ MP_KEY_F+12, "F12" },
{ MP_KEY_F+13, "F13" },
{ MP_KEY_F+14, "F14" },
{ MP_KEY_F+15, "F15" },
{ MP_KEY_F+16, "F16" },
{ MP_KEY_F+17, "F17" },
{ MP_KEY_F+18, "F18" },
{ MP_KEY_F+19, "F19" },
{ MP_KEY_F+20, "F20" },
{ MP_KEY_F+21, "F21" },
{ MP_KEY_F+22, "F22" },
{ MP_KEY_F+23, "F23" },
{ MP_KEY_F+24, "F24" },
{ MP_KEY_KP0, "KP0" },
{ MP_KEY_KP1, "KP1" },
{ MP_KEY_KP2, "KP2" },
{ MP_KEY_KP3, "KP3" },
{ MP_KEY_KP4, "KP4" },
{ MP_KEY_KP5, "KP5" },
{ MP_KEY_KP6, "KP6" },
{ MP_KEY_KP7, "KP7" },
{ MP_KEY_KP8, "KP8" },
{ MP_KEY_KP9, "KP9" },
{ MP_KEY_KPDEL, "KP_DEL" },
{ MP_KEY_KPDEC, "KP_DEC" },
{ MP_KEY_KPINS, "KP_INS" },
{ MP_KEY_KPHOME, "KP_HOME" },
{ MP_KEY_KPEND, "KP_END" },
{ MP_KEY_KPPGUP, "KP_PGUP" },
{ MP_KEY_KPPGDOWN, "KP_PGDWN" },
{ MP_KEY_KPRIGHT, "KP_RIGHT" },
{ MP_KEY_KPLEFT, "KP_LEFT" },
{ MP_KEY_KPDOWN, "KP_DOWN" },
{ MP_KEY_KPUP, "KP_UP" },
{ MP_KEY_KPENTER, "KP_ENTER" },
{ MP_MBTN_LEFT, "MBTN_LEFT" },
{ MP_MBTN_MID, "MBTN_MID" },
{ MP_MBTN_RIGHT, "MBTN_RIGHT" },
{ MP_WHEEL_UP, "WHEEL_UP" },
{ MP_WHEEL_DOWN, "WHEEL_DOWN" },
{ MP_WHEEL_LEFT, "WHEEL_LEFT" },
{ MP_WHEEL_RIGHT, "WHEEL_RIGHT" },
{ MP_MBTN_BACK, "MBTN_BACK" },
{ MP_MBTN_FORWARD, "MBTN_FORWARD" },
{ MP_MBTN9, "MBTN9" },
{ MP_MBTN10, "MBTN10" },
{ MP_MBTN11, "MBTN11" },
{ MP_MBTN12, "MBTN12" },
{ MP_MBTN13, "MBTN13" },
{ MP_MBTN14, "MBTN14" },
{ MP_MBTN15, "MBTN15" },
{ MP_MBTN16, "MBTN16" },
{ MP_MBTN17, "MBTN17" },
{ MP_MBTN18, "MBTN18" },
{ MP_MBTN19, "MBTN19" },
{ MP_MBTN_LEFT_DBL, "MBTN_LEFT_DBL" },
{ MP_MBTN_MID_DBL, "MBTN_MID_DBL" },
{ MP_MBTN_RIGHT_DBL, "MBTN_RIGHT_DBL" },
{ ' ', "SPACE" },
{ '#', "SHARP" },
{ 0x3000, "IDEOGRAPHIC_SPACE" },
{ MP_KEY_ENTER, "ENTER" },
{ MP_KEY_TAB, "TAB" },
{ MP_KEY_BACKSPACE, "BS" },
{ MP_KEY_DELETE, "DEL" },
{ MP_KEY_INSERT, "INS" },
{ MP_KEY_HOME, "HOME" },
{ MP_KEY_END, "END" },
{ MP_KEY_PAGE_UP, "PGUP" },
{ MP_KEY_PAGE_DOWN, "PGDWN" },
{ MP_KEY_ESC, "ESC" },
{ MP_KEY_PRINT, "PRINT" },
{ MP_KEY_RIGHT, "RIGHT" },
{ MP_KEY_LEFT, "LEFT" },
{ MP_KEY_DOWN, "DOWN" },
{ MP_KEY_UP, "UP" },
{ MP_KEY_F+1, "F1" },
{ MP_KEY_F+2, "F2" },
{ MP_KEY_F+3, "F3" },
{ MP_KEY_F+4, "F4" },
{ MP_KEY_F+5, "F5" },
{ MP_KEY_F+6, "F6" },
{ MP_KEY_F+7, "F7" },
{ MP_KEY_F+8, "F8" },
{ MP_KEY_F+9, "F9" },
{ MP_KEY_F+10, "F10" },
{ MP_KEY_F+11, "F11" },
{ MP_KEY_F+12, "F12" },
{ MP_KEY_F+13, "F13" },
{ MP_KEY_F+14, "F14" },
{ MP_KEY_F+15, "F15" },
{ MP_KEY_F+16, "F16" },
{ MP_KEY_F+17, "F17" },
{ MP_KEY_F+18, "F18" },
{ MP_KEY_F+19, "F19" },
{ MP_KEY_F+20, "F20" },
{ MP_KEY_F+21, "F21" },
{ MP_KEY_F+22, "F22" },
{ MP_KEY_F+23, "F23" },
{ MP_KEY_F+24, "F24" },
{ MP_KEY_KP0, "KP0" },
{ MP_KEY_KP1, "KP1" },
{ MP_KEY_KP2, "KP2" },
{ MP_KEY_KP3, "KP3" },
{ MP_KEY_KP4, "KP4" },
{ MP_KEY_KP5, "KP5" },
{ MP_KEY_KP6, "KP6" },
{ MP_KEY_KP7, "KP7" },
{ MP_KEY_KP8, "KP8" },
{ MP_KEY_KP9, "KP9" },
{ MP_KEY_KPDEL, "KP_DEL" },
{ MP_KEY_KPDEC, "KP_DEC" },
{ MP_KEY_KPINS, "KP_INS" },
{ MP_KEY_KPHOME, "KP_HOME" },
{ MP_KEY_KPEND, "KP_END" },
{ MP_KEY_KPPGUP, "KP_PGUP" },
{ MP_KEY_KPPGDOWN, "KP_PGDWN" },
{ MP_KEY_KPRIGHT, "KP_RIGHT" },
{ MP_KEY_KPLEFT, "KP_LEFT" },
{ MP_KEY_KPDOWN, "KP_DOWN" },
{ MP_KEY_KPUP, "KP_UP" },
{ MP_KEY_KPENTER, "KP_ENTER" },
{ MP_MBTN_LEFT, "MBTN_LEFT" },
{ MP_MBTN_MID, "MBTN_MID" },
{ MP_MBTN_RIGHT, "MBTN_RIGHT" },
{ MP_WHEEL_UP, "WHEEL_UP" },
{ MP_WHEEL_DOWN, "WHEEL_DOWN" },
{ MP_WHEEL_LEFT, "WHEEL_LEFT" },
{ MP_WHEEL_RIGHT, "WHEEL_RIGHT" },
{ MP_MBTN_BACK, "MBTN_BACK" },
{ MP_MBTN_FORWARD, "MBTN_FORWARD" },
{ MP_MBTN9, "MBTN9" },
{ MP_MBTN10, "MBTN10" },
{ MP_MBTN11, "MBTN11" },
{ MP_MBTN12, "MBTN12" },
{ MP_MBTN13, "MBTN13" },
{ MP_MBTN14, "MBTN14" },
{ MP_MBTN15, "MBTN15" },
{ MP_MBTN16, "MBTN16" },
{ MP_MBTN17, "MBTN17" },
{ MP_MBTN18, "MBTN18" },
{ MP_MBTN19, "MBTN19" },
{ MP_MBTN_LEFT_DBL, "MBTN_LEFT_DBL" },
{ MP_MBTN_MID_DBL, "MBTN_MID_DBL" },
{ MP_MBTN_RIGHT_DBL, "MBTN_RIGHT_DBL" },
{ MP_KEY_GAMEPAD_ACTION_DOWN, "GAMEPAD_ACTION_DOWN" },
{ MP_KEY_GAMEPAD_ACTION_RIGHT, "GAMEPAD_ACTION_RIGHT" },
{ MP_KEY_GAMEPAD_ACTION_LEFT, "GAMEPAD_ACTION_LEFT" },
{ MP_KEY_GAMEPAD_ACTION_UP, "GAMEPAD_ACTION_UP" },
{ MP_KEY_GAMEPAD_BACK, "GAMEPAD_BACK" },
{ MP_KEY_GAMEPAD_MENU, "GAMEPAD_MENU" },
{ MP_KEY_GAMEPAD_START, "GAMEPAD_START" },
{ MP_KEY_GAMEPAD_LEFT_SHOULDER, "GAMEPAD_LEFT_SHOULDER" },
{ MP_KEY_GAMEPAD_RIGHT_SHOULDER, "GAMEPAD_RIGHT_SHOULDER" },
{ MP_KEY_GAMEPAD_LEFT_TRIGGER, "GAMEPAD_LEFT_TRIGGER" },
{ MP_KEY_GAMEPAD_RIGHT_TRIGGER, "GAMEPAD_RIGHT_TRIGGER" },
{ MP_KEY_GAMEPAD_LEFT_STICK, "GAMEPAD_LEFT_STICK" },
{ MP_KEY_GAMEPAD_RIGHT_STICK, "GAMEPAD_RIGHT_STICK" },
{ MP_KEY_GAMEPAD_DPAD_UP, "GAMEPAD_DPAD_UP" },
{ MP_KEY_GAMEPAD_DPAD_DOWN, "GAMEPAD_DPAD_DOWN" },
{ MP_KEY_GAMEPAD_DPAD_LEFT, "GAMEPAD_DPAD_LEFT" },
{ MP_KEY_GAMEPAD_DPAD_RIGHT, "GAMEPAD_DPAD_RIGHT" },
{ MP_KEY_GAMEPAD_LEFT_STICK_UP, "GAMEPAD_LEFT_STICK_UP" },
{ MP_KEY_GAMEPAD_LEFT_STICK_DOWN, "GAMEPAD_LEFT_STICK_DOWN" },
{ MP_KEY_GAMEPAD_LEFT_STICK_LEFT, "GAMEPAD_LEFT_STICK_LEFT" },
{ MP_KEY_GAMEPAD_LEFT_STICK_RIGHT, "GAMEPAD_LEFT_STICK_RIGHT" },
{ MP_KEY_GAMEPAD_RIGHT_STICK_UP, "GAMEPAD_RIGHT_STICK_UP" },
{ MP_KEY_GAMEPAD_RIGHT_STICK_DOWN, "GAMEPAD_RIGHT_STICK_DOWN" },
{ MP_KEY_GAMEPAD_RIGHT_STICK_LEFT, "GAMEPAD_RIGHT_STICK_LEFT" },
{ MP_KEY_GAMEPAD_RIGHT_STICK_RIGHT, "GAMEPAD_RIGHT_STICK_RIGHT" },
{ MP_KEY_GAMEPAD_ACTION_DOWN, "GAMEPAD_ACTION_DOWN" },
{ MP_KEY_GAMEPAD_ACTION_RIGHT, "GAMEPAD_ACTION_RIGHT" },
{ MP_KEY_GAMEPAD_ACTION_LEFT, "GAMEPAD_ACTION_LEFT" },
{ MP_KEY_GAMEPAD_ACTION_UP, "GAMEPAD_ACTION_UP" },
{ MP_KEY_GAMEPAD_BACK, "GAMEPAD_BACK" },
{ MP_KEY_GAMEPAD_MENU, "GAMEPAD_MENU" },
{ MP_KEY_GAMEPAD_START, "GAMEPAD_START" },
{ MP_KEY_GAMEPAD_LEFT_SHOULDER, "GAMEPAD_LEFT_SHOULDER" },
{ MP_KEY_GAMEPAD_RIGHT_SHOULDER, "GAMEPAD_RIGHT_SHOULDER" },
{ MP_KEY_GAMEPAD_LEFT_TRIGGER, "GAMEPAD_LEFT_TRIGGER" },
{ MP_KEY_GAMEPAD_RIGHT_TRIGGER, "GAMEPAD_RIGHT_TRIGGER" },
{ MP_KEY_GAMEPAD_LEFT_STICK, "GAMEPAD_LEFT_STICK" },
{ MP_KEY_GAMEPAD_RIGHT_STICK, "GAMEPAD_RIGHT_STICK" },
{ MP_KEY_GAMEPAD_DPAD_UP, "GAMEPAD_DPAD_UP" },
{ MP_KEY_GAMEPAD_DPAD_DOWN, "GAMEPAD_DPAD_DOWN" },
{ MP_KEY_GAMEPAD_DPAD_LEFT, "GAMEPAD_DPAD_LEFT" },
{ MP_KEY_GAMEPAD_DPAD_RIGHT, "GAMEPAD_DPAD_RIGHT" },
{ MP_KEY_GAMEPAD_LEFT_STICK_UP, "GAMEPAD_LEFT_STICK_UP" },
{ MP_KEY_GAMEPAD_LEFT_STICK_DOWN, "GAMEPAD_LEFT_STICK_DOWN" },
{ MP_KEY_GAMEPAD_LEFT_STICK_LEFT, "GAMEPAD_LEFT_STICK_LEFT" },
{ MP_KEY_GAMEPAD_LEFT_STICK_RIGHT, "GAMEPAD_LEFT_STICK_RIGHT" },
{ MP_KEY_GAMEPAD_RIGHT_STICK_UP, "GAMEPAD_RIGHT_STICK_UP" },
{ MP_KEY_GAMEPAD_RIGHT_STICK_DOWN, "GAMEPAD_RIGHT_STICK_DOWN" },
{ MP_KEY_GAMEPAD_RIGHT_STICK_LEFT, "GAMEPAD_RIGHT_STICK_LEFT" },
{ MP_KEY_GAMEPAD_RIGHT_STICK_RIGHT, "GAMEPAD_RIGHT_STICK_RIGHT" },
{ MP_KEY_POWER, "POWER" },
{ MP_KEY_MENU, "MENU" },
{ MP_KEY_PLAY, "PLAY" },
{ MP_KEY_PAUSE, "PAUSE" },
{ MP_KEY_PLAYPAUSE, "PLAYPAUSE" },
{ MP_KEY_STOP, "STOP" },
{ MP_KEY_FORWARD, "FORWARD" },
{ MP_KEY_REWIND, "REWIND" },
{ MP_KEY_NEXT, "NEXT" },
{ MP_KEY_PREV, "PREV" },
{ MP_KEY_VOLUME_UP, "VOLUME_UP" },
{ MP_KEY_VOLUME_DOWN, "VOLUME_DOWN" },
{ MP_KEY_MUTE, "MUTE" },
{ MP_KEY_HOMEPAGE, "HOMEPAGE" },
{ MP_KEY_WWW, "WWW" },
{ MP_KEY_MAIL, "MAIL" },
{ MP_KEY_FAVORITES, "FAVORITES" },
{ MP_KEY_SEARCH, "SEARCH" },
{ MP_KEY_SLEEP, "SLEEP" },
{ MP_KEY_CANCEL, "CANCEL" },
{ MP_KEY_RECORD, "RECORD" },
{ MP_KEY_CHANNEL_UP, "CHANNEL_UP" },
{ MP_KEY_CHANNEL_DOWN,"CHANNEL_DOWN" },
{ MP_KEY_PLAYONLY, "PLAYONLY" },
{ MP_KEY_PAUSEONLY, "PAUSEONLY" },
{ MP_KEY_GO_BACK, "GO_BACK" },
{ MP_KEY_GO_FORWARD, "GO_FORWARD" },
{ MP_KEY_TOOLS, "TOOLS" },
{ MP_KEY_ZOOMIN, "ZOOMIN" },
{ MP_KEY_ZOOMOUT, "ZOOMOUT" },
{ MP_KEY_POWER, "POWER" },
{ MP_KEY_MENU, "MENU" },
{ MP_KEY_PLAY, "PLAY" },
{ MP_KEY_PAUSE, "PAUSE" },
{ MP_KEY_PLAYPAUSE, "PLAYPAUSE" },
{ MP_KEY_STOP, "STOP" },
{ MP_KEY_FORWARD, "FORWARD" },
{ MP_KEY_REWIND, "REWIND" },
{ MP_KEY_NEXT, "NEXT" },
{ MP_KEY_PREV, "PREV" },
{ MP_KEY_VOLUME_UP, "VOLUME_UP" },
{ MP_KEY_VOLUME_DOWN, "VOLUME_DOWN" },
{ MP_KEY_MUTE, "MUTE" },
{ MP_KEY_HOMEPAGE, "HOMEPAGE" },
{ MP_KEY_WWW, "WWW" },
{ MP_KEY_MAIL, "MAIL" },
{ MP_KEY_FAVORITES, "FAVORITES" },
{ MP_KEY_SEARCH, "SEARCH" },
{ MP_KEY_SLEEP, "SLEEP" },
{ MP_KEY_CANCEL, "CANCEL" },
{ MP_KEY_RECORD, "RECORD" },
{ MP_KEY_CHANNEL_UP, "CHANNEL_UP" },
{ MP_KEY_CHANNEL_DOWN,"CHANNEL_DOWN" },
{ MP_KEY_PLAYONLY, "PLAYONLY" },
{ MP_KEY_PAUSEONLY, "PAUSEONLY" },
{ MP_KEY_GO_BACK, "GO_BACK" },
{ MP_KEY_GO_FORWARD, "GO_FORWARD" },
{ MP_KEY_TOOLS, "TOOLS" },
{ MP_KEY_ZOOMIN, "ZOOMIN" },
{ MP_KEY_ZOOMOUT, "ZOOMOUT" },
// These are kept for backward compatibility
{ MP_KEY_PAUSE, "XF86_PAUSE" },
{ MP_KEY_STOP, "XF86_STOP" },
{ MP_KEY_PREV, "XF86_PREV" },
{ MP_KEY_NEXT, "XF86_NEXT" },
// These are kept for backward compatibility
{ MP_KEY_PAUSE, "XF86_PAUSE" },
{ MP_KEY_STOP, "XF86_STOP" },
{ MP_KEY_PREV, "XF86_PREV" },
{ MP_KEY_NEXT, "XF86_NEXT" },
// Deprecated numeric aliases for the mouse buttons
{ MP_MBTN_LEFT, "MOUSE_BTN0" },
{ MP_MBTN_MID, "MOUSE_BTN1" },
{ MP_MBTN_RIGHT, "MOUSE_BTN2" },
{ MP_WHEEL_UP, "MOUSE_BTN3" },
{ MP_WHEEL_DOWN, "MOUSE_BTN4" },
{ MP_WHEEL_LEFT, "MOUSE_BTN5" },
{ MP_WHEEL_RIGHT, "MOUSE_BTN6" },
{ MP_MBTN_BACK, "MOUSE_BTN7" },
{ MP_MBTN_FORWARD, "MOUSE_BTN8" },
{ MP_MBTN9, "MOUSE_BTN9" },
{ MP_MBTN10, "MOUSE_BTN10" },
{ MP_MBTN11, "MOUSE_BTN11" },
{ MP_MBTN12, "MOUSE_BTN12" },
{ MP_MBTN13, "MOUSE_BTN13" },
{ MP_MBTN14, "MOUSE_BTN14" },
{ MP_MBTN15, "MOUSE_BTN15" },
{ MP_MBTN16, "MOUSE_BTN16" },
{ MP_MBTN17, "MOUSE_BTN17" },
{ MP_MBTN18, "MOUSE_BTN18" },
{ MP_MBTN19, "MOUSE_BTN19" },
{ MP_MBTN_LEFT_DBL, "MOUSE_BTN0_DBL" },
{ MP_MBTN_MID_DBL, "MOUSE_BTN1_DBL" },
{ MP_MBTN_RIGHT_DBL, "MOUSE_BTN2_DBL" },
{ MP_WHEEL_UP, "AXIS_UP" },
{ MP_WHEEL_DOWN, "AXIS_DOWN" },
{ MP_WHEEL_LEFT, "AXIS_LEFT" },
{ MP_WHEEL_RIGHT, "AXIS_RIGHT" },
// Deprecated numeric aliases for the mouse buttons
{ MP_MBTN_LEFT, "MOUSE_BTN0" },
{ MP_MBTN_MID, "MOUSE_BTN1" },
{ MP_MBTN_RIGHT, "MOUSE_BTN2" },
{ MP_WHEEL_UP, "MOUSE_BTN3" },
{ MP_WHEEL_DOWN, "MOUSE_BTN4" },
{ MP_WHEEL_LEFT, "MOUSE_BTN5" },
{ MP_WHEEL_RIGHT, "MOUSE_BTN6" },
{ MP_MBTN_BACK, "MOUSE_BTN7" },
{ MP_MBTN_FORWARD, "MOUSE_BTN8" },
{ MP_MBTN9, "MOUSE_BTN9" },
{ MP_MBTN10, "MOUSE_BTN10" },
{ MP_MBTN11, "MOUSE_BTN11" },
{ MP_MBTN12, "MOUSE_BTN12" },
{ MP_MBTN13, "MOUSE_BTN13" },
{ MP_MBTN14, "MOUSE_BTN14" },
{ MP_MBTN15, "MOUSE_BTN15" },
{ MP_MBTN16, "MOUSE_BTN16" },
{ MP_MBTN17, "MOUSE_BTN17" },
{ MP_MBTN18, "MOUSE_BTN18" },
{ MP_MBTN19, "MOUSE_BTN19" },
{ MP_MBTN_LEFT_DBL, "MOUSE_BTN0_DBL" },
{ MP_MBTN_MID_DBL, "MOUSE_BTN1_DBL" },
{ MP_MBTN_RIGHT_DBL, "MOUSE_BTN2_DBL" },
{ MP_WHEEL_UP, "AXIS_UP" },
{ MP_WHEEL_DOWN, "AXIS_DOWN" },
{ MP_WHEEL_LEFT, "AXIS_LEFT" },
{ MP_WHEEL_RIGHT, "AXIS_RIGHT" },
{ MP_KEY_CLOSE_WIN, "CLOSE_WIN" },
{ MP_KEY_MOUSE_MOVE, "MOUSE_MOVE" },
{ MP_KEY_MOUSE_LEAVE, "MOUSE_LEAVE" },
{ MP_KEY_MOUSE_ENTER, "MOUSE_ENTER" },
{ MP_KEY_CLOSE_WIN, "CLOSE_WIN" },
{ MP_KEY_MOUSE_MOVE, "MOUSE_MOVE" },
{ MP_KEY_MOUSE_LEAVE, "MOUSE_LEAVE" },
{ MP_KEY_MOUSE_ENTER, "MOUSE_ENTER" },
{ MP_KEY_UNMAPPED, "UNMAPPED" },
{ MP_KEY_ANY_UNICODE, "ANY_UNICODE" },
{ MP_KEY_UNMAPPED, "UNMAPPED" },
{ MP_KEY_ANY_UNICODE, "ANY_UNICODE" },
{ 0, NULL }
{ 0, NULL }
};
static const struct key_name modifier_names[] = {

View File

@ -165,7 +165,7 @@ bstr mp_iconv_to_utf8(struct mp_log *log, bstr buf, const char *cp, int flags)
// Force CP949 over EUC-KR since iconv distinguishes them and
// EUC-KR causes error on CP949 encoded data
if (strcasecmp(cp, "EUC-KR") == 0)
cp = "CP949";
cp = "CP949";
iconv_t icdsc;
if ((icdsc = iconv_open("UTF-8", cp)) == (iconv_t) (-1)) {

View File

@ -4100,7 +4100,7 @@ static const struct m_property mp_properties_base[] = {
// Subs
{"sid", property_switch_track, .priv = (void *)(const int[]){0, STREAM_SUB}},
{"secondary-sid", property_switch_track,
.priv = (void *)(const int[]){1, STREAM_SUB}},
.priv = (void *)(const int[]){1, STREAM_SUB}},
{"sub-delay", mp_property_sub_delay, .priv = (void *)&(const int){0}},
{"secondary-sub-delay", mp_property_sub_delay,
.priv = (void *)&(const int){1}},
@ -4732,9 +4732,9 @@ static void cmd_overlay_add(void *pcmd)
int dw = cmd->args[9].v.i, dh = cmd->args[10].v.i;
if (dw <= 0)
dw = w;
dw = w;
if (dh <= 0)
dh = h;
dh = h;
if (strcmp(fmt, "bgra") != 0) {
MP_ERR(mpctx, "overlay-add: unsupported OSD format '%s'\n", fmt);
goto error;

View File

@ -80,9 +80,9 @@ static const char def_config[] =
#endif
enum exit_reason {
EXIT_NONE,
EXIT_NORMAL,
EXIT_ERROR,
EXIT_NONE,
EXIT_NORMAL,
EXIT_ERROR,
};
const char mp_help_text[] =

View File

@ -920,9 +920,9 @@ static int dvb_open(stream_t *stream)
mp_mutex_lock(&global_dvb_state_lock);
if (global_dvb_state && global_dvb_state->stream_used) {
MP_ERR(stream, "DVB stream already in use, only one DVB stream can exist at a time!\n");
mp_mutex_unlock(&global_dvb_state_lock);
goto err_out;
MP_ERR(stream, "DVB stream already in use, only one DVB stream can exist at a time!\n");
mp_mutex_unlock(&global_dvb_state_lock);
goto err_out;
}
// Need to re-get config in any case, not part of global state.

View File

@ -95,71 +95,71 @@ static const char *const mp_dvdnav_events[] = {
static void dvd_set_speed(stream_t *stream, char *device, unsigned speed)
{
#if defined(__linux__) && defined(SG_IO) && defined(GPCMD_SET_STREAMING)
int fd;
unsigned char buffer[28];
unsigned char cmd[12];
struct sg_io_hdr sghdr;
struct stat st;
int fd;
unsigned char buffer[28];
unsigned char cmd[12];
struct sg_io_hdr sghdr;
struct stat st;
memset(&st, 0, sizeof(st));
memset(&st, 0, sizeof(st));
if (stat(device, &st) == -1) return;
if (stat(device, &st) == -1) return;
if (!S_ISBLK(st.st_mode)) return; /* not a block device */
if (!S_ISBLK(st.st_mode)) return; /* not a block device */
switch (speed) {
case 0: /* don't touch speed setting */
return;
case -1: /* restore default value */
MP_INFO(stream, "Restoring DVD speed... ");
break;
default: /* limit to <speed> KB/s */
// speed < 100 is multiple of DVD single speed (1350KB/s)
if (speed < 100)
speed *= 1350;
MP_INFO(stream, "Limiting DVD speed to %dKB/s... ", speed);
break;
}
switch (speed) {
case 0: /* don't touch speed setting */
return;
case -1: /* restore default value */
MP_INFO(stream, "Restoring DVD speed... ");
break;
default: /* limit to <speed> KB/s */
// speed < 100 is multiple of DVD single speed (1350KB/s)
if (speed < 100)
speed *= 1350;
MP_INFO(stream, "Limiting DVD speed to %dKB/s... ", speed);
break;
}
memset(&sghdr, 0, sizeof(sghdr));
sghdr.interface_id = 'S';
sghdr.timeout = 5000;
sghdr.dxfer_direction = SG_DXFER_TO_DEV;
sghdr.dxfer_len = sizeof(buffer);
sghdr.dxferp = buffer;
sghdr.cmd_len = sizeof(cmd);
sghdr.cmdp = cmd;
memset(&sghdr, 0, sizeof(sghdr));
sghdr.interface_id = 'S';
sghdr.timeout = 5000;
sghdr.dxfer_direction = SG_DXFER_TO_DEV;
sghdr.dxfer_len = sizeof(buffer);
sghdr.dxferp = buffer;
sghdr.cmd_len = sizeof(cmd);
sghdr.cmdp = cmd;
memset(cmd, 0, sizeof(cmd));
cmd[0] = GPCMD_SET_STREAMING;
cmd[10] = sizeof(buffer);
memset(cmd, 0, sizeof(cmd));
cmd[0] = GPCMD_SET_STREAMING;
cmd[10] = sizeof(buffer);
memset(buffer, 0, sizeof(buffer));
/* first sector 0, last sector 0xffffffff */
AV_WB32(buffer + 8, 0xffffffff);
if (speed == -1)
buffer[0] = 4; /* restore default */
else {
/* <speed> kilobyte */
AV_WB32(buffer + 12, speed);
AV_WB32(buffer + 20, speed);
}
/* 1 second */
AV_WB16(buffer + 18, 1000);
AV_WB16(buffer + 26, 1000);
memset(buffer, 0, sizeof(buffer));
/* first sector 0, last sector 0xffffffff */
AV_WB32(buffer + 8, 0xffffffff);
if (speed == -1)
buffer[0] = 4; /* restore default */
else {
/* <speed> kilobyte */
AV_WB32(buffer + 12, speed);
AV_WB32(buffer + 20, speed);
}
/* 1 second */
AV_WB16(buffer + 18, 1000);
AV_WB16(buffer + 26, 1000);
fd = open(device, O_RDWR | O_NONBLOCK | O_CLOEXEC);
if (fd == -1) {
MP_INFO(stream, "Couldn't open DVD device for writing, changing DVD speed needs write access.\n");
return;
}
fd = open(device, O_RDWR | O_NONBLOCK | O_CLOEXEC);
if (fd == -1) {
MP_INFO(stream, "Couldn't open DVD device for writing, changing DVD speed needs write access.\n");
return;
}
if (ioctl(fd, SG_IO, &sghdr) < 0)
MP_INFO(stream, "failed\n");
else
MP_INFO(stream, "successful\n");
if (ioctl(fd, SG_IO, &sghdr) < 0)
MP_INFO(stream, "failed\n");
else
MP_INFO(stream, "successful\n");
close(fd);
close(fd);
#endif
}

View File

@ -429,16 +429,16 @@ done:
}
const stream_info_t stream_info_ffmpeg = {
.name = "ffmpeg",
.open = open_f,
.protocols = (const char *const[]){
"rtmp", "rtsp", "rtsps", "http", "https", "mms", "mmst", "mmsh", "mmshttp",
"rtp", "httpproxy", "rtmpe", "rtmps", "rtmpt", "rtmpte", "rtmpts", "srt",
"rist", "srtp", "gopher", "gophers", "data", "ipfs", "ipns", "dav",
"davs", "webdav", "webdavs",
NULL },
.can_write = true,
.stream_origin = STREAM_ORIGIN_NET,
.name = "ffmpeg",
.open = open_f,
.protocols = (const char *const[]){
"rtmp", "rtsp", "rtsps", "http", "https", "mms", "mmst", "mmsh", "mmshttp",
"rtp", "httpproxy", "rtmpe", "rtmps", "rtmpt", "rtmpte", "rtmpts", "srt",
"rist", "srtp", "gopher", "gophers", "data", "ipfs", "ipns", "dav",
"davs", "webdav", "webdavs",
NULL },
.can_write = true,
.stream_origin = STREAM_ORIGIN_NET,
};
// Unlike above, this is not marked as safe, and can contain protocols which
@ -446,12 +446,12 @@ const stream_info_t stream_info_ffmpeg = {
// pseudo-demuxer, which in turn gives access to filters that can access the
// local filesystem.)
const stream_info_t stream_info_ffmpeg_unsafe = {
.name = "ffmpeg",
.open = open_f,
.protocols = (const char *const[]){
"lavf", "ffmpeg", "udp", "ftp", "tcp", "tls", "unix", "sftp", "md5",
"concat", "smb",
NULL },
.stream_origin = STREAM_ORIGIN_UNSAFE,
.can_write = true,
.name = "ffmpeg",
.open = open_f,
.protocols = (const char *const[]){
"lavf", "ffmpeg", "udp", "ftp", "tcp", "tls", "unix", "sftp", "md5",
"concat", "smb",
NULL },
.stream_origin = STREAM_ORIGIN_UNSAFE,
.can_write = true,
};

View File

@ -28,9 +28,9 @@
static int
mf_stream_open (stream_t *stream)
{
stream->demuxer = "mf";
stream->demuxer = "mf";
return STREAM_OK;
return STREAM_OK;
}
const stream_info_t stream_info_mf = {

View File

@ -24,7 +24,7 @@
static int open_s(stream_t *stream)
{
return 1;
return 1;
}
const stream_info_t stream_info_null = {

View File

@ -60,7 +60,7 @@ static int64_t get_size(struct stream *s)
if (size <= 0)
return size;
if (size <= p->slice_start)
return 0;
return 0;
if (p->slice_max_end)
size = MPMIN(size, p->slice_max_end);
return size - p->slice_start;
@ -122,7 +122,7 @@ static int parse_slice_range(stream_t *stream)
}
if (max_end_is_offset)
p->slice_max_end += p->slice_start;
p->slice_max_end += p->slice_start;
if (p->slice_max_end && p->slice_max_end < p->slice_start) {
MP_ERR(stream, "The byte range end (%"PRId64") can't be smaller than the start (%"PRId64"): '%s'\n",

View File

@ -220,7 +220,7 @@ static bool write_lavc(struct image_writer_ctx *ctx, mp_image_t *image, FILE *fp
}
if (avcodec_open2(avctx, codec, NULL) < 0) {
print_open_fail:
print_open_fail:
MP_ERR(ctx, "Could not open libavcodec encoder for saving images\n");
goto error_exit;
}
@ -260,11 +260,11 @@ error_exit:
static void write_jpeg_error_exit(j_common_ptr cinfo)
{
// NOTE: do not write error message, too much effort to connect the libjpeg
// log callbacks with mplayer's log function mp_msp()
// NOTE: do not write error message, too much effort to connect the libjpeg
// log callbacks with mplayer's log function mp_msp()
// Return control to the setjmp point
longjmp(*(jmp_buf*)cinfo->client_data, 1);
// Return control to the setjmp point
longjmp(*(jmp_buf*)cinfo->client_data, 1);
}
static bool write_jpeg(struct image_writer_ctx *ctx, mp_image_t *image, FILE *fp)

View File

@ -43,7 +43,7 @@ int drm_object_create_properties(struct mp_log *log, int fd,
return 0;
fail:
fail:
drm_object_free_properties(object);
return -1;
}
@ -68,43 +68,43 @@ void drm_object_free_properties(struct drm_object *object)
int drm_object_get_property(struct drm_object *object, char *name, uint64_t *value)
{
for (int i = 0; i < object->props->count_props; i++) {
if (strcasecmp(name, object->props_info[i]->name) == 0) {
*value = object->props->prop_values[i];
return 0;
}
}
for (int i = 0; i < object->props->count_props; i++) {
if (strcasecmp(name, object->props_info[i]->name) == 0) {
*value = object->props->prop_values[i];
return 0;
}
}
return -EINVAL;
return -EINVAL;
}
drmModePropertyBlobPtr drm_object_get_property_blob(struct drm_object *object, char *name)
{
uint64_t blob_id;
uint64_t blob_id;
if (!drm_object_get_property(object, name, &blob_id)) {
return drmModeGetPropertyBlob(object->fd, blob_id);
}
if (!drm_object_get_property(object, name, &blob_id)) {
return drmModeGetPropertyBlob(object->fd, blob_id);
}
return NULL;
return NULL;
}
int drm_object_set_property(drmModeAtomicReq *request, struct drm_object *object,
char *name, uint64_t value)
{
for (int i = 0; i < object->props->count_props; i++) {
if (strcasecmp(name, object->props_info[i]->name) == 0) {
if (object->props_info[i]->flags & DRM_MODE_PROP_IMMUTABLE) {
/* Do not try to set immutable values, as this might cause the
* atomic commit operation to fail. */
return -EINVAL;
}
return drmModeAtomicAddProperty(request, object->id,
object->props_info[i]->prop_id, value);
}
}
for (int i = 0; i < object->props->count_props; i++) {
if (strcasecmp(name, object->props_info[i]->name) == 0) {
if (object->props_info[i]->flags & DRM_MODE_PROP_IMMUTABLE) {
/* Do not try to set immutable values, as this might cause the
* atomic commit operation to fail. */
return -EINVAL;
}
return drmModeAtomicAddProperty(request, object->id,
object->props_info[i]->prop_id, value);
}
}
return -EINVAL;
return -EINVAL;
}
struct drm_object *drm_object_create(struct mp_log *log, int fd,

View File

@ -583,7 +583,7 @@ static bool setup_crtc(struct vo_drm_state *drm, const drmModeRes *res)
drm->connector->connector_id);
return false;
success:
success:
MP_VERBOSE(drm, "Selected Encoder %u with CRTC %u\n",
drm->encoder->encoder_id, drm->crtc_id);
return true;

View File

@ -86,13 +86,13 @@ int drm_prime_create_framebuffer(struct mp_log *log, int fd,
for (int plane = 0; plane < AV_DRM_MAX_PLANES; plane++) {
drm_prime_add_handle_ref(handle_refs, framebuffer->gem_handles[plane]);
}
}
}
return 0;
return 0;
fail:
memset(framebuffer, 0, sizeof(*framebuffer));
return -1;
memset(framebuffer, 0, sizeof(*framebuffer));
return -1;
}
void drm_prime_destroy_framebuffer(struct mp_log *log, int fd,

View File

@ -965,8 +965,8 @@ static void init_video(struct gl_video *p)
static struct dr_buffer *gl_find_dr_buffer(struct gl_video *p, uint8_t *ptr)
{
for (int i = 0; i < p->num_dr_buffers; i++) {
struct dr_buffer *buffer = &p->dr_buffers[i];
for (int i = 0; i < p->num_dr_buffers; i++) {
struct dr_buffer *buffer = &p->dr_buffers[i];
uint8_t *bufptr = buffer->buf->data;
size_t size = buffer->buf->params.size;
if (ptr >= bufptr && ptr < bufptr + size)

View File

@ -146,8 +146,8 @@ static bool cuda_ext_vk_init(struct ra_hwdec_mapper *mapper,
if (evk->vk_sem.sem == VK_NULL_HANDLE) {
ret = -1;
goto error;
}
// The returned FD or Handle is owned by the caller (us).
}
// The returned FD or Handle is owned by the caller (us).
CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC w_desc = {
#if HAVE_WIN32_DESKTOP
@ -232,8 +232,8 @@ static bool cuda_ext_vk_wait(const struct ra_hwdec_mapper *mapper, int n)
.value = evk->vk_sem.value
}
}
};
ret = CHECK_CU(cu->cuWaitExternalSemaphoresAsync(&evk->cuda_sem,
};
ret = CHECK_CU(cu->cuWaitExternalSemaphoresAsync(&evk->cuda_sem,
&wp, 1, 0));
return ret == 0;
}

View File

@ -241,7 +241,7 @@ static int mapper_init(struct ra_hwdec_mapper *mapper)
if (mapper->ra->num_formats &&
!ra_get_imgfmt_desc(mapper->ra, mapper->dst_params.imgfmt, &desc))
return -1;
return -1;
p->num_planes = desc.num_planes;
mp_image_set_params(&p->layout, &mapper->dst_params);

View File

@ -759,7 +759,7 @@ static int preinit(struct vo *vo)
wl_list_init(&p->buffer_list);
wl_list_init(&p->osd_buffer_list);
if (!p->ctx)
goto err;
goto err;
assert(p->ctx->ra);

View File

@ -866,7 +866,7 @@ static int preinit(struct vo *vo)
"You should fix your graphics drivers, or not force the xv VO.\n");
return 0;
error:
error:
uninit(vo); // free resources
return -1;
}

View File

@ -1721,7 +1721,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam,
adjust_window_rect(w32, w32->window, &r);
NCCALCSIZE_PARAMS *p = (LPNCCALCSIZE_PARAMS)lParam;
p->rgrc[0].top += r.top + get_title_bar_height(w32);
}
}
break;
case WM_IME_STARTCOMPOSITION: {
HIMC imc = ImmGetContext(w32->window);

View File

@ -1827,10 +1827,10 @@ static void guess_focus(struct vo_wayland_state *wl)
if ((!wl->focused && wl->activated && has_keyboard_input) ||
(wl->focused && !wl->activated))
{
wl->focused = !wl->focused;
wl->pending_vo_events |= VO_EVENT_FOCUS;
}
{
wl->focused = !wl->focused;
wl->pending_vo_events |= VO_EVENT_FOCUS;
}
}
static struct vo_wayland_output *find_output(struct vo_wayland_state *wl)