* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
-#include <vlc/vlc.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
#include "input_internal.h"
struct stream_sys_t
{
- vlc_bool_t i_preserve_memory;
+ bool i_preserve_memory;
int64_t i_pos; /* Current reading offset */
int64_t i_size;
uint8_t *p_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
- * \param i_preserve_memory if this is set to VLC_FALSE the memory buffer
+ * \param i_preserve_memory if this is set to false the memory buffer
* pointed to by p_buffer is freed on stream_Destroy
*/
stream_t *__stream_MemoryNew( vlc_object_t *p_this, uint8_t *p_buffer,
- int64_t i_size, vlc_bool_t i_preserve_memory )
+ int64_t i_size, bool i_preserve_memory )
{
stream_t *s = vlc_stream_create( p_this );
stream_sys_t *p_sys;
s->pf_destroy = Delete;
s->i_char_width = 1;
- s->b_little_endian = VLC_FALSE;
+ s->b_little_endian = false;
vlc_object_attach( s, p_this );
return s;
if( !s->p_sys->i_preserve_memory ) free( s->p_sys->p_buffer );
free( s->p_sys );
vlc_object_detach( s );
- vlc_object_destroy( s );
+ vlc_object_release( s );
}
/****************************************************************************
{
stream_sys_t *p_sys = s->p_sys;
- vlc_bool_t *p_bool;
+ bool *p_bool;
int64_t *pi_64, i_64;
int i_int;
break;
case STREAM_CAN_SEEK:
- p_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t * );
- *p_bool = VLC_TRUE;
+ p_bool = (bool*)va_arg( args, bool * );
+ *p_bool = true;
break;
case STREAM_CAN_FASTSEEK:
- p_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t * );
- *p_bool = VLC_TRUE;
+ p_bool = (bool*)va_arg( args, bool * );
+ *p_bool = true;
break;
case STREAM_GET_POSITION:
break;
case STREAM_GET_MTU:
+ case STREAM_GET_CONTENT_TYPE:
return VLC_EGENERIC;
case STREAM_CONTROL_ACCESS: