Skip to content

Commit

Permalink
remove vestiges of V4L1 support
Browse files Browse the repository at this point in the history
support removed 2012-07-23 caac2d5
NB: that commit removed the define from libmythtv.pro

also:
remove decade old hack 399d84d which is irrelevant because it is now compiled as C++ since afe8de9
  • Loading branch information
ulmus-scott authored and linuxdude42 committed Nov 7, 2021
1 parent 716568b commit 591e017
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 654 deletions.
5 changes: 0 additions & 5 deletions mythtv/configure
Expand Up @@ -1996,7 +1996,6 @@ MYTHTV_CONFIG_LIST='
taglib
v4l2
v4l2prime
v4l1
valgrind
x11
libexiv2_external
Expand Down Expand Up @@ -2629,7 +2628,6 @@ opengles_deps="GLES2_gl2_h"
egl_deps="EGL_egl_h"
v4l2_deps="linux_videodev2_h"
v4l2prime_deps="v4l2 drm"
v4l1_deps="backend v4l2 linux_videodev_h"
vulkan_deps="vulkan_vulkan_core_h"
asi_deps="backend"
waylandextras_deps="wayland_client_h"
Expand Down Expand Up @@ -2794,7 +2792,6 @@ enable opengl
enable egl
enable symbol_visibility
enable deprecation_warnings
enable v4l1
enable v4l2
enable v4l2prime
enable x11
Expand Down Expand Up @@ -4761,7 +4758,6 @@ case $target_os in
enable darwin
enable videotoolbox
disable dvb
disable v4l1
disable v4l2
disable v4l2prime
disable x11
Expand Down Expand Up @@ -4811,7 +4807,6 @@ case $target_os in
disable protocols
fi
disable symver
disable v4l1
disable v4l2
disable v4l2prime
enable windows
Expand Down
1 change: 0 additions & 1 deletion mythtv/docs/doxygen-create-developer-docs.cfg
Expand Up @@ -2091,7 +2091,6 @@ PREDEFINED = USING_XV \
USING_OSX_FIREWIRE \
USING_PULSE \
USING_PULSEOUTPUT \
USING_V4L1 \
USING_V4L2 \
USING_VAAPI \
USING_VDPAU \
Expand Down
45 changes: 0 additions & 45 deletions mythtv/libs/libmythtv/cardutil.cpp
Expand Up @@ -29,10 +29,6 @@
#include "dvbtypes.h"
#endif

#ifdef USING_V4L1
#include <linux/videodev.h>
#endif

#ifdef USING_V4L2
#include "v4l2util.h"
#endif
Expand Down Expand Up @@ -2256,7 +2252,6 @@ bool CardUtil::GetV4LInfo(
return false;

#ifdef USING_V4L2
// First try V4L2 query
struct v4l2_capability capability {};
if (ioctl(videofd, VIDIOC_QUERYCAP, &capability) >= 0)
{
Expand All @@ -2265,14 +2260,6 @@ bool CardUtil::GetV4LInfo(
version = capability.version;
capabilities = capability.capabilities;
}
#ifdef USING_V4L1
else // Fallback to V4L1 query
{
struct video_capability capability2;
if (ioctl(videofd, VIDIOCGCAP, &capability2) >= 0)
input = QString::fromLatin1((const char*)capability2.name);
}
#endif // USING_V4L1
#endif // USING_V4L2

if (!driver.isEmpty())
Expand All @@ -2291,7 +2278,6 @@ InputNames CardUtil::ProbeV4LVideoInputs(int videofd, bool &ok)
#ifdef USING_V4L2
bool usingv4l2 = hasV4L2(videofd);

// V4L v2 query
struct v4l2_input vin {};
while (usingv4l2 && (ioctl(videofd, VIDIOC_ENUMINPUT, &vin) >= 0))
{
Expand All @@ -2305,37 +2291,6 @@ InputNames CardUtil::ProbeV4LVideoInputs(int videofd, bool &ok)
return list;
}

#ifdef USING_V4L1
// V4L v1 query
struct video_capability vidcap;
memset(&vidcap, 0, sizeof(vidcap));
if (ioctl(videofd, VIDIOCGCAP, &vidcap) != 0)
{
QString msg = QObject::tr("Could not query inputs.");
LOG(VB_GENERAL, LOG_ERR, "ProbeV4LVideoInputs(): Error, " + msg + ENO);
list[-1] = msg;
vidcap.channels = 0;
}

for (int i = 0; i < vidcap.channels; i++)
{
struct video_channel test;
memset(&test, 0, sizeof(test));
test.channel = i;

if (ioctl(videofd, VIDIOCGCHAN, &test) != 0)
{
LOG(VB_GENERAL, LOG_ERR, "ProbeV4LVideoInputs(): Error, " +
QString("Could determine name of input #%1"
"\n\t\t\tNot adding it to the list.")
.arg(test.channel) + ENO);
continue;
}

list[i] = test.name;
}
#endif // USING_V4L1

// Create an input when none are advertised
if (list.isEmpty())
list[0] = "Television";
Expand Down

0 comments on commit 591e017

Please sign in to comment.