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
02c03381
Commit
02c03381
authored
Jan 08, 2003
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* all: added a new function (sout_BufferChain) and allowed dummy
stream input creation (with "null" fourcc).
parent
d170ec7c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
10 deletions
+41
-10
include/stream_output.h
include/stream_output.h
+3
-1
src/stream_output/stream_output.c
src/stream_output/stream_output.c
+38
-9
No files found.
include/stream_output.h
View file @
02c03381
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* stream_output.h : stream output module
* stream_output.h : stream output module
*****************************************************************************
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* Copyright (C) 2002 VideoLAN
* $Id: stream_output.h,v 1.
2 2002/12/14 21:32:41
fenrir Exp $
* $Id: stream_output.h,v 1.
3 2003/01/08 10:38:32
fenrir Exp $
*
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Laurent Aimar <fenrir@via.ecp.fr>
* Laurent Aimar <fenrir@via.ecp.fr>
...
@@ -137,3 +137,5 @@ VLC_EXPORT( sout_buffer_t*, sout_BufferNew, ( sout_instance_t *, size_t ) );
...
@@ -137,3 +137,5 @@ 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_BufferRealloc
,(
sout_instance_t
*
,
sout_buffer_t
*
,
size_t
)
);
VLC_EXPORT
(
int
,
sout_BufferDelete
,
(
sout_instance_t
*
,
sout_buffer_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
*
)
);
VLC_EXPORT
(
sout_buffer_t
*
,
sout_BufferDuplicate
,(
sout_instance_t
*
,
sout_buffer_t
*
)
);
VLC_EXPORT
(
void
,
sout_BufferChain
,
(
sout_buffer_t
**
,
sout_buffer_t
*
)
);
src/stream_output/stream_output.c
View file @
02c03381
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* stream_output.c : stream output module
* stream_output.c : stream output module
*****************************************************************************
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* Copyright (C) 2002 VideoLAN
* $Id: stream_output.c,v 1.
6 2002/12/14 21:32:4
2 fenrir Exp $
* $Id: stream_output.c,v 1.
7 2003/01/08 10:38:3
2 fenrir Exp $
*
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Laurent Aimar <fenrir@via.ecp.fr>
* Laurent Aimar <fenrir@via.ecp.fr>
...
@@ -273,7 +273,8 @@ sout_input_t *__sout_InputNew( vlc_object_t *p_this,
...
@@ -273,7 +273,8 @@ sout_input_t *__sout_InputNew( vlc_object_t *p_this,
p_sout
->
pp_inputs
[
p_sout
->
i_nb_inputs
]
=
p_input
;
p_sout
->
pp_inputs
[
p_sout
->
i_nb_inputs
]
=
p_input
;
p_sout
->
i_nb_inputs
++
;
p_sout
->
i_nb_inputs
++
;
if
(
p_sout
->
pf_mux_addstream
(
p_sout
,
p_input
)
<
0
)
if
(
p_input
->
input_format
.
i_fourcc
!=
VLC_FOURCC
(
'n'
,
'u'
,
'l'
,
'l'
)
&&
p_sout
->
pf_mux_addstream
(
p_sout
,
p_input
)
<
0
)
{
{
/* vlc_mutex_unlock( &p_sout->lock ); */
/* vlc_mutex_unlock( &p_sout->lock ); */
msg_Err
(
p_sout
,
"cannot add this stream"
);
msg_Err
(
p_sout
,
"cannot add this stream"
);
...
@@ -310,7 +311,8 @@ int sout_InputDelete( sout_input_t *p_input )
...
@@ -310,7 +311,8 @@ int sout_InputDelete( sout_input_t *p_input )
msg_Dbg
(
p_sout
,
"removing an input"
);
msg_Dbg
(
p_sout
,
"removing an input"
);
if
(
p_sout
->
pf_mux_delstream
(
p_sout
,
p_input
)
<
0
)
if
(
p_input
->
input_format
.
i_fourcc
!=
VLC_FOURCC
(
'n'
,
'u'
,
'l'
,
'l'
)
&&
p_sout
->
pf_mux_delstream
(
p_sout
,
p_input
)
<
0
)
{
{
msg_Err
(
p_sout
,
"cannot del this stream"
);
msg_Err
(
p_sout
,
"cannot del this stream"
);
/* FIXME FIXME */
/* FIXME FIXME */
...
@@ -329,8 +331,6 @@ int sout_InputDelete( sout_input_t *p_input )
...
@@ -329,8 +331,6 @@ int sout_InputDelete( sout_input_t *p_input )
}
}
p_sout
->
i_nb_inputs
--
;
p_sout
->
i_nb_inputs
--
;
/* FIXME --> send message to mux to declare this stream removing */
sout_FifoDestroy
(
p_sout
,
p_input
->
p_fifo
);
sout_FifoDestroy
(
p_sout
,
p_input
->
p_fifo
);
vlc_mutex_destroy
(
&
p_input
->
lock
);
vlc_mutex_destroy
(
&
p_input
->
lock
);
free
(
p_input
);
free
(
p_input
);
...
@@ -349,11 +349,21 @@ int sout_InputSendBuffer( sout_input_t *p_input, sout_buffer_t *p_buffer )
...
@@ -349,11 +349,21 @@ int sout_InputSendBuffer( sout_input_t *p_input, sout_buffer_t *p_buffer )
{
{
/* msg_Dbg( p_input->p_sout,
/* msg_Dbg( p_input->p_sout,
"send buffer, size:%d", p_buffer->i_size ); */
"send buffer, size:%d", p_buffer->i_size ); */
if
(
p_input
->
input_format
.
i_fourcc
!=
VLC_FOURCC
(
'n'
,
'u'
,
'l'
,
'l'
)
)
{
sout_FifoPut
(
p_input
->
p_fifo
,
p_buffer
);
sout_FifoPut
(
p_input
->
p_fifo
,
p_buffer
);
vlc_mutex_lock
(
&
p_input
->
p_sout
->
lock
);
vlc_mutex_lock
(
&
p_input
->
p_sout
->
lock
);
p_input
->
p_sout
->
pf_mux
(
p_input
->
p_sout
);
p_input
->
p_sout
->
pf_mux
(
p_input
->
p_sout
);
vlc_mutex_unlock
(
&
p_input
->
p_sout
->
lock
);
vlc_mutex_unlock
(
&
p_input
->
p_sout
->
lock
);
}
else
{
sout_BufferDelete
(
p_input
->
p_sout
,
p_buffer
);
}
return
(
0
);
return
(
0
);
}
}
...
@@ -538,3 +548,22 @@ sout_buffer_t *sout_BufferDuplicate( sout_instance_t *p_sout,
...
@@ -538,3 +548,22 @@ sout_buffer_t *sout_BufferDuplicate( sout_instance_t *p_sout,
return
(
p_dup
);
return
(
p_dup
);
}
}
void
sout_BufferChain
(
sout_buffer_t
**
pp_chain
,
sout_buffer_t
*
p_buffer
)
{
if
(
*
pp_chain
==
NULL
)
{
*
pp_chain
=
p_buffer
;
}
else
{
sout_buffer_t
*
p
=
*
pp_chain
;
while
(
p
->
p_next
)
{
p
=
p
->
p_next
;
}
p
->
p_next
=
p_buffer
;
}
}
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