the tvtime.c diff is messed up with other changes here are the relevant
ones for tvtime.c:
@@ -1204,11 +1176,14 @@
int matte_y = 0;
int matte_h = 0;
int matte_mode = 0;
int restarttvtime = 0;
int return_value = 0;
int last_current_id = -1;
int quiet_screenshots = 0;
char prevloc[ 256 ];
+ int audio_state = 0;
@@ -2069,9 +2054,34 @@
if( tuner_state == TUNER_STATE_HAS_SIGNAL ) {
has_signal = 1;
+ /* reopen the device for now, there are several issues which don't
allow pausing the
+ audio data transfer.
+
+ TODO:
+ The driver(?) seems to crash when setting up the alsa
parameters again during the same
+ session.
+ */
+
+ if (empia_device && audio_state == 0 &&
videoinput_get_audio(vidin) == NULL) {
+ videoinput_set_audio(vidin, alsa_open(empia_device,
"default", SND_PCM_FORMAT_S16_LE, 2 /* 2 channels */, 48000 /* rate */));
+ if (videoinput_get_audio(vidin)) {
+ audio_state=0;
+ printf("starting alsa transfer\n");
+
alsa_start_threaded_loop(videoinput_get_audio(vidin));
+ } else {
+ audio_state=-1;
+ }
+ }
+
if( osd ) tvtime_osd_signal_present( osd, 1 );
} else if( tuner_state == TUNER_STATE_NO_SIGNAL ) {
if( osd ) tvtime_osd_signal_present( osd, 0 );
+ if (vidin && videoinput_get_audio(vidin)) {
+ alsa_join_threaded_loop(videoinput_get_audio(vidin));
+ alsa_close(videoinput_get_audio_p(vidin));
+ videoinput_set_audio(vidin, NULL);
+ }
+
if( fadepos < 256 ) {
crossfade_frame( fadeframe, saveframe, blueframe, width,
height, width*2, width*2, width*2, fadepos );
@@ -2511,6 +2521,11 @@
/* Return to normal scheduling. */
set_default_priority();
+ if (vidin && videoinput_get_audio(vidin)) {
+ alsa_join_threaded_loop(videoinput_get_audio(vidin));
+ alsa_close(videoinput_get_audio_p(vidin));
+ }
+
/* Remember to save our settings if we were scanning. */
if( scanning ) {
station_writeconfig( stationmgr );
--
tvtime crashes when no device is attached/tvtime does not work when handset is
attached
https://bugs.launchpad.net/bugs/575938
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs