From: Andre P. <at...@us...> - 2004-10-13 15:24:13
|
Update of /cvsroot/xine/xine-macosx/Cocoaxine/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4048 Modified Files: XineStream.h XineStream.m Log Message: Cocoaxine XineStream.h: * Added deinterlacing methods * Enabled verbosity control methods * 'play' method now properly handles paused states * Added pragmas for easier source code navigation in Xcode Index: XineStream.h =================================================================== RCS file: /cvsroot/xine/xine-macosx/Cocoaxine/src/XineStream.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- XineStream.h 5 Jul 2004 01:08:55 -0000 1.3 +++ XineStream.h 13 Oct 2004 15:24:00 -0000 1.4 @@ -65,9 +65,9 @@ - (XineVideoPort *) videoPort; // Parameters -#if 0 - (void) setVerbosity:(int)verbosityLevel; - (int) verbosity; -#endif +- (void) setDeinterlacing:(BOOL)flag; +- (BOOL) deinterlacing; @end Index: XineStream.m =================================================================== RCS file: /cvsroot/xine/xine-macosx/Cocoaxine/src/XineStream.m,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- XineStream.m 8 Jul 2004 04:50:52 -0000 1.7 +++ XineStream.m 13 Oct 2004 15:24:00 -0000 1.8 @@ -104,6 +104,7 @@ { int currentVolume = [self volume]; [self setVolumeBetween0To100:0]; + [self play]; [self pause]; [self setVolumeBetween0To100:currentVolume]; } @@ -130,7 +131,15 @@ - (BOOL) play { - return [self playFromPositionBetween0And65535:0]; + if ([self isPlaying]) + { + xine_set_param (stream, XINE_PARAM_SPEED, XINE_SPEED_NORMAL); + return YES; + } + else + { + return [self playFromPositionBetween0And65535:0]; + } } - (BOOL) playFromPositionBetween0And65535:(int)position @@ -184,6 +193,11 @@ return xine_get_param (stream, XINE_PARAM_AUDIO_VOLUME); } + +#pragma mark Accessors +/* + * Accessors + */ - (xine_stream_t *) stream { return stream; @@ -199,4 +213,31 @@ return videoPort; } + +#pragma mark Parameters +/* + * Parameters + */ + +- (void) setVerbosity:(int)verbosityLevel +{ + xine_set_param (stream, XINE_PARAM_VERBOSITY, verbosityLevel); +} + +- (int) verbosity +{ + return xine_get_param (stream, XINE_PARAM_VERBOSITY); +} + +- (void) setDeinterlacing:(BOOL)flag +{ + xine_set_param (stream, XINE_PARAM_VO_DEINTERLACE, flag); +} + +- (BOOL) deinterlacing +{ + return xine_get_param (stream, XINE_PARAM_VO_DEINTERLACE); +} + + @end |