VLCMediaListPlayer.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /*****************************************************************************
  2. * VLCMediaListPlayer.h: VLCKit.framework VLCMediaListPlayer implementation
  3. *****************************************************************************
  4. * Copyright (C) 2009 Pierre d'Herbemont
  5. * Partial Copyright (C) 2009-2013 Felix Paul Kühne
  6. * Copyright (C) 2009-2013 VLC authors and VideoLAN
  7. * $Id$
  8. *
  9. * Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
  10. * Felix Paul Kühne <fkuehne # videolan.org
  11. *
  12. * This program is free software; you can redistribute it and/or modify it
  13. * under the terms of the GNU Lesser General Public License as published by
  14. * the Free Software Foundation; either version 2.1 of the License, or
  15. * (at your option) any later version.
  16. *
  17. * This program is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU Lesser General Public License for more details.
  21. *
  22. * You should have received a copy of the GNU Lesser General Public License
  23. * along with this program; if not, write to the Free Software Foundation,
  24. * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  25. *****************************************************************************/
  26. @class VLCMedia, VLCMediaPlayer, VLCMediaList;
  27. /**
  28. * VLCRepeatMode
  29. * (don't repeat anything, repeat one, repeat all)
  30. */
  31. typedef NS_ENUM(NSInteger, VLCRepeatMode) {
  32. VLCDoNotRepeat,
  33. VLCRepeatCurrentItem,
  34. VLCRepeatAllItems
  35. };
  36. @interface VLCMediaListPlayer : NSObject {
  37. void *instance;
  38. VLCMedia *_rootMedia;
  39. VLCMediaPlayer *_mediaPlayer;
  40. VLCMediaList *_mediaList;
  41. VLCRepeatMode _repeatMode;
  42. }
  43. @property (readwrite, retain) VLCMediaList *mediaList;
  44. /**
  45. * rootMedia - Use this method to play a media and its subitems.
  46. * This will erase mediaList.
  47. * Setting mediaList will erase rootMedia.
  48. */
  49. @property (readwrite, retain) VLCMedia *rootMedia;
  50. @property (readonly, retain) VLCMediaPlayer *mediaPlayer;
  51. - (id)initWithOptions:(NSArray *)options;
  52. /**
  53. * Basic play, pause and stop are here. For other methods, use the mediaPlayer.
  54. */
  55. - (void)play;
  56. - (void)pause;
  57. - (void)stop;
  58. /**
  59. * previous, next, play item at index
  60. * \returns YES on success, NO if there is no such item
  61. */
  62. - (BOOL)next;
  63. - (BOOL)previous;
  64. - (BOOL)playItemAtIndex:(int)index;
  65. /**
  66. * Playmode selection (don't repeat anything, repeat one, repeat all)
  67. * See VLCRepeatMode.
  68. */
  69. @property (readwrite) VLCRepeatMode repeatMode;
  70. /**
  71. * media must be in the current media list.
  72. */
  73. - (void)playMedia:(VLCMedia *)media;
  74. @end