Commit 607cb16c authored by Laurent Aimar's avatar Laurent Aimar

* fixed seek flag with broadcasted data.

parent c5f92560
......@@ -2,7 +2,7 @@
* 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>
*
......@@ -10,7 +10,7 @@
* 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
......@@ -29,11 +29,11 @@
****************************************************************************/
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 )
......@@ -56,14 +56,14 @@ static void GenerateGuid( guid_t *p_guid )
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;
}
}
......@@ -83,6 +83,14 @@ static const guid_t asf_object_header_guid =
{ 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,
......
......@@ -2,7 +2,7 @@
* 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>
*
......@@ -70,6 +70,8 @@
#include "buffer.h"
#include "mms.h"
#undef MMS_DEBUG
/****************************************************************************
* NOTES:
* MMSProtocole documentation found at http://get.to/sdp
......@@ -261,7 +263,13 @@ static int Open( vlc_object_t *p_this )
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;
......@@ -867,7 +875,13 @@ static int MMSOpen( input_thread_t *p_input,
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 );
......@@ -1483,7 +1497,7 @@ static int NetFillBuffer( input_thread_t *p_input )
i_udp_read = 0;
}
#if 1
#if MMS_DEBUG
if( p_access->i_proto == MMS_PROTO_UDP )
{
msg_Dbg( p_input,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment