Mercurial > mplayer.hg
changeset 32690:55953c41f4ae
Add size based support for -endpos in MPlayer.
author | cboesch |
---|---|
date | Mon, 10 Jan 2011 19:18:51 +0000 |
parents | 5f505a260e9c |
children | 98ddd06f0e9b |
files | DOCS/man/en/mplayer.1 help/help_mp-cs.h help/help_mp-de.h help/help_mp-en.h help/help_mp-es.h help/help_mp-fr.h help/help_mp-hu.h help/help_mp-it.h help/help_mp-pl.h help/help_mp-ru.h help/help_mp-tr.h help/help_mp-uk.h help/help_mp-zh_CN.h help/help_mp-zh_TW.h mplayer.c |
diffstat | 15 files changed, 6 insertions(+), 25 deletions(-) [+] |
line wrap: on
line diff
--- a/DOCS/man/en/mplayer.1 Sun Jan 09 20:21:45 2011 +0000 +++ b/DOCS/man/en/mplayer.1 Mon Jan 10 19:18:51 2011 +0000 @@ -1552,8 +1552,7 @@ Stop at given time or byte position. .br .I NOTE: -Byte position is enabled only for MEncoder and will not be accurate, as it can -only stop at a frame boundary. +Byte position may not be accurate, as it can only stop at a frame boundary. When used in conjunction with \-ss option, \-endpos time will shift forward by seconds specified with \-ss. .sp 1
--- a/help/help_mp-cs.h Sun Jan 09 20:21:45 2011 +0000 +++ b/help/help_mp-cs.h Mon Jan 10 19:18:51 2011 +0000 @@ -190,7 +190,6 @@ #define MSGTR_EdloutBadStop "EDL: Vynechání zrušeno, poslední start > stop\n" #define MSGTR_EdloutStartSkip "EDL: Začátek vynechaného bloku, stiskněte znovu 'i' pro ukončení bloku.\n" #define MSGTR_EdloutEndSkip "EDL: Konec vynechaného bloku, řádek zapsán.\n" -#define MSGTR_MPEndposNoSizeBased "Volba -endpos v MPlayeru zatím nepodporuje rozměrové jednotky.\n" // mplayer.c OSD #define MSGTR_OSDenabled "zapnuto"
--- a/help/help_mp-de.h Sun Jan 09 20:21:45 2011 +0000 +++ b/help/help_mp-de.h Mon Jan 10 19:18:51 2011 +0000 @@ -207,7 +207,6 @@ #define MSGTR_EdloutBadStop "EDL-Sprung abgebrochen, letzter Start > Stop\n" #define MSGTR_EdloutStartSkip "EDL-Sprung begonnen, drücke 'i' erneut, um den Block zu beenden.\n" #define MSGTR_EdloutEndSkip "EDL-Sprung beendet, Zeile geschrieben.\n" -#define MSGTR_MPEndposNoSizeBased "Die Option -endpos unterstützt für MPlayer noch keine Größenangaben.\n" // mplayer.c OSD #define MSGTR_OSDenabled "aktiviert"
--- a/help/help_mp-en.h Sun Jan 09 20:21:45 2011 +0000 +++ b/help/help_mp-en.h Mon Jan 10 19:18:51 2011 +0000 @@ -199,7 +199,6 @@ #define MSGTR_EdloutBadStop "EDL skip canceled, last start > stop\n" #define MSGTR_EdloutStartSkip "EDL skip start, press 'i' again to end block.\n" #define MSGTR_EdloutEndSkip "EDL skip end, line written.\n" -#define MSGTR_MPEndposNoSizeBased "Option -endpos in MPlayer does not yet support size units.\n" // mplayer.c OSD #define MSGTR_OSDenabled "enabled"
--- a/help/help_mp-es.h Sun Jan 09 20:21:45 2011 +0000 +++ b/help/help_mp-es.h Mon Jan 10 19:18:51 2011 +0000 @@ -206,7 +206,6 @@ #define MSGTR_EdloutBadStop "EDL skip cancelado, último comienzo > parada\n" #define MSGTR_EdloutStartSkip "EDL skip comenzado, presione 'i' denuevo para terminar con el bloque.\n" #define MSGTR_EdloutEndSkip "EDL skip terminado, operación guardada.\n" -#define MSGTR_MPEndposNoSizeBased "La opción -endpos en MPlayer aun no soporta unidades de tamaño.\n" // mplayer.c OSD #define MSGTR_OSDenabled "habilitado"
--- a/help/help_mp-fr.h Sun Jan 09 20:21:45 2011 +0000 +++ b/help/help_mp-fr.h Mon Jan 10 19:18:51 2011 +0000 @@ -194,7 +194,6 @@ #define MSGTR_EdloutBadStop "Saut EDL annulé, dernier début > arrêt\n" #define MSGTR_EdloutStartSkip "EDL saute le début, presse 'i' encore une fois pour fin du bloc.\n" #define MSGTR_EdloutEndSkip "EDL saute la fin, ligne écrite.\n" -#define MSGTR_MPEndposNoSizeBased "Option -endpos dans MPlayer ne supporte pas encore les unités de taille.\n" // mplayer.c OSD
--- a/help/help_mp-hu.h Sun Jan 09 20:21:45 2011 +0000 +++ b/help/help_mp-hu.h Mon Jan 10 19:18:51 2011 +0000 @@ -199,7 +199,6 @@ #define MSGTR_EdloutBadStop "EDL skip visszavonva, az utolsó start > stop\n" #define MSGTR_EdloutStartSkip "EDL skip eleje, nyomd meg az 'i'-t a blokk befejezéséhez.\n" #define MSGTR_EdloutEndSkip "EDL skip vége, a sor kiírva.\n" -#define MSGTR_MPEndposNoSizeBased "Az MPlayer -endpos opciója jelenleg még nem támogatja a méretbeli megadást.\n" // mplayer.c OSD #define MSGTR_OSDenabled "bekapcsolva"
--- a/help/help_mp-it.h Sun Jan 09 20:21:45 2011 +0000 +++ b/help/help_mp-it.h Mon Jan 10 19:18:51 2011 +0000 @@ -197,7 +197,6 @@ #define MSGTR_EdloutBadStop "Salto EDL ingnorato, ultimo start > stop\n" #define MSGTR_EdloutStartSkip "Tempo di start EDL impostato, ripremere 'i' per impostare lo stop.\n" #define MSGTR_EdloutEndSkip "Fine del blocco EDL, riga scritta.\n" -#define MSGTR_MPEndposNoSizeBased "L'opzione -endpos in MPlayer non supporta ancora unità di mis. di dimensione.\n" // mplayer.c OSD #define MSGTR_OSDenabled "abilitat"
--- a/help/help_mp-pl.h Sun Jan 09 20:21:45 2011 +0000 +++ b/help/help_mp-pl.h Mon Jan 10 19:18:51 2011 +0000 @@ -189,7 +189,6 @@ #define MSGTR_EdloutBadStop "Pominięcie EDL odwołane, ostatni start > stop\n" #define MSGTR_EdloutStartSkip "Pominięcie EDL rozpoczęte, wciśnij ponownie 'i' by zakończyć blok.\n" #define MSGTR_EdloutEndSkip "Pominięcie EDL zakończone, wiersz zapisany.\n" -#define MSGTR_MPEndposNoSizeBased "Opcja MPlayer -endpos nie obsługuje jeszcze jednostek rozmiaru.\n" // mplayer.c OSD
--- a/help/help_mp-ru.h Sun Jan 09 20:21:45 2011 +0000 +++ b/help/help_mp-ru.h Mon Jan 10 19:18:51 2011 +0000 @@ -191,7 +191,6 @@ #define MSGTR_EdloutBadStop "EDL пропуск отменён, последний start > stop\n" #define MSGTR_EdloutStartSkip "Начало EDL пропуска, нажмите 'i' ещё раз для завершения блока.\n" #define MSGTR_EdloutEndSkip "Конец EDL пропуска, строка записана.\n" -#define MSGTR_MPEndposNoSizeBased "В MPlayer опция -endpos пока не поддерживает единицы размера.\n" // mplayer.c OSD #define MSGTR_OSDenabled "включено"
--- a/help/help_mp-tr.h Sun Jan 09 20:21:45 2011 +0000 +++ b/help/help_mp-tr.h Mon Jan 10 19:18:51 2011 +0000 @@ -194,7 +194,6 @@ #define MSGTR_EdloutStartSkip "EDL atlaması başlangıcı, bloğu bitirmek için\n"\ "'i' tuşuna tekrar basın.\n" #define MSGTR_EdloutEndSkip "EDL atlaması sonu, satır yazıldı.\n" -#define MSGTR_MPEndposNoSizeBased "MPlayer'da -endpos seçeneği henüz boyut birimlerini desteklemiyor.\n" // mplayer.c OSD
--- a/help/help_mp-uk.h Sun Jan 09 20:21:45 2011 +0000 +++ b/help/help_mp-uk.h Mon Jan 10 19:18:51 2011 +0000 @@ -185,7 +185,6 @@ #define MSGTR_EdloutBadStop "Ігнорування EDL відмінено, останній start > stop\n" #define MSGTR_EdloutStartSkip "Старт EDL пропуску, натисніть 'i' знов, щоб завершити блок.\n" #define MSGTR_EdloutEndSkip "Кінець EDL пропуску, рядок записано.\n" -#define MSGTR_MPEndposNoSizeBased "Опція -endpos у MPlayer ще не підтримує одиниці ромзіру.\n" // mplayer.c OSD #define MSGTR_OSDenabled "увімкнено"
--- a/help/help_mp-zh_CN.h Sun Jan 09 20:21:45 2011 +0000 +++ b/help/help_mp-zh_CN.h Mon Jan 10 19:18:51 2011 +0000 @@ -196,7 +196,6 @@ #define MSGTR_EdloutBadStop "取消 EDL 跳跃,上一个开始位置 > 停止位置\n" #define MSGTR_EdloutStartSkip "开始 EDL 跳跃,再按键‘i’以指定跳过内容的结尾。\n" #define MSGTR_EdloutEndSkip "结束 EDL 跳跃,文本行已写入。\n" -#define MSGTR_MPEndposNoSizeBased "MPlayer 的选项 -endpos 还不支持指定尺寸大小的单位。\n" // mplayer.c OSD #define MSGTR_OSDenabled "已启用"
--- a/help/help_mp-zh_TW.h Sun Jan 09 20:21:45 2011 +0000 +++ b/help/help_mp-zh_TW.h Mon Jan 10 19:18:51 2011 +0000 @@ -193,7 +193,6 @@ #define MSGTR_EdloutBadStop "EDL 跳躍已取消, 上次開始位置 > 停止位置\n" #define MSGTR_EdloutStartSkip "EDL 跳躍開始, 再按鍵 'i' 以停止。\n" #define MSGTR_EdloutEndSkip "EDL 跳躍結束, 綫已寫入。\n" -#define MSGTR_MPEndposNoSizeBased "MPlayer 的選項 -endpos 還不支持大小單位。\n" // mplayer.c OSD
--- a/mplayer.c Sun Jan 09 20:21:45 2011 +0000 +++ b/mplayer.c Mon Jan 10 19:18:51 2011 +0000 @@ -3654,11 +3654,6 @@ end_at.pos += seek_to_sec; } -if (end_at.type == END_AT_SIZE) { - mp_msg(MSGT_CPLAYER, MSGL_WARN, MSGTR_MPEndposNoSizeBased); - end_at.type = END_AT_NONE; -} - #ifdef CONFIG_DVDNAV mp_dvdnav_context_free(mpctx); if (mpctx->stream->type == STREAMTYPE_DVDNAV) { @@ -3702,7 +3697,8 @@ if(!quiet) print_status(a_pos, 0, 0); - if(end_at.type == END_AT_TIME && end_at.pos < a_pos) + if(end_at.type == END_AT_TIME && end_at.pos < a_pos || + end_at.type == END_AT_SIZE && end_at.pos < stream_tell(mpctx->stream)) mpctx->eof = PT_NEXT_ENTRY; update_subtitles(NULL, a_pos, mpctx->d_sub, 0); update_osd_msg(); @@ -3810,10 +3806,9 @@ if (play_n_frames <= 0) mpctx->eof = PT_NEXT_ENTRY; } - -// FIXME: add size based support for -endpos - if (end_at.type == END_AT_TIME && - !frame_time_remaining && end_at.pos <= mpctx->sh_video->pts) + if (!frame_time_remaining && + ((end_at.type == END_AT_TIME && mpctx->sh_video->pts >= end_at.pos) || + (end_at.type == END_AT_SIZE && stream_tell(mpctx->stream) >= end_at.pos))) mpctx->eof = PT_NEXT_ENTRY; } // end if(mpctx->sh_video)