From b3594cbeaee54fbf39c38bb76640d996750353f4 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 25 Feb 2012 22:18:42 +0100 Subject: [PATCH] spark: use ioctls instead of procfs in cVideo::getPictureInfo Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/cd90a23b46b40d2605e8e35c46da13abe763c0eb Author: Stefan Seyfried Date: 2012-02-25 (Sat, 25 Feb 2012) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libspark/video.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libspark/video.cpp b/libspark/video.cpp index 708765b..1e51b6f 100644 --- a/libspark/video.cpp +++ b/libspark/video.cpp @@ -519,10 +519,13 @@ void cVideo::Pig(int x, int y, int w, int h, int osd_w, int osd_h) void cVideo::getPictureInfo(int &width, int &height, int &rate) { - rate = proc_get_hex("/proc/stb/vmpeg/0/framerate"); + video_size_t s; + ioctl(fd, VIDEO_GET_SIZE, &s); + ioctl(fd, VIDEO_GET_FRAME_RATE, &rate); rate /= 1000; - width = proc_get_hex("/proc/stb/vmpeg/0/xres"); - height = proc_get_hex("/proc/stb/vmpeg/0/yres"); + height = s.h; + width = s.w; + lt_debug("%s: rate: %d, width: %d height: %d\n", __func__, rate, width, height); } void cVideo::SetSyncMode(AVSYNC_TYPE Mode)