There is much work in progress ... But Hans, please be aware that there are
not only mythtv users !
There are two vdr-plugins which are tainted by the changes. I managed to
adapt the pvr350-Plugin, but as I mentioned several times, the decoder
start/stop ioctls are much slower than the fwapi calls which were used by
the plugin before.
Big problem is the pvrinput-Plugin: Teletext does no longer work, and the
DNR filters seem also to be broken.
The code looks like this:
--------------------------------------------------------------------
void cPvrReadThread::Action(void)
{
active = true;
unsigned char buffer[BUFFSIZE];
int r;
if (vbi_fd > 0)
{
int vbi_insert = 1;
if (ioctl(vbi_fd, IVTV_IOC_S_VBI_EMBED, &vbi_insert) < 0)
{
log(0, "Error setting vbi embedded mode, %d:%s", errno, strerror(errno));
}
struct v4l2_format vbi_fmt;
vbi_fmt.type = V4L2_BUF_TYPE_SLICED_VBI_CAPTURE;
vbi_fmt.fmt.sliced.service_set = V4L2_SLICED_TELETEXT_B;
if (ioctl(vbi_fd, VIDIOC_S_FMT, &vbi_fmt) < 0)
{
log(0, "Error setting vbi mode, %d:%s", errno, strerror(errno));
}
}
while (active)
{
r = read(video_fd, buffer, BUFFSIZE);
if (r == -1)
{
log(0, "Error reading from video device, %d:%s", errno, strerror(errno));
break;
}
if (r > 0)
{
ParseProgramStream(buffer, r);
}
}
}
---------------------------------------------------------------
bool cPvrDevice::SetCodec(void)
{
struct ivtv_ioctl_codec codec;
if (IOCTL(video_fd, IVTV_IOC_G_CODEC, &codec) != 0)
{
log(0, "IVTV_IOC_G_CODEC failed, %d:%s", errno, strerror(errno));
return false;
}
codec.stream_type = IVTV_STREAM_DVD_S2; // IVTV_STREAM_PS or
IVTV_STREAM_DVD_S2
codec.aspect = PvrSetup.AspectRatio + 1;
codec.pulldown = PvrSetup.Pulldown;
codec.bitrate = PvrSetup.VideoBitrate * 1000;
codec.bitrate_peak = 15000000;
codec.bitrate_mode = bitrateCBR;
codec.framespergop = PvrSetup.FramesPerGop; // 15 for NTSC
codec.bframes = PvrSetup.BFrames + 1;
codec.gop_closure = PvrSetup.GopClosure;
codec.dnr_mode = PvrSetup.DnrMode;
codec.dnr_type = PvrSetup.DnrType;
codec.dnr_spatial = PvrSetup.DnrSpatial;
codec.dnr_temporal = PvrSetup.DnrTemporal;
codec.audio_bitmask = 0x0009 | ((PvrSetup.AudioBitrate + 1) << 4);
codec.framerate = 1;
if (IOCTL(video_fd, IVTV_IOC_S_CODEC, &codec) != 0)
{
log(0, "IVTV_IOC_S_CODEC failed, %d:%s", errno, strerror(errno));
return false;
}
return true;
}
----------------------------------------------------------------------------
Could you help me to adapt this to the new (v4l2 ?) commands?
Which other header files than ivtv.h and videodev2.h have to be included?
Greets, Martin
_______________________________________________
ivtv-devel mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-devel