diff options
-rw-r--r-- | xine_fbfe_frontend.c | 4 | ||||
-rw-r--r-- | xine_frontend.c | 21 | ||||
-rw-r--r-- | xine_sxfe_frontend.c | 4 |
3 files changed, 20 insertions, 9 deletions
diff --git a/xine_fbfe_frontend.c b/xine_fbfe_frontend.c index 1332a266..5adf3477 100644 --- a/xine_fbfe_frontend.c +++ b/xine_fbfe_frontend.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: xine_fbfe_frontend.c,v 1.5 2006-08-19 19:18:21 phintuka Exp $ + * $Id: xine_fbfe_frontend.c,v 1.6 2006-08-23 05:30:14 phintuka Exp $ * */ @@ -255,8 +255,8 @@ static frontend_t *fbfe_get_frontend(void) this->fe.fe_free = fe_free; -#ifndef FE_STANDALONE this->fe.grab = fe_grab; +#ifndef FE_STANDALONE this->fe.xine_osd_command = xine_osd_command; this->fe.xine_control = xine_control; diff --git a/xine_frontend.c b/xine_frontend.c index 3c153104..b6bf1588 100644 --- a/xine_frontend.c +++ b/xine_frontend.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: xine_frontend.c,v 1.14 2006-08-21 00:04:56 phintuka Exp $ + * $Id: xine_frontend.c,v 1.15 2006-08-23 05:30:14 phintuka Exp $ * */ @@ -432,7 +432,8 @@ static void configure_audio_out(fe_t *this, const char *audio_driver, const char } static int fe_xine_init(frontend_t *this_gen, const char *audio_driver, - const char *audio_port, const char *video_driver, + const char *audio_port, + const char *video_driver, int pes_buffers, int priority, const char *static_post_plugins) { @@ -1157,13 +1158,24 @@ static void *fe_control(void *fe_handle, const char *cmd) } free(name); return NULL; + + } else if(!strncmp(cmd, "GRAB ", 5)) { + int quality, width, height, jpeg, size=0; + jpeg = !strncmp(cmd+5,"JPEG",4); + if(3 == sscanf(cmd+5+4, "%d %d %d", &quality, &width, &height)) { + grab_data_t *result = (grab_data_t*)malloc(sizeof(grab_data_t)); + result->data = this->fe.grab((frontend_t*)this, &size, + jpeg, quality, width, height); + if(result->data && (result->size=size)>0) + return result; + free(result->data); + free(result); + } } return NULL; } -#ifndef FE_STANDALONE - /* * --- RgbToJpeg ------------------------------------------------------------- * @@ -1355,7 +1367,6 @@ static char *fe_grab(frontend_t *this_gen, int *size, int jpeg, return (char*) jcd.mem; } -#endif /* #ifndef FE_STANDALONE */ #ifdef FE_STANDALONE diff --git a/xine_sxfe_frontend.c b/xine_sxfe_frontend.c index 521ca568..d9088521 100644 --- a/xine_sxfe_frontend.c +++ b/xine_sxfe_frontend.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: xine_sxfe_frontend.c,v 1.9 2006-08-19 19:18:21 phintuka Exp $ + * $Id: xine_sxfe_frontend.c,v 1.10 2006-08-23 05:30:14 phintuka Exp $ * */ @@ -875,8 +875,8 @@ static frontend_t *sxfe_get_frontend(void) this->fe.fe_interrupt = sxfe_interrupt; this->fe.fe_free = fe_free; -#ifndef FE_STANDALONE this->fe.grab = fe_grab; +#ifndef FE_STANDALONE this->fe.xine_osd_command = xine_osd_command; this->fe.xine_control = xine_control; |