stream_configuration.cpp 677 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * This file is part of the FreeStreamer project,
  3. * (C)Copyright 2011-2018 Matias Muhonen <mmu@iki.fi> 穆马帝
  4. * See the file ''LICENSE'' for using the code.
  5. *
  6. * https://github.com/muhku/FreeStreamer
  7. */
  8. #include "stream_configuration.h"
  9. namespace astreamer {
  10. Stream_Configuration::Stream_Configuration() :
  11. userAgent(NULL),
  12. cacheDirectory(NULL),
  13. predefinedHttpHeaderValues(NULL)
  14. {
  15. }
  16. Stream_Configuration::~Stream_Configuration()
  17. {
  18. if (userAgent) {
  19. CFRelease(userAgent);
  20. userAgent = NULL;
  21. }
  22. }
  23. Stream_Configuration* Stream_Configuration::configuration()
  24. {
  25. static Stream_Configuration config;
  26. return &config;
  27. }
  28. }