From diego at biurrun.de Wed Apr 4 16:48:39 2012 From: diego at biurrun.de (Diego Biurrun) Date: Wed, 04 Apr 2012 16:48:39 +0200 Subject: [MPlayer-cvslog] r34824 - trunk/stream/stream_ffmpeg.c In-Reply-To: <20120327195557.GE2335@1und1.de> References: <20120324162855.9409E14EFE1@avserver.banki.hu> <20120324190335.GB10018@1und1.de> <20120324195923.GA17923@1und1.de> <20120327173939.GA6711@pool.informatik.rwth-aachen.de> <20120327195557.GE2335@1und1.de> Message-ID: <20120404144839.GA17907@pool.informatik.rwth-aachen.de> On Tue, Mar 27, 2012 at 09:55:57PM +0200, Reimar D?ffinger wrote: > On Tue, Mar 27, 2012 at 07:39:39PM +0200, Diego Biurrun wrote: > > On Sat, Mar 24, 2012 at 08:59:34PM +0100, Reimar D?ffinger wrote: > > > And sorry for the grumpiness, but I've mentioned the issues with the > > > new official API several times already and for FFmpeg all the necessary > > > url_ symbols are exported again (though the header needs to be copied > > > manually still). So I am annoyed about it being applied with only > > > about a day's notice. > > > > No worries, I will revert it shortly, was busy the past few days. > > I've been working on a flag on the FFmpeg side that should disable > the buffering and might make this acceptable. > Problem is I need to come up with a way to test it properly. > The patch required on MPlayer side would be the below, though > the write function still needs to be fixed (needs to return error, > explicitly call flush for FFmpeg versions that don't have the flag)... Revert or not then? Diego From Reimar.Doeffinger at gmx.de Wed Apr 4 20:22:54 2012 From: Reimar.Doeffinger at gmx.de (Reimar =?iso-8859-1?Q?D=F6ffinger?=) Date: Wed, 4 Apr 2012 20:22:54 +0200 Subject: [MPlayer-cvslog] r34824 - trunk/stream/stream_ffmpeg.c In-Reply-To: <20120404144839.GA17907@pool.informatik.rwth-aachen.de> References: <20120324162855.9409E14EFE1@avserver.banki.hu> <20120324190335.GB10018@1und1.de> <20120324195923.GA17923@1und1.de> <20120327173939.GA6711@pool.informatik.rwth-aachen.de> <20120327195557.GE2335@1und1.de> <20120404144839.GA17907@pool.informatik.rwth-aachen.de> Message-ID: <20120404182254.GB2307@1und1.de> On Wed, Apr 04, 2012 at 04:48:39PM +0200, Diego Biurrun wrote: > On Tue, Mar 27, 2012 at 09:55:57PM +0200, Reimar D?ffinger wrote: > > On Tue, Mar 27, 2012 at 07:39:39PM +0200, Diego Biurrun wrote: > > > On Sat, Mar 24, 2012 at 08:59:34PM +0100, Reimar D?ffinger wrote: > > > > And sorry for the grumpiness, but I've mentioned the issues with the > > > > new official API several times already and for FFmpeg all the necessary > > > > url_ symbols are exported again (though the header needs to be copied > > > > manually still). So I am annoyed about it being applied with only > > > > about a day's notice. > > > > > > No worries, I will revert it shortly, was busy the past few days. > > > > I've been working on a flag on the FFmpeg side that should disable > > the buffering and might make this acceptable. > > Problem is I need to come up with a way to test it properly. > > The patch required on MPlayer side would be the below, though > > the write function still needs to be fixed (needs to return error, > > explicitly call flush for FFmpeg versions that don't have the flag)... > > Revert or not then? I'd say it's ok to leave it be as-is for a little bit longer. From subversion at mplayerhq.hu Wed Apr 4 20:42:33 2012 From: subversion at mplayerhq.hu (reimar) Date: Wed, 4 Apr 2012 20:42:33 +0200 (CEST) Subject: [MPlayer-cvslog] r34838 - trunk/stream/stream_ffmpeg.c Message-ID: <20120404184233.C28E7152B61@avserver.banki.hu> Author: reimar Date: Wed Apr 4 20:42:33 2012 New Revision: 34838 Log: Use AVIO_FLAG_DIRECT to avoid issues with one more pointless buffering layer. Modified: trunk/stream/stream_ffmpeg.c Modified: trunk/stream/stream_ffmpeg.c ============================================================================== --- trunk/stream/stream_ffmpeg.c Mon Apr 2 15:47:52 2012 (r34837) +++ trunk/stream/stream_ffmpeg.c Wed Apr 4 20:42:33 2012 (r34838) @@ -101,6 +101,13 @@ static int open_f(stream_t *stream, int goto out; } +#ifdef AVIO_FLAG_DIRECT + flags |= AVIO_FLAG_DIRECT; +#else + mp_msg(MSGT_OPEN, MSGL_WARN, "[ffmpeg] No support for AVIO_FLAG_DIRECT, might cause performance and other issues.\n" + "Please update to and rebuild against an FFmpeg version supporting it.\n"); +#endif + if (stream->url) filename = stream->url; else { From subversion at mplayerhq.hu Wed Apr 4 20:45:37 2012 From: subversion at mplayerhq.hu (reimar) Date: Wed, 4 Apr 2012 20:45:37 +0200 (CEST) Subject: [MPlayer-cvslog] r34839 - trunk/stream/stream_ffmpeg.c Message-ID: <20120404184537.A3492152AF4@avserver.banki.hu> Author: reimar Date: Wed Apr 4 20:45:37 2012 New Revision: 34839 Log: Fix write_buffer: flush after each write and return an error code when an error occurred. Modified: trunk/stream/stream_ffmpeg.c Modified: trunk/stream/stream_ffmpeg.c ============================================================================== --- trunk/stream/stream_ffmpeg.c Wed Apr 4 20:42:33 2012 (r34838) +++ trunk/stream/stream_ffmpeg.c Wed Apr 4 20:45:37 2012 (r34839) @@ -34,7 +34,11 @@ static int fill_buffer(stream_t *s, char static int write_buffer(stream_t *s, char *buffer, int len) { + AVIOContext *ctx = s->priv; avio_write(s->priv, buffer, len); + avio_flush(s->priv); + if (ctx->error) + return -1; return len; } From Reimar.Doeffinger at gmx.de Wed Apr 4 20:46:41 2012 From: Reimar.Doeffinger at gmx.de (Reimar =?iso-8859-1?Q?D=F6ffinger?=) Date: Wed, 4 Apr 2012 20:46:41 +0200 Subject: [MPlayer-cvslog] r34824 - trunk/stream/stream_ffmpeg.c In-Reply-To: <20120404182254.GB2307@1und1.de> References: <20120324162855.9409E14EFE1@avserver.banki.hu> <20120324190335.GB10018@1und1.de> <20120324195923.GA17923@1und1.de> <20120327173939.GA6711@pool.informatik.rwth-aachen.de> <20120327195557.GE2335@1und1.de> <20120404144839.GA17907@pool.informatik.rwth-aachen.de> <20120404182254.GB2307@1und1.de> Message-ID: <20120404184641.GA22753@1und1.de> On Wed, Apr 04, 2012 at 08:22:54PM +0200, Reimar D?ffinger wrote: > On Wed, Apr 04, 2012 at 04:48:39PM +0200, Diego Biurrun wrote: > > On Tue, Mar 27, 2012 at 09:55:57PM +0200, Reimar D?ffinger wrote: > > > On Tue, Mar 27, 2012 at 07:39:39PM +0200, Diego Biurrun wrote: > > > > On Sat, Mar 24, 2012 at 08:59:34PM +0100, Reimar D?ffinger wrote: > > > > > And sorry for the grumpiness, but I've mentioned the issues with the > > > > > new official API several times already and for FFmpeg all the necessary > > > > > url_ symbols are exported again (though the header needs to be copied > > > > > manually still). So I am annoyed about it being applied with only > > > > > about a day's notice. > > > > > > > > No worries, I will revert it shortly, was busy the past few days. > > > > > > I've been working on a flag on the FFmpeg side that should disable > > > the buffering and might make this acceptable. > > > Problem is I need to come up with a way to test it properly. > > > The patch required on MPlayer side would be the below, though > > > the write function still needs to be fixed (needs to return error, > > > explicitly call flush for FFmpeg versions that don't have the flag)... > > > > Revert or not then? > > I'd say it's ok to leave it be as-is for a little bit longer. I _think_ it should be fixed now (together with latest FFmpeg). From subversion at mplayerhq.hu Wed Apr 4 21:12:16 2012 From: subversion at mplayerhq.hu (reimar) Date: Wed, 4 Apr 2012 21:12:16 +0200 (CEST) Subject: [MPlayer-cvslog] r34840 - trunk/libvo/vo_directx.c Message-ID: <20120404191216.BD5C2152B76@avserver.banki.hu> Author: reimar Date: Wed Apr 4 21:12:16 2012 New Revision: 34840 Log: vo_directx: do not do aspect scaling in windowed mode. This matches behaviour of other vos. Modified: trunk/libvo/vo_directx.c Modified: trunk/libvo/vo_directx.c ============================================================================== --- trunk/libvo/vo_directx.c Wed Apr 4 20:45:37 2012 (r34839) +++ trunk/libvo/vo_directx.c Wed Apr 4 21:12:16 2012 (r34840) @@ -464,10 +464,12 @@ static uint32_t Directx_ManageDisplay(vo width = vo_dwidth; height = vo_dheight; - aspect(&width, &height, A_WINZOOM); - panscan_calc_windowed(); - width += vo_panscan_x; - height += vo_panscan_y; + if (aspect_scaling()) { + aspect(&width, &height, A_WINZOOM); + panscan_calc_windowed(); + width += vo_panscan_x; + height += vo_panscan_y; + } width = FFMIN(width, vo_screenwidth); height = FFMIN(height, vo_screenheight); rd.left += (vo_dwidth - width) / 2; From subversion at mplayerhq.hu Thu Apr 5 23:59:10 2012 From: subversion at mplayerhq.hu (reimar) Date: Thu, 5 Apr 2012 23:59:10 +0200 (CEST) Subject: [MPlayer-cvslog] r34841 - trunk/libao2/ao_alsa.c Message-ID: <20120405215910.2A8C21533CD@avserver.banki.hu> Author: reimar Date: Thu Apr 5 23:59:09 2012 New Revision: 34841 Log: vsnprintf always 0-terminates the string, so remove extra code to do this explicitly. Modified: trunk/libao2/ao_alsa.c Modified: trunk/libao2/ao_alsa.c ============================================================================== --- trunk/libao2/ao_alsa.c Wed Apr 4 21:12:16 2012 (r34840) +++ trunk/libao2/ao_alsa.c Thu Apr 5 23:59:09 2012 (r34841) @@ -77,7 +77,6 @@ static void alsa_error_handler(const cha va_start(va, format); vsnprintf(tmp, sizeof tmp, format, va); va_end(va); - tmp[sizeof tmp - 1] = '\0'; if (err) mp_msg(MSGT_AO, MSGL_ERR, "[AO_ALSA] alsa-lib: %s:%i:(%s) %s: %s\n", From subversion at mplayerhq.hu Fri Apr 6 00:29:37 2012 From: subversion at mplayerhq.hu (reimar) Date: Fri, 6 Apr 2012 00:29:37 +0200 (CEST) Subject: [MPlayer-cvslog] r34842 - in trunk/libao2: ao_alsa.c ao_oss.c audio_out.c audio_out_internal.h Message-ID: <20120405222937.59FE81533EF@avserver.banki.hu> Author: reimar Date: Fri Apr 6 00:29:37 2012 New Revision: 34842 Log: Use approach used by ao_oss to avoid audio desync when framestepping with ao_alsa and no hardware pause support. This fixes bug #2052. Modified: trunk/libao2/ao_alsa.c trunk/libao2/ao_oss.c trunk/libao2/audio_out.c trunk/libao2/audio_out_internal.h Modified: trunk/libao2/ao_alsa.c ============================================================================== --- trunk/libao2/ao_alsa.c Thu Apr 5 23:59:09 2012 (r34841) +++ trunk/libao2/ao_alsa.c Fri Apr 6 00:29:37 2012 (r34842) @@ -65,6 +65,7 @@ static snd_pcm_sw_params_t *alsa_swparam static size_t bytes_per_sample; static int alsa_can_pause; +static int prepause_space; #define ALSA_DEVICE_SIZE 256 @@ -691,6 +692,7 @@ static void audio_pause(void) } mp_msg(MSGT_AO,MSGL_V,"alsa-pause: pause supported by hardware\n"); } else { + prepause_space = get_space(); if ((err = snd_pcm_drop(alsa_handler)) < 0) { mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_PcmDropError, snd_strerror(err)); @@ -720,6 +722,7 @@ static void audio_resume(void) mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_PcmPrepareError, snd_strerror(err)); return; } + mp_ao_resume_refill(&audio_out_alsa, prepause_space); } } Modified: trunk/libao2/ao_oss.c ============================================================================== --- trunk/libao2/ao_oss.c Thu Apr 5 23:59:09 2012 (r34841) +++ trunk/libao2/ao_oss.c Fri Apr 6 00:29:37 2012 (r34842) @@ -473,14 +473,8 @@ static void audio_pause(void) // resume playing, after audio_pause() static void audio_resume(void) { - int fillcnt; reset(); - fillcnt = get_space() - prepause_space; - if (fillcnt > 0 && !(ao_data.format & AF_FORMAT_SPECIAL_MASK)) { - void *silence = calloc(fillcnt, 1); - play(silence, fillcnt, 0); - free(silence); - } + mp_ao_resume_refill(&audio_out_oss, prepause_space); } Modified: trunk/libao2/audio_out.c ============================================================================== --- trunk/libao2/audio_out.c Thu Apr 5 23:59:09 2012 (r34841) +++ trunk/libao2/audio_out.c Fri Apr 6 00:29:37 2012 (r34842) @@ -189,3 +189,13 @@ const ao_functions_t* init_best_audio_ou } return NULL; } + +void mp_ao_resume_refill(const ao_functions_t *ao, int prepause_space) +{ + int fillcnt = ao->get_space() - prepause_space; + if (fillcnt > 0 && !(ao_data.format & AF_FORMAT_SPECIAL_MASK)) { + void *silence = calloc(fillcnt, 1); + ao->play(silence, fillcnt, 0); + free(silence); + } +} Modified: trunk/libao2/audio_out_internal.h ============================================================================== --- trunk/libao2/audio_out_internal.h Thu Apr 5 23:59:09 2012 (r34841) +++ trunk/libao2/audio_out_internal.h Fri Apr 6 00:29:37 2012 (r34842) @@ -45,4 +45,6 @@ static void audio_resume(void); audio_resume\ }; +void mp_ao_resume_refill(const ao_functions_t *ao, int prepause_space); + #endif /* MPLAYER_AUDIO_OUT_INTERNAL_H */ From Reimar.Doeffinger at gmx.de Fri Apr 6 00:32:22 2012 From: Reimar.Doeffinger at gmx.de (Reimar =?iso-8859-1?Q?D=F6ffinger?=) Date: Fri, 6 Apr 2012 00:32:22 +0200 Subject: [MPlayer-cvslog] r34842 - in trunk/libao2: ao_alsa.c ao_oss.c audio_out.c audio_out_internal.h In-Reply-To: <20120405222937.59FE81533EF@avserver.banki.hu> References: <20120405222937.59FE81533EF@avserver.banki.hu> Message-ID: <20120405223221.GA18154@1und1.de> On Fri, Apr 06, 2012 at 12:29:37AM +0200, reimar wrote: > Author: reimar > Date: Fri Apr 6 00:29:37 2012 > New Revision: 34842 > > Log: > Use approach used by ao_oss to avoid audio desync > when framestepping with ao_alsa and no hardware pause > support. > This fixes bug #2052. > > Modified: > trunk/libao2/ao_alsa.c > trunk/libao2/ao_oss.c > trunk/libao2/audio_out.c > trunk/libao2/audio_out_internal.h > > Modified: trunk/libao2/ao_alsa.c > ============================================================================== > --- trunk/libao2/ao_alsa.c Thu Apr 5 23:59:09 2012 (r34841) > +++ trunk/libao2/ao_alsa.c Fri Apr 6 00:29:37 2012 (r34842) > @@ -65,6 +65,7 @@ static snd_pcm_sw_params_t *alsa_swparam > static size_t bytes_per_sample; > > static int alsa_can_pause; > +static int prepause_space; > > #define ALSA_DEVICE_SIZE 256 > > @@ -691,6 +692,7 @@ static void audio_pause(void) > } > mp_msg(MSGT_AO,MSGL_V,"alsa-pause: pause supported by hardware\n"); > } else { > + prepause_space = get_space(); > if ((err = snd_pcm_drop(alsa_handler)) < 0) > { > mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_PcmDropError, snd_strerror(err)); > @@ -720,6 +722,7 @@ static void audio_resume(void) > mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_PcmPrepareError, snd_strerror(err)); > return; > } > + mp_ao_resume_refill(&audio_out_alsa, prepause_space); Note that this requires only 3 lines of code, so maintainers of other aos are very welcome to add this for all where it makes sense. From ib at wupperonline.de Fri Apr 6 22:48:12 2012 From: ib at wupperonline.de (=?ISO-8859-1?Q?Ingo=20Br=FCckl?=) Date: Fri, 06 Apr 2012 22:48:12 +0200 Subject: [MPlayer-cvslog] r34842 - in trunk/libao2: ao_alsa.c ao_oss.c audio_out.c audio_out_internal.h In-Reply-To: <20120405222937.59FE81533EF@avserver.banki.hu> Message-ID: <4f7f568f.69cda0f7.bm002@wupperonline.de> > Author: reimar > Date: Fri Apr 6 00:29:37 2012 > New Revision: 34842 > Log: > Use approach used by ao_oss to avoid audio desync > when framestepping with ao_alsa and no hardware pause > support. > This fixes bug #2052. > Modified: > trunk/libao2/ao_alsa.c > trunk/libao2/ao_oss.c > trunk/libao2/audio_out.c > trunk/libao2/audio_out_internal.h Not a big deal, but: libao2/audio_out.c:193: warning: no previous prototype for 'mp_ao_resume_refill' Ingo From subversion at mplayerhq.hu Fri Apr 6 23:26:02 2012 From: subversion at mplayerhq.hu (reimar) Date: Fri, 6 Apr 2012 23:26:02 +0200 (CEST) Subject: [MPlayer-cvslog] r34843 - in trunk/libao2: audio_out.h audio_out_internal.h Message-ID: <20120406212603.093BD153F52@avserver.banki.hu> Author: reimar Date: Fri Apr 6 23:26:02 2012 New Revision: 34843 Log: Move mp_ao_resume_refill to audio_out.h to avoid compiler warning about missing prototype in audio_out.c. Including audio_out_internal.h is not an option since that causes warnings about "play" etc. functions being declared but not defined. Modified: trunk/libao2/audio_out.h trunk/libao2/audio_out_internal.h Modified: trunk/libao2/audio_out.h ============================================================================== --- trunk/libao2/audio_out.h Fri Apr 6 00:29:37 2012 (r34842) +++ trunk/libao2/audio_out.h Fri Apr 6 23:26:02 2012 (r34843) @@ -66,6 +66,8 @@ const ao_functions_t* init_best_audio_ou // NULL terminated array of all drivers extern const ao_functions_t* const audio_out_drivers[]; +void mp_ao_resume_refill(const ao_functions_t *ao, int prepause_space); + #define CONTROL_OK 1 #define CONTROL_TRUE 1 #define CONTROL_FALSE 0 Modified: trunk/libao2/audio_out_internal.h ============================================================================== --- trunk/libao2/audio_out_internal.h Fri Apr 6 00:29:37 2012 (r34842) +++ trunk/libao2/audio_out_internal.h Fri Apr 6 23:26:02 2012 (r34843) @@ -45,6 +45,4 @@ static void audio_resume(void); audio_resume\ }; -void mp_ao_resume_refill(const ao_functions_t *ao, int prepause_space); - #endif /* MPLAYER_AUDIO_OUT_INTERNAL_H */ From Reimar.Doeffinger at gmx.de Fri Apr 6 23:26:43 2012 From: Reimar.Doeffinger at gmx.de (Reimar =?iso-8859-1?Q?D=F6ffinger?=) Date: Fri, 6 Apr 2012 23:26:43 +0200 Subject: [MPlayer-cvslog] r34842 - in trunk/libao2: ao_alsa.c ao_oss.c audio_out.c audio_out_internal.h In-Reply-To: <4f7f568f.69cda0f7.bm002@wupperonline.de> References: <20120405222937.59FE81533EF@avserver.banki.hu> <4f7f568f.69cda0f7.bm002@wupperonline.de> Message-ID: <20120406212643.GA8486@1und1.de> On Fri, Apr 06, 2012 at 10:48:12PM +0200, Ingo Br?ckl wrote: > > Author: reimar > > Date: Fri Apr 6 00:29:37 2012 > > New Revision: 34842 > > > Log: > > Use approach used by ao_oss to avoid audio desync > > when framestepping with ao_alsa and no hardware pause > > support. > > This fixes bug #2052. > > > Modified: > > trunk/libao2/ao_alsa.c > > trunk/libao2/ao_oss.c > > trunk/libao2/audio_out.c > > trunk/libao2/audio_out_internal.h > > Not a big deal, but: > > libao2/audio_out.c:193: warning: no previous prototype for 'mp_ao_resume_refill' Fixed, though not sure if it is the best solution. From subversion at mplayerhq.hu Sat Apr 7 02:10:27 2012 From: subversion at mplayerhq.hu (reimar) Date: Sat, 7 Apr 2012 02:10:27 +0200 (CEST) Subject: [MPlayer-cvslog] r34844 - in trunk/sub: sub_cc.c sub_cc.h Message-ID: <20120407001027.CBAF8153FCE@avserver.banki.hu> Author: reimar Date: Sat Apr 7 02:10:27 2012 New Revision: 34844 Log: Add code to support CC subtitles in ASTC and MOV. Code to actually use these will be added later, since it needs special code in FFmpeg. Code for MOV is already read, ASTC might take longer. Modified: trunk/sub/sub_cc.c trunk/sub/sub_cc.h Modified: trunk/sub/sub_cc.c ============================================================================== --- trunk/sub/sub_cc.c Fri Apr 6 23:26:02 2012 (r34843) +++ trunk/sub/sub_cc.c Sat Apr 7 02:10:27 2012 (r34844) @@ -33,6 +33,7 @@ #include #include "config.h" +#include "mp_msg.h" #include "sub_cc.h" #include "subreader.h" @@ -40,6 +41,8 @@ #include "libvo/video_out.h" #include "sub.h" +#include "libavutil/avutil.h" + #define CC_MAX_LINE_LENGTH 64 @@ -337,11 +340,82 @@ static void subcc_decode(const uint8_t * } } +static const uint8_t mov_cc_signature_1[] = {0, 0, 0, 0xa, 'c', 'd', 'a', 't'}; +static const uint8_t mov_cc_signature_2[] = {0, 0, 0, 0xa, 'c', 'd', 't', '2'}; +/** + * MOV uses a vastly more verbose representation for EIA 608 CC data than DVDs. + * This function handles that case. + */ +static void mov_subcc_decode(const uint8_t *data, unsigned len) +{ + while (len >= 10) { + int channel = -1; + if (memcmp(data, mov_cc_signature_1, sizeof(mov_cc_signature_1)) == 0) { + channel = 0; + } else if (memcmp(data, mov_cc_signature_2, sizeof(mov_cc_signature_2)) == 0) { + channel = 1; + } else { + mp_msg(MSGT_OSD, MSGL_V, "Unknown MOV 608 CC formatting\n"); + data++; + len--; + continue; + } + if (channel == selected_channel() >> 1) + cc_decode_EIA608(data[8] | (data[9] << 8)); + data += 10; + len -= 10; + } +} void subcc_process_data(const uint8_t *inputdata, unsigned int len) { + int mov_mode = len >= 10 && + memcmp(inputdata, mov_cc_signature_1, sizeof(mov_cc_signature_1)) == 0; if(!subcc_enabled) return; if(!initialized) subcc_init(); + if (mov_mode) { + mov_subcc_decode(inputdata, len); + return; + } subcc_decode(inputdata, len); } + +/** + * This processes CC captions in the format as found in ASTC broadcasts. + * Like DVD CC it is stored inside the MPEG-frame userdata, but with two + * differences: + * 1) It starts with "GA" instead of "CC" + * 2) It _must_ be reordered in the way the decoder reorders the video frames + * The latter makes things difficult and is the reason why there is no support + * for this yet beyond this function. + */ +void subcc_process_eia708(const uint8_t *data, int len) +{ + int cc_count; + if (!subcc_enabled) + return; + if (!initialized) + subcc_init(); + if (len <= 5) + return; + if (data[0] != '9' || data[1] != '4' || data[2] != 3) { + mp_msg(MSGT_OSD, MSGL_ERR, "Unknown ATSC CC type " + "0x%"PRIx8" 0x%"PRIx8" 0x%"PRIx8"\n", + data[0], data[1], data[2]); + return; + } + // process_cc_data_flag + if (!(data[3] & 0x40)) + return; + cc_count = data[3] & 0x1f; + data += 5; + len -= 5; + cc_count = FFMIN(cc_count, len / 3); + while (cc_count--) { + // EAI-608 data + if ((data[0] & 0xfe) == 0xfc && (data[0] & 1) == selected_channel() >> 1) + cc_decode_EIA608(data[1] | (data[2] << 8)); + data += 3; + } +} Modified: trunk/sub/sub_cc.h ============================================================================== --- trunk/sub/sub_cc.h Fri Apr 6 23:26:02 2012 (r34843) +++ trunk/sub/sub_cc.h Sat Apr 7 02:10:27 2012 (r34844) @@ -25,5 +25,6 @@ extern int subcc_enabled; void subcc_init(void); void subcc_process_data(const uint8_t *inputdata, unsigned int len); +void subcc_process_eia708(const uint8_t *data, int len); #endif /* MPLAYER_SUB_CC_H */ From diego at biurrun.de Sat Apr 7 10:50:59 2012 From: diego at biurrun.de (Diego Biurrun) Date: Sat, 07 Apr 2012 10:50:59 +0200 Subject: [MPlayer-cvslog] r34842 - in trunk/libao2: ao_alsa.c ao_oss.c audio_out.c audio_out_internal.h In-Reply-To: <4f7f568f.69cda0f7.bm002@wupperonline.de> References: <20120405222937.59FE81533EF@avserver.banki.hu> <4f7f568f.69cda0f7.bm002@wupperonline.de> Message-ID: <20120407085059.GA12995@pool.informatik.rwth-aachen.de> On Fri, Apr 06, 2012 at 10:48:12PM +0200, Ingo Br?ckl wrote: > > > Log: > > Use approach used by ao_oss to avoid audio desync > > when framestepping with ao_alsa and no hardware pause > > support. > > This fixes bug #2052. > > > Modified: > > trunk/libao2/ao_alsa.c > > trunk/libao2/ao_oss.c > > trunk/libao2/audio_out.c > > trunk/libao2/audio_out_internal.h > > Not a big deal, but: > > libao2/audio_out.c:193: warning: no previous prototype for 'mp_ao_resume_refill' That warning should really be an error, as it has no false positives. Diego From subversion at mplayerhq.hu Sat Apr 7 13:17:10 2012 From: subversion at mplayerhq.hu (cboesch) Date: Sat, 7 Apr 2012 13:17:10 +0200 (CEST) Subject: [MPlayer-cvslog] r34845 - trunk/sub/subassconvert.c Message-ID: <20120407111710.1BF94153D67@avserver.banki.hu> Author: cboesch Date: Sat Apr 7 13:17:09 2012 New Revision: 34845 Log: subassconvert: handle "\r\n" line ends Previously the code converting text subtitles to ASS format converted newline characters, and only those, to ASS "new line" markup. If the subtitles contained "\r\n", the "\r" was thus left in the text. In previous libass versions the "\r" was not visible, but in the current one it produces an empty box. Improve the conversion to remove the "\r" in that case. Also treat a lone "\r" as a newline. Picked from mplayer2/3e0a2705 Modified: trunk/sub/subassconvert.c Modified: trunk/sub/subassconvert.c ============================================================================== --- trunk/sub/subassconvert.c Sat Apr 7 02:10:27 2012 (r34844) +++ trunk/sub/subassconvert.c Sat Apr 7 13:17:09 2012 (r34845) @@ -86,7 +86,7 @@ static const struct tag_conv { {"", "{\\u1}"}, {"", "{\\u0}"}, {"", "{\\s1}"}, {"", "{\\s0}"}, {"{", "\\{"}, {"}", "\\}"}, - {"\n", "\\N"} + {"\r\n", "\\N"}, {"\n", "\\N"}, {"\r", "\\N"}, }; static const struct { From subversion at mplayerhq.hu Sat Apr 7 13:18:59 2012 From: subversion at mplayerhq.hu (cboesch) Date: Sat, 7 Apr 2012 13:18:59 +0200 (CEST) Subject: [MPlayer-cvslog] r34846 - trunk/sub/subassconvert.c Message-ID: <20120407111859.54F4F153D8A@avserver.banki.hu> Author: cboesch Date: Sat Apr 7 13:18:59 2012 New Revision: 34846 Log: subassconvert: use standard struct zero init. Modified: trunk/sub/subassconvert.c Modified: trunk/sub/subassconvert.c ============================================================================== --- trunk/sub/subassconvert.c Sat Apr 7 13:17:09 2012 (r34845) +++ trunk/sub/subassconvert.c Sat Apr 7 13:18:59 2012 (r34846) @@ -300,7 +300,7 @@ static char *microdvd_load_tags(struct m while (*s == '{') { char *start = s; char tag_char = *(s + 1); - struct microdvd_tag tag = {}; + struct microdvd_tag tag = {0}; if (!tag_char || *(s + 2) != ':') break; @@ -498,7 +498,7 @@ void subassconvert_microdvd(const char * .buf = dest, .bufsize = dest_buffer_size, }; - struct microdvd_tag tags[sizeof(MICRODVD_TAGS) - 1] = {}; + struct microdvd_tag tags[sizeof(MICRODVD_TAGS) - 1] = {{0}}; while (*line) { line = microdvd_load_tags(tags, line); From subversion at mplayerhq.hu Sat Apr 7 14:30:33 2012 From: subversion at mplayerhq.hu (reimar) Date: Sat, 7 Apr 2012 14:30:33 +0200 (CEST) Subject: [MPlayer-cvslog] r34847 - trunk/sub/sub_cc.c Message-ID: <20120407123033.26B99153C24@avserver.banki.hu> Author: reimar Date: Sat Apr 7 14:30:33 2012 New Revision: 34847 Log: Fix misspelling ATSC as ASTC. Modified: trunk/sub/sub_cc.c Modified: trunk/sub/sub_cc.c ============================================================================== --- trunk/sub/sub_cc.c Sat Apr 7 13:18:59 2012 (r34846) +++ trunk/sub/sub_cc.c Sat Apr 7 14:30:33 2012 (r34847) @@ -382,7 +382,7 @@ void subcc_process_data(const uint8_t *i } /** - * This processes CC captions in the format as found in ASTC broadcasts. + * This processes CC captions in the format as found in ATSC broadcasts. * Like DVD CC it is stored inside the MPEG-frame userdata, but with two * differences: * 1) It starts with "GA" instead of "CC" From subversion at mplayerhq.hu Sat Apr 7 21:37:11 2012 From: subversion at mplayerhq.hu (reimar) Date: Sat, 7 Apr 2012 21:37:11 +0200 (CEST) Subject: [MPlayer-cvslog] r34848 - trunk/libmpdemux/demux_lavf.c Message-ID: <20120407193711.59B4F153BC6@avserver.banki.hu> Author: reimar Date: Sat Apr 7 21:37:11 2012 New Revision: 34848 Log: Remove outdated comment. Modified: trunk/libmpdemux/demux_lavf.c Modified: trunk/libmpdemux/demux_lavf.c ============================================================================== --- trunk/libmpdemux/demux_lavf.c Sat Apr 7 14:30:33 2012 (r34847) +++ trunk/libmpdemux/demux_lavf.c Sat Apr 7 21:37:11 2012 (r34848) @@ -423,7 +423,6 @@ static void handle_stream(demuxer_t *dem case AVMEDIA_TYPE_SUBTITLE:{ sh_sub_t* sh_sub; char type; - /* only support text subtitles for now */ if(codec->codec_id == CODEC_ID_TEXT) type = 't'; else if(codec->codec_id == CODEC_ID_MOV_TEXT) From subversion at mplayerhq.hu Sat Apr 7 22:08:53 2012 From: subversion at mplayerhq.hu (reimar) Date: Sat, 7 Apr 2012 22:08:53 +0200 (CEST) Subject: [MPlayer-cvslog] r34849 - in trunk: libmpdemux/demux_lavf.c mpcommon.c sub/sub_cc.c sub/sub_cc.h Message-ID: <20120407200853.977281540E6@avserver.banki.hu> Author: reimar Date: Sat Apr 7 22:08:53 2012 New Revision: 34849 Log: Support EIA-608 captions in MOV. Modified: trunk/libmpdemux/demux_lavf.c trunk/mpcommon.c trunk/sub/sub_cc.c trunk/sub/sub_cc.h Modified: trunk/libmpdemux/demux_lavf.c ============================================================================== --- trunk/libmpdemux/demux_lavf.c Sat Apr 7 21:37:11 2012 (r34848) +++ trunk/libmpdemux/demux_lavf.c Sat Apr 7 22:08:53 2012 (r34849) @@ -439,6 +439,12 @@ static void handle_stream(demuxer_t *dem type = 'd'; else if(codec->codec_id == CODEC_ID_HDMV_PGS_SUBTITLE) type = 'p'; +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54, 14, 100) + else if(codec->codec_id == CODEC_ID_EIA_608) + type = 'c'; +#endif + else if(codec->codec_tag == MKTAG('c', '6', '0', '8')) + type = 'c'; else break; sh_sub = new_sh_sub_sid(demuxer, i, priv->sub_streams, lang ? lang->value : NULL); Modified: trunk/mpcommon.c ============================================================================== --- trunk/mpcommon.c Sat Apr 7 21:37:11 2012 (r34848) +++ trunk/mpcommon.c Sat Apr 7 22:08:53 2012 (r34849) @@ -46,6 +46,7 @@ #include "sub/ass_mp.h" #include "sub/vobsub.h" #include "sub/av_sub.h" +#include "sub/sub_cc.h" #include "libmpcodecs/dec_teletext.h" #include "libavutil/intreadwrite.h" #include "m_option.h" @@ -181,6 +182,7 @@ void update_subtitles(sh_video_t *sh_vid if (is_av_sub(type)) reset_avsub(d_dvdsub->sh); #endif + subcc_reset(); } // find sub if (subdata) { @@ -240,7 +242,7 @@ void update_subtitles(sh_video_t *sh_vid if (vo_vobsub || timestamp >= 0) spudec_assemble(vo_spudec, packet, len, timestamp); } - } else if (is_text_sub(type) || is_av_sub(type) || type == 'd') { + } else if (is_text_sub(type) || is_av_sub(type) || type == 'd' || type == 'c') { int orig_type = type; double endpts; if (type == 'd' && !d_dvdsub->demuxer->teletext) { @@ -287,6 +289,10 @@ void update_subtitles(sh_video_t *sh_vid } continue; } + if (type == 'c') { + subcc_process_data(packet, len); + continue; + } #ifdef CONFIG_ASS if (ass_enabled) { sh_sub_t* sh = d_dvdsub->sh; Modified: trunk/sub/sub_cc.c ============================================================================== --- trunk/sub/sub_cc.c Sat Apr 7 21:37:11 2012 (r34848) +++ trunk/sub/sub_cc.c Sat Apr 7 22:08:53 2012 (r34849) @@ -126,6 +126,13 @@ void subcc_init(void) initialized=1; } +void subcc_reset(void) +{ + if (!initialized) + return; + clear_buffer(&buf1); + clear_buffer(&buf2); +} static void display_buffer(subtitle *buf) { Modified: trunk/sub/sub_cc.h ============================================================================== --- trunk/sub/sub_cc.h Sat Apr 7 21:37:11 2012 (r34848) +++ trunk/sub/sub_cc.h Sat Apr 7 22:08:53 2012 (r34849) @@ -24,6 +24,7 @@ extern int subcc_enabled; void subcc_init(void); +void subcc_reset(void); void subcc_process_data(const uint8_t *inputdata, unsigned int len); void subcc_process_eia708(const uint8_t *data, int len); From subversion at mplayerhq.hu Mon Apr 9 13:25:57 2012 From: subversion at mplayerhq.hu (reimar) Date: Mon, 9 Apr 2012 13:25:57 +0200 (CEST) Subject: [MPlayer-cvslog] r34850 - trunk/libmpdemux/demux_real.c Message-ID: <20120409112557.8E18E154520@avserver.banki.hu> Author: reimar Date: Mon Apr 9 13:25:57 2012 New Revision: 34850 Log: RM demuxer: set aspect from container video dimensions. Fixes the sample from FFmpeg trac issue #785. Modified: trunk/libmpdemux/demux_real.c Modified: trunk/libmpdemux/demux_real.c ============================================================================== --- trunk/libmpdemux/demux_real.c Sat Apr 7 22:08:53 2012 (r34849) +++ trunk/libmpdemux/demux_real.c Mon Apr 9 13:25:57 2012 (r34850) @@ -1519,6 +1519,8 @@ static demuxer_t* demux_open_real(demuxe sh->bih->biSize = sizeof(*sh->bih); sh->disp_w = sh->bih->biWidth = stream_read_word(demuxer->stream); sh->disp_h = sh->bih->biHeight = stream_read_word(demuxer->stream); + if (sh->disp_w > 0 && sh->disp_h > 0) + sh->aspect = (float)sh->disp_w / sh->disp_h; sh->bih->biPlanes = 1; sh->bih->biBitCount = 24; sh->bih->biCompression = sh->format; From subversion at mplayerhq.hu Tue Apr 10 15:17:49 2012 From: subversion at mplayerhq.hu (ib) Date: Tue, 10 Apr 2012 15:17:49 +0200 (CEST) Subject: [MPlayer-cvslog] r34851 - trunk/libao2/ao_alsa.c Message-ID: <20120410131749.DA3E8154913@avserver.banki.hu> Author: ib Date: Tue Apr 10 15:17:49 2012 New Revision: 34851 Log: Clarify the used opening modes by improving the verbose status messages. By now, the (only) message indicates that the device is always opened in blocking mode, regardless of the "block" suboption to the ALSA output driver. Modified: trunk/libao2/ao_alsa.c Modified: trunk/libao2/ao_alsa.c ============================================================================== --- trunk/libao2/ao_alsa.c Mon Apr 9 13:25:57 2012 (r34850) +++ trunk/libao2/ao_alsa.c Tue Apr 10 15:17:49 2012 (r34851) @@ -463,6 +463,7 @@ static int init(int rate_hz, int channel int open_mode = block ? 0 : SND_PCM_NONBLOCK; int isac3 = AF_FORMAT_IS_AC3(format) || AF_FORMAT_IS_IEC61937(format); //modes = 0, SND_PCM_NONBLOCK, SND_PCM_ASYNC + mp_msg(MSGT_AO,MSGL_V,"alsa-init: opening device in %sblocking mode\n", block ? "" : "non-"); if ((err = try_open_device(alsa_device, open_mode, isac3)) < 0) { if (err != -EBUSY && !block) { @@ -480,7 +481,7 @@ static int init(int rate_hz, int channel if ((err = snd_pcm_nonblock(alsa_handler, 0)) < 0) { mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_ErrorSetBlockMode, snd_strerror(err)); } else { - mp_msg(MSGT_AO,MSGL_V,"alsa-init: pcm opened in blocking mode\n"); + mp_msg(MSGT_AO,MSGL_V,"alsa-init: device reopened in blocking mode\n"); } snd_pcm_hw_params_alloca(&alsa_hwparams); From subversion at mplayerhq.hu Wed Apr 11 20:44:03 2012 From: subversion at mplayerhq.hu (ib) Date: Wed, 11 Apr 2012 20:44:03 +0200 (CEST) Subject: [MPlayer-cvslog] r34852 - trunk/etc/mplayer.desktop Message-ID: <20120411184403.383C1154D6E@avserver.banki.hu> Author: ib Date: Wed Apr 11 20:44:02 2012 New Revision: 34852 Log: Add Spanish entries to desktop file. Translation by Juan A. Javierre, jjavierre telefonica net. Modified: trunk/etc/mplayer.desktop Modified: trunk/etc/mplayer.desktop ============================================================================== --- trunk/etc/mplayer.desktop Tue Apr 10 15:17:49 2012 (r34851) +++ trunk/etc/mplayer.desktop Wed Apr 11 20:44:02 2012 (r34852) @@ -4,18 +4,21 @@ Name=MPlayer GenericName=Media Player GenericName[ca]=Reproductor multim?dia GenericName[de]=Medienwiedergabe +GenericName[es]=Reproductor multimedia GenericName[fr]=Lecteur multim?dia GenericName[it]=Lettore multimediale GenericName[ja]=????????? X-GNOME-FullName=MPlayer Media Player X-GNOME-FullName[ca]=MPlayer Reproductor multim?dia X-GNOME-FullName[de]=MPlayer Medienwiedergabe +X-GNOME-FullName[es]=MPlayer Reproductor multimedia X-GNOME-FullName[fr]=MPlayer Lecteur multim?dia X-GNOME-FullName[it]=MPlayer Lettore multimediale X-GNOME-FullName[ja]=MPlayer ????????? Comment=Play movies and songs Comment[ca]=Reprodu?u v?deos i can?ons Comment[de]=Filme und Musik wiedergeben +Comment[es]=Reproduce v?deos y m?sica Comment[fr]=Lit les films et musiques Comment[it]=Riproduce filmati e musica Comment[ja]=???????????????? From subversion at mplayerhq.hu Thu Apr 12 08:21:30 2012 From: subversion at mplayerhq.hu (cehoyos) Date: Thu, 12 Apr 2012 08:21:30 +0200 (CEST) Subject: [MPlayer-cvslog] r34853 - trunk/etc/codecs.conf Message-ID: <20120412062130.9A214154E73@avserver.banki.hu> Author: cehoyos Date: Thu Apr 12 08:21:30 2012 New Revision: 34853 Log: Support lagarith RGB with FFmpeg. Modified: trunk/etc/codecs.conf Modified: trunk/etc/codecs.conf ============================================================================== --- trunk/etc/codecs.conf Wed Apr 11 20:44:02 2012 (r34852) +++ trunk/etc/codecs.conf Thu Apr 12 08:21:30 2012 (r34853) @@ -2390,7 +2390,7 @@ videocodec fflagarith fourcc LAGS driver ffmpeg dll lagarith - out YV12 + out YV12,RGB24,BGR32 ;http://lags.leetcode.net/codec.html videocodec lagarith From subversion at mplayerhq.hu Sat Apr 14 14:00:04 2012 From: subversion at mplayerhq.hu (cigaes) Date: Sat, 14 Apr 2012 14:00:04 +0200 (CEST) Subject: [MPlayer-cvslog] r34854 - trunk/configure Message-ID: <20120414120004.434DD155AB6@avserver.banki.hu> Author: cigaes Date: Sat Apr 14 14:00:03 2012 New Revision: 34854 Log: configure: suggest --extra-*flags instead of CFLAGS. Modified: trunk/configure Modified: trunk/configure ============================================================================== --- trunk/configure Thu Apr 12 08:21:30 2012 (r34853) +++ trunk/configure Sat Apr 14 14:00:03 2012 (r34854) @@ -8922,8 +8922,9 @@ but: *** *** DO NOT REPORT BUGS IF IT DOES NOT COMPILE/WORK! *** *** -It is strongly recommended to let MPlayer choose the correct CFLAGS! -To do so, execute 'CFLAGS= ./configure ' +It is strongly recommended to let MPlayer choose the correct *FLAGS! +To do so, remove *FLAGS from the environment an re-run configure. +You can use --extra-*flags to add custom flags if necessary. EOF fi From subversion at mplayerhq.hu Sun Apr 15 13:09:17 2012 From: subversion at mplayerhq.hu (reimar) Date: Sun, 15 Apr 2012 13:09:17 +0200 (CEST) Subject: [MPlayer-cvslog] r34857 - trunk/mplayer.c Message-ID: <20120415110917.6E15D15600A@avserver.banki.hu> Author: reimar Date: Sun Apr 15 13:09:17 2012 New Revision: 34857 Log: Fix hang when video pts suddenly jumps to match audio pts. This is a workaround for Debian issue Bug#668543. It most likely is also a FFmpeg demuxer issue, see https://ffmpeg.org/trac/ffmpeg/ticket/1213. Modified: trunk/mplayer.c Modified: trunk/mplayer.c ============================================================================== --- trunk/mplayer.c Sat Apr 14 18:55:53 2012 (r34856) +++ trunk/mplayer.c Sun Apr 15 13:09:17 2012 (r34857) @@ -2080,6 +2080,19 @@ static void adjust_sync_and_print_status ++drop_message; mp_msg(MSGT_AVSYNC, MSGL_WARN, MSGTR_SystemTooSlow); } + if (AV_delay > 0.5 && correct_pts && mpctx->delay < -audio_delay - 30) { + // This case means that we are supposed to stop video for a long + // time, even though audio is already ahead. + // This happens e.g. when initial audio pts is 10000, video + // starts at 0 but suddenly jumps to match audio. + // This is common in ogg streams. + // Only check for -correct-pts since this case does not cause + // issues with -nocorrect-pts. + mp_msg(MSGT_AVSYNC, MSGL_WARN, "Timing looks severely broken, resetting\n"); + AV_delay = 0; + timing_error = 0; + mpctx->delay = -audio_delay; + } if (autosync) x = AV_delay * 0.1f; else From subversion at mplayerhq.hu Sun Apr 15 17:01:09 2012 From: subversion at mplayerhq.hu (reimar) Date: Sun, 15 Apr 2012 17:01:09 +0200 (CEST) Subject: [MPlayer-cvslog] r34860 - in trunk: libmpcodecs/vd_ffmpeg.c libmpcodecs/vd_mpegpes.c libmpcodecs/vd_zrmjpeg.c mencoder.c mplayer.c Message-ID: <20120415150109.E4506155E1C@avserver.banki.hu> Author: reimar Date: Sun Apr 15 17:01:09 2012 New Revision: 34860 Log: Decode last frames for codecs with delay. Previously they would get lost, which would be particularly extreme when decoding with frame multithreading and lots of threads. Modified: trunk/libmpcodecs/vd_ffmpeg.c trunk/libmpcodecs/vd_mpegpes.c trunk/libmpcodecs/vd_zrmjpeg.c trunk/mencoder.c trunk/mplayer.c Modified: trunk/libmpcodecs/vd_ffmpeg.c ============================================================================== --- trunk/libmpcodecs/vd_ffmpeg.c Sun Apr 15 15:12:56 2012 (r34859) +++ trunk/libmpcodecs/vd_ffmpeg.c Sun Apr 15 17:01:09 2012 (r34860) @@ -731,7 +731,7 @@ static mp_image_t *decode(sh_video_t *sh int dr1= ctx->do_dr1; AVPacket pkt; - if(len<=0) return NULL; // skipped frame + if(data && len<=0) return NULL; // skipped frame //ffmpeg interlace (mpeg2) bug have been fixed. no need of -noslices if (!dr1) @@ -755,6 +755,7 @@ static mp_image_t *decode(sh_video_t *sh avctx->skip_idct = AVDISCARD_ALL; } + if (data) mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "vd_ffmpeg data: %04x, %04x, %04x, %04x\n", ((int *)data)[0], ((int *)data)[1], ((int *)data)[2], ((int *)data)[3]); av_init_packet(&pkt); Modified: trunk/libmpcodecs/vd_mpegpes.c ============================================================================== --- trunk/libmpcodecs/vd_mpegpes.c Sun Apr 15 15:12:56 2012 (r34859) +++ trunk/libmpcodecs/vd_mpegpes.c Sun Apr 15 17:01:09 2012 (r34860) @@ -61,6 +61,8 @@ static mp_image_t* decode(sh_video_t *sh mp_mpeg_header_t picture; const unsigned char *d = data; + if (len <= 0 && !data) return NULL; // delay flush + if(len>10 && !d[0] && !d[1] && d[2]==1 && d[3]==0xB3) { float old_aspect = sh->aspect; int oldw = sh->disp_w, oldh = sh->disp_h; Modified: trunk/libmpcodecs/vd_zrmjpeg.c ============================================================================== --- trunk/libmpcodecs/vd_zrmjpeg.c Sun Apr 15 15:12:56 2012 (r34859) +++ trunk/libmpcodecs/vd_zrmjpeg.c Sun Apr 15 17:01:09 2012 (r34860) @@ -232,6 +232,8 @@ static mp_image_t* decode(sh_video_t *sh mp_image_t* mpi; vd_zrmjpeg_ctx_t *ctx = sh->context; + if (len <= 0 && !data) return NULL; // delay flush + if (!ctx->vo_initialized) { ctx->preferred_csp = guess_mjpeg_type(data, len, sh->disp_h); if (ctx->preferred_csp == 0) return NULL; Modified: trunk/mencoder.c ============================================================================== --- trunk/mencoder.c Sun Apr 15 15:12:56 2012 (r34859) +++ trunk/mencoder.c Sun Apr 15 17:01:09 2012 (r34860) @@ -232,6 +232,7 @@ typedef struct { int in_size; float frame_time; int already_read; + int flush; } s_frame_data; static edl_record_ptr edl_records = NULL; ///< EDL entries memory area @@ -433,6 +434,11 @@ static int slowseek(float end_pts, demux if (!frame_data->already_read) { // when called after fixdelay, a frame is already read frame_data->in_size = video_read_frame(sh_video, &frame_data->frame_time, &frame_data->start, force_fps); + frame_data->flush = frame_data->in_size < 0 && d_video->eof; + if (frame_data->flush) { + frame_data->in_size = 0; + frame_data->start = NULL; + } if(frame_data->in_size<0) return 2; sh_video->timer += frame_data->frame_time; } @@ -454,6 +460,8 @@ static int slowseek(float end_pts, demux void *decoded_frame = decode_video(sh_video, frame_data->start, frame_data->in_size, !softskip, MP_NOPTS_VALUE, NULL); if (decoded_frame) filter_video(sh_video, decoded_frame, MP_NOPTS_VALUE); + else if (frame_data->flush) + return 2; } if (print_info) mp_msg(MSGT_MENCODER, MSGL_STATUS, @@ -1392,6 +1400,11 @@ if(sh_audio){ if (!frame_data.already_read) { frame_data.in_size=video_read_frame(sh_video,&frame_data.frame_time,&frame_data.start,force_fps); + frame_data.flush = frame_data.in_size < 0 && d_video->eof; + if (frame_data.flush) { + frame_data.in_size = 0; + frame_data.start = NULL; + } sh_video->timer+=frame_data.frame_time; } frame_data.frame_time /= playback_speed; @@ -1469,6 +1482,8 @@ default: ((vf_instance_t *)sh_video->vfilter)->control(sh_video->vfilter, VFCTRL_SKIP_NEXT_FRAME, 0) != CONTROL_TRUE); void *decoded_frame = decode_video(sh_video,frame_data.start,frame_data.in_size, drop_frame, MP_NOPTS_VALUE, NULL); + if (frame_data.flush && !decoded_frame) + at_eof = 1; if (did_seek && sh_video->pts != MP_NOPTS_VALUE) { did_seek = 0; sub_offset = sh_video->pts; Modified: trunk/mplayer.c ============================================================================== --- trunk/mplayer.c Sun Apr 15 15:12:56 2012 (r34859) +++ trunk/mplayer.c Sun Apr 15 17:01:09 2012 (r34860) @@ -1798,6 +1798,7 @@ static int generate_video_frame(sh_video if (in_size < 0) { // try to extract last frames in case of decoder lag in_size = 0; + start = NULL; pts = MP_NOPTS_VALUE; hit_eof = 1; } @@ -2425,6 +2426,7 @@ static double update_video(int *blit_fra int full_frame; do { + int flush; current_module = "video_read_frame"; frame_time = sh_video->next_frame_time; in_size = video_read_frame(sh_video, &sh_video->next_frame_time, @@ -2441,6 +2443,11 @@ static double update_video(int *blit_fra mpctx->stream->eof = 0; } else #endif + flush = in_size < 0 && mpctx->d_video->eof; + if (flush) { + start = NULL; + in_size = 0; + } if (in_size < 0) return -1; if (in_size > max_framesize) @@ -2450,12 +2457,15 @@ static double update_video(int *blit_fra #ifdef CONFIG_DVDNAV full_frame = 1; decoded_frame = mp_dvdnav_restore_smpi(&in_size, &start, decoded_frame); - // still frame has been reached, no need to decode - if (in_size > 0 && !decoded_frame) #endif + // still frame has been reached, no need to decode + if ((in_size > 0 || flush) && !decoded_frame) decoded_frame = decode_video(sh_video, start, in_size, drop_frame, sh_video->pts, &full_frame); + if (flush && !decoded_frame) + return -1; + if (full_frame) { sh_video->timer += frame_time; if (mpctx->sh_audio) From subversion at mplayerhq.hu Sun Apr 15 17:09:34 2012 From: subversion at mplayerhq.hu (reimar) Date: Sun, 15 Apr 2012 17:09:34 +0200 (CEST) Subject: [MPlayer-cvslog] r34861 - trunk/libvo/vo_yuv4mpeg.c Message-ID: <20120415150934.86A04155BDB@avserver.banki.hu> Author: reimar Date: Sun Apr 15 17:09:34 2012 New Revision: 34861 Log: yuv4mpeg: support writing to stdout instead of file. Modified: trunk/libvo/vo_yuv4mpeg.c Modified: trunk/libvo/vo_yuv4mpeg.c ============================================================================== --- trunk/libvo/vo_yuv4mpeg.c Sun Apr 15 17:01:09 2012 (r34860) +++ trunk/libvo/vo_yuv4mpeg.c Sun Apr 15 17:09:34 2012 (r34861) @@ -132,7 +132,7 @@ static int config(uint32_t width, uint32 write_bytes = image_width * image_height * 3 / 2; image = malloc(write_bytes); - yuv_out = fopen(yuv_filename, "wb"); + yuv_out = strcmp(yuv_filename, "-") ? fopen(yuv_filename, "wb") : stdout; if (!yuv_out || image == 0) { mp_msg(MSGT_VO,MSGL_FATAL, @@ -238,7 +238,7 @@ static void uninit(void) free(image); image = NULL; - if(yuv_out) + if(yuv_out && yuv_out != stdout) fclose(yuv_out); yuv_out = NULL; From subversion at mplayerhq.hu Sun Apr 15 17:23:43 2012 From: subversion at mplayerhq.hu (reimar) Date: Sun, 15 Apr 2012 17:23:43 +0200 (CEST) Subject: [MPlayer-cvslog] r34862 - trunk/libvo/vo_yuv4mpeg.c Message-ID: <20120415152343.B36EC155C62@avserver.banki.hu> Author: reimar Date: Sun Apr 15 17:23:43 2012 New Revision: 34862 Log: Allow using -vo yuv4mpeg for files with resolution changes. Not all programs can read such files. Modified: trunk/libvo/vo_yuv4mpeg.c Modified: trunk/libvo/vo_yuv4mpeg.c ============================================================================== --- trunk/libvo/vo_yuv4mpeg.c Sun Apr 15 17:09:34 2012 (r34861) +++ trunk/libvo/vo_yuv4mpeg.c Sun Apr 15 17:23:43 2012 (r34862) @@ -105,7 +105,6 @@ static int config(uint32_t width, uint32 "Video formats differ (w:%i=>%i, h:%i=>%i, fps:%f=>%f), " "restarting output.\n", image_width, width, image_height, height, image_fps, vo_fps); - uninit(); } image_height = height; image_width = width; @@ -130,9 +129,11 @@ static int config(uint32_t width, uint32 } write_bytes = image_width * image_height * 3 / 2; + free(image); image = malloc(write_bytes); - yuv_out = strcmp(yuv_filename, "-") ? fopen(yuv_filename, "wb") : stdout; + if (!yuv_out) + yuv_out = strcmp(yuv_filename, "-") ? fopen(yuv_filename, "wb") : stdout; if (!yuv_out || image == 0) { mp_msg(MSGT_VO,MSGL_FATAL, From subversion at mplayerhq.hu Sun Apr 15 17:25:26 2012 From: subversion at mplayerhq.hu (reimar) Date: Sun, 15 Apr 2012 17:25:26 +0200 (CEST) Subject: [MPlayer-cvslog] r34863 - trunk/libmpcodecs/vd_ffmpeg.c Message-ID: <20120415152526.C9513155BF4@avserver.banki.hu> Author: reimar Date: Sun Apr 15 17:25:26 2012 New Revision: 34863 Log: Allow using up to 16 threads, that should be the maximum safe value. Modified: trunk/libmpcodecs/vd_ffmpeg.c Modified: trunk/libmpcodecs/vd_ffmpeg.c ============================================================================== --- trunk/libmpcodecs/vd_ffmpeg.c Sun Apr 15 17:23:43 2012 (r34862) +++ trunk/libmpcodecs/vd_ffmpeg.c Sun Apr 15 17:25:26 2012 (r34863) @@ -131,7 +131,7 @@ const m_option_t lavc_decode_opts_conf[] {"skiploopfilter", &lavc_param_skip_loop_filter_str , CONF_TYPE_STRING , 0, 0, 0, NULL}, {"skipidct" , &lavc_param_skip_idct_str , CONF_TYPE_STRING , 0, 0, 0, NULL}, {"skipframe" , &lavc_param_skip_frame_str , CONF_TYPE_STRING , 0, 0, 0, NULL}, - {"threads" , &lavc_param_threads , CONF_TYPE_INT , CONF_RANGE, 1, 8, NULL}, + {"threads" , &lavc_param_threads , CONF_TYPE_INT , CONF_RANGE, 1, 16, NULL}, {"bitexact" , &lavc_param_bitexact , CONF_TYPE_FLAG , 0, 0, CODEC_FLAG_BITEXACT, NULL}, {"o" , &lavc_avopt , CONF_TYPE_STRING , 0, 0, 0, NULL}, {NULL, NULL, 0, 0, 0, 0, NULL} From ib at wupperonline.de Sun Apr 15 20:03:20 2012 From: ib at wupperonline.de (=?ISO-8859-1?Q?Ingo=20Br=FCckl?=) Date: Sun, 15 Apr 2012 20:03:20 +0200 Subject: [MPlayer-cvslog] r34860 - in trunk: libmpcodecs/vd_ffmpeg.c libmpcodecs/vd_mpegpes.c libmpcodecs/vd In-Reply-To: <20120415150109.E4506155E1C@avserver.banki.hu> Message-ID: <4f8b0dcb.2dc29ea7.bm000@wupperonline.de> > Author: reimar > Date: Sun Apr 15 17:01:09 2012 > New Revision: 34860 mplayer.c: In function 'update_video': mplayer.c:2429: warning: 'flush' may be used uninitialized in this function Did you notice this message? > Modified: trunk/mplayer.c > ============================================================================== > +++ trunk/mplayer.c Sun Apr 15 17:01:09 2012 (r34860) > @@ -2425,6 +2426,7 @@ static double update_video(int *blit_fra > int full_frame; > > do { > + int flush; > current_module = "video_read_frame"; > frame_time = sh_video->next_frame_time; > in_size = video_read_frame(sh_video, > &sh_video->next_frame_time, > @@ -2441,6 +2443,11 @@ static double update_video(int *blit_fra > mpctx->stream->eof = 0; > } else > #endif > + flush = in_size < 0 && mpctx->d_video->eof; > + if (flush) { > + start = NULL; > + in_size = 0; > + } > if (in_size < 0) > return -1; > if (in_size > max_framesize) I don't know nothing about what this is all about, but the "else" in the CONFIG_DVDNAV block grabs the "flush = in_size < 0 && mpctx->d_video->eof;". Ingo From subversion at mplayerhq.hu Sun Apr 15 21:19:00 2012 From: subversion at mplayerhq.hu (reimar) Date: Sun, 15 Apr 2012 21:19:00 +0200 (CEST) Subject: [MPlayer-cvslog] r34864 - trunk/libmpdemux/demux_ts.c Message-ID: <20120415191900.F180E155B56@avserver.banki.hu> Author: reimar Date: Sun Apr 15 21:19:00 2012 New Revision: 34864 Log: Make teletext sub streams actually work with native TS demuxer. Modified: trunk/libmpdemux/demux_ts.c Modified: trunk/libmpdemux/demux_ts.c ============================================================================== --- trunk/libmpdemux/demux_ts.c Sun Apr 15 17:25:26 2012 (r34863) +++ trunk/libmpdemux/demux_ts.c Sun Apr 15 21:19:00 2012 (r34864) @@ -414,6 +414,8 @@ static void ts_add_stream(demuxer_t * de sh->type = 'v'; break; case SPU_PGS: sh->type = 'p'; break; + case SPU_TELETEXT: + sh->type = 'd'; break; } priv->ts.streams[es->pid].id = priv->last_sid; priv->ts.streams[es->pid].sh = sh; From Reimar.Doeffinger at gmx.de Sun Apr 15 23:01:32 2012 From: Reimar.Doeffinger at gmx.de (Reimar =?iso-8859-1?Q?D=F6ffinger?=) Date: Sun, 15 Apr 2012 23:01:32 +0200 Subject: [MPlayer-cvslog] r34860 - in trunk: libmpcodecs/vd_ffmpeg.c libmpcodecs/vd_mpegpes.c libmpcodecs/vd In-Reply-To: <4f8b0dcb.2dc29ea7.bm000@wupperonline.de> References: <20120415150109.E4506155E1C@avserver.banki.hu> <4f8b0dcb.2dc29ea7.bm000@wupperonline.de> Message-ID: <20120415210132.GC24227@1und1.de> On Sun, Apr 15, 2012 at 08:03:20PM +0200, Ingo Br?ckl wrote: > > Author: reimar > > Date: Sun Apr 15 17:01:09 2012 > > New Revision: 34860 > > mplayer.c: In function 'update_video': > mplayer.c:2429: warning: 'flush' may be used uninitialized in this function > > Did you notice this message? No, thanks for noticing. > > Modified: trunk/mplayer.c > > ============================================================================== > > +++ trunk/mplayer.c Sun Apr 15 17:01:09 2012 (r34860) > > @@ -2425,6 +2426,7 @@ static double update_video(int *blit_fra > > int full_frame; > > > > do { > > + int flush; > > current_module = "video_read_frame"; > > frame_time = sh_video->next_frame_time; > > in_size = video_read_frame(sh_video, > > &sh_video->next_frame_time, > > @@ -2441,6 +2443,11 @@ static double update_video(int *blit_fra > > mpctx->stream->eof = 0; > > } else > > #endif > > + flush = in_size < 0 && mpctx->d_video->eof; > > + if (flush) { > > + start = NULL; > > + in_size = 0; > > + } > > if (in_size < 0) > > return -1; > > if (in_size > max_framesize) > > I don't know nothing about what this is all about, but the "else" in the > CONFIG_DVDNAV block grabs the "flush = in_size < 0 && mpctx->d_video->eof;". It is kind of a special-case mess to display the still frames in DVD menus. It seems there's a whole lot of stuff broken again around that anyway. I'll fix that one first though. From subversion at mplayerhq.hu Sun Apr 15 23:02:59 2012 From: subversion at mplayerhq.hu (reimar) Date: Sun, 15 Apr 2012 23:02:59 +0200 (CEST) Subject: [MPlayer-cvslog] r34865 - trunk/mplayer.c Message-ID: <20120415210259.E625E155B3A@avserver.banki.hu> Author: reimar Date: Sun Apr 15 23:02:59 2012 New Revision: 34865 Log: Fix dvdnav case to not leave "flush" uninitialized. Modified: trunk/mplayer.c Modified: trunk/mplayer.c ============================================================================== --- trunk/mplayer.c Sun Apr 15 21:19:00 2012 (r34864) +++ trunk/mplayer.c Sun Apr 15 23:02:59 2012 (r34865) @@ -2441,14 +2441,14 @@ static double update_video(int *blit_fra if (mpctx->d_audio) mpctx->d_audio->eof = 0; mpctx->stream->eof = 0; - } else + } #endif flush = in_size < 0 && mpctx->d_video->eof; if (flush) { start = NULL; in_size = 0; } - if (in_size < 0) + if (mpctx->stream->type != STREAMTYPE_DVDNAV && in_size < 0) return -1; if (in_size > max_framesize) max_framesize = in_size; // stats From subversion at mplayerhq.hu Sun Apr 15 23:37:16 2012 From: subversion at mplayerhq.hu (reimar) Date: Sun, 15 Apr 2012 23:37:16 +0200 (CEST) Subject: [MPlayer-cvslog] r34866 - trunk/sub/spudec.c Message-ID: <20120415213716.100DF155CC4@avserver.banki.hu> Author: reimar Date: Sun Apr 15 23:37:15 2012 New Revision: 34866 Log: Ensure that the highlight disappears when switching from DVD menu to playback. Modified: trunk/sub/spudec.c Modified: trunk/sub/spudec.c ============================================================================== --- trunk/sub/spudec.c Sun Apr 15 23:02:59 2012 (r34865) +++ trunk/sub/spudec.c Sun Apr 15 23:37:15 2012 (r34866) @@ -273,11 +273,17 @@ static int apply_palette_crop(spudec_han uint8_t *src; uint16_t pal[4]; unsigned stride = (crop_w + 7) & ~7; + int ret = 1; if (crop_x > this->pal_width || crop_y > this->pal_height || crop_w > this->pal_width - crop_x || crop_h > this->pal_width - crop_y || crop_w > 0x8000 || crop_h > 0x8000 || stride * crop_h > this->image_size) { - return 0; + // this might be an actual error or just signal that + // the highlight should be removed. + this->width = 0; + this->height = 0; + ret = 0; + goto out; } for (i = 0; i < 4; ++i) { int color; @@ -304,6 +310,7 @@ static int apply_palette_crop(spudec_han this->start_row = this->pal_start_row + crop_y; spudec_cut_image(this); +out: // reset scaled image this->scaled_frame_width = 0; this->scaled_frame_height = 0; From ib at wupperonline.de Mon Apr 16 12:06:47 2012 From: ib at wupperonline.de (=?ISO-8859-1?Q?Ingo=20Br=FCckl?=) Date: Mon, 16 Apr 2012 12:06:47 +0200 Subject: [MPlayer-cvslog] r34860 - in trunk: libmpcodecs/vd_ffmpeg.c libmpcodecs/vd_mpegpes.c libmpcodec In-Reply-To: <20120415210132.GC24227@1und1.de> Message-ID: <4f8bf253.77850b6e.bm000@wupperonline.de> Reimar D?ffinger wrote on Sun, 15 Apr 2012 23:01:32 +0200: > On Sun, Apr 15, 2012 at 08:03:20PM +0200, Ingo Br?ckl wrote: >> > Author: reimar >> > Date: Sun Apr 15 17:01:09 2012 >> > New Revision: 34860 >> >> mplayer.c: In function 'update_video': >> mplayer.c:2429: warning: 'flush' may be used uninitialized in this function >> >> Did you notice this message? > No, thanks for noticing. You're welcome. BTW, this again raises a (one year old) question why we don't use silent compiling which helps spotting these messages more easily. (For the GUI I personally am using even far stricter warning options.) I don't mind continuing to patch these for me locally but I think that these might be of benefit for all developers. At least they don't worsen anything. Ingo -------------- next part -------------- A non-text attachment was scrubbed... Name: mplayer.Makefile.quiet.patch Type: text/x-makefile Size: 2918 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: mplayer.Makefile.warning.patch Type: text/x-diff Size: 623 bytes Desc: not available URL: From subversion at mplayerhq.hu Wed Apr 18 15:29:53 2012 From: subversion at mplayerhq.hu (ib) Date: Wed, 18 Apr 2012 15:29:53 +0200 (CEST) Subject: [MPlayer-cvslog] r34868 - trunk/gui/ui/widgets.c Message-ID: <20120418132953.F3A93156AA5@avserver.banki.hu> Author: ib Date: Wed Apr 18 15:29:53 2012 New Revision: 34868 Log: Fix crash with icon that has unsupported format. This closes Bugzilla #2057. Modified: trunk/gui/ui/widgets.c Modified: trunk/gui/ui/widgets.c ============================================================================== --- trunk/gui/ui/widgets.c Wed Apr 18 11:04:05 2012 (r34867) +++ trunk/gui/ui/widgets.c Wed Apr 18 15:29:53 2012 (r34868) @@ -73,7 +73,7 @@ static const char gui_icon_name[] = "mpl guiIcon_t guiIcon; -static void gtkLoadIcon(GtkIconTheme *theme, gint size, GdkPixmap **gdkIcon, GdkBitmap **gdkIconMask) +static int gtkLoadIcon(GtkIconTheme *theme, gint size, GdkPixmap **gdkIcon, GdkBitmap **gdkIconMask) { GdkPixbuf *pixbuf; guchar *data; @@ -109,6 +109,8 @@ static void gtkLoadIcon(GtkIconTheme *th /* start up GTK which realizes the pixmaps */ gtk_main_iteration_do(FALSE); + + return (pixbuf != NULL); } void gtkInit(void) @@ -136,13 +138,15 @@ void gtkInit(void) theme = gtk_icon_theme_get_default(); - gtkLoadIcon(theme, 16, &gdkIcon, &gdkIconMask); + if (gtkLoadIcon(theme, 16, &gdkIcon, &gdkIconMask)) { guiIcon.small = GDK_PIXMAP_XID(gdkIcon); guiIcon.small_mask = GDK_PIXMAP_XID(gdkIconMask); + } - gtkLoadIcon(theme, 32, &gdkIcon, &gdkIconMask); + if (gtkLoadIcon(theme, 32, &gdkIcon, &gdkIconMask)) { guiIcon.normal = GDK_PIXMAP_XID(gdkIcon); guiIcon.normal_mask = GDK_PIXMAP_XID(gdkIconMask); + } gtkLoadIcon(theme, 48, &gdkIcon, &gdkIconMask); From subversion at mplayerhq.hu Wed Apr 18 15:34:48 2012 From: subversion at mplayerhq.hu (ib) Date: Wed, 18 Apr 2012 15:34:48 +0200 (CEST) Subject: [MPlayer-cvslog] r34869 - trunk/gui/ui/widgets.c Message-ID: <20120418133449.004EA156AA5@avserver.banki.hu> Author: ib Date: Wed Apr 18 15:34:48 2012 New Revision: 34869 Log: Cosmetic: Adjust indent. Modified: trunk/gui/ui/widgets.c Modified: trunk/gui/ui/widgets.c ============================================================================== --- trunk/gui/ui/widgets.c Wed Apr 18 15:29:53 2012 (r34868) +++ trunk/gui/ui/widgets.c Wed Apr 18 15:34:48 2012 (r34869) @@ -139,13 +139,13 @@ void gtkInit(void) theme = gtk_icon_theme_get_default(); if (gtkLoadIcon(theme, 16, &gdkIcon, &gdkIconMask)) { - guiIcon.small = GDK_PIXMAP_XID(gdkIcon); - guiIcon.small_mask = GDK_PIXMAP_XID(gdkIconMask); + guiIcon.small = GDK_PIXMAP_XID(gdkIcon); + guiIcon.small_mask = GDK_PIXMAP_XID(gdkIconMask); } if (gtkLoadIcon(theme, 32, &gdkIcon, &gdkIconMask)) { - guiIcon.normal = GDK_PIXMAP_XID(gdkIcon); - guiIcon.normal_mask = GDK_PIXMAP_XID(gdkIconMask); + guiIcon.normal = GDK_PIXMAP_XID(gdkIcon); + guiIcon.normal_mask = GDK_PIXMAP_XID(gdkIconMask); } gtkLoadIcon(theme, 48, &gdkIcon, &gdkIconMask); From subversion at mplayerhq.hu Thu Apr 19 16:55:00 2012 From: subversion at mplayerhq.hu (ib) Date: Thu, 19 Apr 2012 16:55:00 +0200 (CEST) Subject: [MPlayer-cvslog] [propchange]: r34868 - svn:log Message-ID: <20120419145500.46D97157C32@avserver.banki.hu> Author: ib Revision: 34868 Property Name: svn:log Action: modified Property diff: --- old property value +++ new property value @@ -1,3 +1,3 @@ -Fix crash with icon that has unsupported format. +Fix crash with icon that can't be loaded. This closes Bugzilla #2057. From subversion at mplayerhq.hu Fri Apr 20 20:30:40 2012 From: subversion at mplayerhq.hu (reimar) Date: Fri, 20 Apr 2012 20:30:40 +0200 (CEST) Subject: [MPlayer-cvslog] r34870 - trunk/mplayer.c Message-ID: <20120420183040.A8C59159613@avserver.banki.hu> Author: reimar Date: Fri Apr 20 20:30:40 2012 New Revision: 34870 Log: Use a local variable to reduce some code clutter. Based on and in preparation for patch(es) by Roger Pack [rogerdpack2 gmail] Modified: trunk/mplayer.c Modified: trunk/mplayer.c ============================================================================== --- trunk/mplayer.c Wed Apr 18 15:34:48 2012 (r34869) +++ trunk/mplayer.c Fri Apr 20 20:30:40 2012 (r34870) @@ -2621,6 +2621,7 @@ static void edl_loadfile(void) // Execute EDL command for the current position if one exists static void edl_update(MPContext *mpctx) { + double pts; if (!edl_records) return; @@ -2632,6 +2633,7 @@ static void edl_update(MPContext *mpctx) return; } + pts = mpctx->sh_video->pts; // This indicates that we need to reset next EDL record according // to new PTS due to seek or other condition if (edl_needs_reset) { @@ -2642,19 +2644,19 @@ static void edl_update(MPContext *mpctx) // Find next record, also skip immediately if we are already // inside any record while (next_edl_record) { - if (next_edl_record->start_sec > mpctx->sh_video->pts) + if (next_edl_record->start_sec > pts) break; - if (next_edl_record->stop_sec >= mpctx->sh_video->pts) { + if (next_edl_record->stop_sec >= pts) { if (edl_backward) { mpctx->osd_function = OSD_REW; edl_decision = 1; abs_seek_pos = 0; - rel_seek_secs = -(mpctx->sh_video->pts - + rel_seek_secs = -(pts - next_edl_record->start_sec + edl_backward_delay); mp_msg(MSGT_CPLAYER, MSGL_DBG4, "EDL_SKIP: pts [%f], " "offset [%f], start [%f], stop [%f], length [%f]\n", - mpctx->sh_video->pts, rel_seek_secs, + pts, rel_seek_secs, next_edl_record->start_sec, next_edl_record->stop_sec, next_edl_record->length_sec); return; @@ -2672,15 +2674,15 @@ static void edl_update(MPContext *mpctx) } if (next_edl_record && - mpctx->sh_video->pts >= next_edl_record->start_sec) { + pts >= next_edl_record->start_sec) { if (next_edl_record->action == EDL_SKIP) { mpctx->osd_function = OSD_FFW; edl_decision = 1; abs_seek_pos = 0; - rel_seek_secs = next_edl_record->stop_sec - mpctx->sh_video->pts; + rel_seek_secs = next_edl_record->stop_sec - pts; mp_msg(MSGT_CPLAYER, MSGL_DBG4, "EDL_SKIP: pts [%f], offset [%f], " "start [%f], stop [%f], length [%f]\n", - mpctx->sh_video->pts, rel_seek_secs, + pts, rel_seek_secs, next_edl_record->start_sec, next_edl_record->stop_sec, next_edl_record->length_sec); } else if (next_edl_record->action == EDL_MUTE) { From Reimar.Doeffinger at gmx.de Sun Apr 22 12:56:14 2012 From: Reimar.Doeffinger at gmx.de (Reimar =?iso-8859-1?Q?D=F6ffinger?=) Date: Sun, 22 Apr 2012 12:56:14 +0200 Subject: [MPlayer-cvslog] r34860 - in trunk: libmpcodecs/vd_ffmpeg.c libmpcodecs/vd_mpegpes.c libmpcodec In-Reply-To: <4f8bf253.77850b6e.bm000@wupperonline.de> References: <20120415210132.GC24227@1und1.de> <4f8bf253.77850b6e.bm000@wupperonline.de> Message-ID: <20120422105614.GE2997@1und1.de> On Mon, Apr 16, 2012 at 12:06:47PM +0200, Ingo Br?ckl wrote: > Reimar D?ffinger wrote on Sun, 15 Apr 2012 23:01:32 +0200: > > > On Sun, Apr 15, 2012 at 08:03:20PM +0200, Ingo Br?ckl wrote: > >> > Author: reimar > >> > Date: Sun Apr 15 17:01:09 2012 > >> > New Revision: 34860 > >> > >> mplayer.c: In function 'update_video': > >> mplayer.c:2429: warning: 'flush' may be used uninitialized in this function > >> > >> Did you notice this message? > > > No, thanks for noticing. > > You're welcome. > > BTW, this again raises a (one year old) question why we don't use silent > compiling which helps spotting these messages more easily. (For the GUI > I personally am using even far stricter warning options.) I don't mind > continuing to patch these for me locally but I think that these might be > of benefit for all developers. At least they don't worsen anything. > > Ingo > Prettify make output. > > By default, make gives brief compiling messages. > For full command echoing, add V=1 to make. > > > Index: Makefile > =================================================================== > --- Makefile (revision 33134) > +++ Makefile (working copy) > @@ -21,6 +21,14 @@ > > include config.mak > > +ifdef V > +P = @\# > +Q = > +else > +P = @ > +Q = @ > +endif The FFmpeg approach is nicer and avoids having to change all the rules. Though it will require a few hacks/rule changes, too. From subversion at mplayerhq.hu Sun Apr 22 14:10:49 2012 From: subversion at mplayerhq.hu (reimar) Date: Sun, 22 Apr 2012 14:10:49 +0200 (CEST) Subject: [MPlayer-cvslog] r34871 - trunk/stream/stream.c Message-ID: <20120422121049.8A75C15B8C8@avserver.banki.hu> Author: reimar Date: Sun Apr 22 14:10:49 2012 New Revision: 34871 Log: Retry reconnecting several times. Also add a delay, otherwise a server closing any incoming connection immediately would make MPlayer stop even if it happens only for 1 second or so. With this change, no server/network outage of any kind shorter than 5 seconds should cause MPlayer to give up anymore. Modified: trunk/stream/stream.c Modified: trunk/stream/stream.c ============================================================================== --- trunk/stream/stream.c Fri Apr 20 20:30:40 2012 (r34870) +++ trunk/stream/stream.c Sun Apr 22 14:10:49 2012 (r34871) @@ -281,6 +281,26 @@ void stream_capture_do(stream_t *s) } } +static int stream_reconnect(stream_t *s) +{ +#define MAX_RECONNECT_RETRIES 5 +#define RECONNECT_SLEEP_MS 1000 + int retry = 0; + off_t pos = s->pos; + // Seeking is used as a hack to make network streams + // reopen the connection, ideally they would implement + // e.g. a STREAM_CTRL_RECONNECT to do this + do { + if (retry >= MAX_RECONNECT_RETRIES) + return 0; + if (retry) usec_sleep(RECONNECT_SLEEP_MS * 1000); + retry++; + s->eof=1; + stream_reset(s); + } while (stream_seek_internal(s, pos) >= 0 || s->pos != pos); // seek failed + return 1; +} + int stream_read_internal(stream_t *s, void *buf, int len) { int orig_len = len; @@ -308,9 +328,8 @@ int stream_read_internal(stream_t *s, vo len= s->fill_buffer ? s->fill_buffer(s, buf, len) : 0; } if(len<=0){ - off_t pos = s->pos; // do not retry if this looks like proper eof - if (s->eof || (s->end_pos && pos == s->end_pos)) + if (s->eof || (s->end_pos && s->pos == s->end_pos)) goto eof_out; // dvdnav has some horrible hacks to "suspend" reads, // we need to skip this code or seeks will hang. @@ -319,12 +338,7 @@ int stream_read_internal(stream_t *s, vo // just in case this is an error e.g. due to network // timeout reset and retry - // Seeking is used as a hack to make network streams - // reopen the connection, ideally they would implement - // e.g. a STREAM_CTRL_RECONNECT to do this - s->eof=1; - stream_reset(s); - if (stream_seek_internal(s, pos) >= 0 || s->pos != pos) // seek failed + if (!stream_reconnect(s)) goto eof_out; // make sure EOF is set to ensure no endless loops s->eof=1; From diego at biurrun.de Sun Apr 22 16:36:37 2012 From: diego at biurrun.de (Diego Biurrun) Date: Sun, 22 Apr 2012 16:36:37 +0200 Subject: [MPlayer-cvslog] r34868 - trunk/gui/ui/widgets.c In-Reply-To: <20120418132953.F3A93156AA5@avserver.banki.hu> References: <20120418132953.F3A93156AA5@avserver.banki.hu> Message-ID: <20120422143637.GA30643@pool.informatik.rwth-aachen.de> On Wed, Apr 18, 2012 at 03:29:53PM +0200, ib wrote: > > --- trunk/gui/ui/widgets.c Wed Apr 18 11:04:05 2012 (r34867) > +++ trunk/gui/ui/widgets.c Wed Apr 18 15:29:53 2012 (r34868) > @@ -109,6 +109,8 @@ static void gtkLoadIcon(GtkIconTheme *th > > /* start up GTK which realizes the pixmaps */ > gtk_main_iteration_do(FALSE); > + > + return (pixbuf != NULL); pointless () Diego From tempn at twmi.rr.com Sun Apr 22 16:46:25 2012 From: tempn at twmi.rr.com (compn) Date: Sun, 22 Apr 2012 10:46:25 -0400 Subject: [MPlayer-cvslog] r34871 - trunk/stream/stream.c In-Reply-To: <20120422121049.8A75C15B8C8@avserver.banki.hu> References: <20120422121049.8A75C15B8C8@avserver.banki.hu> Message-ID: <20120422104625.512ebdb9.tempn@twmi.rr.com> On Sun, 22 Apr 2012 14:10:49 +0200 (CEST), reimar wrote: > >With this change, no server/network outage of any kind shorter >than 5 seconds should cause MPlayer to give up anymore. want to you make it a runtime option? lots of strange users like fiddling with wifi networks and broken internet. maybe they want 120+ second timeouts like some protocols handle. -compn From Reimar.Doeffinger at gmx.de Sun Apr 22 17:26:44 2012 From: Reimar.Doeffinger at gmx.de (Reimar =?iso-8859-1?Q?D=F6ffinger?=) Date: Sun, 22 Apr 2012 17:26:44 +0200 Subject: [MPlayer-cvslog] r34871 - trunk/stream/stream.c In-Reply-To: <20120422104625.512ebdb9.tempn@twmi.rr.com> References: <20120422121049.8A75C15B8C8@avserver.banki.hu> <20120422104625.512ebdb9.tempn@twmi.rr.com> Message-ID: <20120422152644.GA21570@1und1.de> On Sun, Apr 22, 2012 at 10:46:25AM -0400, compn wrote: > On Sun, 22 Apr 2012 14:10:49 +0200 (CEST), reimar wrote: > > > >With this change, no server/network outage of any kind shorter > >than 5 seconds should cause MPlayer to give up anymore. > > want to you make it a runtime option? > lots of strange users like fiddling with wifi networks and broken > internet. maybe they want 120+ second timeouts like some protocols > handle. There is already the normal network timeout. This is rather the case where the network timeout has already happened and we're trying again. Considering how rarely this issue seems to appear, I don't really like adding more option clutter for it. Not until someone comes with some real need for it. And even then we probably should add options for the ordinary network timeout first. My concern with the original code was mostly that e.g. a 1 ms misconfiguration in a local firewall (where it would immediately close any connection) could cause MPlayer to stop playing. I think there are still some issues, e.g. I believe the seeking code does not retry, so doing a seek right when there is a (even very short) network failure will break things, but that's for some other time. From subversion at mplayerhq.hu Sun Apr 22 23:52:40 2012 From: subversion at mplayerhq.hu (cigaes) Date: Sun, 22 Apr 2012 23:52:40 +0200 (CEST) Subject: [MPlayer-cvslog] r34872 - in trunk/sub: av_sub.c spudec.c spudec.h Message-ID: <20120422215240.0E5B315BCA4@avserver.banki.hu> Author: cigaes Date: Sun Apr 22 23:52:39 2012 New Revision: 34872 Log: av_sub: support multiple rectangles. The "packet_t" structure is renamed with a prefix, because it is used a public header. Modified: trunk/sub/av_sub.c trunk/sub/spudec.c trunk/sub/spudec.h Modified: trunk/sub/av_sub.c ============================================================================== --- trunk/sub/av_sub.c Sun Apr 22 14:10:49 2012 (r34871) +++ trunk/sub/av_sub.c Sun Apr 22 23:52:39 2012 (r34872) @@ -32,6 +32,47 @@ void reset_avsub(struct sh_sub *sh) } } +static void avsub_to_spudec(AVSubtitleRect **rects, int num_rects, + double pts, double endpts) +{ + int i, xmin = INT_MAX, ymin = INT_MAX, xmax = INT_MIN, ymax = INT_MIN; + struct spu_packet_t *packet; + + if (num_rects == 1) { + spudec_set_paletted(vo_spudec, + rects[0]->pict.data[0], + rects[0]->pict.linesize[0], + rects[0]->pict.data[1], + rects[0]->x, + rects[0]->y, + rects[0]->w, + rects[0]->h, + pts, + endpts); + return; + } + for (i = 0; i < num_rects; i++) { + xmin = FFMIN(xmin, rects[i]->x); + ymin = FFMIN(ymin, rects[i]->y); + xmax = FFMAX(xmax, rects[i]->x + rects[i]->w); + ymax = FFMAX(ymax, rects[i]->y + rects[i]->h); + } + packet = spudec_packet_create(xmin, ymin, xmax - xmin, ymax - ymin); + if (!packet) + return; + spudec_packet_clear(packet); + for (i = 0; i < num_rects; i++) + spudec_packet_fill(packet, + rects[i]->pict.data[0], + rects[i]->pict.linesize[0], + rects[i]->pict.data[1], + rects[i]->x - xmin, + rects[i]->y - ymin, + rects[i]->w, + rects[i]->h); + spudec_packet_send(vo_spudec, packet, pts, endpts); +} + /** * Decode a subtitle packet via libavcodec. * \return < 0 on error, > 0 if further processing is needed @@ -90,16 +131,7 @@ int decode_avsub(struct sh_sub *sh, uint case SUBTITLE_BITMAP: if (!vo_spudec) vo_spudec = spudec_new_scaled(NULL, ctx->width, ctx->height, NULL, 0); - spudec_set_paletted(vo_spudec, - sub.rects[0]->pict.data[0], - sub.rects[0]->pict.linesize[0], - sub.rects[0]->pict.data[1], - sub.rects[0]->x, - sub.rects[0]->y, - sub.rects[0]->w, - sub.rects[0]->h, - *pts, - *endpts); + avsub_to_spudec(sub.rects, sub.num_rects, *pts, *endpts); vo_osd_changed(OSDTYPE_SPU); break; case SUBTITLE_TEXT: Modified: trunk/sub/spudec.c ============================================================================== --- trunk/sub/spudec.c Sun Apr 22 14:10:49 2012 (r34871) +++ trunk/sub/spudec.c Sun Apr 22 23:52:39 2012 (r34872) @@ -57,8 +57,8 @@ int spu_aamode = 3; int spu_alignment = -1; float spu_gaussvar = 1.0; -typedef struct packet_t packet_t; -struct packet_t { +typedef struct spu_packet_t packet_t; +struct spu_packet_t { int is_decoded; unsigned char *packet; int data_len; @@ -1349,25 +1349,12 @@ void spudec_set_hw_spu(void *this, const #define MP_NOPTS_VALUE (-1LL<<63) //both int64_t and double should be able to represent this exactly -/** - * palette must contain at least 256 32-bit entries, otherwise crashes - * are possible - */ -void spudec_set_paletted(void *this, const uint8_t *pal_img, int pal_stride, - const void *palette, - int x, int y, int w, int h, - double pts, double endpts) +packet_t *spudec_packet_create(int x, int y, int w, int h) { - int i; - uint16_t g8a8_pal[256]; packet_t *packet; - const uint32_t *pal = palette; - spudec_handle_t *spu = this; - uint8_t *img; - uint8_t *aimg; int stride = (w + 7) & ~7; if ((unsigned)w >= 0x8000 || (unsigned)h > 0x4000) - return; + return NULL; packet = calloc(1, sizeof(packet_t)); packet->is_decoded = 1; packet->width = w; @@ -1377,21 +1364,47 @@ void spudec_set_paletted(void *this, con packet->start_row = y; packet->data_len = 2 * stride * h; if (packet->data_len) { // size 0 is a special "clear" packet - packet->packet = malloc(packet->data_len); - img = packet->packet; - aimg = packet->packet + stride * h; - for (i = 0; i < 256; i++) { - uint32_t pixel = pal[i]; - int alpha = pixel >> 24; - int gray = (((pixel & 0x000000ff) >> 0) + - ((pixel & 0x0000ff00) >> 7) + - ((pixel & 0x00ff0000) >> 16)) >> 2; - gray = FFMIN(gray, alpha); - g8a8_pal[i] = (-alpha << 8) | gray; - } - pal2gray_alpha(g8a8_pal, pal_img, pal_stride, - img, aimg, stride, w, h); + packet->packet = malloc(packet->data_len); + if (!packet->packet) { + free(packet); + packet = NULL; + } + } + return packet; +} + +void spudec_packet_clear(packet_t *packet) +{ + /* clear alpha and value, as value is premultiplied */ + memset(packet->packet, 0, packet->data_len); +} + +void spudec_packet_fill(packet_t *packet, + const uint8_t *pal_img, int pal_stride, + const void *palette, + int x, int y, int w, int h) +{ + const uint32_t *pal = palette; + uint8_t *img = packet->packet + x + y * packet->stride; + uint8_t *aimg = img + packet->stride * packet->height; + int i; + uint16_t g8a8_pal[256]; + + for (i = 0; i < 256; i++) { + uint32_t pixel = pal[i]; + int alpha = pixel >> 24; + int gray = (((pixel & 0x000000ff) >> 0) + + ((pixel & 0x0000ff00) >> 7) + + ((pixel & 0x00ff0000) >> 16)) >> 2; + gray = FFMIN(gray, alpha); + g8a8_pal[i] = (-alpha << 8) | gray; } + pal2gray_alpha(g8a8_pal, pal_img, pal_stride, + img, aimg, packet->stride, w, h); +} + +void spudec_packet_send(void *spu, packet_t *packet, double pts, double endpts) +{ packet->start_pts = 0; packet->end_pts = 0x7fffffff; if (pts != MP_NOPTS_VALUE) @@ -1400,3 +1413,20 @@ void spudec_set_paletted(void *this, con packet->end_pts = endpts * 90000; spudec_queue_packet(spu, packet); } + +/** + * palette must contain at least 256 32-bit entries, otherwise crashes + * are possible + */ +void spudec_set_paletted(void *spu, const uint8_t *pal_img, int pal_stride, + const void *palette, + int x, int y, int w, int h, + double pts, double endpts) +{ + packet_t *packet = spudec_packet_create(x, y, w, h); + if (!packet) + return; + if (packet->data_len) // size 0 is a special "clear" packet + spudec_packet_fill(packet, pal_img, pal_stride, palette, 0, 0, w, h); + spudec_packet_send(spu, packet, pts, endpts); +} Modified: trunk/sub/spudec.h ============================================================================== --- trunk/sub/spudec.h Sun Apr 22 14:10:49 2012 (r34871) +++ trunk/sub/spudec.h Sun Apr 22 23:52:39 2012 (r34872) @@ -41,5 +41,13 @@ void spudec_set_paletted(void *this, con const void *palette, int x, int y, int w, int h, double pts, double endpts); +struct spu_packet_t *spudec_packet_create(int x, int y, int w, int h); +void spudec_packet_fill(struct spu_packet_t *packet, + const uint8_t *pal_img, int pal_stride, + const void *palette, + int x, int y, int w, int h); +void spudec_packet_send(void *spu, struct spu_packet_t *packet, + double pts, double endpts); +void spudec_packet_clear(struct spu_packet_t *packet); #endif /* MPLAYER_SPUDEC_H */ From subversion at mplayerhq.hu Mon Apr 23 20:39:14 2012 From: subversion at mplayerhq.hu (reimar) Date: Mon, 23 Apr 2012 20:39:14 +0200 (CEST) Subject: [MPlayer-cvslog] r34873 - trunk/stream/stream.c Message-ID: <20120423183914.E800A15D0CC@avserver.banki.hu> Author: reimar Date: Mon Apr 23 20:39:14 2012 New Revision: 34873 Log: Detect prematurely closed connection. Then we get a streaming_stopped status but we have a end_pos and have not reached it yet, do not accept it as EOF but instead try reconnection. For example a forced restart of a webserver will usually result in the connection being closed before EOF. Modified: trunk/stream/stream.c Modified: trunk/stream/stream.c ============================================================================== --- trunk/stream/stream.c Sun Apr 22 23:52:39 2012 (r34872) +++ trunk/stream/stream.c Mon Apr 23 20:39:14 2012 (r34873) @@ -310,7 +310,8 @@ int stream_read_internal(stream_t *s, vo #ifdef CONFIG_NETWORKING if( s->streaming_ctrl!=NULL && s->streaming_ctrl->streaming_read ) { len=s->streaming_ctrl->streaming_read(s->fd, buf, len, s->streaming_ctrl); - if (s->streaming_ctrl->status == streaming_stopped_e) + if (s->streaming_ctrl->status == streaming_stopped_e && + (!s->end_pos || s->pos == s->end_pos)) s->eof = 1; } else #endif From subversion at mplayerhq.hu Mon Apr 23 20:39:16 2012 From: subversion at mplayerhq.hu (reimar) Date: Mon, 23 Apr 2012 20:39:16 +0200 (CEST) Subject: [MPlayer-cvslog] r34874 - trunk/sub/spudec.c Message-ID: <20120423183916.475C915D0D0@avserver.banki.hu> Author: reimar Date: Mon Apr 23 20:39:16 2012 New Revision: 34874 Log: Use more precise alpha handling for -spuaa 4. Modified: trunk/sub/spudec.c Modified: trunk/sub/spudec.c ============================================================================== --- trunk/sub/spudec.c Mon Apr 23 20:39:14 2012 (r34873) +++ trunk/sub/spudec.c Mon Apr 23 20:39:16 2012 (r34874) @@ -877,9 +877,9 @@ static void sws_spu_image(unsigned char ctx=sws_getContext(sw, sh, PIX_FMT_GRAY8, dw, dh, PIX_FMT_GRAY8, SWS_GAUSS, &filter, NULL, NULL); sws_scale(ctx,&s1,&ss,0,sh,&d1,&ds); - for (i=ss*sh-1; i>=0; i--) if (!s2[i]) s2[i] = 255; //else s2[i] = 1; + for (i=ss*sh-1; i>=0; i--) s2[i] = -s2[i]; sws_scale(ctx,&s2,&ss,0,sh,&d2,&ds); - for (i=ds*dh-1; i>=0; i--) if (d2[i]==0) d2[i] = 1; else if (d2[i]==255) d2[i] = 0; + for (i=ds*dh-1; i>=0; i--) d2[i] = -d2[i]; sws_freeContext(ctx); } From subversion at mplayerhq.hu Tue Apr 24 20:00:29 2012 From: subversion at mplayerhq.hu (reimar) Date: Tue, 24 Apr 2012 20:00:29 +0200 (CEST) Subject: [MPlayer-cvslog] r34875 - trunk/Changelog Message-ID: <20120424180030.0C8A615DF03@avserver.banki.hu> Author: reimar Date: Tue Apr 24 20:00:29 2012 New Revision: 34875 Log: Minor Changelog updates for release. Modified: trunk/Changelog Modified: trunk/Changelog ============================================================================== --- trunk/Changelog Mon Apr 23 20:39:16 2012 (r34874) +++ trunk/Changelog Tue Apr 24 20:00:29 2012 (r34875) @@ -1,6 +1,6 @@ -MPlayer (1.0) +MPlayer - rc5: + 1.1: "We gave up on 1.0" Decoders: * FFmpeg AAC decoder is now preferred over libfaad2 and the internal @@ -16,9 +16,12 @@ MPlayer (1.0) Other: * support adding noise at output resolution with -vo gl:noise-strength=8 + * experimental support for OpenGL ES 1.0 in -vo gl * experimental support for PGS (BluRay-compatible), DVB and XSUB subtitles. * experimental af_cmdline slave command to change e.g. audio equalizer options at runtime. * vo x11: don't hide or show cursor any more if attached to an existing window (-wid) + * try reconnecting network streams e.g. after network timeouts + * lots of bug fixes as always (and surely a few new bugs, too :-( ) GUI: * all skin messages available as slave commands (gui ) @@ -29,6 +32,8 @@ MPlayer (1.0) MEncoder: * -force-key-frames option to set explicit seek points. +MPlayer (1.0) + rc4: "Yes We Can" GUI: Changes towards removing the GUI From subversion at mplayerhq.hu Tue Apr 24 20:04:15 2012 From: subversion at mplayerhq.hu (reimar) Date: Tue, 24 Apr 2012 20:04:15 +0200 (CEST) Subject: [MPlayer-cvslog] r34876 - trunk/Changelog Message-ID: <20120424180415.800B815DF06@avserver.banki.hu> Author: reimar Date: Tue Apr 24 20:04:15 2012 New Revision: 34876 Log: Remove "experimental" from old features that seem to be working fine. Modified: trunk/Changelog Modified: trunk/Changelog ============================================================================== --- trunk/Changelog Tue Apr 24 20:00:29 2012 (r34875) +++ trunk/Changelog Tue Apr 24 20:04:15 2012 (r34876) @@ -17,8 +17,8 @@ MPlayer Other: * support adding noise at output resolution with -vo gl:noise-strength=8 * experimental support for OpenGL ES 1.0 in -vo gl - * experimental support for PGS (BluRay-compatible), DVB and XSUB subtitles. - * experimental af_cmdline slave command to change e.g. audio equalizer options at runtime. + * support for PGS (BluRay-compatible), DVB and XSUB subtitles. + * af_cmdline slave command to change e.g. audio equalizer options at runtime. * vo x11: don't hide or show cursor any more if attached to an existing window (-wid) * try reconnecting network streams e.g. after network timeouts * lots of bug fixes as always (and surely a few new bugs, too :-( ) From subversion at mplayerhq.hu Tue Apr 24 23:01:15 2012 From: subversion at mplayerhq.hu (ranma) Date: Tue, 24 Apr 2012 23:01:15 +0200 (CEST) Subject: [MPlayer-cvslog] r34877 - trunk/libaf/reorder_ch.c Message-ID: <20120424210115.DC5D315DF54@avserver.banki.hu> Author: ranma Date: Tue Apr 24 23:01:15 2012 New Revision: 34877 Log: This will allow us to encode 7.1 audio AAC. 7.1 audio not being really popular, instead of creating a new re_order function, I'm using 2 functions for the re_ordering from L R Ls Rs C LFE Rls Rrs --> C L R Ls Rs Rls Rrs LFE Patch by Thierry Foucu [tfoucu gmail] Modified: trunk/libaf/reorder_ch.c Modified: trunk/libaf/reorder_ch.c ============================================================================== --- trunk/libaf/reorder_ch.c Tue Apr 24 20:04:15 2012 (r34876) +++ trunk/libaf/reorder_ch.c Tue Apr 24 23:01:15 2012 (r34877) @@ -785,6 +785,9 @@ static int reorder_self_5_step_1(void *s if (chnum==6) { REORDER_SELF_SWAP_5_STEP_1(src_8,tmp,samples,6,s0,s1,s2,s3,s4); } + else if (chnum==8) { + REORDER_SELF_SWAP_5_STEP_1(src_8,tmp,samples,8,s0,s1,s2,s3,s4); + } else { REORDER_SELF_SWAP_5_STEP_1(src_8,tmp,samples,5,s0,s1,s2,s3,s4); } @@ -797,6 +800,9 @@ static int reorder_self_5_step_1(void *s if (chnum==6) { REORDER_SELF_SWAP_5_STEP_1(src_16,tmp,samples,6,s0,s1,s2,s3,s4); } + else if (chnum==8) { + REORDER_SELF_SWAP_5_STEP_1(src_16,tmp,samples,8,s0,s1,s2,s3,s4); + } else { REORDER_SELF_SWAP_5_STEP_1(src_16,tmp,samples,5,s0,s1,s2,s3,s4); } @@ -835,6 +841,9 @@ static int reorder_self_5_step_1(void *s if (chnum==6) { REORDER_SELF_SWAP_5_STEP_1(src_32,tmp,samples,6,s0,s1,s2,s3,s4); } + else if (chnum==8) { + REORDER_SELF_SWAP_5_STEP_1(src_32,tmp,samples,8,s0,s1,s2,s3,s4); + } else { REORDER_SELF_SWAP_5_STEP_1(src_32,tmp,samples,5,s0,s1,s2,s3,s4); } @@ -847,6 +856,9 @@ static int reorder_self_5_step_1(void *s if (chnum==6) { REORDER_SELF_SWAP_5_STEP_1(src_64,tmp,samples,6,s0,s1,s2,s3,s4); } + else if (chnum==8) { + REORDER_SELF_SWAP_5_STEP_1(src_64,tmp,samples,8,s0,s1,s2,s3,s4); + } else { REORDER_SELF_SWAP_5_STEP_1(src_64,tmp,samples,5,s0,s1,s2,s3,s4); } @@ -1250,6 +1262,7 @@ void reorder_channel(void *src, // AF_CHANNEL_LAYOUT_7_1_A L R C LFE Ls Rs Rls Rrs // AF_CHANNEL_LAYOUT_7_1_B L R Ls Rs C LFE Rls Rrs // AF_CHANNEL_LAYOUT_7_1_C L C R Ls Rs LFE Rls Rrs + // AF_CHANNEL_LAYOUT_7_1_D C L R Ls Rs Rls Rrs LFE // AF_CHANNEL_LAYOUT_7_1_F C L R LFE Ls Rs Rls Rrs case AF_CHANNEL_LAYOUT_7_1_A << 16 | AF_CHANNEL_LAYOUT_7_1_B: case AF_CHANNEL_LAYOUT_7_1_B << 16 | AF_CHANNEL_LAYOUT_7_1_A: @@ -1258,6 +1271,12 @@ void reorder_channel(void *src, else reorder_self_4_step_2(src, samples, samplesize, 8, 2, 3, 4, 5); break; + case AF_CHANNEL_LAYOUT_7_1_B << 16 | AF_CHANNEL_LAYOUT_7_1_D: + // First convert to AF_CHANNEL_LAYOUT_7_1_F + reorder_self_2_4(src, samples, samplesize, 8, 3, 5, 4, 2, 1, 0); + // then convert to AF_CHANNEL_LAYOUT_7_1_D + reorder_self_5_step_1(src, samples, samplesize, 8, 3, 4, 5, 6, 7); + break; case AF_CHANNEL_LAYOUT_7_1_C << 16 | AF_CHANNEL_LAYOUT_7_1_B: reorder_self_4_step_1(src, samples, samplesize, 8, 1, 2, 3, 4); break; From subversion at mplayerhq.hu Wed Apr 25 03:07:11 2012 From: subversion at mplayerhq.hu (compn) Date: Wed, 25 Apr 2012 03:07:11 +0200 (CEST) Subject: [MPlayer-cvslog] r34878 - trunk/etc/codecs.conf Message-ID: <20120425010711.E2E4A15DFA2@avserver.banki.hu> Author: compn Date: Wed Apr 25 03:07:11 2012 New Revision: 34878 Log: codecs.conf: add some isom/fourcc to dts decoders Modified: trunk/etc/codecs.conf Modified: trunk/etc/codecs.conf ============================================================================== --- trunk/etc/codecs.conf Tue Apr 24 23:01:15 2012 (r34877) +++ trunk/etc/codecs.conf Wed Apr 25 03:07:11 2012 (r34878) @@ -5158,6 +5158,7 @@ audiocodec ffdca fourcc "DTS " fourcc dtsb ;from vlc fourcc dtsc ;from ffmpeg + fourcc dtse,dtsh,dtsl ;untested format 0x2001 format 0x86 driver ffmpeg @@ -5166,6 +5167,9 @@ audiocodec ffdca audiocodec dts info "DTS-libdca" status working + fourcc "dts " + fourcc "DTS " + fourcc dtsb,dtsc,dtse,dtsh,dtsl ;untested format 0x2001 format 0x86 driver libdca From subversion at mplayerhq.hu Fri Apr 27 16:33:07 2012 From: subversion at mplayerhq.hu (reimar) Date: Fri, 27 Apr 2012 16:33:07 +0200 (CEST) Subject: [MPlayer-cvslog] r34879 - trunk/libvo/vo_yuv4mpeg.c Message-ID: <20120427143307.AA31115E600@avserver.banki.hu> Author: reimar Date: Fri Apr 27 16:33:07 2012 New Revision: 34879 Log: vo_yuv4mpeg: flush userspace FILE buffers after each frame. Potentially reduces delay when piping to stdout/fifo. Modified: trunk/libvo/vo_yuv4mpeg.c Modified: trunk/libvo/vo_yuv4mpeg.c ============================================================================== --- trunk/libvo/vo_yuv4mpeg.c Wed Apr 25 03:07:11 2012 (r34878) +++ trunk/libvo/vo_yuv4mpeg.c Fri Apr 27 16:33:07 2012 (r34879) @@ -170,6 +170,7 @@ static void vo_y4m_write(const void *ptr if (fwrite(ptr, 1, num_bytes, yuv_out) != num_bytes) mp_msg(MSGT_VO,MSGL_ERR, MSGTR_VO_YUV4MPEG_OutFileWriteError); + fflush(yuv_out); } static int write_last_frame(void) From subversion at mplayerhq.hu Sun Apr 29 17:54:21 2012 From: subversion at mplayerhq.hu (cehoyos) Date: Sun, 29 Apr 2012 17:54:21 +0200 (CEST) Subject: [MPlayer-cvslog] r34880 - trunk/configure Message-ID: <20120429155421.3266915EEDB@avserver.banki.hu> Author: cehoyos Date: Sun Apr 29 17:54:20 2012 New Revision: 34880 Log: Try linking when testing for libmad. Modified: trunk/configure Modified: trunk/configure ============================================================================== --- trunk/configure Fri Apr 27 16:33:07 2012 (r34879) +++ trunk/configure Sun Apr 29 17:54:20 2012 (r34880) @@ -6130,7 +6130,7 @@ echores "$_liblzo" echocheck "mad support" if test "$_mad" = auto ; then _mad=no - header_check mad.h -lmad && _mad=yes + statement_check mad.h 'mad_synth_init(0)' -lmad && _mad=yes fi if test "$_mad" = yes ; then def_mad='#define CONFIG_LIBMAD 1' From subversion at mplayerhq.hu Sun Apr 29 18:39:34 2012 From: subversion at mplayerhq.hu (cehoyos) Date: Sun, 29 Apr 2012 18:39:34 +0200 (CEST) Subject: [MPlayer-cvslog] r34881 - in trunk: codec-cfg.c etc/codecs.conf Message-ID: <20120429163934.B72A615EF32@avserver.banki.hu> Author: cehoyos Date: Sun Apr 29 18:39:34 2012 New Revision: 34881 Log: Support new colour spaces for FFmpeg camstudio decoding on big-endian. Modified: trunk/codec-cfg.c trunk/etc/codecs.conf Modified: trunk/codec-cfg.c ============================================================================== --- trunk/codec-cfg.c Sun Apr 29 17:54:20 2012 (r34880) +++ trunk/codec-cfg.c Sun Apr 29 18:39:34 2012 (r34881) @@ -212,6 +212,7 @@ static const struct { {"RGBA", IMGFMT_RGBA}, {"BGR4", IMGFMT_BGR4}, {"BGR8", IMGFMT_BGR8}, + {"BGR15LE", IMGFMT_BGR15LE}, {"BGR15", IMGFMT_BGR15}, {"BGR16", IMGFMT_BGR16}, {"BGR24", IMGFMT_BGR24}, Modified: trunk/etc/codecs.conf ============================================================================== --- trunk/etc/codecs.conf Sun Apr 29 17:54:20 2012 (r34880) +++ trunk/etc/codecs.conf Sun Apr 29 18:39:34 2012 (r34881) @@ -3469,7 +3469,7 @@ videocodec camtasia fourcc TSCC,tscc driver vfw dll "tsccvid.dll" - out BGR32,BGR24,BGR15,BGR8 query,flip + out BGRA,BGR32,BGR24,BGR15LE,BGR15,BGR8 query,flip videocodec ffcamstudio info "CamStudio Screen Codec" From tempn at twmi.rr.com Mon Apr 30 01:42:03 2012 From: tempn at twmi.rr.com (compn) Date: Sun, 29 Apr 2012 19:42:03 -0400 Subject: [MPlayer-cvslog] r34881 - in trunk: codec-cfg.c etc/codecs.conf In-Reply-To: <20120429163934.B72A615EF32@avserver.banki.hu> References: <20120429163934.B72A615EF32@avserver.banki.hu> Message-ID: <20120429194203.8f4a4ec2.tempn@twmi.rr.com> On Sun, 29 Apr 2012 18:39:34 +0200 (CEST), cehoyos wrote: >Author: cehoyos >Date: Sun Apr 29 18:39:34 2012 >New Revision: 34881 > >Log: >Support new colour spaces for FFmpeg camstudio decoding on big-endian. i'm kinda confused this works. i thought we were just supposed to add the base colorspace like BGR15 , and then BGR15BE or BGR15LE would be chosen automatically? is what i wrote about this incorrect in the docs? http://www1.mplayerhq.hu/DOCS/tech/codecs.conf.txt please review it if so... >+ {"BGR15LE", IMGFMT_BGR15LE}, also why 'big-endian' commit message but 'LE' is added ? >- out BGR32,BGR24,BGR15,BGR8 query,flip >+ out BGRA,BGR32,BGR24,BGR15LE,BGR15,BGR8 query,flip you switched BGR32 to BGRA ? does the binary codec support that ? p.s. you added BGR15LE to the binary codec, but not the ffcamtasia codec? p.p.s. the ffcamtasia codec doesnt need the 'query' flag i dont think. -compn From subversion at mplayerhq.hu Mon Apr 30 12:19:12 2012 From: subversion at mplayerhq.hu (cehoyos) Date: Mon, 30 Apr 2012 12:19:12 +0200 (CEST) Subject: [MPlayer-cvslog] r34882 - trunk/etc/codecs.conf Message-ID: <20120430101912.444EE15F2FB@avserver.banki.hu> Author: cehoyos Date: Mon Apr 30 12:19:11 2012 New Revision: 34882 Log: Revert r34881: The change was wrong. Replaced: trunk/etc/codecs.conf - copied unchanged from r34880, trunk/etc/codecs.conf From subversion at mplayerhq.hu Mon Apr 30 12:20:10 2012 From: subversion at mplayerhq.hu (cehoyos) Date: Mon, 30 Apr 2012 12:20:10 +0200 (CEST) Subject: [MPlayer-cvslog] r34883 - trunk/etc/codecs.conf Message-ID: <20120430102010.BC8DB15F2FC@avserver.banki.hu> Author: cehoyos Date: Mon Apr 30 12:20:10 2012 New Revision: 34883 Log: Support new colour spaces for FFmpeg camstudio decoding on big-endian. Modified: trunk/etc/codecs.conf Modified: trunk/etc/codecs.conf ============================================================================== --- trunk/etc/codecs.conf Mon Apr 30 12:19:11 2012 (r34882) +++ trunk/etc/codecs.conf Mon Apr 30 12:20:10 2012 (r34883) @@ -3477,7 +3477,7 @@ videocodec ffcamstudio fourcc CSCD,cscd driver ffmpeg dll "camstudio" - out BGR32,BGR24,BGR15 query + out BGRA,BGR32,BGR24,BGR15LE,BGR15,BGR8 query,flip ; Fraps - Realtime Video Capture - http://www.fraps.com/ videocodec fraps From cehoyos at ag.or.at Mon Apr 30 12:23:11 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Mon, 30 Apr 2012 10:23:11 +0000 (UTC) Subject: [MPlayer-cvslog] r34881 - in trunk: codec-cfg.c etc/codecs.conf References: <20120429163934.B72A615EF32@avserver.banki.hu> <20120429194203.8f4a4ec2.tempn@twmi.rr.com> Message-ID: compn twmi.rr.com> writes: > p.s. you added BGR15LE to the binary codec, but not the ffcamtasia > codec? I tested the patch on big-endian (for ffcamstudio), but accidentally added the changed line to camtasia on my (little-endian) working machine. Thank you for looking, Carl Eugen