ogg_theora_decoder.cpp 556 B

1234567891011121314151617181920212223242526272829
  1. #include "ogg_theora_decoder.h"
  2. #include <string.h>
  3. ifc_oggdecoder *OggDecoderFactory::CreateDecoder(const ogg_packet *packet)
  4. {
  5. if (packet && packet->packet && packet->bytes >= 42)
  6. {
  7. if (!memcmp(packet->packet + 1, "theora", 6))
  8. return new OggTheoraDecoder(packet);
  9. }
  10. return 0;
  11. }
  12. #define CBCLASS OggDecoderFactory
  13. START_DISPATCH;
  14. CB(DISP_CREATEDECODER, CreateDecoder)
  15. END_DISPATCH;
  16. #undef CBCLASS
  17. OggTheoraDecoder::OggTheoraDecoder(const ogg_packet *packet)
  18. {
  19. }
  20. #define CBCLASS OggTheoraDecoder
  21. START_DISPATCH;
  22. END_DISPATCH;
  23. #undef CBCLASS