[Redbutton-devel] SF.net SVN: redbutton: [75] redbutton-browser/trunk
Brought to you by:
skilvington
|
From: <ski...@us...> - 2006-05-22 13:57:28
|
Revision: 75 Author: skilvington Date: 2006-05-22 06:57:21 -0700 (Mon, 22 May 2006) ViewCVS: http://svn.sourceforge.net/redbutton/?rev=75&view=rev Log Message: ----------- no need for current_frame_lock Modified Paths: -------------- redbutton-browser/trunk/MHEGVideoOutput.c redbutton-browser/trunk/MHEGVideoOutput.h Modified: redbutton-browser/trunk/MHEGVideoOutput.c =================================================================== --- redbutton-browser/trunk/MHEGVideoOutput.c 2006-05-22 13:30:46 UTC (rev 74) +++ redbutton-browser/trunk/MHEGVideoOutput.c 2006-05-22 13:57:21 UTC (rev 75) @@ -52,7 +52,6 @@ void x11_shm_init(MHEGVideoOutput *v) { - pthread_mutex_init(&v->current_frame_lock, NULL); v->current_frame = NULL; v->resize_ctx = NULL; @@ -74,8 +73,6 @@ if(v->current_frame != NULL) x11_shm_destroy_frame(v); - pthread_mutex_destroy(&v->current_frame_lock); - return; } @@ -116,9 +113,7 @@ } /* convert the frame to RGB */ - pthread_mutex_lock(&v->current_frame_lock); img_convert(&v->rgb_frame, v->out_format, yuv_frame, f->pix_fmt, out_width, out_height); - pthread_mutex_unlock(&v->current_frame_lock); return; } @@ -130,9 +125,6 @@ unsigned int out_width; unsigned int out_height; -/* TODO */ -/* probably dont need this lock anymore, only we use v->current_frame */ - pthread_mutex_lock(&v->current_frame_lock); if(v->current_frame != NULL) { /* video frame is already scaled as needed */ @@ -143,7 +135,6 @@ /* get it drawn straight away */ XFlush(d->dpy); } - pthread_mutex_unlock(&v->current_frame_lock); return; } @@ -203,13 +194,11 @@ MHEGDisplay *d = MHEGEngine_getDisplay(); /* get rid of the current frame */ - pthread_mutex_lock(&v->current_frame_lock); /* the XImage data is our shared memory, make sure XDestroyImage doesn't try to free it */ v->current_frame->data = NULL; XDestroyImage(v->current_frame); /* make sure no-one tries to use it */ v->current_frame = NULL; - pthread_mutex_unlock(&v->current_frame_lock); XShmDetach(d->dpy, &v->shm); shmdt(v->shm.shmaddr); Modified: redbutton-browser/trunk/MHEGVideoOutput.h =================================================================== --- redbutton-browser/trunk/MHEGVideoOutput.h 2006-05-22 13:30:46 UTC (rev 74) +++ redbutton-browser/trunk/MHEGVideoOutput.h 2006-05-22 13:57:21 UTC (rev 75) @@ -13,7 +13,6 @@ ImgReSampleContext *resize_ctx; AVPicture resized_frame; uint8_t *tmpbuf_data; - pthread_mutex_t current_frame_lock; /* locked when we are updating current frame */ XImage *current_frame; /* frame we are currently displaying */ } MHEGVideoOutput; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |