Merge commit 'upstream/0.4.13'
Alessio Treglia
13 years ago
238 | 238 | /* #undef TTFFONTFILE */ |
239 | 239 | |
240 | 240 | /* Version number of package */ |
241 | #define VERSION "0.4.12" | |
241 | #define VERSION "0.4.13" | |
242 | 242 | |
243 | 243 | /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most |
244 | 244 | significant byte first (like Motorola and SPARC, unlike Intel). */ |
2547 | 2547 | |
2548 | 2548 | VERSION_MAJOR=0 |
2549 | 2549 | VERSION_MINOR=4 |
2550 | VERSION_SUB=12 | |
2550 | VERSION_SUB=13 | |
2551 | 2551 | |
2552 | 2552 | am__api_version='1.11' |
2553 | 2553 | |
6254 | 6254 | FOUND_L_PORTMIDI=yes |
6255 | 6255 | fi |
6256 | 6256 | |
6257 | fi | |
6258 | if test "x$FOUND_H_PORTMIDI$FOUND_L_PORTMIDI" = "xyesyes"; then | |
6257 | 6259 | MIDI_LIBS="-lportmidi" |
6258 | 6260 | fi |
6259 | 6261 |
7 | 7 | |
8 | 8 | VERSION_MAJOR=0 |
9 | 9 | VERSION_MINOR=4 |
10 | VERSION_SUB=12 | |
10 | VERSION_SUB=13 | |
11 | 11 | |
12 | 12 | dnl Every other copy of the package version number gets its value from here |
13 | 13 | AM_INIT_AUTOMAKE(xjadeo, [${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_SUB}]) |
196 | 196 | if test "x$PORTMIDI" != "xno" -a -z "$portmidisrc" ; then |
197 | 197 | AC_CHECK_HEADERS(portmidi.h porttime.h , [FOUND_H_PORTMIDI=yes]) |
198 | 198 | AC_CHECK_LIB([portmidi], [Pm_CountDevices], [FOUND_L_PORTMIDI=yes]) |
199 | fi | |
200 | if test "x$FOUND_H_PORTMIDI$FOUND_L_PORTMIDI" = "xyesyes"; then | |
199 | 201 | MIDI_LIBS="-lportmidi" |
200 | 202 | fi |
201 | 203 |
50 | 50 | # |
51 | 51 | |
52 | 52 | # -m : specify MIDI port to read from. |
53 | # with alsa-midi this is a string alike "24,0" or "hw:2,0,0" | |
54 | # for port-midi use an integer value of the midi port eg. 2 | |
55 | # "-1" autoconnects to the first avail. input-port with the | |
56 | # portmidi driver. | |
57 | #midiid=<port> | |
58 | ;midismpte=-1 | |
53 | # jack-midi: specify midi-port name to connect to or "" to not auto-connect. | |
54 | # alsa-seq: specify id to connect to. (-1: none) eg. -m ardour or -m 80 | |
55 | # portmidi: numeric-id; -1: autodetect, > -1 specifies a (input) midi port. | |
56 | # use '-v -m -1' to list midi-ports. | |
57 | # alsa-raw: specify device-name eg. -m hw:1,0 or -m 1 | |
58 | # 'xjadeo -h' shows more information, 'xjadeo -V' lists available drivers. | |
59 | ;mididriver=alsa-sequencer | |
60 | ;midiid=-1 | |
59 | 61 | |
60 | # -C : use MTC quarter frames for | |
61 | # more accurate sync. this is generally | |
62 | # a good idea, however it taxes performance. | |
62 | # -c : don't use MTC quarter frames for | |
63 | # more accurate sync. | |
63 | 64 | #midiclk=[yes|no] |
64 | 65 | ;midiclk=no |
65 | 66 |
7 | 7 | <rect> |
8 | 8 | <x>0</x> |
9 | 9 | <y>0</y> |
10 | <width>347</width> | |
10 | <width>300</width> | |
11 | 11 | <height>120</height> |
12 | 12 | </rect> |
13 | 13 | </property> |
43 | 43 | <cstring>textLabel2</cstring> |
44 | 44 | </property> |
45 | 45 | <property name="text"> |
46 | <string>FPS</string> | |
46 | <string>screen updates per sec.</string> | |
47 | 47 | </property> |
48 | 48 | </widget> |
49 | 49 | <widget class="QSpinBox"> |
82 | 82 | <cstring>textLabel1</cstring> |
83 | 83 | </property> |
84 | 84 | <property name="text"> |
85 | <string>Frame offset</string> | |
85 | <string>time offset in video-frames:</string> | |
86 | 86 | </property> |
87 | 87 | </widget> |
88 | 88 | <widget class="QSpinBox"> |
109 | 109 | <property name="spacing"> |
110 | 110 | <number>0</number> |
111 | 111 | </property> |
112 | <spacer> | |
113 | <property name="name"> | |
114 | <cstring>spacer4</cstring> | |
115 | </property> | |
116 | <property name="orientation"> | |
117 | <enum>Horizontal</enum> | |
118 | </property> | |
119 | <property name="sizeType"> | |
120 | <enum>Expanding</enum> | |
121 | </property> | |
122 | <property name="sizeHint"> | |
123 | <size> | |
124 | <width>2</width> | |
125 | <height>6</height> | |
126 | </size> | |
127 | </property> | |
128 | </spacer> | |
112 | 129 | <widget class="QProgressBar"> |
113 | 130 | <property name="name"> |
114 | 131 | <cstring>progressBar</cstring> |
115 | 132 | </property> |
116 | 133 | <property name="sizePolicy"> |
117 | 134 | <sizepolicy> |
118 | <hsizetype>3</hsizetype> | |
135 | <hsizetype>7</hsizetype> | |
119 | 136 | <vsizetype>0</vsizetype> |
120 | 137 | <horstretch>5</horstretch> |
121 | 138 | <verstretch>0</verstretch> |
152 | 169 | </property> |
153 | 170 | <property name="sizeHint"> |
154 | 171 | <size> |
155 | <width>1</width> | |
172 | <width>3</width> | |
156 | 173 | <height>6</height> |
157 | 174 | </size> |
158 | 175 | </property> |
235 | 252 | </item> |
236 | 253 | <item text="&Sync" name="Sync"> |
237 | 254 | <action name="syncJackAction"/> |
238 | <action name="syncMTCAction"/> | |
255 | <action name="syncMTCJackAction"/> | |
256 | <action name="syncMTCAlsaAction"/> | |
239 | 257 | <action name="syncOffAction"/> |
240 | 258 | </item> |
241 | 259 | <item text="&Zoom" name="Zoom"> |
247 | 265 | <item text="&OSD" name="OSD"> |
248 | 266 | <action name="osdFontAction"/> |
249 | 267 | <action name="osdFrameAction"/> |
250 | <action name="osdSMTPEAction"/> | |
268 | <action name="osdSMPTEAction"/> | |
269 | <action name="osdBoxAction"/> | |
251 | 270 | </item> |
252 | 271 | <item text="&Seek" name="Seek"> |
253 | 272 | <action name="seekany_frameAction"/> |
335 | 354 | </action> |
336 | 355 | <action> |
337 | 356 | <property name="name"> |
338 | <cstring>syncMTCAction</cstring> | |
357 | <cstring>syncMTCJackAction</cstring> | |
339 | 358 | </property> |
340 | 359 | <property name="toggleAction"> |
341 | 360 | <bool>true</bool> |
342 | 361 | </property> |
343 | 362 | <property name="text"> |
344 | <string>MTC</string> | |
363 | <string>MTC (JACK MIDI)</string> | |
345 | 364 | </property> |
346 | 365 | <property name="menuText"> |
347 | <string>MTC</string> | |
366 | <string>MTC (JACK MIDI)</string> | |
367 | </property> | |
368 | </action> | |
369 | <action> | |
370 | <property name="name"> | |
371 | <cstring>syncMTCAlsaAction</cstring> | |
372 | </property> | |
373 | <property name="toggleAction"> | |
374 | <bool>true</bool> | |
375 | </property> | |
376 | <property name="text"> | |
377 | <string>MTC (ALSA SEQ)</string> | |
378 | </property> | |
379 | <property name="menuText"> | |
380 | <string>MTC (ALSA SEQ)</string> | |
348 | 381 | </property> |
349 | 382 | </action> |
350 | 383 | <action> |
436 | 469 | </action> |
437 | 470 | <action> |
438 | 471 | <property name="name"> |
439 | <cstring>osdSMTPEAction</cstring> | |
472 | <cstring>osdSMPTEAction</cstring> | |
440 | 473 | </property> |
441 | 474 | <property name="toggleAction"> |
442 | 475 | <bool>true</bool> |
443 | 476 | </property> |
444 | 477 | <property name="text"> |
445 | <string>SMTPE</string> | |
446 | </property> | |
447 | <property name="menuText"> | |
448 | <string>SMTPE</string> | |
478 | <string>SMPTE</string> | |
479 | </property> | |
480 | <property name="menuText"> | |
481 | <string>SMPTE</string> | |
482 | </property> | |
483 | </action> | |
484 | <action> | |
485 | <property name="name"> | |
486 | <cstring>osdBoxAction</cstring> | |
487 | </property> | |
488 | <property name="toggleAction"> | |
489 | <bool>true</bool> | |
490 | </property> | |
491 | <property name="text"> | |
492 | <string>Box</string> | |
493 | </property> | |
494 | <property name="menuText"> | |
495 | <string>Box</string> | |
449 | 496 | </property> |
450 | 497 | </action> |
451 | 498 | <action> |
588 | 635 | <slot>syncOff()</slot> |
589 | 636 | </connection> |
590 | 637 | <connection> |
591 | <sender>syncMTCAction</sender> | |
592 | <signal>activated()</signal> | |
593 | <receiver>MainWindow</receiver> | |
594 | <slot>syncMTC()</slot> | |
638 | <sender>syncMTCAlsaAction</sender> | |
639 | <signal>activated()</signal> | |
640 | <receiver>MainWindow</receiver> | |
641 | <slot>syncMTCalsa()</slot> | |
642 | </connection> | |
643 | <connection> | |
644 | <sender>syncMTCJackAction</sender> | |
645 | <signal>activated()</signal> | |
646 | <receiver>MainWindow</receiver> | |
647 | <slot>syncMTCjack()</slot> | |
595 | 648 | </connection> |
596 | 649 | <connection> |
597 | 650 | <sender>syncJackAction</sender> |
612 | 665 | <slot>setFPS(const QString&)</slot> |
613 | 666 | </connection> |
614 | 667 | <connection> |
615 | <sender>osdSMTPEAction</sender> | |
668 | <sender>osdBoxAction</sender> | |
669 | <signal>toggled(bool)</signal> | |
670 | <receiver>MainWindow</receiver> | |
671 | <slot>osdBoxToggled(bool)</slot> | |
672 | </connection> | |
673 | <connection> | |
674 | <sender>osdSMPTEAction</sender> | |
616 | 675 | <signal>toggled(bool)</signal> |
617 | 676 | <receiver>MainWindow</receiver> |
618 | 677 | <slot>osdSMPTEToggled(bool)</slot> |
684 | 743 | <slot>zoom200()</slot> |
685 | 744 | <slot>zoomFullScreen()</slot> |
686 | 745 | <slot>syncJack()</slot> |
687 | <slot>syncMTC()</slot> | |
746 | <slot>syncMTCjack()</slot> | |
747 | <slot>syncMTCalsa()</slot> | |
688 | 748 | <slot>syncOff()</slot> |
689 | 749 | <slot>setOffset( const QString & )</slot> |
690 | 750 | <slot>fileExit()</slot> |
691 | 751 | <slot>osdFrameToggled( bool )</slot> |
692 | 752 | <slot>osdSMPTEToggled( bool )</slot> |
753 | <slot>osdBoxToggled( bool )</slot> | |
693 | 754 | <slot>osdFont()</slot> |
694 | 755 | <slot>seekBarChanged( int )</slot> |
695 | 756 | <slot>filePreferences()</slot> |
45 | 45 | <cstring>textLabel1</cstring> |
46 | 46 | </property> |
47 | 47 | <property name="text"> |
48 | <string>Midi port (MTC):</string> | |
48 | <string>Autoconnect ALSA Midi port (MTC):</string> | |
49 | 49 | </property> |
50 | 50 | </widget> |
51 | 51 | <spacer> |
67 | 67 | </spacer> |
68 | 68 | <widget class="QLineEdit"> |
69 | 69 | <property name="name"> |
70 | <cstring>prefLineMidi</cstring> | |
70 | <cstring>prefLineAlsaMidi</cstring> | |
71 | 71 | </property> |
72 | 72 | <property name="sizePolicy"> |
73 | 73 | <sizepolicy> |
91 | 91 | </widget> |
92 | 92 | <widget class="QLayoutWidget"> |
93 | 93 | <property name="name"> |
94 | <cstring>layout10</cstring> | |
94 | <cstring>layout11</cstring> | |
95 | 95 | </property> |
96 | 96 | <hbox> |
97 | 97 | <property name="name"> |
99 | 99 | </property> |
100 | 100 | <widget class="QLabel"> |
101 | 101 | <property name="name"> |
102 | <cstring>textLabel1_2</cstring> | |
102 | <cstring>textLabel3</cstring> | |
103 | 103 | </property> |
104 | 104 | <property name="text"> |
105 | <string>xjadeo/xjremote executable:</string> | |
105 | <string>Autoconnect JACK Midi port (MTC):</string> | |
106 | 106 | </property> |
107 | 107 | </widget> |
108 | 108 | <spacer> |
109 | 109 | <property name="name"> |
110 | <cstring>spacer16_2</cstring> | |
110 | <cstring>spacer9</cstring> | |
111 | 111 | </property> |
112 | 112 | <property name="orientation"> |
113 | 113 | <enum>Horizontal</enum> |
117 | 117 | </property> |
118 | 118 | <property name="sizeHint"> |
119 | 119 | <size> |
120 | <width>10</width> | |
120 | <width>0</width> | |
121 | 121 | <height>20</height> |
122 | 122 | </size> |
123 | 123 | </property> |
124 | 124 | </spacer> |
125 | 125 | <widget class="QLineEdit"> |
126 | 126 | <property name="name"> |
127 | <cstring>prefLineXjadeo</cstring> | |
127 | <cstring>prefLineJackMidi</cstring> | |
128 | 128 | </property> |
129 | 129 | <property name="sizePolicy"> |
130 | 130 | <sizepolicy> |
140 | 140 | <height>0</height> |
141 | 141 | </size> |
142 | 142 | </property> |
143 | <property name="maxLength"> | |
144 | <number>64</number> | |
145 | </property> | |
143 | 146 | </widget> |
144 | 147 | </hbox> |
145 | 148 | </widget> |
146 | 149 | <widget class="QLayoutWidget"> |
147 | 150 | <property name="name"> |
148 | <cstring>layout13</cstring> | |
151 | <cstring>layout10</cstring> | |
149 | 152 | </property> |
150 | 153 | <hbox> |
151 | 154 | <property name="name"> |
153 | 156 | </property> |
154 | 157 | <widget class="QLabel"> |
155 | 158 | <property name="name"> |
159 | <cstring>textLabel1_2</cstring> | |
160 | </property> | |
161 | <property name="text"> | |
162 | <string>xjadeo/xjremote executable:</string> | |
163 | </property> | |
164 | </widget> | |
165 | <spacer> | |
166 | <property name="name"> | |
167 | <cstring>spacer16_2</cstring> | |
168 | </property> | |
169 | <property name="orientation"> | |
170 | <enum>Horizontal</enum> | |
171 | </property> | |
172 | <property name="sizeType"> | |
173 | <enum>Expanding</enum> | |
174 | </property> | |
175 | <property name="sizeHint"> | |
176 | <size> | |
177 | <width>10</width> | |
178 | <height>20</height> | |
179 | </size> | |
180 | </property> | |
181 | </spacer> | |
182 | <widget class="QLineEdit"> | |
183 | <property name="name"> | |
184 | <cstring>prefLineXjadeo</cstring> | |
185 | </property> | |
186 | <property name="sizePolicy"> | |
187 | <sizepolicy> | |
188 | <hsizetype>7</hsizetype> | |
189 | <vsizetype>0</vsizetype> | |
190 | <horstretch>1</horstretch> | |
191 | <verstretch>0</verstretch> | |
192 | </sizepolicy> | |
193 | </property> | |
194 | <property name="minimumSize"> | |
195 | <size> | |
196 | <width>160</width> | |
197 | <height>0</height> | |
198 | </size> | |
199 | </property> | |
200 | </widget> | |
201 | </hbox> | |
202 | </widget> | |
203 | <widget class="QLayoutWidget"> | |
204 | <property name="name"> | |
205 | <cstring>layout13</cstring> | |
206 | </property> | |
207 | <hbox> | |
208 | <property name="name"> | |
209 | <cstring>unnamed</cstring> | |
210 | </property> | |
211 | <widget class="QLabel"> | |
212 | <property name="name"> | |
156 | 213 | <cstring>textLabel1_3</cstring> |
157 | 214 | </property> |
158 | 215 | <property name="text"> |
171 | 228 | </property> |
172 | 229 | <property name="sizeHint"> |
173 | 230 | <size> |
174 | <width>81</width> | |
231 | <width>57</width> | |
175 | 232 | <height>21</height> |
176 | 233 | </size> |
177 | 234 | </property> |
57 | 57 | if(m_recentFiles.count()) |
58 | 58 | updateRecentFilesMenu(); |
59 | 59 | |
60 | m_midiport = m_settings.readEntry("MIDI port"); | |
60 | m_alsamidiport = m_settings.readEntry("ALSA MIDI port"); | |
61 | m_jackmidiport = m_settings.readEntry("JACK MIDI port"); | |
61 | 62 | m_importdir = m_settings.readEntry("Import Directory"); |
62 | 63 | m_importdestination = m_settings.readBoolEntry("Import Destination"); |
63 | 64 | m_importcodec = m_settings.readEntry("Import Codec"); |
67 | 68 | m_xjinfopath = m_settings.readEntry("XJINFO Path"); |
68 | 69 | |
69 | 70 | // TODO: detect portmidi / alsamidi default. 'midi library' |
70 | if (m_midiport.isEmpty()) m_midiport = QString("24"); | |
71 | if (m_alsamidiport.isEmpty()) m_alsamidiport = QString("24"); | |
72 | if (m_jackmidiport.isEmpty()) m_jackmidiport = QString(""); | |
71 | 73 | if (m_importcodec.isEmpty()) m_importcodec = QString("mpeg4"); |
72 | 74 | if (m_mencoderpath.isEmpty()) m_mencoderpath = QString("mencoder"); |
73 | 75 | if (m_xjadeopath.isEmpty()) m_xjadeopath = QString(BINDIR "xjremote"); |
88 | 90 | xjadeo.writeToStdin(QString("get framerate\n")); |
89 | 91 | xjadeo.writeToStdin(QString("get offset\n")); |
90 | 92 | xjadeo.writeToStdin(QString("get osdcfg\n")); |
93 | xjadeo.writeToStdin(QString("midi driver\n")); | |
91 | 94 | xjadeo.writeToStdin(QString("get syncsource\n")); |
92 | 95 | xjadeo.writeToStdin(QString("get position\n")); |
93 | 96 | xjadeo.writeToStdin(QString("get seekmode\n")); |
158 | 161 | for(int i = 0; i < int (m_recentFiles.count()); ++i) |
159 | 162 | m_settings.writeEntry("File" + QString::number(i + 1), m_recentFiles[i]); |
160 | 163 | m_settings.writeEntry("OSD font", m_osdfont); |
161 | m_settings.writeEntry("MIDI port", m_midiport); | |
164 | m_settings.writeEntry("JACK MIDI port", m_jackmidiport); | |
165 | m_settings.writeEntry("ALSA MIDI port", m_alsamidiport); | |
162 | 166 | m_settings.writeEntry("Import Codec", m_importcodec); |
163 | 167 | m_settings.writeEntry("Import Directory", m_importdir); |
164 | 168 | m_settings.writeEntry("Import Destination", m_importdestination); |
206 | 210 | PrefDialog *pdialog = new PrefDialog::PrefDialog(this); |
207 | 211 | if (pdialog) { |
208 | 212 | /* set values */ |
209 | pdialog->prefLineMidi->setText(m_midiport); | |
213 | pdialog->prefLineJackMidi->setText(m_jackmidiport); | |
214 | pdialog->prefLineAlsaMidi->setText(m_alsamidiport); | |
210 | 215 | pdialog->prefLineXjadeo->setText(m_xjadeopath); |
211 | 216 | pdialog->prefLineXjinfo->setText(m_xjinfopath); |
212 | 217 | pdialog->prefLineMencoder->setText(m_mencoderpath); |
228 | 233 | m_xjadeopath = pdialog->prefLineXjadeo->text(); |
229 | 234 | if (!pdialog->prefLineXjinfo->text().isEmpty()) |
230 | 235 | m_xjinfopath = pdialog->prefLineXjinfo->text(); |
231 | if (!pdialog->prefLineMidi->text().isEmpty()) | |
232 | m_midiport = pdialog->prefLineMidi->text(); | |
236 | if (!pdialog->prefLineAlsaMidi->text().isEmpty()) | |
237 | m_alsamidiport = pdialog->prefLineAlsaMidi->text(); | |
238 | if (!pdialog->prefLineJackMidi->text().isEmpty()) | |
239 | m_jackmidiport = pdialog->prefLineJackMidi->text(); | |
233 | 240 | if (pdialog->prefDirCheckBox->isOn() && !pdialog->destDirLineEdit->text().isEmpty()) |
234 | 241 | m_importdir = pdialog->destDirLineEdit->text(); |
235 | 242 | /* and save */ |
339 | 346 | { |
340 | 347 | xjadeo.writeToStdin(QString("midi disconnect\n")); |
341 | 348 | xjadeo.writeToStdin(QString("jack connect\n")); |
349 | xjadeo.writeToStdin(QString("midi driver\n")); | |
342 | 350 | xjadeo.writeToStdin(QString("get syncsource\n")); |
343 | 351 | } |
344 | 352 | |
345 | void QJadeo::syncMTC() | |
346 | { | |
347 | xjadeo.writeToStdin(QString("jack disconnect\n")); | |
348 | //xjadeo.writeToStdin(QString("midi reconnect\n")); | |
349 | xjadeo.writeToStdin(QString("midi connect "+ m_midiport +"\n")); | |
350 | xjadeo.writeToStdin(QString("get syncsource\n")); | |
351 | } | |
352 | ||
353 | void QJadeo::syncOff() | |
353 | void QJadeo::syncMTCalsa() | |
354 | 354 | { |
355 | 355 | xjadeo.writeToStdin(QString("jack disconnect\n")); |
356 | 356 | xjadeo.writeToStdin(QString("midi disconnect\n")); |
357 | xjadeo.writeToStdin(QString("midi driver alsa-seq\n")); | |
358 | xjadeo.writeToStdin(QString("midi connect "+ m_alsamidiport +"\n")); | |
359 | xjadeo.writeToStdin(QString("midi driver\n")); | |
360 | xjadeo.writeToStdin(QString("get syncsource\n")); | |
361 | } | |
362 | ||
363 | void QJadeo::syncMTCjack() | |
364 | { | |
365 | xjadeo.writeToStdin(QString("jack disconnect\n")); | |
366 | xjadeo.writeToStdin(QString("midi disconnect\n")); | |
367 | xjadeo.writeToStdin(QString("midi driver jack\n")); | |
368 | xjadeo.writeToStdin(QString("midi connect "+ m_jackmidiport +"\n")); | |
369 | xjadeo.writeToStdin(QString("midi driver\n")); | |
370 | xjadeo.writeToStdin(QString("get syncsource\n")); | |
371 | } | |
372 | ||
373 | void QJadeo::syncOff() | |
374 | { | |
375 | xjadeo.writeToStdin(QString("jack disconnect\n")); | |
376 | xjadeo.writeToStdin(QString("midi disconnect\n")); | |
377 | xjadeo.writeToStdin(QString("midi driver\n")); | |
357 | 378 | xjadeo.writeToStdin(QString("get syncsource\n")); |
358 | 379 | } |
359 | 380 | |
381 | 402 | xjadeo.writeToStdin(QString("osd smpte 100\n")); |
382 | 403 | else |
383 | 404 | xjadeo.writeToStdin(QString("osd smpte -1\n")); |
405 | } | |
406 | ||
407 | void QJadeo::osdBoxToggled(bool value) | |
408 | { | |
409 | if(value) | |
410 | xjadeo.writeToStdin(QString("osd box\n")); | |
411 | else | |
412 | xjadeo.writeToStdin(QString("osd nobox\n")); | |
384 | 413 | } |
385 | 414 | |
386 | 415 | void QJadeo::seekBarChanged( int value ) |
473 | 502 | Seek->setItemChecked(Seek->idAt(0),TRUE); |
474 | 503 | } |
475 | 504 | } |
505 | else if(name == "mididrv") | |
506 | { | |
507 | m_mididrv = 0; | |
508 | if (value == "JACK-MIDI") m_mididrv = 1; | |
509 | } | |
476 | 510 | else if(name == "syncsource") |
477 | 511 | { |
478 | 512 | Sync->setItemChecked(Sync->idAt(0),FALSE); |
479 | 513 | Sync->setItemChecked(Sync->idAt(1),FALSE); |
480 | 514 | Sync->setItemChecked(Sync->idAt(2),FALSE); |
515 | Sync->setItemChecked(Sync->idAt(3),FALSE); | |
481 | 516 | |
482 | 517 | if (value.toInt()==0) { // off |
483 | 518 | seekBar->setEnabled(TRUE); |
484 | Sync->setItemChecked(Sync->idAt(2),TRUE); | |
519 | Sync->setItemChecked(Sync->idAt(3),TRUE); | |
485 | 520 | } else if (value.toInt()==2) { // MIDI |
486 | 521 | seekBar->setEnabled(FALSE); |
487 | Sync->setItemChecked(Sync->idAt(1),TRUE); | |
522 | if (m_mididrv == 1) | |
523 | Sync->setItemChecked(Sync->idAt(1),TRUE); // JACK midi | |
524 | else | |
525 | Sync->setItemChecked(Sync->idAt(2),TRUE); // ALSA midi | |
488 | 526 | } else { |
489 | 527 | seekBar->setEnabled(FALSE); //JACK |
490 | 528 | Sync->setItemChecked(Sync->idAt(0),TRUE); |
530 | 568 | xjadeo.writeToStdin(QString("notify frame\n")); |
531 | 569 | xjadeo.writeToStdin(QString("get offset\n")); |
532 | 570 | xjadeo.writeToStdin(QString("get osdcfg\n")); |
571 | xjadeo.writeToStdin(QString("midi driver\n")); | |
533 | 572 | xjadeo.writeToStdin(QString("get syncsource\n")); |
534 | 573 | xjadeo.writeToStdin(QString("get position\n")); |
535 | 574 | } |
546 | 585 | m_frames = 0; |
547 | 586 | m_offset = 0; |
548 | 587 | m_framerate = 0; |
588 | m_mididrv = 0; | |
549 | 589 | xjadeo.writeToStdin("load " + filename + "\n"); |
550 | 590 | xjadeo.writeToStdin(QString("get filename\n")); |
551 | 591 | xjadeo.writeToStdin(QString("get width\n")); |
597 | 637 | |
598 | 638 | if(!xjadeo.start()) |
599 | 639 | { |
600 | QMessageBox::QMessageBox::critical( &w, "qjadeo","can not execute xjadeo/xjremote.","Exit", QString::null, QString::null, 0, -1); | |
601 | ||
602 | qFatal("Could not start xjadeo executable: " + xjadeoPath); | |
603 | qFatal("Try to set the XJREMOTE environment variable to point to xjadeo."); | |
640 | QMessageBox::QMessageBox::critical( &w, "qjadeo","can not execute xjadeo/xjremote.","Exit", QString::null, QString::null, 0, -1); | |
641 | //qFatal("Could not start xjadeo executable: " + xjadeoPath); | |
642 | //qFatal("Try to set the XJREMOTE environment variable to point to xjadeo."); | |
643 | exit(1); | |
604 | 644 | } |
605 | 645 | |
606 | 646 | w.connect(&xjadeo, SIGNAL(readyReadStdout()), &w, SLOT(readFromStdout())); |
29 | 29 | int m_offset; |
30 | 30 | int m_framerate; |
31 | 31 | QString m_osdfont; |
32 | QString m_midiport; | |
32 | QString m_alsamidiport; | |
33 | QString m_jackmidiport; | |
33 | 34 | QString m_importdir; |
34 | 35 | bool m_importdestination; |
35 | 36 | QString m_importcodec; |
36 | 37 | QString m_mencoderpath; |
37 | 38 | QString m_mencoderopts; |
38 | 39 | QString m_xjinfopath; |
40 | int m_mididrv; | |
39 | 41 | |
40 | 42 | void updateRecentFilesMenu(); |
41 | 43 | void updateRecentFiles(const QString & filename); |
56 | 58 | void zoomFullScreen(); |
57 | 59 | |
58 | 60 | void syncJack(); |
59 | void syncMTC(); | |
61 | void syncMTCalsa(); | |
62 | void syncMTCjack(); | |
60 | 63 | void syncOff(); |
61 | 64 | |
62 | 65 | void seekContinuously(); |
72 | 75 | |
73 | 76 | void osdFrameToggled(bool); |
74 | 77 | void osdSMPTEToggled(bool); |
78 | void osdBoxToggled(bool); | |
75 | 79 | void osdFont(); |
76 | 80 | void seekBarChanged( int ); |
77 | 81 |
95 | 95 | <translation>qjadeo</translation> |
96 | 96 | </message> |
97 | 97 | <message> |
98 | <source>FPS</source> | |
99 | <translation>FPS</translation> | |
100 | </message> | |
101 | <message> | |
102 | <source>Frame offset</source> | |
103 | <translation>Décalage de trame</translation> | |
98 | <source>screen updates per sec.</source> | |
99 | <translation>Fréquence de rafraîchissement d'écran:</translation> | |
100 | </message> | |
101 | <message> | |
102 | <source>time offset in video-frames:</source> | |
103 | <translation>Décalage dans les trames vidéo:</translation> | |
104 | 104 | </message> |
105 | 105 | <message> |
106 | 106 | <source>&File</source> |
167 | 167 | <translation>Transport JACK</translation> |
168 | 168 | </message> |
169 | 169 | <message> |
170 | <source>MTC</source> | |
171 | <translation>MTC</translation> | |
170 | <source>MTC (ALSA SEQ)</source> | |
171 | <translation>MTC (ALSA SEQ)</translation> | |
172 | </message> | |
173 | <message> | |
174 | <source>MTC (JACK MIDI)</source> | |
175 | <translation>MTC (JACK MIDI)</translation> | |
172 | 176 | </message> |
173 | 177 | <message> |
174 | 178 | <source>off</source> |
203 | 207 | <translation>Numéro de Trame</translation> |
204 | 208 | </message> |
205 | 209 | <message> |
206 | <source>SMTPE</source> | |
210 | <source>Box</source> | |
211 | <translation>Cadre</translation> | |
212 | </message> | |
213 | <message> | |
214 | <source>SMPTE</source> | |
207 | 215 | <translation>SMPTE</translation> |
208 | 216 | </message> |
209 | 217 | <message> |
262 | 270 | <translation>Paramètres généraux</translation> |
263 | 271 | </message> |
264 | 272 | <message> |
265 | <source>Midi port (MTC):</source> | |
266 | <translation>Port Midi (MTC):</translation> | |
273 | <source>Autoconnect ALSA Midi port (MTC):</source> | |
274 | <translation>Se connecter automatiquement ce port ALSA Midi (MTC):</translation> | |
275 | </message> | |
276 | <message> | |
277 | <source>Autoconnect JACK Midi port (MTC):</source> | |
278 | <translation>Se connecter automatiquement ce port JACK Midi (MTC):</translation> | |
267 | 279 | </message> |
268 | 280 | <message> |
269 | 281 | <source>xjadeo/xjremote executable:</source> |
41 | 41 | extern int want_nosplash; |
42 | 42 | extern int mq_en; |
43 | 43 | extern int avoid_lash; |
44 | extern char *midi_driver; | |
44 | 45 | |
45 | 46 | #ifdef HAVE_MIDI |
46 | 47 | extern char midiid[32]; |
93 | 94 | #ifdef HAVE_MIDI |
94 | 95 | midi_clkconvert=atoi(value); |
95 | 96 | #endif |
97 | } else if (!strncasecmp(item,"MIDIDRIVER",10)) { | |
98 | #ifdef HAVE_MIDI | |
99 | if (midi_driver) free(midi_driver); | |
100 | midi_driver = strdup(value); | |
101 | #endif | |
102 | rv=1; | |
96 | 103 | } else if (!strncasecmp(item,"QUIET",7)) { |
97 | 104 | YES_OK (want_quiet); |
98 | 105 | } else if (!strncasecmp(item,"VERBOSE",7)) { |
685 | 685 | if (midi_choose_driver(mp)>0) { |
686 | 686 | remote_printf(100,"ok."); |
687 | 687 | } else { |
688 | remote_printf(440,"choosen MIDI driver is not supported."); | |
688 | remote_printf(440,"chosen MIDI driver is not supported."); | |
689 | 689 | } |
690 | 690 | #else |
691 | 691 | remote_printf(499,"midi not available."); |
186 | 186 | #endif |
187 | 187 | |
188 | 188 | offFrame = newFrame + ts_offset; |
189 | ||
189 | long curFrame = dispFrame; | |
190 | 190 | display_frame((int64_t)(offFrame), force_redraw); |
191 | 191 | |
192 | if ((remote_en||mq_en||ipc_queue) && ((remote_mode&1) || ((remote_mode&2)&& offFrame!=dispFrame)) ) { | |
192 | if ((remote_en||mq_en||ipc_queue) && ((remote_mode&1) || ((remote_mode&2)&& curFrame!=dispFrame)) ) { | |
193 | 193 | /*call xapi_pposition ?? -> rv:200 |
194 | 194 | * dispFrame is the currently displayed frame |
195 | 195 | * = SMPTE + offset |
579 | 579 | printf("\nDEBUG: want frame=%li ", (long int) timestamp); |
580 | 580 | # endif |
581 | 581 | |
582 | # if 1 // TODO -> -F <ratio> | |
583 | timestamp*=tpf; | |
584 | # else // THIS is eqivalent - or even better at rounding but | |
585 | // does not work with -F <double> | |
586 | timestamp=av_rescale_q(timestamp,c1_Q,v_stream->time_base); | |
587 | timestamp=av_rescale_q(timestamp,c1_Q,v_stream->r_frame_rate); //< timestamp/=framerate; | |
588 | # endif | |
582 | if (filefps > 0) { | |
583 | timestamp*=tpf; | |
584 | } else { | |
585 | // does not work with -F <double>, but it's more accurate when rounding ratios | |
586 | timestamp=av_rescale_q(timestamp,c1_Q,v_stream->time_base); | |
587 | timestamp=av_rescale_q(timestamp,c1_Q,v_stream->r_frame_rate); //< timestamp/=framerate; | |
588 | } | |
589 | 589 | |
590 | 590 | # ifdef FFDEBUG |
591 | 591 | printf("ts=%li ##\n", (long int) timestamp); |