* asf.h: MMS access plug-in
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
- * $Id: asf.h,v 1.3 2002/11/22 18:35:57 sam Exp $
+ * $Id: asf.h,v 1.4 2003/03/02 18:17:58 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* 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.
- *
+ *
* This program 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
****************************************************************************/
typedef struct guid_s
-{
- u32 v1; /* le */
- u16 v2; /* le */
- u16 v3; /* le */
- u8 v4[8];
+{
+ uint32_t v1; /* le */
+ uint16_t v2; /* le */
+ uint16_t v3; /* le */
+ uint8_t v4[8];
} guid_t;
static inline int CmpGuid( const guid_t *p_guid1, const guid_t *p_guid2 )
int i;
srand( mdate() & 0xffffffff );
-
+
/* FIXME should be generated using random data */
p_guid->v1 = 0xbabac001;
- p_guid->v2 = ( (u64)rand() << 16 ) / RAND_MAX;
- p_guid->v3 = ( (u64)rand() << 16 ) / RAND_MAX;
+ p_guid->v2 = ( (uint64_t)rand() << 16 ) / RAND_MAX;
+ p_guid->v3 = ( (uint64_t)rand() << 16 ) / RAND_MAX;
for( i = 0; i < 8; i++ )
{
- p_guid->v4[i] = ( (u64)rand() * 256 ) / RAND_MAX;
+ p_guid->v4[i] = ( (uint64_t)rand() * 256 ) / RAND_MAX;
}
}
{ 0xA6,0xD9, 0x00,0xAA,0x00,0x62,0xCE,0x6C }
};
+static const guid_t asf_object_file_properties_guid =
+{
+ 0x8cabdca1,
+ 0xa947,
+ 0x11cf,
+ { 0x8e,0xe4, 0x00,0xC0,0x0C,0x20,0x53,0x65 }
+};
+
static const guid_t asf_object_stream_properties_guid =
{
0xB7DC0791,
* mms.c: MMS access plug-in
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
- * $Id: mms.c,v 1.19 2003/02/20 01:52:45 sigmunau Exp $
+ * $Id: mms.c,v 1.20 2003/03/02 18:17:58 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
#include "buffer.h"
#include "mms.h"
+#undef MMS_DEBUG
+
/****************************************************************************
* NOTES:
* MMSProtocole documentation found at http://get.to/sdp
p_input->stream.b_connected = 1;
}
p_input->stream.p_selected_area->i_tell = 0;
- if( p_access->i_packet_count <= 0 )
+ /*
+ * i_flags_broadcast
+ * yy xx ?? ??
+ * broadcast yy=0x02, xx= 0x00
+ * pre-recorded yy=0x01, xx= 0x80 if video, 0x00 no video
+ */
+ if( p_access->i_packet_count <= 0 || ( p_access->i_flags_broadcast >> 24 ) == 0x02 )
{
p_input->stream.b_seekable = 0;
p_input->stream.p_selected_area->i_size = 0;
buffer.p_data,
buffer.i_data );
- mms_CommandRead( p_input, 0x01, 0 );
+ if( mms_CommandRead( p_input, 0x01, 0 ) < 0 )
+ {
+ var_buffer_free( &buffer );
+ MMSClose( p_input );
+ return( -1 );
+ }
+
i_server_version = GetDWLE( p_access->p_cmd + MMS_CMD_HEADERSIZE + 32 );
i_tool_version = GetDWLE( p_access->p_cmd + MMS_CMD_HEADERSIZE + 36 );
i_update_player_url = GetDWLE( p_access->p_cmd + MMS_CMD_HEADERSIZE + 40 );
i_udp_read = 0;
}
-#if 1
+#if MMS_DEBUG
if( p_access->i_proto == MMS_PROTO_UDP )
{
msg_Dbg( p_input,