1
0

Main.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. #ifndef NULLSOFT_IN_MP4_MAINH
  2. #define NULLSOFT_IN_MP4_MAINH
  3. #include "mp4.h"
  4. #include "../Winamp/in2.h"
  5. #include "mpeg4audio.h"
  6. #include "mpeg4video.h"
  7. #include "AudioSample.h"
  8. #include "../nu/AutoLock.h"
  9. #include "../nu/VideoClock.h"
  10. extern nu::VideoClock video_clock;
  11. MP4TrackId GetAudioTrack(MP4FileHandle infile);
  12. MP4TrackId GetVideoTrack(MP4FileHandle infile);
  13. int GetAACTrack(MP4FileHandle infile);
  14. class waServiceFactory;
  15. bool CreateVideoDecoder(MP4FileHandle file, MP4TrackId track, MP4VideoDecoder *&decoder, waServiceFactory *&serviceFactory);
  16. class MP4AudioDecoder;
  17. bool CreateDecoder(MP4FileHandle file, MP4TrackId track, MP4AudioDecoder *&decoder, waServiceFactory *&serviceFactory);
  18. void ConfigureDecoderASC(MP4FileHandle file, MP4TrackId track, MP4AudioDecoder *decoder);
  19. bool GetCustomMetadata(MP4FileHandle mp4, char *metadata, wchar_t *dest, int destlen, const char *owner=0);
  20. float GetGain(MP4FileHandle mp4, bool allowDefault=true);
  21. void GetGaps(MP4FileHandle mp4, unsigned __int32 &pre, unsigned __int32 &post);
  22. struct ThreadInfoBox
  23. {
  24. HWND hwndDlg;
  25. HANDLE completionEvent;
  26. };
  27. VOID CALLBACK CurrentlyPlayingInfoBox(ULONG_PTR param);
  28. extern wchar_t lastfn[MAX_PATH*4];
  29. extern HANDLE killEvent, seekEvent, pauseEvent;
  30. extern In_Module mod; // the output module
  31. extern MP4FileHandle MP4hFile;
  32. extern MP4TrackId audio_track, video_track;
  33. class AudioSample;
  34. int TryWriteAudio(AudioSample *sample);
  35. extern MP4AudioDecoder *audio;
  36. extern MP4VideoDecoder *video;
  37. extern unsigned int audio_bitrate, video_bitrate;
  38. extern MP4SampleId numSamples, numVideoSamples;
  39. extern DWORD WINAPI PlayProc(LPVOID lpParameter);
  40. extern bool first;
  41. extern HANDLE hThread;
  42. extern Nullsoft::Utility::LockGuard play_mp4_guard;
  43. extern volatile int m_needseek;
  44. void CALLBACK Seek(ULONG_PTR data);
  45. void CALLBACK Pause(ULONG_PTR data);
  46. extern uint32_t m_video_timescale;
  47. extern uint32_t m_timescale;
  48. extern const wchar_t *defaultExtensions;
  49. extern wchar_t m_ini[MAX_PATH];
  50. char *BuildExtensions(const char *extensions);
  51. extern bool config_show_average_bitrate;
  52. void FlushOutput();
  53. extern int m_force_seek;
  54. MP4Duration GetClock();
  55. MP4Duration GetDecodeClock();
  56. extern bool audio_chunk;
  57. // {B6CB4A7C-A8D0-4c55-8E60-9F7A7A23DA0F}
  58. static const GUID playbackConfigGroupGUID =
  59. {
  60. 0xb6cb4a7c, 0xa8d0, 0x4c55, { 0x8e, 0x60, 0x9f, 0x7a, 0x7a, 0x23, 0xda, 0xf }
  61. };
  62. #endif