mirror of
				https://github.com/vdr-projects/vdr.git
				synced 2025-03-01 10:50:46 +00:00 
			
		
		
		
	Added a poll to cDvbDevice::PlayVideo() and cDvbDevice::PlayAudio() to avoid excessive CPU load
This commit is contained in:
		
							
								
								
									
										5
									
								
								HISTORY
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								HISTORY
									
									
									
									
									
								
							| @@ -5849,10 +5849,13 @@ Video Disk Recorder Revision History | ||||
|   the patch from ftp://ftp.cadsoft.de/vdr/Developer/av7110_v4ldvb_api5_audiobuf_test_1.diff | ||||
|   to the driver (thanks to Oliver Endriss). | ||||
|  | ||||
| 2008-12-22: Version 1.7.3 | ||||
| 2008-12-28: Version 1.7.3 | ||||
|  | ||||
| - Updated the Russian OSD texts (thanks to Oleg Roitburd). | ||||
| - Fixed handling the 'pointer field' in generating and parsing PAT/PMT (thanks to | ||||
|   Frank Schmirler). | ||||
| - Fixed handling modulation types for DVB-S transponders when processing the NIT. | ||||
| - Changed cDvbDevice::GrabImage() to use V4L2 (thanks to Marco Schl<68><6C>ler). | ||||
| - Added a poll to cDvbDevice::PlayVideo() and cDvbDevice::PlayAudio() to avoid | ||||
|   excessive CPU load (this is just a makeshift solution until the FF DVB cards | ||||
|   can play TS directly). | ||||
|   | ||||
							
								
								
									
										10
									
								
								dvbdevice.c
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								dvbdevice.c
									
									
									
									
									
								
							| @@ -4,7 +4,7 @@ | ||||
|  * See the main source file 'vdr.c' for copyright information and | ||||
|  * how to reach the author. | ||||
|  * | ||||
|  * $Id: dvbdevice.c 2.7 2008/12/22 10:24:10 kls Exp $ | ||||
|  * $Id: dvbdevice.c 2.8 2008/12/28 10:59:51 kls Exp $ | ||||
|  */ | ||||
|  | ||||
| #include "dvbdevice.h" | ||||
| @@ -1303,6 +1303,10 @@ int cDvbDevice::PlayVideo(const uchar *Data, int Length) | ||||
|   int w; | ||||
|   do { | ||||
|      w = WriteAllOrNothing(fd_video, Data, Length, 1000, 10); | ||||
|      if (w < 0 && errno == EAGAIN) { | ||||
|         cPoller Poller(fd_video, true); | ||||
|         Poller.Poll(200); | ||||
|         } | ||||
|      } while (w != Length); | ||||
|   return w; | ||||
| } | ||||
| @@ -1312,6 +1316,10 @@ int cDvbDevice::PlayAudio(const uchar *Data, int Length, uchar Id) | ||||
|   int w; | ||||
|   do { | ||||
|      w = WriteAllOrNothing(fd_audio, Data, Length, 1000, 10); | ||||
|      if (w < 0 && errno == EAGAIN) { | ||||
|         cPoller Poller(fd_audio, true); | ||||
|         Poller.Poll(200); | ||||
|         } | ||||
|      } while (w != Length); | ||||
|   return w; | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user