From ad18a33f5876be0c791bc394348a8333c50317b5 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 7 Jan 2012 18:16:12 +0100 Subject: core: remove EDL muting I'm not sure what's the point of this feature. Aside from that, the EDL code is relatively buggy anyway, and I see no reason why such an obscure feature should be left in, if it possibly causes bugs. --- command.c | 17 ----------------- mp_core.h | 3 --- mplayer.c | 25 +------------------------ 3 files changed, 1 insertion(+), 44 deletions(-) diff --git a/command.c b/command.c index 414fd1e33b..1234c0847d 100644 --- a/command.c +++ b/command.c @@ -721,10 +721,6 @@ static int mp_property_volume(m_option_t *prop, int action, void *arg, return M_PROPERTY_NOT_IMPLEMENTED; } - if (mpctx->edl_muted) - return M_PROPERTY_DISABLED; - mpctx->user_muted = 0; - switch (action) { case M_PROPERTY_SET: if (!arg) @@ -758,27 +754,14 @@ static int mp_property_mute(m_option_t *prop, int action, void *arg, switch (action) { case M_PROPERTY_SET: - if (mpctx->edl_muted) - return M_PROPERTY_DISABLED; if (!arg) return M_PROPERTY_ERROR; mixer_setmuted(&mpctx->mixer, *(int *) arg); - mpctx->user_muted = mixer_getmuted(&mpctx->mixer); return M_PROPERTY_OK; case M_PROPERTY_STEP_UP: case M_PROPERTY_STEP_DOWN: - if (mpctx->edl_muted) - return M_PROPERTY_DISABLED; mixer_mute(&mpctx->mixer); - mpctx->user_muted = mixer_getmuted(&mpctx->mixer); return M_PROPERTY_OK; - case M_PROPERTY_PRINT: - if (!arg) - return M_PROPERTY_ERROR; - if (mpctx->edl_muted) { - *(char **) arg = talloc_strdup(NULL, mp_gtext("enabled (EDL)")); - return M_PROPERTY_OK; - } default: return m_property_flag_ro(prop, action, arg, mixer_getmuted(&mpctx->mixer)); diff --git a/mp_core.h b/mp_core.h index 8b36465c5f..cef398dea2 100644 --- a/mp_core.h +++ b/mp_core.h @@ -187,9 +187,6 @@ typedef struct MPContext { double last_chapter_pts; float begin_skip; ///< start time of the current skip while on edlout mode - // audio is muted if either EDL or user activates mute - short edl_muted; ///< Stores whether EDL is currently in muted mode. - short user_muted; ///< Stores whether user wanted muted mode. int global_sub_size; // this encompasses all subtitle sources int global_sub_pos; // this encompasses all subtitle sources diff --git a/mplayer.c b/mplayer.c index fb1638bbd0..b33c36af00 100644 --- a/mplayer.c +++ b/mplayer.c @@ -3107,25 +3107,6 @@ static void pause_loop(struct MPContext *mpctx) } } - -// Find the right mute status and record position for new file position -static void edl_seek_reset(MPContext *mpctx) -{ - mpctx->edl_muted = 0; - next_edl_record = edl_records; - - while (next_edl_record) { - if (next_edl_record->start_sec >= get_current_time(mpctx)) - break; - - if (next_edl_record->action == EDL_MUTE) - mpctx->edl_muted = !mpctx->edl_muted; - next_edl_record = next_edl_record->next; - } - mixer_setmuted(&mpctx->mixer, mpctx->edl_muted || mpctx->user_muted); -} - - // Execute EDL command for the current position if one exists static void edl_update(MPContext *mpctx) { @@ -3149,9 +3130,7 @@ static void edl_update(MPContext *mpctx) "[%f], length [%f]\n", next_edl_record->start_sec, next_edl_record->stop_sec, next_edl_record->length_sec); } else if (next_edl_record->action == EDL_MUTE) { - mpctx->edl_muted = !mpctx->edl_muted; - mixer_setmuted(&mpctx->mixer, mpctx->edl_muted || mpctx->user_muted); - mp_msg(MSGT_CPLAYER, MSGL_DBG4, "EDL_MUTE: [%f]\n", + mp_msg(MSGT_CPLAYER, MSGL_DBG4, "EDL_MUTE: [%f] ignored\n", next_edl_record->start_sec); } next_edl_record = next_edl_record->next; @@ -3205,8 +3184,6 @@ static void seek_reset(struct MPContext *mpctx, bool reset_ao) vobsub_seek(vo_vobsub, mpctx->sh_video->pts); } - edl_seek_reset(mpctx); - mpctx->hrseek_active = false; mpctx->hrseek_framedrop = false; mpctx->total_avsync_change = 0; -- cgit v1.2.3