Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
2.9 KiB

  1. /******************************Module*Header*******************************\
  2. * Module Name: vcdplyer.h
  3. *
  4. * Function prototype for the Video CD Player application.
  5. *
  6. *
  7. * Created: dd-mm-94
  8. * Author: Stephen Estrop [StephenE]
  9. *
  10. * Copyright (c) 1994 - 1997 Microsoft Corporation. All Rights Reserved.
  11. \**************************************************************************/
  12. /* -------------------------------------------------------------------------
  13. ** CMpegMovie - an Mpeg movie playback class.
  14. ** -------------------------------------------------------------------------
  15. */
  16. enum EMpegMovieMode { MOVIE_NOTOPENED = 0x00,
  17. MOVIE_OPENED = 0x01,
  18. MOVIE_PLAYING = 0x02,
  19. MOVIE_STOPPED = 0x03,
  20. MOVIE_PAUSED = 0x04 };
  21. struct IMpegAudioDecoder;
  22. struct IMpegVideoDecoder;
  23. struct IQualProp;
  24. class CMpegMovie {
  25. private:
  26. // Our state variable - records whether we are opened, playing etc.
  27. EMpegMovieMode m_Mode;
  28. HANDLE m_MediaEvent;
  29. HWND m_hwndApp;
  30. BOOL m_bFullScreen;
  31. GUID m_TimeFormat;
  32. IFilterGraph *m_Fg;
  33. IGraphBuilder *m_Gb;
  34. IMediaControl *m_Mc;
  35. IMediaSeeking *m_Ms;
  36. IMediaEvent *m_Me;
  37. IVideoWindow *m_Vw;
  38. void GetPerformanceInterfaces();
  39. HRESULT FindInterfaceFromFilterGraph(
  40. REFIID iid, // interface to look for
  41. LPVOID *lp // place to return interface pointer in
  42. );
  43. public:
  44. CMpegMovie(HWND hwndApplication);
  45. ~CMpegMovie();
  46. HRESULT OpenMovie(TCHAR *lpFileName);
  47. DWORD CloseMovie();
  48. BOOL PlayMovie();
  49. BOOL PauseMovie();
  50. BOOL StopMovie();
  51. OAFilterState GetStateMovie();
  52. HANDLE GetMovieEventHandle();
  53. long GetMovieEventCode();
  54. BOOL PutMoviePosition(LONG x, LONG y, LONG cx, LONG cy);
  55. BOOL GetMoviePosition(LONG *x, LONG *y, LONG *cx, LONG *cy);
  56. BOOL GetMovieWindowState(long *lpuState);
  57. BOOL SetMovieWindowState(long uState);
  58. REFTIME GetDuration();
  59. REFTIME GetCurrentPosition();
  60. BOOL SeekToPosition(REFTIME rt,BOOL bFlushData);
  61. EMpegMovieMode StatusMovie();
  62. void SetFullScreenMode(BOOL bMode);
  63. BOOL IsFullScreenMode();
  64. BOOL SetWindowForeground(long Focus);
  65. BOOL IsTimeFormatSupported(GUID Format);
  66. BOOL IsTimeSupported();
  67. BOOL SetTimeFormat(GUID Format);
  68. GUID GetTimeFormat();
  69. void SetFocus();
  70. BOOL ConfigDialog(HWND hwnd);
  71. BOOL SelectStream(int iStream);
  72. IMpegVideoDecoder *pMpegDecoder;
  73. IMpegAudioDecoder *pMpegAudioDecoder;
  74. IQualProp *pVideoRenderer;
  75. IAMStreamSelect *m_pStreamSelect;
  76. };