factory_f263.cpp 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #include "api.h"
  2. #include "factory_f263.h"
  3. #include "impl_f263decoder.h"
  4. static const char serviceName[] = "F263 Decoder";
  5. FOURCC F263Factory::GetServiceType()
  6. {
  7. return WaSvc::OBJECT;
  8. }
  9. const char *F263Factory::GetServiceName()
  10. {
  11. return serviceName;
  12. }
  13. GUID F263Factory::GetGUID()
  14. {
  15. return obj_f263decoderGUID;
  16. }
  17. void *F263Factory::GetInterface(int global_lock)
  18. {
  19. F263Decoder *f263decoder = new F263Decoder;
  20. obj_f263decoder *ifc= static_cast<obj_f263decoder *>(f263decoder);
  21. // if (global_lock)
  22. // WASABI_API_SVC->service_lock(this, (void *)ifc);
  23. return ifc;
  24. }
  25. int F263Factory::SupportNonLockingInterface()
  26. {
  27. return 1;
  28. }
  29. int F263Factory::ReleaseInterface(void *ifc)
  30. {
  31. //WASABI_API_SVC->service_unlock(ifc);
  32. obj_f263decoder *decoderIFC = static_cast<obj_f263decoder *>(ifc);
  33. F263Decoder *decoder = static_cast<F263Decoder *>(decoderIFC);
  34. delete decoder;
  35. return 1;
  36. }
  37. const char *F263Factory::GetTestString()
  38. {
  39. return NULL;
  40. }
  41. int F263Factory::ServiceNotify(int msg, int param1, int param2)
  42. {
  43. return 1;
  44. }
  45. #define CBCLASS F263Factory
  46. START_DISPATCH;
  47. CB(WASERVICEFACTORY_GETSERVICETYPE, GetServiceType)
  48. CB(WASERVICEFACTORY_GETSERVICENAME, GetServiceName)
  49. CB(WASERVICEFACTORY_GETGUID, GetGUID)
  50. CB(WASERVICEFACTORY_GETINTERFACE, GetInterface)
  51. CB(WASERVICEFACTORY_SUPPORTNONLOCKINGGETINTERFACE, SupportNonLockingInterface)
  52. CB(WASERVICEFACTORY_RELEASEINTERFACE, ReleaseInterface)
  53. CB(WASERVICEFACTORY_GETTESTSTRING, GetTestString)
  54. CB(WASERVICEFACTORY_SERVICENOTIFY, ServiceNotify)
  55. END_DISPATCH;
  56. #undef CBCLASS