diff options
| author | Lars Hanisch <dvb@flensrocker.de> | 2010-08-25 20:39:54 +0200 |
|---|---|---|
| committer | Lars Hanisch <dvb@flensrocker.de> | 2010-08-25 20:39:54 +0200 |
| commit | 6807a1ebd72e29e98100e40e6acc98d402193f63 (patch) | |
| tree | 6bf4a97d5d119b5b52803a9aad8a5a08fbacf97d | |
| parent | c984887d32b9f12eae5b3c1538f79fbf7bad26b5 (diff) | |
| download | vdr-plugin-pvrinput-6807a1ebd72e29e98100e40e6acc98d402193f63.tar.gz vdr-plugin-pvrinput-6807a1ebd72e29e98100e40e6acc98d402193f63.tar.bz2 | |
add VPS line to vbi packet
| -rwxr-xr-x | device.c | 2 | ||||
| -rwxr-xr-x | pvrinput.c | 2 | ||||
| -rwxr-xr-x | reader.c | 16 |
3 files changed, 15 insertions, 5 deletions
@@ -647,7 +647,7 @@ bool cPvrDevice::SetVBImode(int vbiLinesPerFrame, int vbistatus) return false; } if ((ctrl.value == V4L2_MPEG_STREAM_VBI_FMT_IVTV) && (vbiLinesPerFrame == 625)) { - vbifmt.fmt.sliced.service_set = V4L2_SLICED_TELETEXT_B | V4L2_SLICED_WSS_625; + vbifmt.fmt.sliced.service_set = V4L2_SLICED_TELETEXT_B | V4L2_SLICED_WSS_625 | V4L2_SLICED_VPS; vbifmt.type = V4L2_BUF_TYPE_SLICED_VBI_CAPTURE; vbifmt.fmt.sliced.reserved[0] = 0; vbifmt.fmt.sliced.reserved[1] = 0; @@ -6,7 +6,7 @@ #endif #endif -static const char *VERSION = "2010-08-21-ttx-wss"; +static const char *VERSION = "2010-08-25-ttx-wss-vps"; static const char *DESCRIPTION = tr("use Hauppauge PVR as input device"); static const char *MAINMENUENTRY = tr("PVR picture settings"); @@ -310,7 +310,7 @@ void cPvrReadThread::PesToTs(uint8_t *Data, uint32_t Length) if (vbi_fmt->itv0.linemask[lm_nr] & bit) { if ((line_nr < 35) && ((vbi_fmt->itv0.line[line_nr].id == V4L2_MPEG_VBI_IVTV_TELETEXT_B) || (vbi_fmt->itv0.line[line_nr].id == V4L2_MPEG_VBI_IVTV_WSS_625) - //|| (vbi_fmt->itv0.line[line_nr].id == V4L2_MPEG_VBI_IVTV_VPS) + || (vbi_fmt->itv0.line[line_nr].id == V4L2_MPEG_VBI_IVTV_VPS) )) needed_size += 46; line_nr++; @@ -329,7 +329,7 @@ void cPvrReadThread::PesToTs(uint8_t *Data, uint32_t Length) for (int vbiNr = 0; vbiNr < 36; vbiNr++) { if ((vbi_fmt->ITV0.line[vbiNr].id == V4L2_MPEG_VBI_IVTV_TELETEXT_B) || (vbi_fmt->ITV0.line[vbiNr].id == V4L2_MPEG_VBI_IVTV_WSS_625) - //|| (vbi_fmt->ITV0.line[vbiNr].id == V4L2_MPEG_VBI_IVTV_VPS) + || (vbi_fmt->ITV0.line[vbiNr].id == V4L2_MPEG_VBI_IVTV_VPS) ) needed_size += 46; } @@ -366,7 +366,7 @@ void cPvrReadThread::PesToTs(uint8_t *Data, uint32_t Length) uint8_t field_parity = 0; uint8_t line_offset = 0; uint8_t copy_vbi_bytes = 0; - uint8_t vbi_bytes[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + uint8_t vbi_bytes[13] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; bool copy_vbi_line = false; v4l2_mpeg_vbi_itv0_line *vbi_line = 0; while (true) { @@ -395,6 +395,11 @@ void cPvrReadThread::PesToTs(uint8_t *Data, uint32_t Length) break; } case V4L2_MPEG_VBI_IVTV_VPS: { + data_unit_id = 0xC3; + framing_code = kInvTab[vbi_fmt->itv0.line[itv0_vbiLineNr].data[0]]; + for (int i = 0; i < 12; i++) + vbi_bytes[i] = kInvTab[vbi_fmt->itv0.line[itv0_vbiLineNr].data[i + 1]]; + copy_vbi_bytes = 12; break; } } @@ -433,6 +438,11 @@ void cPvrReadThread::PesToTs(uint8_t *Data, uint32_t Length) break; } case V4L2_MPEG_VBI_IVTV_VPS: { + data_unit_id = 0xC3; + framing_code = kInvTab[vbi_fmt->ITV0.line[ITV0_vbiLineNr].data[0]]; + for (int i = 0; i < 12; i++) + vbi_bytes[i] = kInvTab[vbi_fmt->ITV0.line[ITV0_vbiLineNr].data[i + 1]]; + copy_vbi_bytes = 12; break; } } |
