[Redbutton-devel] SF.net SVN: redbutton: [67] redbutton-browser/trunk/MHEGStreamPlayer.c
Brought to you by:
skilvington
|
From: <ski...@us...> - 2006-05-16 15:41:20
|
Revision: 67 Author: skilvington Date: 2006-05-16 08:41:12 -0700 (Tue, 16 May 2006) ViewCVS: http://svn.sourceforge.net/redbutton/?rev=67&view=rev Log Message: ----------- take video position into account Modified Paths: -------------- redbutton-browser/trunk/MHEGStreamPlayer.c Modified: redbutton-browser/trunk/MHEGStreamPlayer.c =================================================================== --- redbutton-browser/trunk/MHEGStreamPlayer.c 2006-05-16 13:08:55 UTC (rev 66) +++ redbutton-browser/trunk/MHEGStreamPlayer.c 2006-05-16 15:41:12 UTC (rev 67) @@ -530,11 +530,17 @@ pthread_mutex_lock(&p->current_frame_lock); if(p->current_frame != NULL) { -/* TODO */ -/* take p->video size/position into account */ -/* remeber fullscreen scaling */ - x = 0; /* origin of p->video */ - y = 0; + /* origin of VideoClass */ +/* TODO should probably have a lock for this in case we are doing SetPosition in another thread */ + x = p->video->inst.Position.x_position; + y = p->video->inst.Position.y_position; + /* scale if fullscreen */ + if(d->fullscreen) + { + x = (x * d->xres) / MHEG_XRES; + y = (y * d->yres) / MHEG_YRES; + } + /* video frame is already scaled as needed */ out_width = p->current_frame->width; out_height = p->current_frame->height; /* draw it onto the Window contents Pixmap */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |