summaryrefslogtreecommitdiff
authorsimon <simon>2002-12-13 22:52:38 (UTC)
committer simon <simon>2002-12-13 22:52:38 (UTC)
commit7a5b1d2dd538ee6d401e795057660f58e9a60eab (patch) (unidiff)
tree612483f02744b6b7f85ee4552c9227f2918293ef
parent15b3146ee488a3f31f355ece580f444c48bfc7e9 (diff)
downloadopie-7a5b1d2dd538ee6d401e795057660f58e9a60eab.zip
opie-7a5b1d2dd538ee6d401e795057660f58e9a60eab.tar.gz
opie-7a5b1d2dd538ee6d401e795057660f58e9a60eab.tar.bz2
- oops #1
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/lib.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp
index 9d4b1be..040eab3 100644
--- a/noncore/multimedia/opieplayer2/lib.cpp
+++ b/noncore/multimedia/opieplayer2/lib.cpp
@@ -92,97 +92,97 @@ Lib::Lib( InitializationMode initMode, XineVideoWidget* widget )
92 initialize(); 92 initialize();
93 m_initialized = true; 93 m_initialized = true;
94 } 94 }
95 else 95 else
96 assert( false ); 96 assert( false );
97} 97}
98 98
99void Lib::run() 99void Lib::run()
100{ 100{
101 assert( false ); 101 assert( false );
102} 102}
103 103
104void Lib::initialize() 104void Lib::initialize()
105{ 105{
106 m_xine = xine_new( ); 106 m_xine = xine_new( );
107 107
108 QString configPath = QDir::homeDirPath() + "/Settings/opiexine.cf"; 108 QString configPath = QDir::homeDirPath() + "/Settings/opiexine.cf";
109 xine_config_load( m_xine, QFile::encodeName( configPath ) ); 109 xine_config_load( m_xine, QFile::encodeName( configPath ) );
110 110
111 xine_init( m_xine ); 111 xine_init( m_xine );
112 112
113 // allocate oss for sound 113 // allocate oss for sound
114 // and fb for framebuffer 114 // and fb for framebuffer
115 m_audioOutput = xine_open_audio_driver( m_xine, "oss", NULL ); 115 m_audioOutput = xine_open_audio_driver( m_xine, "oss", NULL );
116 m_videoOutput = ::init_video_out_plugin( m_xine, NULL, xine_display_frame, this ); 116 m_videoOutput = ::init_video_out_plugin( m_xine, NULL, xine_display_frame, this );
117 117
118 118
119//xine_open_video_driver( m_xine, NULL, XINE_VISUAL_TYPE_FB, NULL); 119//xine_open_video_driver( m_xine, NULL, XINE_VISUAL_TYPE_FB, NULL);
120 120
121 121
122// null_display_handler( m_videoOutput, xine_display_frame, this ); 122// null_display_handler( m_videoOutput, xine_display_frame, this );
123 123
124 m_stream = xine_stream_new (m_xine, m_audioOutput, m_videoOutput ); 124 m_stream = xine_stream_new (m_xine, m_audioOutput, m_videoOutput );
125 125
126 if (m_wid != 0 ) { 126 if (m_wid != 0 ) {
127 printf( "!0\n" ); 127 printf( "!0\n" );
128 resize ( m_wid-> size ( ) ); 128 resize ( m_wid-> size ( ) );
129 ::null_set_mode( m_videoOutput, qt_screen->depth(), qt_screen->pixelType() ); 129 ::null_set_mode( m_videoOutput, qt_screen->depth(), qt_screen->pixelType() );
130 130
131// m_wid->repaint(); 131// m_wid->repaint();
132 } 132 }
133 133
134 m_queue = xine_event_new_queue (m_stream); 134 m_queue = xine_event_new_queue (m_stream);
135 135
136 xine_event_create_listener_thread (m_queue, xine_event_handler, this); 136 xine_event_create_listener_thread (m_queue, xine_event_handler, this);
137} 137}
138 138
139Lib::~Lib() { 139Lib::~Lib() {
140 assert( isRunning() == false ) 140 assert( isRunning() == false );
141 assert( m_initialized ); 141 assert( m_initialized );
142 142
143// free( m_config ); 143// free( m_config );
144 144
145 xine_close( m_stream ); 145 xine_close( m_stream );
146 146
147 xine_event_dispose_queue( m_queue ); 147 xine_event_dispose_queue( m_queue );
148 148
149 xine_dispose( m_stream ); 149 xine_dispose( m_stream );
150 150
151 xine_exit( m_xine ); 151 xine_exit( m_xine );
152 /* FIXME either free or delete but valgrind bitches against both */ 152 /* FIXME either free or delete but valgrind bitches against both */
153 //free( m_videoOutput ); 153 //free( m_videoOutput );
154 //delete m_audioOutput; 154 //delete m_audioOutput;
155} 155}
156 156
157void Lib::resize ( const QSize &s ) { 157void Lib::resize ( const QSize &s ) {
158 assert( m_initialized ); 158 assert( m_initialized );
159 159
160 if ( s. width ( ) && s. height ( ) ) { 160 if ( s. width ( ) && s. height ( ) ) {
161 ::null_set_gui_width( m_videoOutput, s. width() ); 161 ::null_set_gui_width( m_videoOutput, s. width() );
162 ::null_set_gui_height( m_videoOutput, s. height() ); 162 ::null_set_gui_height( m_videoOutput, s. height() );
163 } 163 }
164} 164}
165 165
166int Lib::majorVersion() { 166int Lib::majorVersion() {
167 int major, minor, sub; 167 int major, minor, sub;
168 xine_get_version ( &major, &minor, &sub ); 168 xine_get_version ( &major, &minor, &sub );
169 return major; 169 return major;
170} 170}
171 171
172int Lib::minorVersion() { 172int Lib::minorVersion() {
173 int major, minor, sub; 173 int major, minor, sub;
174 xine_get_version ( &major, &minor, &sub ); 174 xine_get_version ( &major, &minor, &sub );
175 return minor; 175 return minor;
176} 176}
177 177
178int Lib::subVersion() { 178int Lib::subVersion() {
179 int major, minor, sub; 179 int major, minor, sub;
180 xine_get_version ( &major, &minor, &sub ); 180 xine_get_version ( &major, &minor, &sub );
181 return sub; 181 return sub;
182} 182}
183 183
184int Lib::play( const QString& fileName, int startPos, int start_time ) { 184int Lib::play( const QString& fileName, int startPos, int start_time ) {
185 assert( m_initialized ); 185 assert( m_initialized );
186 186
187 QString str = fileName.stripWhiteSpace(); 187 QString str = fileName.stripWhiteSpace();
188 if ( !xine_open( m_stream, QFile::encodeName(str.utf8() ).data() ) ) { 188 if ( !xine_open( m_stream, QFile::encodeName(str.utf8() ).data() ) ) {