00001 /*------------------------------------------------------------------------------ 00002 00003 Copyright (c) 2000 Tyrell Corporation. All rights reserved. 00004 00005 Tyrell DarkIce 00006 00007 File : FileCast.cpp 00008 Version : $Revision: 1.1 $ 00009 Author : $Author: darkeye $ 00010 Location : $Source: /cvsroot/darkice/darkice/src/FileCast.cpp,v $ 00011 00012 Copyright notice: 00013 00014 This program is free software; you can redistribute it and/or 00015 modify it under the terms of the GNU General Public License 00016 as published by the Free Software Foundation; either version 2 00017 of the License, or (at your option) any later version. 00018 00019 This program is distributed in the hope that it will be useful, 00020 but WITHOUT ANY WARRANTY; without even the implied warranty of 00021 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00022 GNU General Public License for more details. 00023 00024 You should have received a copy of the GNU General Public License 00025 along with this program; if not, write to the Free Software 00026 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00027 00028 ------------------------------------------------------------------------------*/ 00029 00030 /* ============================================================ include files */ 00031 00032 #ifdef HAVE_CONFIG_H 00033 #include "config.h" 00034 #endif 00035 00036 #ifdef HAVE_STDIO_H 00037 #include <stdio.h> 00038 #else 00039 #error need stdio.h 00040 #endif 00041 00042 #ifdef HAVE_STRING_H 00043 #include <string.h> 00044 #else 00045 #error need string.h 00046 #endif 00047 00048 00049 #include "Exception.h" 00050 #include "Source.h" 00051 #include "Sink.h" 00052 #include "Util.h" 00053 #include "FileCast.h" 00054 00055 00056 /* =================================================== local data structures */ 00057 00058 00059 /* ================================================ local constants & macros */ 00060 00061 /*------------------------------------------------------------------------------ 00062 * File identity 00063 *----------------------------------------------------------------------------*/ 00064 static const char fileid[] = "$Id: FileCast.cpp,v 1.1 2002/02/28 09:49:25 darkeye Exp $"; 00065 00066 00067 /* =============================================== local function prototypes */ 00068 00069 00070 /* ============================================================= module code */ 00071 00072 /*------------------------------------------------------------------------------ 00073 * Open the connection 00074 *----------------------------------------------------------------------------*/ 00075 bool 00076 FileCast :: open ( void ) throw ( Exception ) 00077 { 00078 if ( isOpen() ) { 00079 return false; 00080 } 00081 00082 if ( !targetFile->open() ) { 00083 return false; 00084 } 00085 00086 return true; 00087 } 00088 00089 00090 00091 /*------------------------------------------------------------------------------ 00092 00093 $Source: /cvsroot/darkice/darkice/src/FileCast.cpp,v $ 00094 00095 $Log: FileCast.cpp,v $ 00096 Revision 1.1 2002/02/28 09:49:25 darkeye 00097 added possibility to save the encoded stream to a local file only 00098 (no streaming server needed) 00099 00100 00101 00102 ------------------------------------------------------------------------------*/ 00103