source:
smplayer/trunk/src/videopreview/async.diff
| Last change on this file was 113, checked in by , 15 years ago | |
|---|---|
|
|
| File size: 7.6 KB | |
-
videopreview/main.cpp
47 47 */ 48 48 //vp.setAspectRatio( 2.35 ); 49 49 50 51 52 53 54 55 50 56 if ( (vp.showConfigDialog()) && (vp.createThumbnails()) ) { 51 57 vp.show(); 52 58 vp.adjustWindowSize(); 53 59 return a.exec(); 54 60 } 55 61 #endif 56 62 return 0; 57 63 } -
videopreview/videopreview.cpp
105 105 my_layout->addWidget(button_box); 106 106 setLayout(my_layout); 107 107 108 109 110 111 108 112 113 114 115 116 109 117 QList<QByteArray> r_formats = QImageReader::supportedImageFormats(); 110 118 QString read_formats; 111 119 for (int n=0; n < r_formats.count(); n++) { … … 156 164 return "00000005.jpg"; 157 165 } 158 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 159 293 bool VideoPreview::createThumbnails() { 160 294 clearThumbnails(); 161 295 error_message.clear(); … … 244 378 245 379 return true; 246 380 } 381 247 382 248 383 bool VideoPreview::runMplayer(int seek) { 249 384 QStringList args; … … 283 418 for (int n = 0; n < args.count(); n++) command = command + args[n] + " "; 284 419 qDebug("VideoPreview::runMplayer: command: %s", command.toUtf8().constData()); 285 420 421 422 423 424 425 426 427 428 429 430 431 432 286 433 QProcess p; 287 434 #ifdef CD_TO_TEMP_DIR 288 435 p.setWorkingDirectory(full_output_dir); … … 294 441 error_message = tr("The mplayer process didn't run"); 295 442 return false; 296 443 } 444 297 445 298 446 return true; 299 447 } -
videopreview/videopreview.h
19 19 #ifndef _VIDEOPREVIEW_H_ 20 20 #define _VIDEOPREVIEW_H_ 21 21 22 23 22 24 #include <QWidget> 23 25 #include <QString> 24 26 #include <QList> 25 27 28 29 30 31 26 32 class QProgressDialog; 27 33 class QGridLayout; 28 34 class QLabel; … … 90 96 void setExtractFormat( ExtractFormat format ) { prop.extract_format = format; }; 91 97 ExtractFormat extractFormat() { return prop.extract_format; }; 92 98 99 100 101 93 102 bool createThumbnails(); 103 94 104 95 105 bool showConfigDialog(); 96 106 … … 106 116 void cancelPressed(); 107 117 void saveImage(); 108 118 119 120 121 122 123 109 124 protected: 125 126 127 128 129 130 131 132 133 110 134 bool extractImages(); 135 111 136 bool runMplayer(int seek); 112 137 bool addPicture(const QString & filename, int num, int time); 113 138 void displayVideoInfo(const VideoInfo & i); … … 144 169 ExtractFormat extract_format; 145 170 } prop; 146 171 172 147 173 struct { 148 174 int thumbnail_width; 175 176 177 178 149 179 } run; 180 181 182 183 184 150 185 151 186 QString last_directory; 152 187 QString error_message; -
basegui.cpp
4022 4022 4023 4023 video_preview->setMplayerPath(pref->mplayer_bin); 4024 4024 4025 4026 4027 4028 4029 4025 4030 if ( (video_preview->showConfigDialog()) && (video_preview->createThumbnails()) ) { 4026 4031 video_preview->show(); 4027 4032 video_preview->adjustWindowSize(); 4028 4033 } 4034 4029 4035 } 4030 4036 4031 4037 QNetworkProxy BaseGui::userProxy() {
Note:
See TracBrowser
for help on using the repository browser.
