📄 video.h
字号:
/* * Copyright (C) 2005-2007 gulikoza * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 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 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. *//* $Id$ */#ifndef VIDEO_H#define VIDEO_H// Number of video frames being buffered#define FRAMES 24// 1024 KB decoding buffer#define BUFFERSIZE 1048576// Program Association Table entrystruct PAT_entry { unsigned int program; unsigned int pmtpid; unsigned int pcrpid; bool first_pmt; struct { unsigned int pid; const char * stream_type;#define MAX_STREAMS 15 } streams[MAX_STREAMS]; unsigned int num_streams;};struct Videoinfo { // These should be protected by mutex, so no volatile? // set to true when info has changed bool changed; // Source video parameters unsigned int w, h; unsigned int cropx, cropy; double aspect; int offset; // Video colorspace unsigned int colorspace; // SDL window SDL_semaphore * display_change; SDL_Surface * surface;};struct SRC_STATE_tag;struct Audioinfo { char mode; bool stereo; float volume; float prevVolume; SDL_AudioSpec * spec; float * data, * data_out; unsigned int r_pos, w_pos, size; unsigned int ptsstart; double pts; // Frequency resample SRC_STATE_tag * src_state; double ratio; int delay; // Semaphore for audio change SDL_semaphore * audio_change;};struct Frame { // set this flag to true when video changes size bool changed; int id; unsigned int w, h; double time; double aspect; unsigned int pts; unsigned int pitch, edge; unsigned char * data[3]; Frame():changed(true),w(0),h(0),time(0.0),aspect(0.0),pts(0),pitch(0),edge(0) { data[0] = data[1] = data[2] = NULL; }};struct Buffer { unsigned char * data[3]; unsigned int height; int src_width, dst_width;};#ifdef USES_BASECLASSclass Output;// Uncomment for DEBUG output//#define DEBUG#include "log.h"#include "events.h"//#define DEBUG#include "fifo.h"#include "timer.h"#include "baseclass.h"// Filter classes// Source:#include "udp.h"#include "file.h"// Splitter:#include "mpeg_demux.h"// Decoder:#include "mpeg_audio.h"#include "mpeg_decoder.h"#include "libav_decoder.h"#include "libds_decoder.h"// End Filter classes#ifdef DEBUG#undef DEBUG#endif#endif // USES_BASECLASS#endif // VIDEO_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -