NSVFactory.cpp 613 B

12345678910111213141516171819202122
  1. #include "NSVFactory.h"
  2. #include "nsvdec.h"
  3. #include "api.h"
  4. #include "../nsv/nsvlib.h"
  5. IVideoDecoder *NSVFactory::CreateVideoDecoder(int w, int h, double framerate, unsigned int fmt, int *flip)
  6. {
  7. if (fmt == NSV_MAKETYPE('V','P','6','0') || fmt == NSV_MAKETYPE('V','P','6','1') || fmt == NSV_MAKETYPE('V','P','6','2'))
  8. {
  9. *flip=1;
  10. void *mem = WASABI_API_MEMMGR->sysMalloc(sizeof(VP6_Decoder));
  11. VP6_Decoder *dec = new (mem) VP6_Decoder(w,h);
  12. return dec;
  13. }
  14. return NULL;
  15. }
  16. #define CBCLASS NSVFactory
  17. START_DISPATCH;
  18. CB(SVC_NSVFACTORY_CREATEVIDEODECODER, CreateVideoDecoder)
  19. END_DISPATCH;
  20. #undef CBCLASS