NSVFactory.cpp 550 B

12345678910111213141516171819202122
  1. #include "NSVFactory.h"
  2. #include "nsv_h264_decoder.h"
  3. #include "api__h264.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('H','2','6','4'))
  8. {
  9. *flip=0;
  10. void *mem = WASABI_API_MEMMGR->sysMalloc(sizeof(H264_Decoder));
  11. H264_Decoder *dec = new (mem) H264_Decoder();
  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