diff options
Diffstat (limited to 'vdr_decoder.h')
-rw-r--r-- | vdr_decoder.h | 150 |
1 files changed, 75 insertions, 75 deletions
diff --git a/vdr_decoder.h b/vdr_decoder.h index ee943ce..3dd6c00 100644 --- a/vdr_decoder.h +++ b/vdr_decoder.h @@ -82,71 +82,71 @@ class mgDecoder { protected: -/*! \brief database handle to the track being decoded */ - mgContentItem * m_item; - -/*! \brief The currently playing file */ - std::string m_filename; - -/*! \brief Mutexes to coordinate threads */ - cMutex m_lock, m_locklock; - int m_locked; - bool m_urgentLock; - -/*! \brief Whether the decoder is currently active */ - bool m_playing; - -/*! \brief ??? */ - mgPlayInfo m_playinfo; - -/*! \brief Place a lock */ - virtual void lock (bool urgent = false); - -/*! \brief Release a lock */ - virtual void unlock (void); - -/*! \brief Try to obtain a lock */ - virtual bool tryLock (void); - - public: - -//@{ -/*! \brief The constructor */ - mgDecoder (mgContentItem * item); - -/*! \brief The destructor */ - virtual ~ mgDecoder (); -//@} - -/*! \brief Whether a decoder instance is able to play the given file */ - virtual bool valid () = 0; - -/*! \brief Whether a stream (i.e. from the network is being decoded */ - virtual bool isStream () - { - return false; - } - -/*! \brief Start decoding */ - virtual bool start () = 0; - -/*! \brief Stop decoding */ - virtual bool stop () = 0; - -/*! \brief Skip an amount of time. Impossible by default */ - virtual bool skip (int seconds, int avail, int rate) - { - return false; - } - -/*! \brief Return decoded data */ - virtual struct mgDecode *decode () = 0; - -/*! \brief Information about the current playback status */ - virtual mgPlayInfo *playInfo () - { - return 0; - } + /*! \brief database handle to the track being decoded */ + mgContentItem * m_item; + + /*! \brief The currently playing file */ + std::string m_filename; + + /*! \brief Mutexes to coordinate threads */ + cMutex m_lock, m_locklock; + int m_locked; + bool m_urgentLock; + + /*! \brief Whether the decoder is currently active */ + bool m_playing; + + /*! \brief ??? */ + mgPlayInfo m_playinfo; + + /*! \brief Place a lock */ + virtual void lock (bool urgent = false); + + /*! \brief Release a lock */ + virtual void unlock (void); + + /*! \brief Try to obtain a lock */ + virtual bool tryLock (void); + + public: + + //@{ + /*! \brief The constructor */ + mgDecoder (mgContentItem * item); + + /*! \brief The destructor */ + virtual ~ mgDecoder (); + //@} + + /*! \brief Whether a decoder instance is able to play the given file */ + virtual bool valid () = 0; + + /*! \brief Whether a stream (i.e. from the network is being decoded */ + virtual bool isStream () + { + return false; + } + + /*! \brief Start decoding */ + virtual bool start () = 0; + + /*! \brief Stop decoding */ + virtual bool stop () = 0; + + /*! \brief Skip an amount of time. Impossible by default */ + virtual bool skip (int seconds, int avail, int rate) + { + return false; + } + + /*! \brief Return decoded data */ + virtual struct mgDecode *decode () = 0; + + /*! \brief Information about the current playback status */ + virtual mgPlayInfo *playInfo () + { + return 0; + } }; // ---------------------------------------------------------------- @@ -156,15 +156,15 @@ class mgDecoder */ class mgDecoders { - public: - -/*! \brief Try to find a valid decoder for a file - */ - static mgDecoder *findDecoder (mgContentItem * item); - -/*! \brief determine the media type for a given source - */ - static mgMediaType getMediaType (std::string filename); - + public: + + /*! \brief Try to find a valid decoder for a file + */ + static mgDecoder *findDecoder (mgContentItem * item); + + /*! \brief determine the media type for a given source + */ + static mgMediaType getMediaType (std::string filename); + }; #endif //___DECODER_H |