Mercurial > mplayer.hg
diff gui/ui/main.c @ 34387:0ba85cad4c7e
Add audio CD playback support to the X11/GTK GUI.
(The Win32 GUI already had this support. Add missing - although already
used - user event evPlayCD here as well as internal event ivSetCDTrack
- although it's unused - for consistency.)
author | ib |
---|---|
date | Sat, 31 Dec 2011 12:38:52 +0000 |
parents | e8e4e6f9b7ac |
children | f2c03009068d |
line wrap: on
line diff
--- a/gui/ui/main.c Sat Dec 31 12:20:08 2011 +0000 +++ b/gui/ui/main.c Sat Dec 31 12:38:52 2011 +0000 @@ -162,6 +162,14 @@ mp_property_do("sub",M_PROPERTY_SET,&iparam,guiInfo.mpcontext); break; +#ifdef CONFIG_CDDA + case ivSetCDTrack: + guiInfo.Track=iparam; + case evPlayCD: + guiInfoMediumClear ( CLEAR_ALL ); + guiInfo.StreamType=STREAMTYPE_CDDA; + goto play; +#endif #ifdef CONFIG_VCD case ivSetVCDTrack: guiInfo.Track=iparam; @@ -202,6 +210,19 @@ guiInfo.Track=1; guiInfo.NewPlay=GUI_FILE_NEW; break; +#ifdef CONFIG_CDDA + case STREAMTYPE_CDDA: + guiInfoMediumClear( CLEAR_ALL - CLEAR_VCD - CLEAR_FILE ); + if ( !cdrom_device ) cdrom_device=gstrdup( DEFAULT_CDROM_DEVICE ); + uiSetFileName( NULL,cdrom_device,STREAMTYPE_CDDA ); + if ( guiInfo.Playing != GUI_PAUSE ) + { + if ( !guiInfo.Track ) + guiInfo.Track=1; + guiInfo.NewPlay=GUI_FILE_SAME; + } + break; +#endif #ifdef CONFIG_VCD case STREAMTYPE_VCD: guiInfoMediumClear( CLEAR_ALL - CLEAR_VCD - CLEAR_FILE );