Mercurial > mplayer.hg
comparison gui/win32/interface.c @ 27341:e7c989f7a7c9
Start unifying names of internal preprocessor directives.
Replace all USE_ prefixes by CONFIG_ prefixes to indicate
options which are configurable.
author | diego |
---|---|
date | Wed, 30 Jul 2008 12:01:30 +0000 |
parents | 9ba6d4487292 |
children | 1d2faa1020fb |
comparison
equal
deleted
inserted
replaced
27340:33274ce3cce0 | 27341:e7c989f7a7c9 |
---|---|
30 #include "help_mp.h" | 30 #include "help_mp.h" |
31 #include "codec-cfg.h" | 31 #include "codec-cfg.h" |
32 #include "stream/stream.h" | 32 #include "stream/stream.h" |
33 #include "libmpdemux/demuxer.h" | 33 #include "libmpdemux/demuxer.h" |
34 #include "libmpdemux/stheader.h" | 34 #include "libmpdemux/stheader.h" |
35 #ifdef USE_DVDREAD | 35 #ifdef CONFIG_DVDREAD |
36 #include "stream/stream_dvd.h" | 36 #include "stream/stream_dvd.h" |
37 #endif | 37 #endif |
38 #include "input/input.h" | 38 #include "input/input.h" |
39 #include "libvo/video_out.h" | 39 #include "libvo/video_out.h" |
40 #include "libao2/audio_out.h" | 40 #include "libao2/audio_out.h" |
149 mplPlay(); | 149 mplPlay(); |
150 break; | 150 break; |
151 case evPause: | 151 case evPause: |
152 mplPause(); | 152 mplPause(); |
153 break; | 153 break; |
154 #ifdef USE_DVDREAD | 154 #ifdef CONFIG_DVDREAD |
155 case evPlayDVD: | 155 case evPlayDVD: |
156 { | 156 { |
157 static char dvdname[MAX_PATH]; | 157 static char dvdname[MAX_PATH]; |
158 guiIntfStruct.DVD.current_title = dvd_title; | 158 guiIntfStruct.DVD.current_title = dvd_title; |
159 guiIntfStruct.DVD.current_chapter = dvd_chapter; | 159 guiIntfStruct.DVD.current_chapter = dvd_chapter; |
271 case evDropFile: | 271 case evDropFile: |
272 case evLoadPlay: | 272 case evLoadPlay: |
273 { | 273 { |
274 switch(guiIntfStruct.StreamType) | 274 switch(guiIntfStruct.StreamType) |
275 { | 275 { |
276 #ifdef USE_DVDREAD | 276 #ifdef CONFIG_DVDREAD |
277 case STREAMTYPE_DVD: | 277 case STREAMTYPE_DVD: |
278 { | 278 { |
279 guiIntfStruct.Title = guiIntfStruct.DVD.current_title; | 279 guiIntfStruct.Title = guiIntfStruct.DVD.current_title; |
280 guiIntfStruct.Chapter = guiIntfStruct.DVD.current_chapter; | 280 guiIntfStruct.Chapter = guiIntfStruct.DVD.current_chapter; |
281 guiIntfStruct.Angle = guiIntfStruct.DVD.current_angle; | 281 guiIntfStruct.Angle = guiIntfStruct.DVD.current_angle; |
335 void mplNext(void) | 335 void mplNext(void) |
336 { | 336 { |
337 if(guiIntfStruct.Playing == 2) return; | 337 if(guiIntfStruct.Playing == 2) return; |
338 switch(guiIntfStruct.StreamType) | 338 switch(guiIntfStruct.StreamType) |
339 { | 339 { |
340 #ifdef USE_DVDREAD | 340 #ifdef CONFIG_DVDREAD |
341 case STREAMTYPE_DVD: | 341 case STREAMTYPE_DVD: |
342 if(guiIntfStruct.DVD.current_chapter == (guiIntfStruct.DVD.chapters - 1)) | 342 if(guiIntfStruct.DVD.current_chapter == (guiIntfStruct.DVD.chapters - 1)) |
343 return; | 343 return; |
344 guiIntfStruct.DVD.current_chapter++; | 344 guiIntfStruct.DVD.current_chapter++; |
345 break; | 345 break; |
357 void mplPrev(void) | 357 void mplPrev(void) |
358 { | 358 { |
359 if(guiIntfStruct.Playing == 2) return; | 359 if(guiIntfStruct.Playing == 2) return; |
360 switch(guiIntfStruct.StreamType) | 360 switch(guiIntfStruct.StreamType) |
361 { | 361 { |
362 #ifdef USE_DVDREAD | 362 #ifdef CONFIG_DVDREAD |
363 case STREAMTYPE_DVD: | 363 case STREAMTYPE_DVD: |
364 if(guiIntfStruct.DVD.current_chapter == 1) | 364 if(guiIntfStruct.DVD.current_chapter == 1) |
365 return; | 365 return; |
366 guiIntfStruct.DVD.current_chapter--; | 366 guiIntfStruct.DVD.current_chapter--; |
367 break; | 367 break; |
403 | 403 |
404 guiIntfStruct.TimeSec = 0; | 404 guiIntfStruct.TimeSec = 0; |
405 guiIntfStruct.Position = 0; | 405 guiIntfStruct.Position = 0; |
406 guiIntfStruct.AudioType = 0; | 406 guiIntfStruct.AudioType = 0; |
407 | 407 |
408 #ifdef USE_DVDREAD | 408 #ifdef CONFIG_DVDREAD |
409 guiIntfStruct.DVD.current_title = 1; | 409 guiIntfStruct.DVD.current_title = 1; |
410 guiIntfStruct.DVD.current_chapter = 1; | 410 guiIntfStruct.DVD.current_chapter = 1; |
411 guiIntfStruct.DVD.current_angle = 1; | 411 guiIntfStruct.DVD.current_angle = 1; |
412 #endif | 412 #endif |
413 | 413 |
519 | 519 |
520 /* this function gets called by mplayer to update the gui */ | 520 /* this function gets called by mplayer to update the gui */ |
521 int guiGetEvent(int type, char *arg) | 521 int guiGetEvent(int type, char *arg) |
522 { | 522 { |
523 stream_t *stream = (stream_t *) arg; | 523 stream_t *stream = (stream_t *) arg; |
524 #ifdef USE_DVDREAD | 524 #ifdef CONFIG_DVDREAD |
525 dvd_priv_t *dvdp = (dvd_priv_t *) arg; | 525 dvd_priv_t *dvdp = (dvd_priv_t *) arg; |
526 #endif | 526 #endif |
527 if(!mygui || !mygui->skin) return 0; | 527 if(!mygui || !mygui->skin) return 0; |
528 | 528 |
529 if(guiIntfStruct.mpcontext) | 529 if(guiIntfStruct.mpcontext) |
547 guiIntfStruct.NewPlay = 0; | 547 guiIntfStruct.NewPlay = 0; |
548 switch(guiIntfStruct.StreamType) | 548 switch(guiIntfStruct.StreamType) |
549 { | 549 { |
550 case STREAMTYPE_PLAYLIST: | 550 case STREAMTYPE_PLAYLIST: |
551 break; | 551 break; |
552 #ifdef USE_DVDREAD | 552 #ifdef CONFIG_DVDREAD |
553 case STREAMTYPE_DVD: | 553 case STREAMTYPE_DVD: |
554 { | 554 { |
555 char tmp[512]; | 555 char tmp[512]; |
556 dvd_title = guiIntfStruct.DVD.current_title; | 556 dvd_title = guiIntfStruct.DVD.current_title; |
557 dvd_chapter = guiIntfStruct.DVD.current_chapter; | 557 dvd_chapter = guiIntfStruct.DVD.current_chapter; |
612 case guiSetStream: | 612 case guiSetStream: |
613 { | 613 { |
614 guiIntfStruct.StreamType = stream->type; | 614 guiIntfStruct.StreamType = stream->type; |
615 switch(stream->type) | 615 switch(stream->type) |
616 { | 616 { |
617 #ifdef USE_DVDREAD | 617 #ifdef CONFIG_DVDREAD |
618 case STREAMTYPE_DVD: | 618 case STREAMTYPE_DVD: |
619 guiGetEvent(guiSetDVD, (char *) stream->priv); | 619 guiGetEvent(guiSetDVD, (char *) stream->priv); |
620 break; | 620 break; |
621 #endif | 621 #endif |
622 } | 622 } |
623 break; | 623 break; |
624 } | 624 } |
625 #ifdef USE_DVDREAD | 625 #ifdef CONFIG_DVDREAD |
626 case guiSetDVD: | 626 case guiSetDVD: |
627 { | 627 { |
628 guiIntfStruct.DVD.titles = dvdp->vmg_file->tt_srpt->nr_of_srpts; | 628 guiIntfStruct.DVD.titles = dvdp->vmg_file->tt_srpt->nr_of_srpts; |
629 guiIntfStruct.DVD.chapters = dvdp->vmg_file->tt_srpt->title[dvd_title].nr_of_ptts; | 629 guiIntfStruct.DVD.chapters = dvdp->vmg_file->tt_srpt->title[dvd_title].nr_of_ptts; |
630 guiIntfStruct.DVD.angles = dvdp->vmg_file->tt_srpt->title[dvd_title].nr_of_angles; | 630 guiIntfStruct.DVD.angles = dvdp->vmg_file->tt_srpt->title[dvd_title].nr_of_angles; |