enc_if.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. ** enc_if.h - common encoder interface
  3. **
  4. ** Copyright (C) 2001-2003 Nullsoft, Inc.
  5. **
  6. ** This software is provided 'as-is', without any express or implied warranty.
  7. ** In no event will the authors be held liable for any damages arising from the use of this software.
  8. **
  9. ** Permission is granted to anyone to use this software for any purpose, including commercial
  10. ** applications, and to alter it and redistribute it freely, subject to the following restrictions:
  11. ** 1. The origin of this software must not be misrepresented; you must not claim that you wrote the
  12. ** original software. If you use this software in a product, an acknowledgment in the product
  13. ** documentation would be appreciated but is not required.
  14. ** 2. Altered source versions must be plainly marked as such, and must not be misrepresented as
  15. ** being the original software.
  16. ** 3. This notice may not be removed or altered from any source distribution.
  17. */
  18. #ifndef _NSV_ENC_IF_H_
  19. #define _NSV_ENC_IF_H_
  20. class VideoCoder
  21. {
  22. public:
  23. VideoCoder() { }
  24. virtual int Encode(void *in, void *out, int *iskf)=0; // returns bytes in out
  25. virtual ~VideoCoder() { };
  26. };
  27. class AudioCoder
  28. {
  29. public:
  30. AudioCoder() { }
  31. virtual int Encode(int framepos, void *in, int in_avail, int *in_used, void *out, int out_avail)=0; //returns bytes in out
  32. virtual ~AudioCoder() { };
  33. };
  34. // unsigned int GetAudioTypes3(int idx, char *desc);
  35. // unsigned int GetVideoTypes3(int idx, char *desc);
  36. // AudioCoder *CreateAudio3(int nch, int srate, int bps, unsigned int srct, unsigned int *outt, char *configfile);
  37. // VideoCoder *CreateVideo3(int w, int h, double frt, unsigned int pixt, unsigned int *outt, char *configfile);
  38. // HWND ConfigAudio3(HWND hwndParent, HINSTANCE hinst, unsigned int outt, char *configfile);
  39. // HWND ConfigVideo3(HWND hwndParent, HINSTANCE hinst, unsigned int outt, char *configfile);
  40. #endif //_NSV_ENC_IF_H_