From 7fa0e8ce9a31512dbc2ef4c6963ca727142bde6f Mon Sep 17 00:00:00 2001 From: Petri Hintukainen Date: Tue, 18 Oct 2011 09:41:31 +0300 Subject: input_dvb: fixed check for recording file handle --- src/input/input_dvb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/input') diff --git a/src/input/input_dvb.c b/src/input/input_dvb.c index 145abc773..fc3c88862 100644 --- a/src/input/input_dvb.c +++ b/src/input/input_dvb.c @@ -2578,7 +2578,7 @@ static off_t dvb_plugin_read (input_plugin_t *this_gen, ts_rewrite_packets (this, buf,total); - if ((this->record_fd)&&(!this->record_paused)) + if ((this->record_fd > -1) && (!this->record_paused)) write (this->record_fd, buf, total); pthread_mutex_unlock( &this->channel_change_mutex ); -- cgit v1.2.3 From 165a7d69600daae3a5501569a8805e84d3122daf Mon Sep 17 00:00:00 2001 From: Petri Hintukainen Date: Tue, 18 Oct 2011 09:44:08 +0300 Subject: input_dvb: if write() fails, stop recording and log a message --- src/input/input_dvb.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/input') diff --git a/src/input/input_dvb.c b/src/input/input_dvb.c index fc3c88862..f7fa51e16 100644 --- a/src/input/input_dvb.c +++ b/src/input/input_dvb.c @@ -2579,7 +2579,11 @@ static off_t dvb_plugin_read (input_plugin_t *this_gen, ts_rewrite_packets (this, buf,total); if ((this->record_fd > -1) && (!this->record_paused)) - write (this->record_fd, buf, total); + if (write (this->record_fd, buf, total) != total) { + do_record(this); + xprintf(this->class->xine, XINE_VERBOSITY_LOG, + "input_dvb: Recording failed\n"); + } pthread_mutex_unlock( &this->channel_change_mutex ); -- cgit v1.2.3 From a3e08d2839de1a6529286d106376a74f8e62c6ad Mon Sep 17 00:00:00 2001 From: Petri Hintukainen Date: Tue, 18 Oct 2011 09:45:26 +0300 Subject: Removed unused variable --- src/input/input_v4l2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/input') diff --git a/src/input/input_v4l2.c b/src/input/input_v4l2.c index 5396594f4..8411b8cc3 100644 --- a/src/input/input_v4l2.c +++ b/src/input/input_v4l2.c @@ -350,7 +350,7 @@ static uint32_t v4l2_input_get_capabilities(input_plugin_t* this_gen) { } static const char* v4l2_input_get_mrl(input_plugin_t* this_gen) { - v4l2_input_plugin_t* this = (v4l2_input_plugin_t*)this_gen; + /*v4l2_input_plugin_t* this = (v4l2_input_plugin_t*)this_gen;*/ /* HACK HACK HACK HACK */ /* So far, the only way to get the yuv_frames demuxer to work with this */ return "v4l:/"; -- cgit v1.2.3 From 5ae44fd6e69481c8b2779857a7231cf1c5dc74a5 Mon Sep 17 00:00:00 2001 From: Torsten Jager Date: Tue, 18 Oct 2011 11:18:54 +0300 Subject: net_buf_ctrl: dvb sync: observe a/v buffers only. Dont get fooled by subtitle buffers with pts seconds away from video for example. --- src/input/net_buf_ctrl.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/input') diff --git a/src/input/net_buf_ctrl.c b/src/input/net_buf_ctrl.c index 30db0e6e4..d06d8133f 100644 --- a/src/input/net_buf_ctrl.c +++ b/src/input/net_buf_ctrl.c @@ -190,12 +190,13 @@ static void dvbspeed_put (nbc_t *this, fifo_buffer_t * fifo, buf_element_t *b) { int used, mode; const char *name; /* select vars */ - if (fifo == this->video_fifo) { + mode = b->type & BUF_MAJOR_MASK; + if (mode == BUF_VIDEO_BASE) { last = &this->dvbs_video_in; fill = &this->dvbs_video_fill; mode = 0x71; name = "video"; - } else if (fifo == this->audio_fifo) { + } else if (mode == BUF_AUDIO_BASE) { last = &this->dvbs_audio_in; fill = &this->dvbs_audio_fill; mode = 0x0f; @@ -265,12 +266,13 @@ static void dvbspeed_get (nbc_t *this, fifo_buffer_t * fifo, buf_element_t *b) { int used, mode; const char *name; /* select vars */ - if (fifo == this->video_fifo) { + mode = b->type & BUF_MAJOR_MASK; + if (mode == BUF_VIDEO_BASE) { last = &this->dvbs_video_out; fill = &this->dvbs_video_fill; mode = 0x71; name = "video"; - } else if (fifo == this->audio_fifo) { + } else if (mode == BUF_AUDIO_BASE) { last = &this->dvbs_audio_out; fill = &this->dvbs_audio_fill; mode = 0x0f; -- cgit v1.2.3 From 5c160b93ade6a07e3bcc084f4552dcd1eb70b5b4 Mon Sep 17 00:00:00 2001 From: Torsten Jager Date: Tue, 18 Oct 2011 11:19:32 +0300 Subject: net_buf_ctrl: dvb sync: dont rely on demuxer sending BUF_FLAG_FRAME_START (eg for streams that send PES payloads not aligned to frame boundaries). --- src/input/net_buf_ctrl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/input') diff --git a/src/input/net_buf_ctrl.c b/src/input/net_buf_ctrl.c index d06d8133f..d187b5c2b 100644 --- a/src/input/net_buf_ctrl.c +++ b/src/input/net_buf_ctrl.c @@ -203,7 +203,7 @@ static void dvbspeed_put (nbc_t *this, fifo_buffer_t * fifo, buf_element_t *b) { name = "audio"; } else return; /* update fifo fill time */ - if (b->pts && (b->decoder_flags & BUF_FLAG_FRAME_START)) { + if (b->pts) { if (*last) { diff = b->pts - *last; if ((diff > -220000) && (diff < 220000)) *fill += diff; @@ -279,7 +279,7 @@ static void dvbspeed_get (nbc_t *this, fifo_buffer_t * fifo, buf_element_t *b) { name = "audio"; } else return; /* update fifo fill time */ - if (b->pts && (b->decoder_flags & BUF_FLAG_FRAME_START)) { + if (b->pts) { if (*last) { diff = b->pts - *last; if ((diff > -220000) && (diff < 220000)) *fill -= diff; -- cgit v1.2.3