stream_io_callback.hpp

Go to the documentation of this file.
00001 
00002 /*****************************************************************************
00003  * mkv.cpp : matroska demuxer
00004  *****************************************************************************
00005  * Copyright (C) 2003-2004 the VideoLAN team
00006  * $Id: 5bad71b443ea68b7b42fa6fec17e2760bc23e417 $
00007  *
00008  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
00009  *          Steve Lhomme <steve.lhomme@free.fr>
00010  *
00011  * This program is free software; you can redistribute it and/or modify
00012  * it under the terms of the GNU General Public License as published by
00013  * the Free Software Foundation; either version 2 of the License, or
00014  * (at your option) any later version.
00015  *
00016  * This program is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  * GNU General Public License for more details.
00020  *
00021  * You should have received a copy of the GNU General Public License
00022  * along with this program; if not, write to the Free Software
00023  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
00024  *****************************************************************************/
00025 #include "mkv.hpp"
00026 
00027 /*****************************************************************************
00028  * Stream managment
00029  *****************************************************************************/
00030 class vlc_stream_io_callback: public IOCallback
00031 {
00032   private:
00033     stream_t       *s;
00034     bool           mb_eof;
00035     bool           b_owner;
00036 
00037   public:
00038     vlc_stream_io_callback( stream_t *, bool );
00039 
00040     virtual ~vlc_stream_io_callback()
00041     {
00042         if( b_owner )
00043             stream_Delete( s );
00044     }
00045 
00046     virtual uint32   read            ( void *p_buffer, size_t i_size);
00047     virtual void     setFilePointer  ( int64_t i_offset, seek_mode mode = seek_beginning );
00048     virtual size_t   write           ( const void *p_buffer, size_t i_size) { return 0; }
00049     virtual uint64   getFilePointer  ( void );
00050     virtual void     close           ( void ) { return; }
00051 };
00052 
00053 

Generated on Tue May 25 08:04:55 2010 for VLC by  doxygen 1.5.6