├── BuildOnMe.pro ├── glwidget.cpp ├── glwidget.h ├── icons ├── address-book-new.svg ├── appointment-new.svg ├── bookmark-new.svg ├── contact-new.svg ├── document-new.svg ├── document-open.svg ├── document-print-preview.svg ├── document-print.svg ├── document-properties.svg ├── document-save-as.svg ├── document-save.svg ├── edit-clear.svg ├── edit-copy.svg ├── edit-cut.svg ├── edit-delete.svg ├── edit-find-replace.svg ├── edit-find.svg ├── edit-paste.svg ├── edit-redo.svg ├── edit-select-all.svg ├── edit-undo.svg ├── folder-new.svg ├── format-indent-less.svg ├── format-indent-more.svg ├── format-justify-center.svg ├── format-justify-fill.svg ├── format-justify-left.svg ├── format-justify-right.svg ├── format-text-bold.svg ├── format-text-italic.svg ├── format-text-strikethrough.svg ├── format-text-underline.svg ├── go-bottom.svg ├── go-down.svg ├── go-first.svg ├── go-home.svg ├── go-jump.svg ├── go-last.svg ├── go-next.svg ├── go-previous.svg ├── go-top.svg ├── go-up.svg ├── list-add.svg ├── list-remove.svg ├── mail-forward.svg ├── mail-mark-junk.svg ├── mail-message-new.svg ├── mail-reply-all.svg ├── mail-reply-sender.svg ├── mail-send-receive.svg ├── media-eject.svg ├── media-playback-pause.svg ├── media-playback-start.svg ├── media-playback-stop.svg ├── media-record.svg ├── media-seek-backward.svg ├── media-seek-forward.svg ├── media-skip-backward.svg ├── media-skip-forward.svg ├── process-stop.svg ├── system-lock-screen.svg ├── system-log-out.svg ├── system-search.svg ├── system-shutdown.svg ├── tab-new.svg ├── view-fullscreen.svg ├── view-refresh.svg └── window-new.svg ├── main.cpp ├── mainwindow.cpp ├── mainwindow.h ├── mainwindow.ui ├── mltcontroller.cpp ├── mltcontroller.h └── resources.qrc /BuildOnMe.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2011-01-14T22:13:15 4 | # 5 | #------------------------------------------------- 6 | 7 | QT += core gui 8 | 9 | TARGET = BuildOnMe 10 | TEMPLATE = app 11 | 12 | 13 | SOURCES += main.cpp\ 14 | mainwindow.cpp \ 15 | mltcontroller.cpp 16 | 17 | HEADERS += mainwindow.h \ 18 | mltcontroller.h 19 | 20 | FORMS += mainwindow.ui 21 | 22 | mac { 23 | QT += opengl 24 | SOURCES += glwidget.cpp 25 | HEADERS += glwidget.h 26 | } 27 | win32 { 28 | INCLUDEPATH += include/mlt++ include/mlt 29 | LIBS += -Llib -lmlt++ -lmlt 30 | } else { 31 | CONFIG += link_pkgconfig 32 | PKGCONFIG += mlt++ 33 | } 34 | 35 | RESOURCES += \ 36 | resources.qrc 37 | -------------------------------------------------------------------------------- /glwidget.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011 Dan Dennedy 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | #include 24 | #include 25 | #include 26 | #include "glwidget.h" 27 | 28 | #ifndef GL_TEXTURE_RECTANGLE_EXT 29 | #define GL_TEXTURE_RECTANGLE_EXT GL_TEXTURE_RECTANGLE_NV 30 | #endif 31 | 32 | GLWidget::GLWidget (QWidget *parent) 33 | : QGLWidget (parent) 34 | , m_image_width (0) 35 | , m_image_height (0) 36 | , m_texture (0) 37 | , m_display_ratio (4.0/3.0) 38 | { 39 | setAttribute (Qt::WA_PaintOnScreen); 40 | setAttribute (Qt::WA_OpaquePaintEvent); 41 | } 42 | 43 | GLWidget::~GLWidget () 44 | { 45 | makeCurrent (); 46 | if (m_texture) 47 | glDeleteTextures (1, &m_texture); 48 | } 49 | 50 | QSize GLWidget::minimumSizeHint () const 51 | { 52 | return QSize (40, 30); 53 | } 54 | 55 | QSize GLWidget::sizeHint () const 56 | { 57 | return QSize (400, 300); 58 | } 59 | 60 | void GLWidget::initializeGL () 61 | { 62 | QPalette palette; 63 | qglClearColor (palette.color (QPalette::Window)); 64 | glShadeModel (GL_FLAT); 65 | glDisable (GL_DEPTH_TEST); 66 | glDisable (GL_CULL_FACE); 67 | glDisable (GL_LIGHTING); 68 | glDisable (GL_DITHER); 69 | glDisable (GL_BLEND); 70 | glPixelStorei (GL_UNPACK_ALIGNMENT, 1); 71 | } 72 | 73 | void GLWidget::resizeGL(int width, int height) 74 | { 75 | double this_aspect = (double) width / height; 76 | 77 | // Special case optimisation to negate odd effect of sample aspect ratio 78 | // not corresponding exactly with image resolution. 79 | if ((int) (this_aspect * 1000) == (int) (m_display_ratio * 1000)) 80 | { 81 | w = width; 82 | h = height; 83 | } 84 | // Use OpenGL to normalise sample aspect ratio 85 | else if (height * m_display_ratio > width) 86 | { 87 | w = width; 88 | h = width / m_display_ratio; 89 | } 90 | else 91 | { 92 | w = height * m_display_ratio; 93 | h = height; 94 | } 95 | x = (width - w) / 2; 96 | y = (height - h) / 2; 97 | 98 | glViewport (0, 0, width, height); 99 | glMatrixMode (GL_PROJECTION); 100 | glLoadIdentity (); 101 | gluOrtho2D (0, width, height, 0); 102 | glMatrixMode (GL_MODELVIEW); 103 | glClear (GL_COLOR_BUFFER_BIT); 104 | } 105 | 106 | void GLWidget::resizeEvent (QResizeEvent* event) 107 | { 108 | resizeGL (event->size().width(), event->size().height()); 109 | } 110 | 111 | void GLWidget::paintGL () 112 | { 113 | glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 114 | if (m_texture) 115 | { 116 | #ifdef Q_WS_MAC 117 | glClear (GL_COLOR_BUFFER_BIT); 118 | #endif 119 | glEnable (GL_TEXTURE_RECTANGLE_EXT); 120 | glBegin (GL_QUADS); 121 | glTexCoord2i (0, 0); 122 | glVertex2i (x, y); 123 | glTexCoord2i (m_image_width - 1, 0); 124 | glVertex2i (x + w - 1, y); 125 | glTexCoord2i (m_image_width - 1, m_image_height - 1); 126 | glVertex2i (x + w - 1, y + h - 1); 127 | glTexCoord2i (0, m_image_height - 1); 128 | glVertex2i (x, y + h - 1); 129 | glEnd (); 130 | glDisable (GL_TEXTURE_RECTANGLE_EXT); 131 | } 132 | } 133 | 134 | void GLWidget::showImage (QImage image) 135 | { 136 | m_image_width = image.width (); 137 | m_image_height = image.height (); 138 | 139 | makeCurrent (); 140 | if (m_texture) 141 | glDeleteTextures (1, &m_texture); 142 | glPixelStorei (GL_UNPACK_ROW_LENGTH, m_image_width); 143 | glGenTextures (1, &m_texture); 144 | glBindTexture (GL_TEXTURE_RECTANGLE_EXT, m_texture); 145 | glTexParameteri (GL_TEXTURE_RECTANGLE_EXT, GL_TEXTURE_MIN_FILTER, GL_LINEAR); 146 | glTexParameterf (GL_TEXTURE_RECTANGLE_EXT, GL_TEXTURE_MAG_FILTER, GL_LINEAR); 147 | glTexImage2D (GL_TEXTURE_RECTANGLE_EXT, 0, GL_RGBA8, m_image_width, m_image_height, 0, 148 | GL_RGBA, GL_UNSIGNED_BYTE, image.bits()); 149 | updateGL (); 150 | } 151 | -------------------------------------------------------------------------------- /glwidget.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011 Dan Dennedy 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | #ifndef GLWIDGET_H 24 | #define GLWIDGET_H 25 | 26 | #include 27 | 28 | class GLWidget : public QGLWidget 29 | { 30 | Q_OBJECT 31 | 32 | public: 33 | GLWidget (QWidget *parent = 0); 34 | ~GLWidget (); 35 | 36 | QSize minimumSizeHint () const; 37 | QSize sizeHint () const; 38 | void setImageAspectRatio (double ratio) { 39 | m_display_ratio = ratio; 40 | } 41 | 42 | private: 43 | int x, y, w, h; 44 | int m_image_width, m_image_height; 45 | GLuint m_texture; 46 | double m_display_ratio; 47 | 48 | public slots: 49 | void showImage (QImage image); 50 | 51 | protected: 52 | void initializeGL (); 53 | void resizeGL (int width, int height); 54 | void resizeEvent (QResizeEvent* event); 55 | void paintGL (); 56 | }; 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /icons/edit-redo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 23 | 25 | 32 | 35 | 39 | 43 | 44 | 47 | 51 | 55 | 56 | 59 | 63 | 67 | 68 | 71 | 75 | 79 | 80 | 91 | 94 | 98 | 102 | 103 | 113 | 124 | 133 | 142 | 143 | 164 | 166 | 167 | 169 | image/svg+xml 170 | 172 | 173 | 174 | Jakub Steiner 175 | 176 | 177 | http://jimmac.musichall.cz 178 | 180 | Edit Redo 181 | 182 | 183 | edit 184 | redo 185 | again 186 | reapply 187 | 188 | 189 | 190 | 192 | 194 | 196 | 198 | 199 | 200 | 201 | 205 | 215 | 220 | 225 | 230 | 231 | 232 | -------------------------------------------------------------------------------- /icons/edit-undo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 23 | 25 | 32 | 35 | 39 | 43 | 44 | 47 | 51 | 55 | 56 | 59 | 63 | 67 | 68 | 71 | 75 | 79 | 80 | 91 | 94 | 98 | 102 | 103 | 113 | 122 | 131 | 142 | 143 | 164 | 166 | 167 | 169 | image/svg+xml 170 | 172 | 173 | 174 | Jakub Steiner 175 | 176 | 177 | http://jimmac.musichall.cz 178 | 180 | Edit Undo 181 | 182 | 183 | edit 184 | undo 185 | revert 186 | 187 | 188 | 189 | 191 | 193 | 195 | 197 | 198 | 199 | 200 | 204 | 214 | 219 | 224 | 229 | 230 | 231 | -------------------------------------------------------------------------------- /icons/format-justify-fill.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 20 | 22 | 29 | 40 | 43 | 47 | 51 | 52 | 63 | 65 | 69 | 73 | 77 | 78 | 88 | 91 | 95 | 99 | 100 | 111 | 113 | 117 | 121 | 125 | 126 | 136 | 139 | 143 | 147 | 148 | 158 | 161 | 165 | 169 | 170 | 180 | 182 | 186 | 190 | 191 | 201 | 202 | 221 | 223 | 224 | 226 | image/svg+xml 227 | 229 | Justify Center 230 | 2005-10-29 231 | 232 | 233 | Andreas Nilsson 234 | 235 | 236 | 237 | 238 | justify 239 | center 240 | format 241 | 242 | 243 | 245 | 246 | 248 | 250 | 252 | 254 | 255 | 256 | 257 | 261 | 265 | 272 | 277 | 282 | 283 | 292 | 300 | 308 | 316 | 324 | 332 | 341 | 342 | 343 | -------------------------------------------------------------------------------- /icons/format-justify-left.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 20 | 22 | 29 | 40 | 43 | 47 | 51 | 52 | 63 | 65 | 69 | 73 | 77 | 78 | 88 | 91 | 95 | 99 | 100 | 111 | 113 | 117 | 121 | 125 | 126 | 136 | 137 | 156 | 158 | 159 | 161 | image/svg+xml 162 | 164 | Justify Left 165 | 2005-10-29 166 | 167 | 168 | Andreas Nilsson 169 | 170 | 171 | 172 | 173 | justify 174 | left 175 | 176 | 177 | 179 | 180 | 182 | 184 | 186 | 188 | 189 | 190 | 191 | 195 | 199 | 206 | 211 | 216 | 217 | 226 | 233 | 240 | 247 | 254 | 261 | 270 | 271 | 272 | -------------------------------------------------------------------------------- /icons/format-text-bold.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 23 | 30 | 33 | 37 | 41 | 42 | 44 | 48 | 52 | 53 | 56 | 60 | 64 | 65 | 67 | 71 | 75 | 76 | 78 | 82 | 86 | 87 | 90 | 94 | 98 | 99 | 108 | 117 | 127 | 137 | 148 | 159 | 169 | 170 | 195 | 199 | 203 | 207 | 211 | 215 | 219 | 223 | 227 | 239 | 240 | 242 | 243 | 245 | image/svg+xml 246 | 248 | Bold 249 | 2006-01-04 250 | 251 | 252 | Lapo Calamandrei 253 | 254 | 255 | http://tango-project.org 256 | 257 | 258 | text 259 | a 260 | bold 261 | write 262 | letter 263 | 264 | 265 | 267 | 268 | 269 | Andreas Nilsson 270 | 271 | 272 | 273 | 275 | 277 | 279 | 281 | 282 | 283 | 284 | 289 | 301 | 302 | 307 | 310 | 315 | 320 | 325 | 326 | 327 | 328 | -------------------------------------------------------------------------------- /icons/format-text-italic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 23 | 30 | 41 | 44 | 48 | 52 | 53 | 55 | 59 | 63 | 64 | 67 | 71 | 75 | 76 | 78 | 82 | 86 | 87 | 89 | 93 | 97 | 98 | 101 | 105 | 109 | 110 | 120 | 130 | 140 | 150 | 161 | 172 | 182 | 183 | 208 | 212 | 216 | 220 | 224 | 228 | 232 | 236 | 240 | 254 | 255 | 257 | 258 | 260 | image/svg+xml 261 | 263 | Italic 264 | 2006-01-04 265 | 266 | 267 | Lapo Calamandrei 268 | 269 | 270 | http://tango-project.org 271 | 272 | 273 | text 274 | a 275 | italic 276 | cursive 277 | write 278 | letter 279 | 280 | 281 | 283 | 284 | 286 | 288 | 290 | 292 | 293 | 294 | 295 | 300 | 312 | 313 | 318 | 323 | 328 | 333 | 334 | 335 | -------------------------------------------------------------------------------- /icons/go-bottom.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 23 | 25 | 32 | 34 | 38 | 42 | 43 | 54 | 57 | 61 | 65 | 66 | 69 | 73 | 77 | 78 | 89 | 100 | 111 | 122 | 123 | 144 | 146 | 147 | 149 | image/svg+xml 150 | 152 | 153 | 154 | Jakub Steiner 155 | 156 | 157 | http://jimmac.musichall.cz 158 | 160 | Go to Bottom 161 | 162 | 163 | go 164 | bottom 165 | 166 | 167 | 168 | 169 | Andreas Nilsson 170 | 171 | 172 | 173 | 175 | 177 | 179 | 181 | 182 | 183 | 184 | 188 | 198 | 203 | 208 | 213 | 220 | 225 | 226 | 227 | -------------------------------------------------------------------------------- /icons/go-down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 23 | 25 | 32 | 34 | 38 | 42 | 43 | 46 | 50 | 54 | 55 | 58 | 62 | 66 | 67 | 78 | 89 | 100 | 101 | 122 | 124 | 125 | 127 | image/svg+xml 128 | 130 | 131 | 132 | Jakub Steiner 133 | 134 | 135 | http://jimmac.musichall.cz 136 | 138 | Go Down 139 | 140 | 141 | go 142 | lower 143 | down 144 | arrow 145 | pointer 146 | > 147 | 148 | 149 | 150 | 151 | Andreas Nilsson 152 | 153 | 154 | 155 | 157 | 159 | 161 | 163 | 164 | 165 | 166 | 170 | 180 | 183 | 188 | 193 | 198 | 199 | 200 | 201 | -------------------------------------------------------------------------------- /icons/go-first.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 23 | 25 | 32 | 34 | 38 | 42 | 43 | 54 | 57 | 61 | 65 | 66 | 69 | 73 | 77 | 78 | 89 | 100 | 101 | 122 | 124 | 125 | 127 | image/svg+xml 128 | 130 | 131 | 132 | Jakub Steiner 133 | 134 | 135 | http://jimmac.musichall.cz 136 | 138 | Go Previous 139 | 140 | 141 | go 142 | previous 143 | left 144 | arrow 145 | pointer 146 | < 147 | 148 | 149 | 150 | 151 | Andreas Nilsson 152 | 153 | 154 | 155 | 157 | 159 | 161 | 163 | 164 | 165 | 166 | 170 | 180 | 185 | 193 | 198 | 203 | 204 | 205 | -------------------------------------------------------------------------------- /icons/go-jump.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 23 | 25 | 32 | 35 | 39 | 43 | 44 | 47 | 51 | 55 | 56 | 58 | 62 | 66 | 67 | 70 | 74 | 78 | 79 | 90 | 100 | 110 | 119 | 120 | 141 | 143 | 144 | 146 | image/svg+xml 147 | 149 | 150 | 151 | Jakub Steiner 152 | 153 | 154 | http://jimmac.musichall.cz 155 | 157 | Go Jump 158 | 159 | 160 | go 161 | jump 162 | seek 163 | arrow 164 | pointer 165 | 166 | 167 | 168 | 170 | 172 | 174 | 176 | 177 | 178 | 179 | 183 | 193 | 198 | 203 | 204 | 205 | -------------------------------------------------------------------------------- /icons/go-last.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 23 | 25 | 32 | 34 | 38 | 42 | 43 | 54 | 57 | 61 | 65 | 66 | 69 | 73 | 77 | 78 | 89 | 100 | 101 | 122 | 124 | 125 | 127 | image/svg+xml 128 | 130 | 131 | 132 | Jakub Steiner 133 | 134 | 135 | http://jimmac.musichall.cz 136 | 138 | Go Next 139 | 140 | 141 | go 142 | next 143 | right 144 | arrow 145 | pointer 146 | > 147 | 148 | 149 | 150 | 151 | Andreas Nilsson 152 | 153 | 154 | 155 | 157 | 159 | 161 | 163 | 164 | 165 | 166 | 170 | 180 | 185 | 190 | 195 | 203 | 204 | 205 | -------------------------------------------------------------------------------- /icons/go-next.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 24 | 26 | 33 | 35 | 39 | 43 | 44 | 47 | 51 | 55 | 56 | 59 | 63 | 67 | 68 | 79 | 90 | 101 | 102 | 123 | 125 | 126 | 128 | image/svg+xml 129 | 131 | 132 | 133 | Jakub Steiner 134 | 135 | 136 | http://jimmac.musichall.cz 137 | 139 | Go Next 140 | 141 | 142 | go 143 | next 144 | right 145 | arrow 146 | pointer 147 | > 148 | 149 | 150 | 151 | 153 | 155 | 157 | 159 | 160 | 161 | 162 | 166 | 176 | 181 | 186 | 191 | 192 | 193 | -------------------------------------------------------------------------------- /icons/go-up.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 23 | 25 | 32 | 34 | 38 | 42 | 43 | 46 | 50 | 54 | 55 | 58 | 62 | 66 | 67 | 78 | 89 | 100 | 101 | 122 | 124 | 125 | 127 | image/svg+xml 128 | 130 | 131 | 132 | Jakub Steiner 133 | 134 | 135 | http://jimmac.musichall.cz 136 | 138 | Go Up 139 | 140 | 141 | go 142 | higher 143 | up 144 | arrow 145 | pointer 146 | > 147 | 148 | 149 | 150 | 151 | Andreas Nilsson 152 | 153 | 154 | 155 | 157 | 159 | 161 | 163 | 164 | 165 | 166 | 170 | 180 | 185 | 190 | 195 | 196 | 197 | -------------------------------------------------------------------------------- /icons/media-playback-start.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 23 | 25 | 32 | 34 | 38 | 42 | 43 | 45 | 49 | 53 | 54 | 56 | 60 | 64 | 65 | 68 | 72 | 76 | 77 | 79 | 83 | 87 | 88 | 98 | 109 | 119 | 120 | 146 | 150 | 154 | 158 | 162 | 166 | 170 | 174 | 178 | 182 | 186 | 190 | 194 | 198 | 202 | 206 | 210 | 214 | 218 | 230 | 231 | 233 | 234 | 236 | image/svg+xml 237 | 239 | Media Playback Start 240 | 241 | 242 | Lapo Calamandrei 243 | 244 | 245 | 247 | 248 | 249 | play 250 | media 251 | music 252 | video 253 | player 254 | 255 | 256 | 257 | 258 | Jakub Steiner 259 | 260 | 261 | 262 | 264 | 266 | 268 | 270 | 271 | 272 | 273 | 278 | 283 | 290 | 297 | 304 | 311 | 318 | 319 | 320 | -------------------------------------------------------------------------------- /icons/media-record.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 23 | 25 | 32 | 34 | 38 | 42 | 43 | 45 | 49 | 53 | 54 | 57 | 61 | 65 | 66 | 69 | 73 | 77 | 78 | 89 | 100 | 111 | 120 | 131 | 132 | 158 | 162 | 166 | 170 | 174 | 178 | 182 | 186 | 190 | 194 | 198 | 202 | 206 | 210 | 214 | 218 | 222 | 226 | 230 | 242 | 243 | 245 | 246 | 248 | image/svg+xml 249 | 251 | Media Record 252 | 253 | 254 | Lapo Calamandrei 255 | 256 | 257 | 259 | 260 | 261 | media 262 | player 263 | record 264 | music 265 | sound 266 | video 267 | 268 | 269 | 270 | 272 | 274 | 276 | 278 | 279 | 280 | 281 | 286 | 298 | 311 | 321 | 331 | 336 | 337 | 338 | -------------------------------------------------------------------------------- /icons/process-stop.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 20 | 22 | 29 | 31 | 35 | 39 | 40 | 43 | 47 | 51 | 52 | 54 | 58 | 62 | 63 | 66 | 70 | 74 | 75 | 86 | 89 | 93 | 97 | 98 | 100 | 104 | 108 | 109 | 112 | 116 | 120 | 121 | 123 | 127 | 131 | 132 | 134 | 138 | 142 | 143 | 145 | 149 | 153 | 157 | 158 | 168 | 178 | 188 | 197 | 208 | 218 | 229 | 239 | 240 | 261 | 263 | 264 | 266 | image/svg+xml 267 | 269 | Stop 270 | 2005-10-16 271 | 272 | 273 | Andreas Nilsson 274 | 275 | 276 | 277 | 278 | stop 279 | halt 280 | error 281 | 282 | 283 | 285 | 286 | 287 | Jakub Steiner 288 | 289 | 290 | 291 | 293 | 295 | 297 | 299 | 300 | 301 | 302 | 306 | 316 | 321 | 326 | 331 | 335 | 336 | 337 | -------------------------------------------------------------------------------- /icons/tab-new.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 20 | 22 | 29 | 40 | 43 | 47 | 51 | 52 | 63 | 65 | 69 | 73 | 77 | 78 | 88 | 91 | 95 | 99 | 100 | 103 | 107 | 111 | 112 | 114 | 118 | 122 | 123 | 125 | 129 | 133 | 137 | 138 | 140 | 144 | 148 | 149 | 151 | 155 | 159 | 163 | 164 | 174 | 176 | 180 | 184 | 185 | 195 | 205 | 216 | 217 | 238 | 240 | 241 | 243 | image/svg+xml 244 | 246 | New Tab 247 | 2005-10-29 248 | 249 | 250 | Andreas Nilsson 251 | 252 | 253 | 254 | 255 | tab 256 | new 257 | 258 | 259 | 261 | 262 | 263 | Jakub Steiner 264 | 265 | 266 | 267 | 269 | 271 | 273 | 275 | 276 | 277 | 278 | 282 | 286 | 293 | 298 | 303 | 304 | 309 | 314 | 327 | 328 | 329 | -------------------------------------------------------------------------------- /icons/window-new.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 23 | 25 | 26 | 28 | image/svg+xml 29 | 31 | New Window 32 | 33 | 34 | Corey Woodworth 35 | 36 | 37 | 39 | http://jimmac.musichall.cz 40 | 41 | 42 | Jakub Steiner 43 | 44 | 45 | 46 | 47 | new 48 | insert 49 | window 50 | 51 | 52 | 53 | 55 | 57 | 59 | 61 | 62 | 63 | 64 | 80 | 82 | 89 | 100 | 103 | 107 | 111 | 112 | 123 | 125 | 129 | 133 | 137 | 138 | 148 | 150 | 154 | 158 | 162 | 163 | 165 | 169 | 173 | 174 | 176 | 180 | 184 | 185 | 187 | 191 | 195 | 196 | 207 | 218 | 228 | 238 | 239 | 243 | 250 | 255 | 260 | 261 | 270 | 279 | 288 | 292 | 293 | -------------------------------------------------------------------------------- /main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011 Dan Dennedy 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | #include 24 | #include 25 | #include "mainwindow.h" 26 | 27 | int main(int argc, char *argv[]) 28 | { 29 | QApplication a (argc, argv); 30 | QDir dir (QApplication::applicationDirPath()); 31 | dir.cd ("lib"); 32 | dir.cd ("qt4"); 33 | QCoreApplication::addLibraryPath(dir.absolutePath()); 34 | MainWindow w; 35 | w.show (); 36 | w.initializeMlt (); 37 | return a.exec (); 38 | } 39 | -------------------------------------------------------------------------------- /mainwindow.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011 Dan Dennedy 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | #include "mainwindow.h" 24 | #include "ui_mainwindow.h" 25 | #include 26 | #include 27 | 28 | MainWindow::MainWindow (QWidget *parent) 29 | : QMainWindow (parent) 30 | , ui (new Ui::MainWindow) 31 | { 32 | // Create the UI. 33 | ui->setupUi (this); 34 | 35 | // This is required for SDL embeddding. 36 | ui->centralWidget->setAttribute (Qt::WA_NativeWindow); 37 | 38 | // These use the icon theme on Linux, with fallbacks to the icons specified in QtDesigner for other platforms. 39 | ui->actionOpen->setIcon (QIcon::fromTheme ("document-open", ui->actionOpen->icon ())); 40 | ui->actionPlay->setIcon (QIcon::fromTheme ("media-playback-start", ui->actionPlay->icon ())); 41 | ui->actionPause->setIcon (QIcon::fromTheme ("media-playback-pause", ui->actionPause->icon ())); 42 | 43 | // Connect UI signals. 44 | connect (ui->actionOpen, SIGNAL(triggered()), this, SLOT(openVideo())); 45 | connect (ui->actionPlay, SIGNAL(triggered()), this, SLOT(play())); 46 | connect (ui->actionPause, SIGNAL(triggered()), this, SLOT(pause())); 47 | 48 | // Create MLT controller and connect its signals. 49 | mlt = new MltController (ui->centralWidget); 50 | connect (mlt, SIGNAL(frameReceived (void*, unsigned)), this, SLOT(onShowFrame (void*, unsigned))); 51 | #ifdef Q_WS_MAC 52 | gl = new GLWidget (this); 53 | QVBoxLayout *layout = new QVBoxLayout; 54 | layout->addWidget (gl); 55 | layout->setMargin (0); 56 | ui->centralWidget->setLayout (layout); 57 | connect (this, SIGNAL (showImageSignal (QImage)), gl, SLOT (showImage(QImage))); 58 | #endif 59 | } 60 | 61 | MainWindow::~MainWindow () 62 | { 63 | delete mlt; 64 | #ifdef Q_WS_MAC 65 | delete gl; 66 | #endif 67 | delete ui; 68 | } 69 | 70 | void MainWindow::initializeMlt () 71 | { 72 | ui->statusBar->showMessage (tr("Loading plugins...")); 73 | 74 | mlt->init (); 75 | // Load a color producer to clear the video region with black. 76 | mlt->open ("color:"); 77 | pause (); 78 | 79 | ui->statusBar->showMessage (tr("Ready")); 80 | } 81 | 82 | void MainWindow::openVideo () 83 | { 84 | QString filename = QFileDialog::getOpenFileName (this); 85 | if (!filename.isNull()) 86 | { 87 | if (!mlt->open (filename.toUtf8().constData())) { 88 | #ifdef Q_WS_MAC 89 | gl->setImageAspectRatio (mlt->profile()->dar()); 90 | #endif 91 | play(); 92 | } 93 | } 94 | // If file invalid, then on some platforms the dialog messes up SDL. 95 | mlt->onWindowResize (); 96 | } 97 | 98 | void MainWindow::play () 99 | { 100 | mlt->play (); 101 | forceResize (); 102 | ui->statusBar->showMessage (tr("Playing")); 103 | } 104 | 105 | void MainWindow::pause () 106 | { 107 | mlt->pause (); 108 | forceResize (); 109 | ui->statusBar->showMessage (tr("Paused")); 110 | } 111 | 112 | void MainWindow::resizeEvent (QResizeEvent*) 113 | { 114 | mlt->onWindowResize(); 115 | } 116 | 117 | void MainWindow::forceResize() 118 | { 119 | // XXX: this is a hack to force video container to resize 120 | int width = ui->centralWidget->width(); 121 | int height = ui->centralWidget->height(); 122 | ui->centralWidget->resize (width - 1, height - 1); 123 | ui->centralWidget->resize (width, height); 124 | } 125 | 126 | void MainWindow::onShowFrame (void* frame, unsigned position) 127 | { 128 | #ifdef Q_WS_MAC 129 | emit showImageSignal (mlt->getImage (frame)); 130 | #endif 131 | ui->statusBar->showMessage (QString().sprintf ("%.3f", position / mlt->profile()->fps())); 132 | } 133 | -------------------------------------------------------------------------------- /mainwindow.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011 Dan Dennedy 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | #ifndef MAINWINDOW_H 24 | #define MAINWINDOW_H 25 | 26 | #include 27 | #include "mltcontroller.h" 28 | #ifdef Q_WS_MAC 29 | # include "glwidget.h" 30 | #endif 31 | 32 | namespace Ui { 33 | class MainWindow; 34 | } 35 | 36 | class MainWindow : public QMainWindow 37 | { 38 | Q_OBJECT 39 | 40 | public: 41 | explicit MainWindow(QWidget *parent = 0); 42 | ~MainWindow(); 43 | void initializeMlt (); 44 | 45 | private: 46 | void resizeEvent (QResizeEvent* event); 47 | void forceResize (); 48 | 49 | Ui::MainWindow* ui; 50 | MltController* mlt; 51 | #ifdef Q_WS_MAC 52 | GLWidget* gl; 53 | static void on_frame_show(mlt_consumer, MainWindow*, mlt_frame); 54 | #endif 55 | 56 | signals: 57 | void showImageSignal(QImage); 58 | 59 | public slots: 60 | void openVideo (); 61 | void play (); 62 | void pause (); 63 | void onShowFrame (void* frame, unsigned position); 64 | 65 | }; 66 | 67 | #endif // MAINWINDOW_H 68 | -------------------------------------------------------------------------------- /mainwindow.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 854 10 | 557 11 | 12 | 13 | 14 | MainWindow 15 | 16 | 17 | 18 | 19 | 20 | 0 21 | 0 22 | 854 23 | 26 24 | 25 | 26 | 27 | 28 | &File 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | TopToolBarArea 38 | 39 | 40 | false 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | :/icons/icons/document-open.svg:/icons/icons/document-open.svg 51 | 52 | 53 | &Open... 54 | 55 | 56 | Open file 57 | 58 | 59 | Ctrl+O 60 | 61 | 62 | 63 | 64 | E&xit 65 | 66 | 67 | Quit the application 68 | 69 | 70 | Ctrl+Q 71 | 72 | 73 | 74 | 75 | 76 | :/icons/icons/media-playback-start.svg:/icons/icons/media-playback-start.svg 77 | 78 | 79 | Play 80 | 81 | 82 | Start playback 83 | 84 | 85 | Space 86 | 87 | 88 | 89 | 90 | 91 | :/icons/icons/media-playback-pause.svg:/icons/icons/media-playback-pause.svg 92 | 93 | 94 | Pause 95 | 96 | 97 | Pause playback 98 | 99 | 100 | Backspace 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | actionExit 111 | triggered() 112 | MainWindow 113 | close() 114 | 115 | 116 | -1 117 | -1 118 | 119 | 120 | 199 121 | 149 122 | 123 | 124 | 125 | 126 | 127 | -------------------------------------------------------------------------------- /mltcontroller.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011 Dan Dennedy 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy 5 | * of this software and associated documentation files (the "Software"), to deal 6 | * in the Software without restriction, including without limitation the rights 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | * copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in 12 | * all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | * THE SOFTWARE. 21 | */ 22 | 23 | #include "mltcontroller.h" 24 | #include 25 | #include 26 | 27 | MltController::MltController(QObject *parent) 28 | : QObject (parent) 29 | , m_profile (0) 30 | , m_producer (0) 31 | , m_consumer (0) 32 | { 33 | } 34 | 35 | MltController::~MltController () 36 | { 37 | close(); 38 | Mlt::Factory::close(); 39 | } 40 | 41 | void MltController::init () 42 | { 43 | Mlt::Factory::init(); 44 | } 45 | 46 | int MltController::open (const char* url, const char* profile) 47 | { 48 | int error = 0; 49 | 50 | close (); 51 | m_profile = new Mlt::Profile (profile); 52 | m_producer = new Mlt::Producer (*m_profile, url); 53 | if (!m_producer->is_valid ()) { 54 | // Cleanup on error 55 | error = 1; 56 | delete m_producer; 57 | m_producer = 0; 58 | delete m_profile; 59 | m_profile = 0; 60 | } 61 | else { 62 | // if ( !profile ) 63 | // // Automate profile 64 | // m_profile->from_producer (*m_producer); 65 | #ifdef Q_WS_MAC 66 | // use SDL for audio, OpenGL for video 67 | m_consumer = new Mlt::Consumer (*m_profile, "sdl_audio"); 68 | #elif defined(Q_WS_WIN) 69 | // sdl_preview does not work good on Windows 70 | m_consumer = new Mlt::Consumer (*m_profile, "sdl"); 71 | #else 72 | m_consumer = new Mlt::Consumer (*m_profile, "sdl_preview"); 73 | #endif 74 | if (m_consumer->is_valid ()) { 75 | // Embed the SDL window in our GUI. 76 | QWidget* widget = qobject_cast (parent()); 77 | m_consumer->set ("window_id", (int) widget->winId()); 78 | 79 | #ifndef Q_WS_WIN 80 | // Set the background color 81 | // XXX: Incorrect color on Windows 82 | QPalette pal; 83 | m_consumer->set ("window_background", pal.color (QPalette::Window).name().toAscii().constData()); 84 | #endif 85 | 86 | // Connect the producer to the consumer - tell it to "run" later 87 | m_consumer->connect (*m_producer); 88 | // Make an event handler for when a frame's image should be displayed 89 | m_consumer->listen ("consumer-frame-show", this, (mlt_listener) on_frame_show); 90 | m_consumer->start (); 91 | } 92 | else { 93 | // Cleanup on error 94 | error = 2; 95 | delete m_consumer; 96 | m_consumer = 0; 97 | delete m_producer; 98 | m_producer = 0; 99 | delete m_profile; 100 | m_profile = 0; 101 | } 102 | } 103 | return error; 104 | } 105 | 106 | void MltController::close () 107 | { 108 | if (m_consumer) 109 | m_consumer->stop (); 110 | delete m_consumer; 111 | m_consumer = 0; 112 | delete m_producer; 113 | m_producer = 0; 114 | delete m_profile; 115 | m_profile = 0; 116 | } 117 | 118 | void MltController::play () 119 | { 120 | if (m_producer) 121 | m_producer->set_speed (1); 122 | // If we are paused, then we need to "unlock" sdl_still. 123 | if (m_consumer) 124 | m_consumer->set ("refresh", 1); 125 | } 126 | 127 | void MltController::pause () 128 | { 129 | if (m_producer) 130 | m_producer->pause (); 131 | } 132 | 133 | void MltController::setVolume (double volume) 134 | { 135 | if (m_consumer) 136 | m_consumer->set ("volume", volume); 137 | } 138 | 139 | QImage MltController::getImage (void* frame_ptr) 140 | { 141 | Mlt::Frame* frame = static_cast (frame_ptr); 142 | int width = 0; 143 | int height = 0; 144 | // TODO: change the format if using a pixel shader 145 | mlt_image_format format = mlt_image_rgb24a; 146 | const uint8_t* image = frame->get_image (format, width, height); 147 | delete frame; 148 | QImage qimage (width, height, QImage::Format_ARGB32); 149 | memcpy (qimage.scanLine(0), image, width * height * 4); 150 | return qimage; 151 | } 152 | 153 | void MltController::onWindowResize () 154 | { 155 | if (m_consumer) 156 | // When paused this tells sdl_still to update. 157 | m_consumer->set ("refresh", 1); 158 | } 159 | 160 | // MLT consumer-frame-show event handler 161 | void MltController::on_frame_show (mlt_consumer, void* self, mlt_frame frame_ptr) 162 | { 163 | MltController* controller = static_cast (self); 164 | Mlt::Frame* frame = new Mlt::Frame (frame_ptr); 165 | emit controller->frameReceived (frame, (unsigned) mlt_frame_get_position (frame_ptr)); 166 | } 167 | -------------------------------------------------------------------------------- /mltcontroller.h: -------------------------------------------------------------------------------- 1 | #ifndef MLTCONTROLLER_H 2 | #define MLTCONTROLLER_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | class MltController : public QObject 9 | { 10 | Q_OBJECT 11 | public: 12 | explicit MltController (QObject *parent = 0); 13 | ~MltController (); 14 | 15 | /** Initialize the controller. 16 | */ 17 | void init (); 18 | 19 | /** Open a media file, device, or stream. 20 | * @param[in] url string of file/device/stream 21 | * @param[in] profile MLT profile 22 | * @return 0 if no error. Error code if error. 23 | */ 24 | int open (const char* url, const char* profile = 0); 25 | 26 | /** Close the media. 27 | */ 28 | void close (); 29 | 30 | /** Start playback. 31 | */ 32 | void play (); 33 | 34 | /** Pause playback. 35 | */ 36 | void pause (); 37 | 38 | /** Set the SDL audio output level. 39 | * @param volume audio volume in the range [0..1] 40 | */ 41 | void setVolume (double volume); 42 | 43 | /** Get a QImage for a MLT frame. 44 | * This is primarily used within a slot connected to the frameReceived signal. 45 | * @param frame a mlt_frame 46 | * @return a QImage containing the RGBA image for the frame 47 | */ 48 | QImage getImage (void* frame); 49 | 50 | Mlt::Profile* profile () const 51 | { return m_profile; } 52 | 53 | signals: 54 | /** This method will be called each time a new frame is available. 55 | * @param frame pass this opaque frame pointer to getImage() 56 | * @param position the frame number of this frame representing time 57 | */ 58 | void frameReceived (void* frame, unsigned position); 59 | 60 | 61 | public slots: 62 | void onWindowResize (); 63 | 64 | private: 65 | Mlt::Profile* m_profile; 66 | Mlt::Producer* m_producer; 67 | Mlt::Consumer* m_consumer; 68 | 69 | static void on_frame_show (mlt_consumer, void* self, mlt_frame frame); 70 | 71 | }; 72 | 73 | #endif // MLTCONTROLLER_H 74 | -------------------------------------------------------------------------------- /resources.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | icons/document-open.svg 4 | icons/media-playback-start.svg 5 | icons/media-playback-pause.svg 6 | 7 | 8 | --------------------------------------------------------------------------------