Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
881768ad
Commit
881768ad
authored
Nov 25, 2002
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* all: begin to add mms over udp support. It begin to work (at least
for me) but it still needs some work.
parent
1158db5f
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
577 additions
and
343 deletions
+577
-343
modules/access/mms/buffer.c
modules/access/mms/buffer.c
+7
-2
modules/access/mms/buffer.h
modules/access/mms/buffer.h
+2
-2
modules/access/mms/mms.c
modules/access/mms/mms.c
+532
-315
modules/access/mms/mms.h
modules/access/mms/mms.h
+36
-24
No files found.
modules/access/mms/buffer.c
View file @
881768ad
...
...
@@ -2,7 +2,7 @@
* buffer.c: MMS access plug-in
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: buffer.c,v 1.
1 2002/11/22 18:35:57 sam
Exp $
* $Id: buffer.c,v 1.
2 2002/11/25 00:22:04 fenrir
Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -193,7 +193,7 @@ uint64_t var_buffer_get64( var_buffer_t *p_buf )
return
(
i_dw1
+
(
i_dw2
<<
32
)
);
}
int
var_buffer_getmemory
(
var_buffer_t
*
p_buf
,
void
*
p_mem
,
int
i_mem
)
int
var_buffer_getmemory
(
var_buffer_t
*
p_buf
,
void
*
p_mem
,
int
64_t
i_mem
)
{
int
i_copy
;
...
...
@@ -202,6 +202,11 @@ int var_buffer_getmemory ( var_buffer_t *p_buf, void *p_mem, int i_mem )
{
memcpy
(
p_mem
,
p_buf
+
p_buf
->
i_data
,
i_copy
);
}
if
(
i_copy
<
0
)
{
// fprintf( stderr, "\n**************arrrrrrggggg\n" );
i_copy
=
0
;
}
p_buf
->
i_data
+=
i_copy
;
return
(
i_copy
);
}
...
...
modules/access/mms/buffer.h
View file @
881768ad
...
...
@@ -2,7 +2,7 @@
* buffer.h: MMS access plug-in
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: buffer.h,v 1.
1 2002/11/22 18:35:57 sam
Exp $
* $Id: buffer.h,v 1.
2 2002/11/25 00:22:04 fenrir
Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -50,7 +50,7 @@ uint8_t var_buffer_get8 ( var_buffer_t *p_buf );
uint16_t
var_buffer_get16
(
var_buffer_t
*
p_buf
);
uint32_t
var_buffer_get32
(
var_buffer_t
*
p_buf
);
uint64_t
var_buffer_get64
(
var_buffer_t
*
p_buf
);
int
var_buffer_getmemory
(
var_buffer_t
*
p_buf
,
void
*
p_mem
,
int
i_mem
);
int
var_buffer_getmemory
(
var_buffer_t
*
p_buf
,
void
*
p_mem
,
int
64_t
i_mem
);
int
var_buffer_readempty
(
var_buffer_t
*
p_buf
);
void
var_buffer_getguid
(
var_buffer_t
*
p_buf
,
guid_t
*
p_guid
);
modules/access/mms/mms.c
View file @
881768ad
This diff is collapsed.
Click to expand it.
modules/access/mms/mms.h
View file @
881768ad
...
...
@@ -2,7 +2,7 @@
* mms.h: MMS access plug-in
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: mms.h,v 1.
3 2002/11/13 20:28:13
fenrir Exp $
* $Id: mms.h,v 1.
4 2002/11/25 00:22:04
fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -26,9 +26,13 @@ typedef struct url_s
{
char
*
psz_server_addr
;
int
i_server_port
;
char
*
psz_bind_addr
;
int
i_bind_port
;
char
*
psz_path
;
/
/ private
/
* private */
char
*
psz_private
;
}
url_t
;
...
...
@@ -39,10 +43,11 @@ typedef struct url_s
#define MMS_PROTO_TCP 1
#define MMS_PROTO_UDP 2
#define MMS_PACKET_CMD 0
#define MMS_PACKET_HEADER 1
#define MMS_PACKET_MEDIA 2
#define MMS_PACKET_UDP_TIMING 3
#define MMS_PACKET_ANY 0
#define MMS_PACKET_CMD 1
#define MMS_PACKET_HEADER 2
#define MMS_PACKET_MEDIA 3
#define MMS_PACKET_UDP_TIMING 4
#define MMS_STREAM_VIDEO 0x0001
...
...
@@ -54,27 +59,34 @@ typedef struct url_s
typedef
struct
mms_stream_s
{
int
i_id
;
/
/ 1 -> 127
int
i_cat
;
/
/ MMS_STREAM_VIDEO, MMS_STREAM_AUDIO
int
i_bitrate
;
/
/ -1 if unknown
int
i_id
;
/
* 1 -> 127 */
int
i_cat
;
/
* MMS_STREAM_VIDEO, MMS_STREAM_AUDIO */
int
i_bitrate
;
/
* -1 if unknown */
int
i_selected
;
}
mms_stream_t
;
#define MMS_BUFFER_SIZE 100000
typedef
struct
access_s
{
int
i_proto
;
/
/ MMS_PROTO_TCP, MMS_PROTO_UDP
input_socket_t
socket_
server
;
// TCP socket for communication with server
input_socket_t
socket_
data
;
// Optional UDP socket for data(media/header packet)
/
/ send by server
int
i_proto
;
/
* MMS_PROTO_TCP, MMS_PROTO_UDP */
input_socket_t
socket_
tcp
;
/* TCP socket for communication with server */
input_socket_t
socket_
udp
;
/* Optional UDP socket for data(media/header packet) */
/
* send by server */
url_t
url
;
/
/ connect to this server
url_t
url
;
/
* connect to this server */
mms_stream_t
stream
[
128
];
/
/in asf never more than 1->127 streams
mms_stream_t
stream
[
128
];
/
* in asf never more than 1->127 streams */
off_t
i_pos
;
/
/ position of next byte to be read
off_t
i_pos
;
/
* position of next byte to be read */
/* */
uint8_t
buffer_tcp
[
MMS_BUFFER_SIZE
];
int
i_buffer_tcp
;
uint8_t
buffer_udp
[
MMS_BUFFER_SIZE
];
int
i_buffer_udp
;
/* data necessary to send data to server */
guid_t
guid
;
int
i_command_level
;
...
...
@@ -84,26 +96,26 @@ typedef struct access_s
int
i_packet_seq_num
;
uint8_t
*
p_cmd
;
// latest command read
int
i_cmd
;
// allocated at the begining
uint8_t
*
p_cmd
;
/* latest command read */
int
i_cmd
;
/* allocated at the begining */
uint8_t
*
p_header
;
// allocated by mms_ReadPacket
uint8_t
*
p_header
;
/* allocated by mms_ReadPacket */
int
i_header
;
uint8_t
*
p_media
;
// allocated by mms_ReadPacket
uint8_t
*
p_media
;
/* allocated by mms_ReadPacket */
int
i_media
;
int
i_media_used
;
/
/ extracted informations
/
* extracted informations */
int
i_command
;
/
/ from 0x01 answer (not yet set)
/
* from 0x01 answer (not yet set) */
char
*
psz_server_version
;
char
*
psz_tool_version
;
char
*
psz_update_player_url
;
char
*
psz_encryption_type
;
/
/ from 0x06 answer
/
* from 0x06 answer */
uint32_t
i_flags_broadcast
;
uint32_t
i_media_length
;
int
i_packet_length
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment