Source code of Windows XP (NT5)
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.

97 lines
2.1 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1997.
  5. //
  6. // File: M E D I A . H
  7. //
  8. // Contents: Definitions of media player device functions and structs
  9. //
  10. // Notes:
  11. //
  12. // Author: danielwe 6 Nov 1999
  13. //
  14. //----------------------------------------------------------------------------
  15. #ifndef _MEDIA_H
  16. #define _MEDIA_H
  17. #include <streams.h>
  18. #include "updiag.h"
  19. enum State
  20. {
  21. TurnedOff,
  22. Uninitialized,
  23. Stopped,
  24. Paused,
  25. Playing
  26. };
  27. struct Media
  28. {
  29. State state;
  30. IGraphBuilder * pGraph;
  31. LONG lOldVol;
  32. BOOL fIsMuted;
  33. };
  34. BOOL InitMedia(VOID);
  35. VOID OpenMediaFile(LPCTSTR szFile);
  36. BOOL CanPlay(VOID);
  37. BOOL CanSetVolume(VOID);
  38. BOOL CanStop(VOID);
  39. BOOL CanPause(VOID);
  40. BOOL IsInitialized(VOID);
  41. VOID DeleteContents(VOID);
  42. // Event handlers
  43. VOID OnMediaPlay(VOID);
  44. VOID OnMediaPause(VOID);
  45. VOID OnMediaStop(VOID);
  46. VOID OnVolumeUpDown(BOOL fUp);
  47. VOID OnSetVolume(DWORD dwVol);
  48. VOID OnMediaMute(VOID);
  49. // Control handlers
  50. DWORD Val_VolumeUp(DWORD cArgs, ARG *rgArgs);
  51. DWORD Do_VolumeUp(DWORD cArgs, ARG *rgArgs);
  52. DWORD Val_VolumeDown(DWORD cArgs, ARG *rgArgs);
  53. DWORD Do_VolumeDown(DWORD cArgs, ARG *rgArgs);
  54. DWORD Val_SetVolume(DWORD cArgs, ARG *rgArgs);
  55. DWORD Do_SetVolume(DWORD cArgs, ARG *rgArgs);
  56. DWORD Val_Mute(DWORD cArgs, ARG *rgArgs);
  57. DWORD Do_Mute(DWORD cArgs, ARG *rgArgs);
  58. DWORD Val_Power(DWORD cArgs, ARG *rgArgs);
  59. DWORD Do_Power(DWORD cArgs, ARG *rgArgs);
  60. DWORD Val_LoadFile(DWORD cArgs, ARG *rgArgs);
  61. DWORD Do_LoadFile(DWORD cArgs, ARG *rgArgs);
  62. DWORD Val_Play(DWORD cArgs, ARG *rgArgs);
  63. DWORD Do_Play(DWORD cArgs, ARG *rgArgs);
  64. DWORD Val_Stop(DWORD cArgs, ARG *rgArgs);
  65. DWORD Do_Stop(DWORD cArgs, ARG *rgArgs);
  66. DWORD Val_Pause(DWORD cArgs, ARG *rgArgs);
  67. DWORD Do_Pause(DWORD cArgs, ARG *rgArgs);
  68. DWORD Val_SetPos(DWORD cArgs, ARG *rgArgs);
  69. DWORD Do_SetPos(DWORD cArgs, ARG *rgArgs);
  70. DWORD Val_Test(DWORD cArgs, ARG *rgArgs);
  71. DWORD Do_Test(DWORD cArgs, ARG *rgArgs);
  72. DWORD Val_SetTime(DWORD cArgs, ARG *rgArgs);
  73. DWORD Do_SetTime(DWORD cArgs, ARG *rgArgs);
  74. extern Media media;
  75. #endif //!_MEDIA_H