summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2007-05-17 22:49:51 +0000
committerphintuka <phintuka>2007-05-17 22:49:51 +0000
commit935d9d4f599571566d284432d3838a122676e336 (patch)
tree90d6fbc28a18789db3e5cf0609229ed7c31c93e6
parenta05fb69ed916fe307903a842ff8843b9e42d5fb5 (diff)
downloadxineliboutput-935d9d4f599571566d284432d3838a122676e336.tar.gz
xineliboutput-935d9d4f599571566d284432d3838a122676e336.tar.bz2
Move static variable fbdev to fe_t struct
-rw-r--r--xine_fbfe_frontend.c17
-rw-r--r--xine_frontend.c37
2 files changed, 19 insertions, 35 deletions
diff --git a/xine_fbfe_frontend.c b/xine_fbfe_frontend.c
index 06ab56b9..74f29b85 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.12 2007-03-14 10:26:39 phintuka Exp $
+ * $Id: xine_fbfe_frontend.c,v 1.13 2007-05-17 22:49:51 phintuka Exp $
*
*/
@@ -68,6 +68,7 @@ typedef struct fbfe_t {
xine_event_queue_t *event_queue;
post_plugins_t *postplugins;
+ char *fb_dev;
char configfile[256];
@@ -105,7 +106,6 @@ typedef struct fbfe_t {
} fe_t;
#define IS_FBFE
-static char *fbdev = NULL;
/* Common (non-X11/FB) frontend functions */
#include "xine_frontend.c"
@@ -168,9 +168,10 @@ static int fbfe_display_open(frontend_t *this_gen, int width, int height, int fu
this->update_display_size = fbfe_update_display_size;
- if(video_port && *video_port && !strncmp(video_port, "/dev/", 5)) {
- fbdev = strdup(video_port);
- }
+ if(video_port && !strncmp(video_port, "/dev/", 5))
+ this->fb_dev = strdup(video_port);
+ else
+ this->fb_dev = NULL;
return 1;
}
@@ -238,8 +239,10 @@ static void fbfe_display_close(frontend_t *this_gen)
fe_t *this = (fe_t*)this_gen;
if(this) {
- this->display = 0;
-
+ if(this->fb_dev) {
+ free(this->fb_dev);
+ this->fb_dev = NULL;
+ }
if(this->xine)
this->fe.xine_exit(this_gen);
}
diff --git a/xine_frontend.c b/xine_frontend.c
index 721ff3a6..d0a883b6 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.35 2007-04-09 16:15:16 phintuka Exp $
+ * $Id: xine_frontend.c,v 1.36 2007-05-17 22:49:51 phintuka Exp $
*
*/
@@ -486,9 +486,9 @@ static int fe_xine_init(frontend_t *this_gen, const char *audio_driver,
x_upd_num("engine.buffers.video_num_buffers", pes_buffers);
#ifdef IS_FBFE
- if(fbdev) {
+ if(this->fb_dev) {
if(video_driver && !strcmp(video_driver, "fb"))
- x_upd_str("video.device.fb_device", fbdev);
+ x_upd_str("video.device.fb_device", this->fb_dev);
else if(video_driver && !strcmp(video_driver, "DirectFB")) {
/* DirectFBInit (NULL, NULL); */
/* DirectFBSetOption ("fbdev", video_port); */
@@ -502,15 +502,15 @@ static int fe_xine_init(frontend_t *this_gen, const char *audio_driver,
else
*head = 0;
asprintf(&tmp, "%sfbdev=%s%s",
- head ? orig : "", fbdev, tail ? tail : "");
+ head ? orig : "", this->fb_dev, tail ? tail : "");
} else {
- asprintf(&tmp, "fbdev=%s%s%s", fbdev, orig?",":"", orig?orig:"");
+ asprintf(&tmp, "fbdev=%s%s%s", this->fb_dev, orig?",":"", orig?orig:"");
}
LOGMSG("replacing environment variable DFBARGS with %s (original was %s)",
tmp, getenv("DFBARGS"));
free(orig);
} else {
- asprintf(&tmp, "fbdev=%s", fbdev);
+ asprintf(&tmp, "fbdev=%s", this->fb_dev);
LOGMSG("setting environment variable DFBARGS to %s", tmp);
}
setenv("DFBARGS", tmp, 1);
@@ -669,23 +669,6 @@ static int fe_xine_open(frontend_t *this_gen, const char *mrl)
free(url);
#if 0
- /* priority */
- {
- struct sched_param temp;
- temp.sched_priority = this->priority;
- if(!pthread_setschedparam(this->stream->demux_thread, SCHED_RR, &temp))
- LOGERR("pthread_setschedparam(demux_thread, SCHED_RR, %d) failed",
- temp.sched_priority);
- if(!pthread_setschedparam(this->stream->video_thread, SCHED_RR, &temp))
- LOGERR("pthread_setschedparam(video_thread, SCHED_RR, %d) failed",
- temp.sched_priority);
- if(!pthread_setschedparam(this->stream->audio_thread, SCHED_RR, &temp))
- LOGERR("pthread_setschedparam(audio_thread, SCHED_RR, %d) failed",
- temp.sched_priority);
- }
-#endif
-
-#if 0
this->xine->config->update_num(this->xine->config,
"video.output.xv_double_buffer",
1);
@@ -1075,11 +1058,9 @@ static void fe_xine_exit(frontend_t *this_gen)
static void fe_free(frontend_t *this_gen)
{
- fe_t *this = (fe_t*)this_gen;
-
- if (this) {
- if(this->display)
- this->fe.fe_display_close(this_gen);
+ if (this_gen) {
+ fe_t *this = (fe_t*)this_gen;
+ this->fe.fe_display_close(this_gen);
free(this);
}
}