/*****************************************************************************
* mem_stream.c: stream_t wrapper around memory buffer
*****************************************************************************
/*****************************************************************************
* mem_stream.c: stream_t wrapper around memory buffer
*****************************************************************************
*
* 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
*
* 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
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
*
* 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, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
static int Control( stream_t *, int i_query, va_list );
static void Delete ( stream_t * );
static int Control( stream_t *, int i_query, va_list );
static void Delete ( stream_t * );
* \param p_this the calling vlc_object
* \param p_buffer the memory buffer for the stream
* \param i_buffer the size of the buffer
* \param p_this the calling vlc_object
* \param p_buffer the memory buffer for the stream
* \param i_buffer the size of the buffer
* pointed to by p_buffer is freed on stream_Destroy
*/
stream_t *__stream_MemoryNew( vlc_object_t *p_this, uint8_t *p_buffer,
* pointed to by p_buffer is freed on stream_Destroy
*/
stream_t *__stream_MemoryNew( vlc_object_t *p_this, uint8_t *p_buffer,
case STREAM_SET_POSITION:
i_64 = (int64_t)va_arg( args, int64_t );
i_64 = __MAX( i_64, 0 );
case STREAM_SET_POSITION:
i_64 = (int64_t)va_arg( args, int64_t );
i_64 = __MAX( i_64, 0 );
{
stream_sys_t *p_sys = s->p_sys;
int i_res = __MIN( i_read, p_sys->i_size - p_sys->i_pos );
{
stream_sys_t *p_sys = s->p_sys;
int i_res = __MIN( i_read, p_sys->i_size - p_sys->i_pos );