author | simon <simon> | 2002-12-10 23:24:48 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-10 23:24:48 (UTC) |
commit | 7f4bd526d59aacbf750e9ee58337b6cf640ba28b (patch) (side-by-side diff) | |
tree | 162f849f529cefe24ff5c6f9c0bdceee0cde772c /noncore/multimedia/opieplayer2/lib.h | |
parent | 763b6ad10dbb7a23c446347cb7fb88cfbadd3e27 (diff) | |
download | opie-7f4bd526d59aacbf750e9ee58337b6cf640ba28b.zip opie-7f4bd526d59aacbf750e9ee58337b6cf640ba28b.tar.gz opie-7f4bd526d59aacbf750e9ee58337b6cf640ba28b.tar.bz2 |
- added an m_initialized flag and a guard for it, along with an
assertion method called from all methods that access variables depending
on initialization (basically all :)
Diffstat (limited to 'noncore/multimedia/opieplayer2/lib.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/lib.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/lib.h b/noncore/multimedia/opieplayer2/lib.h index d546c99..4b8dc81 100644 --- a/noncore/multimedia/opieplayer2/lib.h +++ b/noncore/multimedia/opieplayer2/lib.h @@ -162,46 +162,51 @@ namespace XINE { /** * test */ Frame currentFrame() const; /** * Returns the error code * XINE_ERROR_NONE 0 * XINE_ERROR_NO_INPUT_PLUGIN 1 * XINE_ERROR_NO_DEMUXER_PLUGIN 2 * XINE_ERROR_DEMUXER_FAILED 3 */ int error() const; signals: void stopped(); protected: virtual void receiveMessage( ThreadUtil::ChannelMessage *msg, SendType sendType ); private: void initialize(); + void assertInitialized() const; + + mutable ThreadUtil::Mutex m_initGuard; + bool m_initialized : 1; + int m_bytes_per_pixel; bool m_video:1; XineVideoWidget *m_wid; xine_t *m_xine; xine_stream_t *m_stream; xine_cfg_entry_t *m_config; xine_vo_driver_t *m_videoOutput; xine_ao_driver_t* m_audioOutput; xine_event_queue_t *m_queue; void handleXineEvent( const xine_event_t* t ); void handleXineEvent( int type ); void drawFrame( uint8_t* frame, int width, int height, int bytes ); // C -> C++ bridge for the event system static void xine_event_handler( void* user_data, const xine_event_t* t); static void xine_display_frame( void* user_data, uint8_t* frame , int width, int height, int bytes ); }; }; #endif |