/xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamTV.h

http://github.com/xbmc/xbmc · C Header · 74 lines · 42 code · 13 blank · 19 comment · 0 complexity · b002eded9a3fcbd0e48ac08c52724308 MD5 · raw file

  1. #pragma once
  2. /*
  3. * Copyright (C) 2005-2013 Team XBMC
  4. * http://xbmc.org
  5. *
  6. * This Program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2, or (at your option)
  9. * any later version.
  10. *
  11. * This Program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with XBMC; see the file COPYING. If not, see
  18. * <http://www.gnu.org/licenses/>.
  19. *
  20. */
  21. #include "DVDInputStream.h"
  22. namespace XFILE {
  23. class IFile;
  24. class ILiveTVInterface;
  25. class IRecordable;
  26. }
  27. class CDVDInputStreamTV
  28. : public CDVDInputStream
  29. , public CDVDInputStream::IChannel
  30. , public CDVDInputStream::IDisplayTime
  31. {
  32. public:
  33. CDVDInputStreamTV();
  34. virtual ~CDVDInputStreamTV();
  35. virtual bool Open(const char* strFile, const std::string &content);
  36. virtual void Close();
  37. virtual int Read(uint8_t* buf, int buf_size);
  38. virtual int64_t Seek(int64_t offset, int whence);
  39. virtual bool Pause(double dTime) { return false; };
  40. virtual bool IsEOF();
  41. virtual int64_t GetLength();
  42. virtual ENextStream NextStream();
  43. virtual int GetBlockSize();
  44. bool NextChannel(bool preview = false);
  45. bool PrevChannel(bool preview = false);
  46. bool SelectChannelByNumber(unsigned int channel);
  47. int GetTotalTime();
  48. int GetTime();
  49. static bool SeekTime(int iTimeInMsec);
  50. bool CanRecord();
  51. bool IsRecording();
  52. bool Record(bool bOnOff);
  53. bool CanPause() { return false; };
  54. bool CanSeek() { return false; };
  55. bool UpdateItem(CFileItem& item);
  56. protected:
  57. XFILE::IFile* m_pFile;
  58. XFILE::ILiveTVInterface* m_pLiveTV;
  59. XFILE::IRecordable* m_pRecordable;
  60. bool m_eof;
  61. };