Subtitles.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. #ifndef _SUBTITLES_H
  16. #define _SUBTITLES_H
  17. #include "debug.h"
  18. #include "InputMedia.h"
  19. #include <string.h>
  20. #include <windows.h>
  21. /*
  22.  * Recognized formats
  23.  */
  24. enum {
  25. SUBTITLES_FORMAT_SUBVIEWER,
  26. SUBTITLES_FORMAT_MICRODVD
  27. };
  28. /*
  29.  * Subtitles Class
  30.  */
  31. class Subtitles {
  32. private:
  33. int         format;
  34. InputMedia *input;
  35. int         firstFrame;
  36. int         lastFrame;
  37. char        text[255];
  38. int         getNextSubtitle();
  39. public:
  40. Subtitles();
  41. ~Subtitles();
  42. int Open(char *aviFilename);
  43. int Apply(HWND hwnd, long frameNumber, double frameRate, int fullscreen);
  44. int Close();
  45. };
  46. #endif