Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Steve Lhomme
VLC
Commits
f8bf106d
Commit
f8bf106d
authored
Dec 14, 2002
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added stream output. (common work with titer).
parent
3f126864
Changes
29
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
4383 additions
and
14 deletions
+4383
-14
configure.ac.in
configure.ac.in
+16
-0
include/stream_output.h
include/stream_output.h
+96
-7
include/vlc_common.h
include/vlc_common.h
+4
-1
modules/Makefile.am
modules/Makefile.am
+4
-0
modules/access_output/.cvsignore
modules/access_output/.cvsignore
+2
-0
modules/access_output/Modules.am
modules/access_output/Modules.am
+3
-0
modules/access_output/dummy.c
modules/access_output/dummy.c
+121
-0
modules/access_output/file.c
modules/access_output/file.c
+151
-0
modules/access_output/udp.c
modules/access_output/udp.c
+398
-0
modules/mux/.cvsignore
modules/mux/.cvsignore
+2
-0
modules/mux/Modules.am
modules/mux/Modules.am
+1
-0
modules/mux/dummy.c
modules/mux/dummy.c
+131
-0
modules/mux/mpeg/.cvsignore
modules/mux/mpeg/.cvsignore
+2
-0
modules/mux/mpeg/Modules.am
modules/mux/mpeg/Modules.am
+12
-0
modules/mux/mpeg/bits.h
modules/mux/mpeg/bits.h
+93
-0
modules/mux/mpeg/pes.c
modules/mux/mpeg/pes.c
+208
-0
modules/mux/mpeg/pes.h
modules/mux/mpeg/pes.h
+38
-0
modules/mux/mpeg/ps.c
modules/mux/mpeg/ps.c
+361
-0
modules/mux/mpeg/ts.c
modules/mux/mpeg/ts.c
+599
-0
modules/packetizer/.cvsignore
modules/packetizer/.cvsignore
+2
-0
modules/packetizer/Modules.am
modules/packetizer/Modules.am
+5
-0
modules/packetizer/a52.c
modules/packetizer/a52.c
+393
-0
modules/packetizer/copy.c
modules/packetizer/copy.c
+227
-0
modules/packetizer/mpeg4video.c
modules/packetizer/mpeg4video.c
+358
-0
modules/packetizer/mpegaudio.c
modules/packetizer/mpegaudio.c
+370
-0
modules/packetizer/mpegvideo.c
modules/packetizer/mpegvideo.c
+395
-0
src/input/input_dec.c
src/input/input_dec.c
+17
-1
src/libvlc.h
src/libvlc.h
+19
-2
src/stream_output/stream_output.c
src/stream_output/stream_output.c
+355
-3
No files found.
configure.ac.in
View file @
f8bf106d
...
...
@@ -135,6 +135,7 @@ case "x${target_os}" in
LDFLAGS_access_mms="${LDFLAGS_access_mms} -lws2_32"
LDFLAGS_access_rtp="${LDFLAGS_access_rtp} -lws2_32"
LDFLAGS_access_udp="${LDFLAGS_access_udp} -lws2_32"
LDFLAGS_access_output_udp="${LDFLAGS_access_output_udp} -lws2_32"
LDFLAGS_rc="${LDFLAGS_rc} -lws2_32"
LDFLAGS_sap="${LDFLAGS_sap} -lws2_32"
fi
...
...
@@ -273,6 +274,7 @@ AC_CHECK_FUNC(send,,[
LDFLAGS_access_rtp="${LDFLAGS_access_rtp} -lsocket"
LDFLAGS_access_udp="${LDFLAGS_access_udp} -lsocket"
LDFLAGS_sap="${LDFLAGS_sap} -lsocket"
LDFLAGS_access_output_udp="${LDFLAGS_access_output_udp} -lsocket"
)])
AC_CHECK_FUNC(gethostbyname,,[
...
...
@@ -865,6 +867,20 @@ AC_ARG_ENABLE(release,
[ --enable-release activate extra optimizations (default disabled)])
AM_CONDITIONAL(RELEASE, test "x${enable_release}" = "xyes")
dnl
dnl Stream output
dnl
AC_ARG_ENABLE(sout,
[ --enable-sout Stream output modules (default enabled)])
if test "x${enable_sout}" != "xno"
then
PLUGINS="${PLUGINS} access_output_dummy access_output_udp access_output_file"
PLUGINS="${PLUGINS} mux_ts mux_ps mux_dummy"
PLUGINS="${PLUGINS} packetizer_mpegaudio packetizer_mpegvideo packetizer_a52"
PLUGINS="${PLUGINS} packetizer_mpeg4video packetizer_copy"
fi
dnl
dnl Input plugins
dnl
...
...
include/stream_output.h
View file @
f8bf106d
...
...
@@ -2,15 +2,17 @@
* stream_output.h : stream output module
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: stream_output.h,v 1.
1
2002/
08
/1
2
2
2:12:50 massiot
Exp $
* $Id: stream_output.h,v 1.
2
2002/
12
/1
4
2
1:32:41 fenrir
Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Laurent Aimar <fenrir@via.ecp.fr>
* Eric Petit <titer@videolan.org>
*
* 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
* 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
...
...
@@ -24,6 +26,59 @@
/*****************************************************************************
* sout_instance_t: stream output thread descriptor
*****************************************************************************/
struct
sout_buffer_t
{
size_t
i_allocated_size
;
byte_t
*
p_buffer
;
size_t
i_size
;
// mtime_t i_date;
mtime_t
i_length
;
mtime_t
i_dts
;
mtime_t
i_pts
;
int
i_bitrate
;
struct
sout_buffer_t
*
p_next
;
};
struct
sout_packet_format_t
{
int
i_cat
;
// AUDIO_ES, VIDEO_ES, SPU_ES
vlc_fourcc_t
i_fourcc
;
void
*
p_format
;
// WAVEFORMATEX or BITMAPINFOHEADER
};
struct
sout_fifo_t
{
vlc_mutex_t
lock
;
/* fifo data lock */
vlc_cond_t
wait
;
/* fifo data conditional variable */
int
i_depth
;
sout_buffer_t
*
p_first
;
sout_buffer_t
**
pp_last
;
};
struct
sout_input_t
{
vlc_mutex_t
lock
;
sout_instance_t
*
p_sout
;
sout_packet_format_t
input_format
;
sout_fifo_t
*
p_fifo
;
void
*
p_mux_data
;
};
#define SOUT_METHOD_NONE 0x00
#define SOUT_METHOD_FILE 0x10
#define SOUT_METHOD_NETWORK 0x20
struct
sout_instance_t
{
VLC_COMMON_MEMBERS
...
...
@@ -33,10 +88,30 @@ struct sout_instance_t
char
*
psz_mux
;
char
*
psz_name
;
module_t
*
p_access
;
module_t
*
p_mux
;
module_t
*
p_access
;
int
i_method
;
void
*
p_access_data
;
int
(
*
pf_write
)(
sout_instance_t
*
,
sout_buffer_t
*
);
int
(
*
pf_seek
)(
sout_instance_t
*
,
off_t
);
module_t
*
p_mux
;
void
*
p_mux_data
;
int
(
*
pf_mux_addstream
)(
sout_instance_t
*
,
sout_input_t
*
);
int
(
*
pf_mux_delstream
)(
sout_instance_t
*
,
sout_input_t
*
);
int
(
*
pf_mux
)
(
sout_instance_t
*
);
vlc_mutex_t
lock
;
int
i_nb_inputs
;
sout_input_t
**
pp_inputs
;
};
/*****************************************************************************
* Prototypes
*****************************************************************************/
...
...
@@ -44,7 +119,21 @@ struct sout_instance_t
VLC_EXPORT
(
sout_instance_t
*
,
__sout_NewInstance
,
(
vlc_object_t
*
,
char
*
)
);
VLC_EXPORT
(
void
,
sout_DeleteInstance
,
(
sout_instance_t
*
)
);
sout_fifo_t
*
sout_CreateFifo
(
void
);
void
sout_DestroyFifo
(
sout_fifo_t
*
);
void
sout_FreeFifo
(
sout_fifo_t
*
);
VLC_EXPORT
(
sout_fifo_t
*
,
sout_FifoCreate
,
(
sout_instance_t
*
)
);
VLC_EXPORT
(
void
,
sout_FifoDestroy
,
(
sout_instance_t
*
,
sout_fifo_t
*
)
);
VLC_EXPORT
(
void
,
sout_FifoFree
,
(
sout_instance_t
*
,
sout_fifo_t
*
)
);
VLC_EXPORT
(
void
,
sout_FifoPut
,
(
sout_fifo_t
*
,
sout_buffer_t
*
)
);
VLC_EXPORT
(
sout_buffer_t
*
,
sout_FifoGet
,
(
sout_fifo_t
*
)
);
VLC_EXPORT
(
sout_buffer_t
*
,
sout_FifoShow
,
(
sout_fifo_t
*
)
);
#define sout_InputNew( a, b ) __sout_InputNew( VLC_OBJECT(a), b )
VLC_EXPORT
(
sout_input_t
*
,
__sout_InputNew
,
(
vlc_object_t
*
,
sout_packet_format_t
*
)
);
VLC_EXPORT
(
int
,
sout_InputDelete
,
(
sout_input_t
*
)
);
VLC_EXPORT
(
int
,
sout_InputSendBuffer
,
(
sout_input_t
*
,
sout_buffer_t
*
)
);
VLC_EXPORT
(
sout_buffer_t
*
,
sout_BufferNew
,
(
sout_instance_t
*
,
size_t
)
);
VLC_EXPORT
(
int
,
sout_BufferRealloc
,(
sout_instance_t
*
,
sout_buffer_t
*
,
size_t
)
);
VLC_EXPORT
(
int
,
sout_BufferDelete
,
(
sout_instance_t
*
,
sout_buffer_t
*
)
);
VLC_EXPORT
(
sout_buffer_t
*
,
sout_BufferDuplicate
,(
sout_instance_t
*
,
sout_buffer_t
*
)
);
include/vlc_common.h
View file @
f8bf106d
...
...
@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vlc_common.h,v 1.4
3
2002/12/1
3 01:56:29 gbazin
Exp $
* $Id: vlc_common.h,v 1.4
4
2002/12/1
4 21:32:41 fenrir
Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
...
...
@@ -241,6 +241,9 @@ typedef struct subpicture_sys_t subpicture_sys_t;
/* Stream output */
typedef
struct
sout_instance_t
sout_instance_t
;
typedef
struct
sout_fifo_t
sout_fifo_t
;
typedef
struct
sout_input_t
sout_input_t
;
typedef
struct
sout_buffer_t
sout_buffer_t
;
typedef
struct
sout_packet_format_t
sout_packet_format_t
;
/* Decoders */
typedef
struct
decoder_fifo_t
decoder_fifo_t
;
...
...
modules/Makefile.am
View file @
f8bf106d
...
...
@@ -8,6 +8,7 @@ EXTRA_DIST = \
access/satellite/Modules.am
\
access/v4l/Modules.am
\
access/vcd/Modules.am
\
access_output/Modules.am
\
audio_filter/channel_mixer/Modules.am
\
audio_filter/converter/Modules.am
\
audio_filter/resampler/Modules.am
\
...
...
@@ -53,6 +54,9 @@ EXTRA_DIST = \
misc/memcpy/Modules.am
\
misc/network/Modules.am
\
misc/testsuite/Modules.am
\
mux/Modules.am
\
mux/mpeg/Modules.am
\
packetizer/Modules.am
\
video_chroma/Modules.am
\
video_filter/Modules.am
\
video_filter/deinterlace/Modules.am
\
...
...
modules/access_output/.cvsignore
0 → 100644
View file @
f8bf106d
.deps
.dirstamp
modules/access_output/Modules.am
0 → 100644
View file @
f8bf106d
SOURCES_access_output_dummy = modules/access_output/dummy.c
SOURCES_access_output_file = modules/access_output/file.c
SOURCES_access_output_udp = modules/access_output/udp.c
modules/access_output/dummy.c
0 → 100644
View file @
f8bf106d
/*****************************************************************************
* dummy.c
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: dummy.c,v 1.1 2002/12/14 21:32:41 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Eric Petit <titer@videolan.org>
*
* 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
* 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
* GNU General Public License for more details.
*
* 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.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <vlc/vlc.h>
#include <vlc/input.h>
#include <vlc/sout.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#elif defined( _MSC_VER ) && defined( _WIN32 ) && !defined( UNDER_CE )
# include <io.h>
#endif
/*****************************************************************************
* Exported prototypes
*****************************************************************************/
static
int
Open
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
static
int
Write
(
sout_instance_t
*
,
sout_buffer_t
*
);
static
int
Seek
(
sout_instance_t
*
,
off_t
);
/*****************************************************************************
* Module descriptor
*****************************************************************************/
vlc_module_begin
();
set_description
(
_
(
"Dummy stream ouput"
)
);
set_capability
(
"sout access"
,
0
);
add_shortcut
(
"dummy"
);
set_callbacks
(
Open
,
Close
);
vlc_module_end
();
/*****************************************************************************
* Open: open the file
*****************************************************************************/
static
int
Open
(
vlc_object_t
*
p_this
)
{
sout_instance_t
*
p_sout
=
(
sout_instance_t
*
)
p_this
;
p_sout
->
i_method
=
SOUT_METHOD_NONE
;
p_sout
->
p_access_data
=
NULL
;
p_sout
->
pf_write
=
Write
;
p_sout
->
pf_seek
=
Seek
;
msg_Info
(
p_sout
,
"dummy stream output access launched"
);
return
VLC_SUCCESS
;
}
/*****************************************************************************
* Close: close the target
*****************************************************************************/
static
void
Close
(
vlc_object_t
*
p_this
)
{
sout_instance_t
*
p_sout
=
(
sout_instance_t
*
)
p_this
;
msg_Info
(
p_sout
,
"Close"
);
}
/*****************************************************************************
* Read: standard read on a file descriptor.
*****************************************************************************/
static
int
Write
(
sout_instance_t
*
p_sout
,
sout_buffer_t
*
p_buffer
)
{
size_t
i_write
=
0
;
do
{
sout_buffer_t
*
p_next
;
i_write
+=
p_buffer
->
i_size
;
p_next
=
p_buffer
->
p_next
;
sout_BufferDelete
(
p_sout
,
p_buffer
);
p_buffer
=
p_next
;
}
while
(
p_buffer
);
msg_Dbg
(
p_sout
,
"Dummy Skipped: len:%d"
,
(
uint32_t
)
i_write
);
return
(
i_write
);
}
/*****************************************************************************
* Seek: seek to a specific location in a file
*****************************************************************************/
static
int
Seek
(
sout_instance_t
*
p_sout
,
off_t
i_pos
)
{
msg_Dbg
(
p_sout
,
"Seek: pos:%lld"
,
(
int64_t
)
i_pos
);
return
(
0
);
}
modules/access_output/file.c
0 → 100644
View file @
f8bf106d
/*****************************************************************************
* file.c
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: file.c,v 1.1 2002/12/14 21:32:41 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Eric Petit <titer@videolan.org>
*
* 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
* 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
* GNU General Public License for more details.
*
* 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.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <vlc/vlc.h>
#include <vlc/input.h>
#include <vlc/sout.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#elif defined( _MSC_VER ) && defined( _WIN32 ) && !defined( UNDER_CE )
# include <io.h>
#endif
/*****************************************************************************
* Exported prototypes
*****************************************************************************/
static
int
Open
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
static
int
Write
(
sout_instance_t
*
,
sout_buffer_t
*
);
static
int
Seek
(
sout_instance_t
*
,
off_t
);
/*****************************************************************************
* Module descriptor
*****************************************************************************/
vlc_module_begin
();
set_description
(
_
(
"File stream ouput"
)
);
set_capability
(
"sout access"
,
50
);
add_shortcut
(
"file"
);
set_callbacks
(
Open
,
Close
);
vlc_module_end
();
typedef
struct
sout_access_data_s
{
FILE
*
p_file
;
}
sout_access_data_t
;
/*****************************************************************************
* Open: open the file
*****************************************************************************/
static
int
Open
(
vlc_object_t
*
p_this
)
{
sout_instance_t
*
p_sout
=
(
sout_instance_t
*
)
p_this
;
sout_access_data_t
*
p_access
;
char
*
psz_name
=
p_sout
->
psz_name
;
p_access
=
malloc
(
sizeof
(
sout_access_data_t
)
);
if
(
!
(
p_access
->
p_file
=
fopen
(
psz_name
,
"wb"
)
)
)
{
msg_Err
(
p_sout
,
"cannot open `%s'"
,
psz_name
);
free
(
p_access
);
return
(
-
1
);
}
p_sout
->
i_method
=
SOUT_METHOD_FILE
;
p_sout
->
p_access_data
=
p_access
;
p_sout
->
pf_write
=
Write
;
p_sout
->
pf_seek
=
Seek
;
msg_Info
(
p_sout
,
"Open: name:`%s'"
,
psz_name
);
return
VLC_SUCCESS
;
}
/*****************************************************************************
* Close: close the target
*****************************************************************************/
static
void
Close
(
vlc_object_t
*
p_this
)
{
sout_instance_t
*
p_sout
=
(
sout_instance_t
*
)
p_this
;
sout_access_data_t
*
p_access
=
(
sout_access_data_t
*
)
p_sout
->
p_access_data
;
if
(
p_access
->
p_file
)
{
fclose
(
p_access
->
p_file
);
}
msg_Info
(
p_sout
,
"Close"
);
}
/*****************************************************************************
* Read: standard read on a file descriptor.
*****************************************************************************/
static
int
Write
(
sout_instance_t
*
p_sout
,
sout_buffer_t
*
p_buffer
)
{
sout_access_data_t
*
p_access
=
(
sout_access_data_t
*
)
p_sout
->
p_access_data
;
size_t
i_write
=
0
;
do
{
sout_buffer_t
*
p_next
;
i_write
+=
fwrite
(
p_buffer
->
p_buffer
,
1
,
p_buffer
->
i_size
,
p_access
->
p_file
);
p_next
=
p_buffer
->
p_next
;
sout_BufferDelete
(
p_sout
,
p_buffer
);
p_buffer
=
p_next
;
}
while
(
p_buffer
);
msg_Dbg
(
p_sout
,
"Write: len:%d"
,
(
uint32_t
)
i_write
);
return
(
i_write
);
}
/*****************************************************************************
* Seek: seek to a specific location in a file
*****************************************************************************/
static
int
Seek
(
sout_instance_t
*
p_sout
,
off_t
i_pos
)
{
sout_access_data_t
*
p_access
=
(
sout_access_data_t
*
)
p_sout
->
p_access_data
;
msg_Dbg
(
p_sout
,
"Seek: pos:%lld"
,
(
int64_t
)
i_pos
);
return
(
fseek
(
p_access
->
p_file
,
i_pos
,
SEEK_SET
)
);
}
modules/access_output/udp.c
0 → 100644
View file @
f8bf106d
/*****************************************************************************
* udp.c
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: udp.c,v 1.1 2002/12/14 21:32:41 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Eric Petit <titer@videolan.org>
*
* 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
* 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
* GNU General Public License for more details.
*
* 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.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <vlc/vlc.h>
#include <vlc/input.h>
#include <vlc/sout.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#elif defined( _MSC_VER ) && defined( _WIN32 ) && !defined( UNDER_CE )
# include <io.h>
#endif
#ifdef WIN32
# include <winsock2.h>
# include <ws2tcpip.h>
# ifndef IN_MULTICAST
# define IN_MULTICAST(a) IN_CLASSD(a)
# endif
#else
# include <sys/socket.h>
#endif
#include "network.h"
#define DEFAULT_PORT 1234
#define LATENCY 100000
#define MAX_ERROR 500000
/*****************************************************************************
* Exported prototypes
*****************************************************************************/
static
int
Open
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
static
int
Write
(
sout_instance_t
*
,
sout_buffer_t
*
);
static
int
Seek
(
sout_instance_t
*
,
off_t
);
static
void
ThreadWrite
(
vlc_object_t
*
p_this
);
/*****************************************************************************
* Module descriptor
*****************************************************************************/
vlc_module_begin
();
set_description
(
_
(
"UDP stream ouput"
)
);
set_capability
(
"sout access"
,
100
);
add_shortcut
(
"udp"
);
add_shortcut
(
"rtp"
);
// Will work only with ts muxer
set_callbacks
(
Open
,
Close
);
vlc_module_end
();
typedef
struct
sout_access_thread_s
{
VLC_COMMON_MEMBERS
sout_instance_t
*
p_sout
;
sout_fifo_t
*
p_fifo
;
int
i_handle
;
}
sout_access_thread_t
;
typedef
struct
sout_access_data_s
{
int
b_rtpts
;
// 1 if add rtp/ts header
uint16_t
i_sequence_number
;
uint32_t
i_ssrc
;
int
i_mtu
;
sout_buffer_t
*
p_buffer
;
sout_access_thread_t
*
p_thread
;
}
sout_access_data_t
;
/*****************************************************************************
* Open: open the file
*****************************************************************************/
static
int
Open
(
vlc_object_t
*
p_this
)
{
sout_instance_t
*
p_sout
=
(
sout_instance_t
*
)
p_this
;
sout_access_data_t
*
p_access
;
char
*
psz_parser
;
char
*
psz_dst_addr
;
int
i_dst_port
;
module_t
*
p_network
;
network_socket_t
socket_desc
;
if
(
!
(
p_access
=
malloc
(
sizeof
(
sout_access_data_t
)
)
)
)
{
msg_Err
(
p_sout
,
"Not enough memory"
);
return
(
-
1
);
}
if
(
p_sout
->
psz_access
!=
NULL
&&
!
strcmp
(
p_sout
->
psz_access
,
"rtp"
)
)
{
if
(
p_sout
->
psz_mux
!=
NULL
&&
strcmp
(
p_sout
->
psz_mux
,
"ts"
)
)