From 9c79ab35fc7950f8ee35ea0ebea8ca802a225131 Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Thu, 26 Jan 2006 12:40:51 +0000 Subject: send events for tvtime filmmode changes CVS patchset: 7847 CVS date: 2006/01/26 12:40:51 --- ChangeLog | 1 + include/xine.h.in | 5 ++++- src/post/deinterlace/xine_plugin.c | 13 ++++++++++++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7afb46edf..10b668d5f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,7 @@ xine-lib (1.1.2) * Patch from SuSE to fix alsa after hardware suspend * Fix the ./configure --enable-static-xv parameter * Really fix the speed changing race that was mentioned in 1.1.1 + * Send events for tvtime filmmode changes xine-lib (1.1.1) * Improve sound quality when using alsa 1.0.9 or above. diff --git a/include/xine.h.in b/include/xine.h.in index 25b41a0d9..d00403f82 100644 --- a/include/xine.h.in +++ b/include/xine.h.in @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine.h.in,v 1.146 2005/10/30 02:18:35 miguelfreitas Exp $ + * $Id: xine.h.in,v 1.147 2006/01/26 12:40:51 miguelfreitas Exp $ * * public xine-lib (libxine) interface and documentation * @@ -1529,6 +1529,9 @@ void xine_config_reset (xine_t *self); #define XINE_EVENT_VDR_SETVIDEOWINDOW 350 #define XINE_EVENT_VDR_FRAMESIZECHANGED 351 +/* events generated from post plugins */ +#define XINE_EVENT_POST_TVTIME_FILMMODE_CHANGE 400 + /* * xine event struct */ diff --git a/src/post/deinterlace/xine_plugin.c b/src/post/deinterlace/xine_plugin.c index c3ecbd2e3..67de0a06c 100644 --- a/src/post/deinterlace/xine_plugin.c +++ b/src/post/deinterlace/xine_plugin.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_plugin.c,v 1.46 2005/09/19 16:14:02 valtri Exp $ + * $Id: xine_plugin.c,v 1.47 2006/01/26 12:40:51 miguelfreitas Exp $ * * advanced video deinterlacer plugin * Jun/2003 by Miguel Freitas @@ -122,6 +122,7 @@ struct post_plugin_deinterlace_s { int cheap_mode; tvtime_t *tvtime; int tvtime_changed; + int tvtime_last_filmmode; int vo_deinterlace_enabled; int framecounter; @@ -391,6 +392,7 @@ static post_plugin_t *deinterlace_open_plugin(post_class_t *class_gen, int input this->tvtime = tvtime_new_context(); this->tvtime_changed++; + this->tvtime_last_filmmode = 0; pthread_mutex_init (&this->lock, NULL); @@ -719,6 +721,15 @@ static int deinterlace_draw(vo_frame_t *frame, xine_stream_t *stream) this->tvtime_changed = 0; } + if( this->tvtime_last_filmmode != this->tvtime->filmmode ) { + xine_event_t event; + event.type = XINE_EVENT_POST_TVTIME_FILMMODE_CHANGE; + event.stream = stream; + event.data = (void *)&this->tvtime->filmmode; + event.data_length = sizeof(this->tvtime->filmmode); + xine_event_send(stream, &event); + this->tvtime_last_filmmode = this->tvtime->filmmode; + } pthread_mutex_unlock (&this->lock); lprintf("frame flags pf: %d rff: %d tff: %d duration: %d\n", -- cgit v1.2.3