summaryrefslogtreecommitdiff
authorsimon <simon>2002-12-02 11:29:43 (UTC)
committer simon <simon>2002-12-02 11:29:43 (UTC)
commitfcee8216cade787e0099c0aa43a5b8f90b24a85b (patch) (unidiff)
tree612f8c1b263747b2ea2b2e2b0df3ca960e663766
parent5a7c8386e4d526558becf2553912eb42a42107ee (diff)
downloadopie-fcee8216cade787e0099c0aa43a5b8f90b24a85b.zip
opie-fcee8216cade787e0099c0aa43a5b8f90b24a85b.tar.gz
opie-fcee8216cade787e0099c0aa43a5b8f90b24a85b.tar.bz2
- Holger asked for removal of the QCString version() method (the one that
returns "test" :)
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/lib.cpp6
-rw-r--r--noncore/multimedia/opieplayer2/lib.h1
2 files changed, 0 insertions, 7 deletions
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp
index 77dab9a..96bdb21 100644
--- a/noncore/multimedia/opieplayer2/lib.cpp
+++ b/noncore/multimedia/opieplayer2/lib.cpp
@@ -87,102 +87,96 @@ Lib::Lib( XineVideoWidget* widget ) {
87 87
88 m_xine = xine_new( ); 88 m_xine = xine_new( );
89 89
90 xine_config_load( m_xine, str.data() ); 90 xine_config_load( m_xine, str.data() );
91 91
92 xine_init( m_xine ); 92 xine_init( m_xine );
93 93
94 // allocate oss for sound 94 // allocate oss for sound
95 // and fb for framebuffer 95 // and fb for framebuffer
96 m_audioOutput = xine_open_audio_driver( m_xine, "oss", NULL ); 96 m_audioOutput = xine_open_audio_driver( m_xine, "oss", NULL );
97 m_videoOutput = ::init_video_out_plugin( m_config, NULL ); 97 m_videoOutput = ::init_video_out_plugin( m_config, NULL );
98 98
99 99
100//xine_open_video_driver( m_xine, NULL, XINE_VISUAL_TYPE_FB, NULL); 100//xine_open_video_driver( m_xine, NULL, XINE_VISUAL_TYPE_FB, NULL);
101 101
102 102
103 null_display_handler( m_videoOutput, xine_display_frame, this ); 103 null_display_handler( m_videoOutput, xine_display_frame, this );
104 104
105 m_stream = xine_stream_new (m_xine, m_audioOutput, m_videoOutput ); 105 m_stream = xine_stream_new (m_xine, m_audioOutput, m_videoOutput );
106 106
107 if (m_wid != 0 ) { 107 if (m_wid != 0 ) {
108 printf( "!0\n" ); 108 printf( "!0\n" );
109 resize ( m_wid-> size ( ) ); 109 resize ( m_wid-> size ( ) );
110 ::null_set_mode( m_videoOutput, qt_screen->depth(), qt_screen->pixelType() ); 110 ::null_set_mode( m_videoOutput, qt_screen->depth(), qt_screen->pixelType() );
111 111
112 m_wid->repaint(); 112 m_wid->repaint();
113 } 113 }
114 114
115 m_queue = xine_event_new_queue (m_stream); 115 m_queue = xine_event_new_queue (m_stream);
116 116
117 xine_event_create_listener_thread (m_queue, xine_event_handler, this); 117 xine_event_create_listener_thread (m_queue, xine_event_handler, this);
118} 118}
119 119
120Lib::~Lib() { 120Lib::~Lib() {
121// free( m_config ); 121// free( m_config );
122 xine_exit( m_xine ); 122 xine_exit( m_xine );
123 /* FIXME either free or delete but valgrind bitches against both */ 123 /* FIXME either free or delete but valgrind bitches against both */
124 //free( m_videoOutput ); 124 //free( m_videoOutput );
125 //delete m_audioOutput; 125 //delete m_audioOutput;
126} 126}
127 127
128void Lib::resize ( const QSize &s ) { 128void Lib::resize ( const QSize &s ) {
129 if ( s. width ( ) && s. height ( ) ) { 129 if ( s. width ( ) && s. height ( ) ) {
130 ::null_set_gui_width( m_videoOutput, s. width() ); 130 ::null_set_gui_width( m_videoOutput, s. width() );
131 ::null_set_gui_height( m_videoOutput, s. height() ); 131 ::null_set_gui_height( m_videoOutput, s. height() );
132 } 132 }
133} 133}
134 134
135QCString Lib::version() {
136 // QCString str( xine_get_str_version() );
137 // return str;
138 return "test";
139}
140
141int Lib::majorVersion() { 135int Lib::majorVersion() {
142 int major, minor, sub; 136 int major, minor, sub;
143 xine_get_version ( &major, &minor, &sub ); 137 xine_get_version ( &major, &minor, &sub );
144 return major; 138 return major;
145} 139}
146 140
147int Lib::minorVersion() { 141int Lib::minorVersion() {
148 int major, minor, sub; 142 int major, minor, sub;
149 xine_get_version ( &major, &minor, &sub ); 143 xine_get_version ( &major, &minor, &sub );
150 return minor; 144 return minor;
151} 145}
152 146
153int Lib::subVersion() { 147int Lib::subVersion() {
154 int major, minor, sub; 148 int major, minor, sub;
155 xine_get_version ( &major, &minor, &sub ); 149 xine_get_version ( &major, &minor, &sub );
156 return sub; 150 return sub;
157} 151}
158 152
159int Lib::play( const QString& fileName, int startPos, int start_time ) { 153int Lib::play( const QString& fileName, int startPos, int start_time ) {
160 QString str = fileName.stripWhiteSpace(); 154 QString str = fileName.stripWhiteSpace();
161 if ( !xine_open( m_stream, QFile::encodeName(str.utf8() ).data() ) ) { 155 if ( !xine_open( m_stream, QFile::encodeName(str.utf8() ).data() ) ) {
162 return 0; 156 return 0;
163 } 157 }
164 return xine_play( m_stream, startPos, start_time); 158 return xine_play( m_stream, startPos, start_time);
165} 159}
166 160
167void Lib::stop() { 161void Lib::stop() {
168 qDebug("<<<<<<<< STOP IN LIB TRIGGERED >>>>>>>"); 162 qDebug("<<<<<<<< STOP IN LIB TRIGGERED >>>>>>>");
169 xine_stop( m_stream ); 163 xine_stop( m_stream );
170} 164}
171 165
172void Lib::pause() { 166void Lib::pause() {
173 xine_set_param( m_stream, XINE_PARAM_SPEED, XINE_SPEED_PAUSE ); 167 xine_set_param( m_stream, XINE_PARAM_SPEED, XINE_SPEED_PAUSE );
174} 168}
175 169
176int Lib::speed() const { 170int Lib::speed() const {
177 return xine_get_param ( m_stream, XINE_PARAM_SPEED ); 171 return xine_get_param ( m_stream, XINE_PARAM_SPEED );
178} 172}
179 173
180void Lib::setSpeed( int speed ) { 174void Lib::setSpeed( int speed ) {
181 xine_set_param ( m_stream, XINE_PARAM_SPEED, speed ); 175 xine_set_param ( m_stream, XINE_PARAM_SPEED, speed );
182} 176}
183 177
184int Lib::status() const { 178int Lib::status() const {
185 return xine_get_status( m_stream ); 179 return xine_get_status( m_stream );
186} 180}
187 181
188int Lib::currentPosition() const { 182int Lib::currentPosition() const {
diff --git a/noncore/multimedia/opieplayer2/lib.h b/noncore/multimedia/opieplayer2/lib.h
index a7e51fb..3224cb9 100644
--- a/noncore/multimedia/opieplayer2/lib.h
+++ b/noncore/multimedia/opieplayer2/lib.h
@@ -15,97 +15,96 @@
15     ._= =}       : or (at your option) any later version. 15     ._= =}       : or (at your option) any later version.
16    .%`+i>       _;_. 16    .%`+i>       _;_.
17    .i_,=:_.      -<s. This program is distributed in the hope that 17    .i_,=:_.      -<s. This program is distributed in the hope that
18     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 18     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
19    : ..    .:,     . . . without even the implied warranty of 19    : ..    .:,     . . . without even the implied warranty of
20    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 20    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
22..}^=.=       =       ; Library General Public License for more 22..}^=.=       =       ; Library General Public License for more
23++=   -.     .`     .: details. 23++=   -.     .`     .: details.
24 :     =  ...= . :.=- 24 :     =  ...= . :.=-
25 -.   .:....=;==+<; You should have received a copy of the GNU 25 -.   .:....=;==+<; You should have received a copy of the GNU
26  -_. . .   )=.  = Library General Public License along with 26  -_. . .   )=.  = Library General Public License along with
27    --        :-=` this library; see the file COPYING.LIB. 27    --        :-=` this library; see the file COPYING.LIB.
28 If not, write to the Free Software Foundation, 28 If not, write to the Free Software Foundation,
29 Inc., 59 Temple Place - Suite 330, 29 Inc., 59 Temple Place - Suite 330,
30 Boston, MA 02111-1307, USA. 30 Boston, MA 02111-1307, USA.
31 31
32*/ 32*/
33 33
34#ifndef ZECKEXINELIB_H 34#ifndef ZECKEXINELIB_H
35#define ZECKEXINELIB_H 35#define ZECKEXINELIB_H
36 36
37#include <qcstring.h> 37#include <qcstring.h>
38#include <qstring.h> 38#include <qstring.h>
39#include <qobject.h> 39#include <qobject.h>
40 40
41#include <xine.h> 41#include <xine.h>
42//#include "xine.h" 42//#include "xine.h"
43 43
44#include "threadutil.h" 44#include "threadutil.h"
45 45
46class XineVideoWidget; 46class XineVideoWidget;
47 47
48namespace XINE { 48namespace XINE {
49 49
50 /** 50 /**
51 * Lib wrapps the simple interface 51 * Lib wrapps the simple interface
52 * of libxine for easy every day use 52 * of libxine for easy every day use
53 * This will become a full C++ Wrapper 53 * This will become a full C++ Wrapper
54 * It supports playing, pausing, info, 54 * It supports playing, pausing, info,
55 * stooping, seeking. 55 * stooping, seeking.
56 */ 56 */
57 class Frame; 57 class Frame;
58 class Lib : public ThreadUtil::Channel { 58 class Lib : public ThreadUtil::Channel {
59 Q_OBJECT 59 Q_OBJECT
60 public: 60 public:
61 Lib(XineVideoWidget* = 0); 61 Lib(XineVideoWidget* = 0);
62 ~Lib(); 62 ~Lib();
63 QCString version();
64 static int majorVersion(); 63 static int majorVersion();
65 static int minorVersion(); 64 static int minorVersion();
66 static int subVersion(); 65 static int subVersion();
67 66
68 67
69 void resize ( const QSize &s ); 68 void resize ( const QSize &s );
70 69
71 int play( const QString& fileName, 70 int play( const QString& fileName,
72 int startPos = 0, 71 int startPos = 0,
73 int start_time = 0 ); 72 int start_time = 0 );
74 void stop(); 73 void stop();
75 void pause(); 74 void pause();
76 75
77 int speed() const; 76 int speed() const;
78 77
79 /** 78 /**
80 * Set the speed of the stream, if codec supports it 79 * Set the speed of the stream, if codec supports it
81 * XINE_SPEED_PAUSE 0 80 * XINE_SPEED_PAUSE 0
82 * XINE_SPEED_SLOW_4 1 81 * XINE_SPEED_SLOW_4 1
83 * XINE_SPEED_SLOW_2 2 82 * XINE_SPEED_SLOW_2 2
84 * XINE_SPEED_NORMAL 4 83 * XINE_SPEED_NORMAL 4
85 * XINE_SPEED_FAST_2 8 84 * XINE_SPEED_FAST_2 8
86 *XINE_SPEED_FAST_4 16 85 *XINE_SPEED_FAST_4 16
87 */ 86 */
88 void setSpeed( int speed = XINE_SPEED_PAUSE ); 87 void setSpeed( int speed = XINE_SPEED_PAUSE );
89 88
90 int status() const; 89 int status() const;
91 90
92 int currentPosition()const; 91 int currentPosition()const;
93 //in seconds 92 //in seconds
94 int currentTime()const; 93 int currentTime()const;
95 94
96 int length() const; 95 int length() const;
97 96
98 bool isSeekable()const; 97 bool isSeekable()const;
99 98
100 /** 99 /**
101 * Whether or not to show video output 100 * Whether or not to show video output
102 */ 101 */
103 void setShowVideo(bool video); 102 void setShowVideo(bool video);
104 103
105 /** 104 /**
106 * is we show video 105 * is we show video
107 */ 106 */
108 bool isShowingVideo() const; 107 bool isShowingVideo() const;
109 108
110 /** 109 /**
111 * 110 *