mirror of
				https://github.com/vdr-projects/vdr.git
				synced 2025-03-01 10:50:46 +00:00 
			
		
		
		
	Improved handling frames at the beginning and end of a recording in cDvbPlayer for devices with large buffers
This commit is contained in:
		| @@ -1244,6 +1244,8 @@ Reinhard Nissl <rnissl@gmx.de> | ||||
|  for reporting a bug in storing the current OSD size in case the | ||||
|  device has changed it in its setup menu | ||||
|  for increasing the value of MAXFRAMESIZE to better suit HD recordings | ||||
|  for improving handling frames at the beginning and end of a recording in cDvbPlayer | ||||
|  for devices with large buffers | ||||
|  | ||||
| Richard Robson <richard_robson@beeb.net> | ||||
|  for reporting freezing replay if a timer starts while in Transfer Mode from the | ||||
|   | ||||
							
								
								
									
										2
									
								
								HISTORY
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								HISTORY
									
									
									
									
									
								
							| @@ -6317,3 +6317,5 @@ Video Disk Recorder Revision History | ||||
| - Moved the declaration of cMenuCommands to menu.h, so that plugins can use it. | ||||
| - Added a note to the MANUAL, saying that adding new transponders only works if the | ||||
|   "EPG scan" is active (suggested by Halim Sahim). | ||||
| - Improved handling frames at the beginning and end of a recording in cDvbPlayer for | ||||
|   devices with large buffers (thanks to Reinhard Nissl). | ||||
|   | ||||
							
								
								
									
										13
									
								
								dvbplayer.c
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								dvbplayer.c
									
									
									
									
									
								
							| @@ -4,7 +4,7 @@ | ||||
|  * See the main source file 'vdr.c' for copyright information and | ||||
|  * how to reach the author. | ||||
|  * | ||||
|  * $Id: dvbplayer.c 2.19 2009/12/13 13:49:56 kls Exp $ | ||||
|  * $Id: dvbplayer.c 2.20 2010/02/06 12:34:28 kls Exp $ | ||||
|  */ | ||||
|  | ||||
| #include "dvbplayer.h" | ||||
| @@ -396,6 +396,7 @@ void cDvbPlayer::Action(void) | ||||
|   uint32_t LastStc = 0; | ||||
|   int LastReadIFrame = -1; | ||||
|   int SwitchToPlayFrame = 0; | ||||
|   cFrame *DropFrame = NULL; | ||||
|  | ||||
|   while (Running()) { | ||||
|         if (WaitingForData) | ||||
| @@ -502,6 +503,13 @@ void cDvbPlayer::Action(void) | ||||
|           else | ||||
|              Sleep = true; | ||||
|  | ||||
|           if (DropFrame) { | ||||
|              if (!eof || (playDir != pdForward && DropFrame->Index() > 0) || (playDir == pdForward && DropFrame->Index() < readIndex)) { | ||||
|                 ringBuffer->Drop(DropFrame); // the very first and last frame are continously repeated to flush data through the device | ||||
|                 DropFrame = NULL; | ||||
|                 } | ||||
|              } | ||||
|  | ||||
|           // Get the next frame from the buffer: | ||||
|  | ||||
|           if (!playFrame) { | ||||
| @@ -546,8 +554,7 @@ void cDvbPlayer::Action(void) | ||||
|                    Sleep = true; | ||||
|                 } | ||||
|              if (pc <= 0) { | ||||
|                 if (!eof || (playDir != pdForward && playFrame->Index() > 0) || (playDir == pdForward && playFrame->Index() < readIndex)) | ||||
|                    ringBuffer->Drop(playFrame); // the very first and last frame are continously repeated to flush data through the device | ||||
|                 DropFrame = playFrame; | ||||
|                 playFrame = NULL; | ||||
|                 p = NULL; | ||||
|                 } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user