From eb5bf3b88e11054e30aaa34e713a4a61c167cc04 Mon Sep 17 00:00:00 2001 From: voroshil Date: Thu, 31 May 2007 17:49:51 +0000 Subject: New "automute" tv:// option. Will switch off sound and show blue screen instead of video with noise when signal level (in 0-255 scale) is less than specified value. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23440 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/tvi_def.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'stream/tvi_def.h') diff --git a/stream/tvi_def.h b/stream/tvi_def.h index 7a77dd3a50..72b7bd5101 100644 --- a/stream/tvi_def.h +++ b/stream/tvi_def.h @@ -52,3 +52,41 @@ static void free_handle(tvi_handle_t *h) free(h); } } + +/** + Fills video frame in given buffer with blue color for yv12,i420,uyvy,yuy2. + Other formats will be filled with 0xC0 +*/ +static inline void fill_blank_frame(char* buffer,int len,int fmt){ + int i; + + switch(fmt){ + case IMGFMT_YV12: + memset(buffer, 0xFF,5*len/6); + memset(buffer+5*len/6, 0xFF,len/6); + break; + case IMGFMT_I420: + memset(buffer, 0xFF,4*len/6); + memset(buffer+4*len/6, 0xFF,len/6); + memset(buffer+5*len/6, 0xFF,len/6); + break; + case IMGFMT_UYVY: + for(i=0;i