Playlist.h
上传用户:lusi_8715
上传日期:2007-01-08
资源大小:199k
文件大小:2k
源码类别:

流媒体/Mpeg4/MP4

开发平台:

Visual C++

  1. /**************************************************************************************
  2.  *                                                                                    *
  3.  * This application contains code from OpenDivX and is released as a "Larger Work"    *
  4.  * under that license. Consistant with that license, this application is released     *
  5.  * under the GNU General Public License.                                              *
  6.  *                                                                                    *
  7.  * The OpenDivX license can be found at: http://www.projectmayo.com/opendivx/docs.php *
  8.  * The GPL can be found at: http://www.gnu.org/copyleft/gpl.html                      *
  9.  *                                                                                    *
  10.  * Copyright (c) 2001 - Project Mayo                                                  *
  11.  *                                                                                    *
  12.  * Authors: Damien Chavarria <adrc at projectmayo.com>                                *
  13.  *                                                                                    *
  14.  **************************************************************************************/
  15. #include <stdio.h>
  16. #include <stdlib.h>
  17. typedef struct _list_t {
  18. char *filename;
  19. struct _list_t *next;
  20. } list_t;
  21. /*
  22.  * The playlist class
  23.  */
  24. class Playlist {
  25. private:
  26. int     nbr_items;
  27. int     current_position;
  28. list_t *list;
  29. char *GetItemAt(int i);
  30. public:
  31. Playlist();
  32. ~Playlist();
  33. int   Clear();
  34. int   Reset();
  35. int   Add(char *filename);
  36. char *Previous();
  37. char *Next();
  38. };