commit 4b50edb775fc1684da77bae557eb449b1c78dc4e
Author: Gregorio Gervasio, Jr <ggervasio@yahoo.com>
Date: Sat Jun 4 18:40:49 2011 -0700
Partial fixes for NVR audio/vbi recording.
diff --git a/mythtv/libs/libmythtv/NuppelVideoRecorder.cpp b/mythtv/libs/libmythtv/NuppelVideoRecorder.cpp
index af162d8..7fb2d6d 100644
a
|
b
|
void NuppelVideoRecorder::SetOptionsFromProfile(RecordingProfile *profile, |
355 | 355 | const QString &vbidev) |
356 | 356 | { |
357 | 357 | SetOption("videodevice", videodev); |
358 | | SetOption("vbidevice", vbidev); |
| 358 | V4LRecorder::SetOption("vbidevice", vbidev); |
359 | 359 | SetOption("tvformat", gCoreContext->GetSetting("TVFormat")); |
360 | | SetOption("vbiformat", gCoreContext->GetSetting("VbiFormat")); |
361 | | SetOption("audiodevice", audiodev); |
| 360 | V4LRecorder::SetOption("vbiformat", gCoreContext->GetSetting("VbiFormat")); |
| 361 | V4LRecorder::SetOption("audiodevice", audiodev); |
362 | 362 | |
363 | 363 | QString setting = QString::null; |
364 | 364 | const Setting *tmp = profile->byName("videocodec"); |
… |
… |
void NuppelVideoRecorder::FormatTT(struct VBIData *vbidata) |
2628 | 2628 | void NuppelVideoRecorder::FormatTT(struct VBIData*) {} |
2629 | 2629 | #endif // USING_V4L2 |
2630 | 2630 | |
2631 | | void NuppelVideoRecorder::FormatCC(struct cc *cc) |
| 2631 | void NuppelVideoRecorder::FormatCC(int code1, int code2) |
2632 | 2632 | { |
2633 | 2633 | struct timeval tnow; |
2634 | 2634 | gettimeofday (&tnow, &tzone); |
… |
… |
void NuppelVideoRecorder::FormatCC(struct cc *cc) |
2638 | 2638 | int tc = (tnow.tv_sec - stm.tv_sec) * 1000 + |
2639 | 2639 | tnow.tv_usec / 1000 - stm.tv_usec / 1000; |
2640 | 2640 | |
2641 | | ccd->FormatCC(tc, cc->code1, cc->code2); |
| 2641 | ccd->FormatCC(tc, code1, code2); |
2642 | 2642 | } |
2643 | 2643 | |
2644 | 2644 | void NuppelVideoRecorder::AddTextData(unsigned char *buf, int len, |
diff --git a/mythtv/libs/libmythtv/NuppelVideoRecorder.h b/mythtv/libs/libmythtv/NuppelVideoRecorder.h
index d444926..bd14457 100644
a
|
b
|
class MTV_PUBLIC NuppelVideoRecorder : public V4LRecorder, public CC608Input |
158 | 158 | void DoMJPEG(void); |
159 | 159 | |
160 | 160 | virtual void FormatTT(struct VBIData*); // RecorderBase |
161 | | virtual void FormatCC(struct cc*); // RecorderBase |
| 161 | virtual void FormatCC(int code1, int code2); // RecorderBase |
162 | 162 | virtual void AddTextData(unsigned char*,int,int64_t,char); // CC608Decoder |
163 | 163 | |
164 | 164 | void UpdateResolutions(void); |
diff --git a/mythtv/libs/libmythtv/v4lrecorder.cpp b/mythtv/libs/libmythtv/v4lrecorder.cpp
index 672af94..5b4ed7d 100644
a
|
b
|
int V4LRecorder::OpenVBIDevice(void) |
207 | 207 | vbi608 = new VBI608Extractor(); |
208 | 208 | } |
209 | 209 | |
| 210 | { |
| 211 | QMutexLocker locker(&pauseLock); |
| 212 | request_recording = true; |
| 213 | } |
| 214 | |
210 | 215 | vbi_fd = fd; |
211 | 216 | |
212 | 217 | return fd; |
… |
… |
void V4LRecorder::RunVBIDevice(void) |
314 | 319 | |
315 | 320 | if (buf) |
316 | 321 | delete [] buf; |
| 322 | |
| 323 | CloseVBIDevice(); |
317 | 324 | } |
318 | 325 | |
319 | 326 | /* vim: set expandtab tabstop=4 shiftwidth=4: */ |
diff --git a/mythtv/libs/libmythtv/v4lrecorder.h b/mythtv/libs/libmythtv/v4lrecorder.h
index eff84b5..397498b 100644
a
|
b
|
class MPUBLIC V4LRecorder : public DTVRecorder |
40 | 40 | void RunVBIDevice(void); |
41 | 41 | |
42 | 42 | virtual void FormatTT(struct VBIData *vbidata) {} |
43 | | virtual void FormatCC(uint code1, uint code2) {} |
| 43 | virtual void FormatCC(int code1, int code2) {} |
44 | 44 | |
45 | 45 | protected: |
46 | 46 | QString audiodevice; |