1
0

feeds.cpp 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #include "main.h"
  2. #include "feeds.h"
  3. const static wchar_t VID_Info[] = L"VID_Info";
  4. int VideoTextFeed::hasFeed(const wchar_t *name)
  5. {
  6. if (!_wcsicmp(name, VID_Info))
  7. return 1;
  8. else
  9. return 0;
  10. }
  11. //extern "C" extern char vidoutbuf_save[1024];
  12. static wchar_t wideVideo[1024]=L"";
  13. const wchar_t *VideoTextFeed::getFeedText(const wchar_t *name)
  14. {
  15. return wideVideo;
  16. }
  17. const wchar_t *VideoTextFeed::getFeedDescription(const wchar_t *name)
  18. {
  19. return L"Video Info Text";
  20. }
  21. void VideoTextFeed::UpdateText(const wchar_t *text, int length)
  22. {
  23. if (!text)
  24. text=L"";
  25. wideVideo[1023]=0;
  26. StringCchCopyW(wideVideo, 1024, text);
  27. CallViewers(VID_Info, text, length);
  28. }
  29. // --------
  30. const static wchar_t PE_Info[] = L"PE_Info";
  31. int PlaylistTextFeed::hasFeed(const wchar_t *name)
  32. {
  33. if (!_wcsicmp(name, PE_Info))
  34. return 1;
  35. else
  36. return 0;
  37. }
  38. const wchar_t *PlaylistTextFeed::getFeedText(const wchar_t *name)
  39. {
  40. return playlistStr;
  41. }
  42. const wchar_t *PlaylistTextFeed::getFeedDescription(const wchar_t *name)
  43. {
  44. return L"Playlist Info Text";
  45. }
  46. void PlaylistTextFeed::UpdateText(const wchar_t *text, int length)
  47. {
  48. CallViewers(PE_Info, text, length);
  49. }