From 8f9101869f6b460f61033ce434bba0a793d25137 Mon Sep 17 00:00:00 2001 From: deva Date: Fri, 9 Jun 2006 18:20:51 +0000 Subject: Moved files to other folder: lib - Shared files between server and client client - Client files server - Server files --- src/multiplexer.h | 134 ------------------------------------------------------ 1 file changed, 134 deletions(-) delete mode 100644 src/multiplexer.h (limited to 'src/multiplexer.h') diff --git a/src/multiplexer.h b/src/multiplexer.h deleted file mode 100644 index 9959009..0000000 --- a/src/multiplexer.h +++ /dev/null @@ -1,134 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/*************************************************************************** - * multiplexer.h - * - * Wed Aug 31 13:05:18 CEST 2005 - * Copyright 2005 Bent Bisballe Nyeng - * deva@aasimon.org - ****************************************************************************/ - -/* - * This file is part of MIaV. - * - * MIaV 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. - * - * MIaV 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 MIaV; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. - */ -#include "config.h" -#ifndef __MIAV_MULTIPLEXER_H__ -#define __MIAV_MULTIPLEXER_H__ - -#include "iso11172-1.h" -#include "iso11172-2.h" -#include "iso11172-3.h" - -#include "file.h" -#include "multicast.h" -#include "info.h" -#include "frame.h" - -#include "threadsafe_queue_priority.h" - -/** - * Multiplexer configuration - */ -// How many packets should we put in one pack -#define PACKETS_PER_PACK 3 - -// How many packets bewteen audio packs -#define AUDIO_PACKET_FREQUENCY 10 - -// How many packs bewteen system headers -#define SYSTEM_HEADER_FREQUENCY 5 - -// Size of video or audio data pr. packet -#define PACKET_SIZE 2028 - -/** - * Other stuff - */ -// The number of streamtypes. -#define NUM_TYPES 2 - -// Enum of the streamtypes. -typedef enum { - TYPE_VIDEO, - TYPE_AUDIO -} StreamType; - - -class Multiplexer { -public: - Multiplexer(File *file, Multicast *m, Info *info, volatile bool *running, - ThreadSafeQueuePriority *video_queue, - ThreadSafeQueuePriority *audio_queue); - ~Multiplexer(); - - void multiplex(); - -private: - int Write(void* data, int size); - int Write(char* data, int size); - int Write(unsigned long long int val); - int Write(long long int val); - int Write(long int val); - int Write(unsigned long int val); - int Write(int val); - int Write(unsigned int val); - int Write(short int val); - int Write(unsigned short int val); - - unsigned long long int SCR; - - double written[NUM_TYPES]; - - void iso11172_stream(); - bool pack(); - void system_header(); - bool packet(); - bool packet(StreamType type); - /* - void audio_packet(); - void video_packet(); - - void audio_data(ISO11172_3::header *header); - void audio_data_layer_I(ISO11172_3::header *header); - void audio_data_layer_II(ISO11172_3::header *header); - void audio_data_layer_III(ISO11172_3::header *header); - - void video_data(ISO11172_2::sequence_header_1 *header1, - ISO11172_2::sequence_header_2 *header2); - */ - // Frequency variables - unsigned int write_system_header; - unsigned int write_audio_packet; - - Frame *getFrame(StreamType type); - int read_stream(char *buf, unsigned int size, StreamType type); - - Frame *frame[NUM_TYPES]; - unsigned int frame_number[NUM_TYPES]; - unsigned int read[NUM_TYPES]; - - File *file; - Multicast *multicast; - Info *info; - volatile bool *running; - - // Audio Header - bool audio_header_read; - - ThreadSafeQueuePriority *queue[NUM_TYPES]; -}; - -#endif/*__MIAV_MULTIPLEXER_H__*/ -- cgit v1.2.3