From patchwork Sat May 31 09:52:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWFya28gTcOka2Vsw6Q=?= X-Patchwork-Id: 24112 Received: from localhost ([127.0.0.1] helo=www.linuxtv.org) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1WqfyN-00004y-Jx; Sat, 31 May 2014 11:53:07 +0200 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1WqfyJ-00004t-Tg for vdr@linuxtv.org; Sat, 31 May 2014 11:53:05 +0200 X-tubIT-Incoming-IP: 195.197.172.111 Received: from gw03.mail.saunalahti.fi ([195.197.172.111]) by mail.tu-berlin.de (exim-4.72/mailfrontend-7) with esmtps [UNKNOWN:AES256-GCM-SHA384:256] for id 1WqfyH-0008PD-3C; Sat, 31 May 2014 11:53:03 +0200 Received: from localhost (a88-113-69-187.elisa-laajakaista.fi [88.113.69.187]) by gw03.mail.saunalahti.fi (Postfix) with ESMTP id F336520095 for ; Sat, 31 May 2014 12:52:58 +0300 (EEST) Date: Sat, 31 May 2014 12:52:58 +0300 From: Marko =?iso-8859-1?B?TeRrZWzk?= To: vdr@linuxtv.org Message-ID: <20140531095258.GA3411@x60s> References: <20131225145039.GB4115@x220> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20131225145039.GB4115@x220> User-Agent: Mutt/1.5.23 (2014-03-12) X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2014.5.31.93920 X-PMX-Spam: Gauge=IIIIIIIII, Probability=9%, Report=' RCVD_FROM_IP_DATE 0.1, HTML_00_01 0.05, HTML_00_10 0.05, MSGID_ADDED_BY_MTA 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_2000_2999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, INVALID_MSGID_NO_FQDN 0, __ANY_URI 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CD 0, __CP_MEDIA_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __DATE_TZ_RU 0, __FORWARDED_MSG 0, __HAS_FROM 0, __HAS_MSGID 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __SUBJ_ALPHA_NEGATE 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_MAILTO 0, __URI_NO_PATH 0, __URI_NO_WWW 0, __URI_NS , __USER_AGENT 0' X-LSpam-Score: -1.1 (-) X-LSpam-Report: No, score=-1.1 required=5.0 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793 autolearn=no Subject: Re: [vdr] cSoftDevice::StillPicture() not updating video in VDR 2.0 X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: vdr-bounces@linuxtv.org Errors-To: vdr-bounces@linuxtv.org On Wed, Dec 25, 2013 at 04:50:39PM +0200, Marko Mäkelä wrote: >After upgrading to VDR 2.0, I got Softdevice to almost work (see the >mail archive a couple of months ago). Sometimes it is showing garbage >(really random noise) on the MGA350 OSD layer; I can live with that, >as this box is only used for infrequent recordings. I guess that I removed some memset() call that was essential, when I was trying to debug the display of subtitles. Apparently when no OSD layer is displayed on top of the video layer, the memory can be reused for something else, and I have to clear it again before enabling the OSD layer display. >The last annoying problem is that going to the next or previous I-frame >when editing (buttons 4 and 6 on the remote control) are not updating >the video screen at all. Only the edit mark is moving on the OSD layer. >If I press Play, it will start playing from the current edit mark. So, >it is possible but much more clumsy to cut recordings. Today I found an old PES recording from VDR 1.6, and to my surprise I did see the still frames when moving the edit mark around by pressing 4 or 6. So, it seems that in order to fix this for TS video, I would have to do something differently. That something is actually documented in device.h: virtual void StillPicture(const uchar *Data, int Length); ///< Displays the given I-frame as a still picture. ///< Data points either to TS (first byte is 0x47) or PES (first //byte ///< is 0x00) data of the given Length. The default //implementation ///< converts TS to PES and calls itself again, allowing a //derived class ///< to display PES if it can't handle TS directly. SoftHDDevice is implementing the TS to PES conversion exactly like that. With the following patch, also Softdevice is doing the trick: I guess I might soon set up a repository on vdr-developer.org for the revived Softdevice. If not for anything else, it would be the Linus method of backing up. :) Marko --- softdevice.c 2011-04-17 20:22:19.000000000 +0300 +++ softdevice.c 2014-05-31 12:00:21.159478808 +0300 @@ -527,7 +527,9 @@ void cSoftDevice::SetVolumeDevice(int Vo void cSoftDevice::StillPicture(const uchar *Data, int Length) { SOFTDEB("StillPicture...\n"); - if (decoder) + if (Data[0] == 0x47) // TS packet? + cDevice::StillPicture(Data, Length); // convert to PES and call us again + else if (decoder) decoder->StillPicture((uchar *)Data,Length); }