/* * test_video.c - Test program for new API * * Copyright (C) 2000 Ralph Metzler * & Marcus Metzler for convergence integrated media GmbH * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include #include #include #include #include #include #include #include #include #include #include #include int videoStop(int fd) { int ans; if ((ans = ioctl(fd,VIDEO_STOP,0)) < 0) { perror("VIDEO STOP: "); return -1; } return 0; } int videoPlay(int fd) { int ans; if ((ans = ioctl(fd,VIDEO_PLAY)) < 0) { perror("VIDEO PLAY: "); return -1; } return 0; } int videoFreeze(int fd) { int ans; if ((ans = ioctl(fd,VIDEO_FREEZE)) < 0) { perror("VIDEO FREEZE: "); return -1; } return 0; } int videoContinue(int fd) { int ans; if ((ans = ioctl(fd,VIDEO_CONTINUE)) < 0) { perror("VIDEO CONTINUE: "); return -1; } return 0; } int videoSelectSource(int fd, video_stream_source_t source) { int ans; if ((ans = ioctl(fd,VIDEO_SELECT_SOURCE, source)) < 0) { perror("VIDEO SELECT SOURCE: "); return -1; } return 0; } int videoSetBlank(int fd, boolean state) { int ans; if ((ans = ioctl(fd,VIDEO_SET_BLANK, state)) < 0) { perror("VIDEO SET BLANK: "); return -1; } return 0; } int videoFastForward(int fd,int nframes) { int ans; if ((ans = ioctl(fd,VIDEO_FAST_FORWARD, nframes)) < 0) { perror("VIDEO FAST FORWARD: "); return -1; } return 0; } int videoSlowMotion(int fd,int nframes) { int ans; if ((ans = ioctl(fd,VIDEO_SLOWMOTION, nframes)) < 0) { perror("VIDEO SLOWMOTION: "); return -1; } return 0; } int videoGetStatus(int fd) { struct video_status stat; int ans; if ((ans = ioctl(fd,VIDEO_GET_STATUS, &stat)) < 0) { perror("VIDEO GET STATUS: "); return -1; } printf("Video Status:\n"); printf(" Blank State : %s\n", (stat.video_blank ? "BLANK" : "STILL")); printf(" Play State : "); switch ((int)stat.play_state){ case VIDEO_STOPPED: printf("STOPPED (%d)\n",stat.play_state); break; case VIDEO_PLAYING: printf("PLAYING (%d)\n",stat.play_state); break; case VIDEO_FREEZED: printf("FREEZED (%d)\n",stat.play_state); break; default: printf("unknown (%d)\n",stat.play_state); break; } printf(" Stream Source : "); switch((int)stat.stream_source){ case VIDEO_SOURCE_DEMUX: printf("DEMUX (%d)\n",stat.stream_source); break; case VIDEO_SOURCE_MEMORY: printf("MEMORY (%d)\n",stat.stream_source); break; default: printf("unknown (%d)\n",stat.stream_source); break; } printf(" Format (Aspect Ratio): "); switch((int)stat.video_format){ case VIDEO_FORMAT_4_3: printf("4:3 (%d)\n",stat.video_format); break; case VIDEO_FORMAT_16_9: printf("16:9 (%d)\n",stat.video_format); break; default: printf("unknown (%d)\n",stat.video_format); break; } printf(" Displa
# Sweden - Ulricehamn
# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
T 618000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
T 842000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE