Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
e87abf62
Commit
e87abf62
authored
Feb 28, 2007
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reworked/improved the way sout-keep works. (VLM sout-keep does not
work again yet )
parent
0bf39ed3
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
187 additions
and
100 deletions
+187
-100
src/input/input.c
src/input/input.c
+173
-48
src/input/input_internal.h
src/input/input_internal.h
+5
-2
src/input/vlm.c
src/input/vlm.c
+6
-8
src/playlist/engine.c
src/playlist/engine.c
+3
-0
src/stream_output/stream_output.c
src/stream_output/stream_output.c
+0
-42
No files found.
src/input/input.c
View file @
e87abf62
This diff is collapsed.
Click to expand it.
src/input/input_internal.h
View file @
e87abf62
...
...
@@ -93,6 +93,7 @@ struct input_thread_private_t
/* Output */
es_out_t
*
p_es_out
;
sout_instance_t
*
p_sout
;
/* XXX Move it to es_out ? */
vlc_bool_t
b_sout_keep
;
vlc_bool_t
b_out_pace_control
;
/* idem ? */
/* Main input properties */
...
...
@@ -225,8 +226,10 @@ int input_DownloadAndCacheArt ( playlist_t *, input_item_t * );
***************************************************************************/
/* input.c */
#define input_CreateThread2(a,b,c) __input_CreateThread2(VLC_OBJECT(a),b,c)
input_thread_t
*
__input_CreateThread2
(
vlc_object_t
*
,
input_item_t
*
,
const
char
*
);
#define input_CreateThreadExtended(a,b,c,d) __input_CreateThreadExtended(VLC_OBJECT(a),b,c,d)
input_thread_t
*
__input_CreateThreadExtended
(
vlc_object_t
*
,
input_item_t
*
,
const
char
*
,
sout_instance_t
*
);
void
input_DestroyThreadExtended
(
input_thread_t
*
p_input
,
sout_instance_t
**
);
/* var.c */
void
input_ControlVarInit
(
input_thread_t
*
);
...
...
src/input/vlm.c
View file @
e87abf62
...
...
@@ -1140,14 +1140,13 @@ int vlm_MediaSetup( vlm_t *vlm, vlm_media_t *media, const char *psz_cmd,
asprintf
(
&
psz_header
,
_
(
"Media: %s"
),
media
->
psz_name
);
if
(
(
p_input
=
input_CreateThread2
(
vlm
,
&
media
->
item
,
psz_header
)
)
)
if
(
(
p_input
=
input_CreateThreadExtended
(
vlm
,
&
media
->
item
,
psz_header
,
NULL
)
)
)
{
while
(
!
p_input
->
b_eof
&&
!
p_input
->
b_error
)
msleep
(
100000
);
input_StopThread
(
p_input
);
input_DestroyThread
(
p_input
);
input_DestroyThread
Extended
(
p_input
,
NULL
);
}
free
(
psz_output
);
free
(
psz_header
);
...
...
@@ -1242,12 +1241,11 @@ int vlm_MediaControl( vlm_t *vlm, vlm_media_t *media, const char *psz_id,
if
(
p_instance
->
p_input
)
{
input_StopThread
(
p_instance
->
p_input
);
input_DestroyThread
(
p_instance
->
p_input
);
input_DestroyThread
Extended
(
p_instance
->
p_input
,
NULL
);
}
asprintf
(
&
psz_header
,
_
(
"Media: %s"
),
media
->
psz_name
);
p_instance
->
p_input
=
input_CreateThread2
(
vlm
,
&
p_instance
->
item
,
psz_header
);
p_instance
->
p_input
=
input_CreateThreadExtended
(
vlm
,
&
p_instance
->
item
,
psz_header
,
NULL
);
if
(
!
p_instance
->
p_input
)
{
TAB_REMOVE
(
media
->
i_instance
,
media
->
instance
,
p_instance
);
...
...
@@ -1361,7 +1359,7 @@ int vlm_MediaControl( vlm_t *vlm, vlm_media_t *media, const char *psz_id,
if
(
p_instance
->
p_input
)
{
input_StopThread
(
p_instance
->
p_input
);
input_DestroyThread
(
p_instance
->
p_input
);
input_DestroyThread
Extended
(
p_instance
->
p_input
,
NULL
);
}
input_ItemClean
(
&
p_instance
->
item
);
...
...
@@ -2502,7 +2500,7 @@ static int Manage( vlc_object_t* p_object )
char
buffer
[
12
];
input_StopThread
(
p_instance
->
p_input
);
input_DestroyThread
(
p_instance
->
p_input
);
input_DestroyThread
Extended
(
p_instance
->
p_input
,
NULL
);
p_instance
->
p_input
=
NULL
;
/* FIXME, find a way to select the right instance */
...
...
src/playlist/engine.c
View file @
e87abf62
...
...
@@ -210,6 +210,8 @@ static void ObjectGarbageCollector( playlist_t *p_playlist )
vlc_object_release
(
p_obj
);
break
;
}
msg_Dbg
(
p_playlist
,
"garbage collector destroying 1 sout"
);
vlc_object_detach
(
p_obj
);
vlc_object_release
(
p_obj
);
sout_DeleteInstance
(
(
sout_instance_t
*
)
p_obj
);
}
...
...
@@ -409,6 +411,7 @@ void playlist_LastLoop( playlist_t *p_playlist )
while
(
(
p_obj
=
vlc_object_find
(
p_playlist
,
VLC_OBJECT_SOUT
,
FIND_CHILD
)
)
)
{
vlc_object_detach
(
p_obj
);
vlc_object_release
(
p_obj
);
sout_DeleteInstance
(
(
sout_instance_t
*
)
p_obj
);
}
...
...
src/stream_output/stream_output.c
View file @
e87abf62
...
...
@@ -73,45 +73,6 @@ static void mrl_Clean( mrl_t *p_mrl );
sout_instance_t
*
__sout_NewInstance
(
vlc_object_t
*
p_parent
,
char
*
psz_dest
)
{
sout_instance_t
*
p_sout
;
vlc_value_t
keep
;
if
(
var_Get
(
p_parent
,
"sout-keep"
,
&
keep
)
>=
0
&&
keep
.
b_bool
)
{
/* Remove the sout from the playlist garbage collector */
playlist_t
*
p_playlist
=
pl_Yield
(
p_parent
);
vlc_mutex_lock
(
&
p_playlist
->
gc_lock
);
p_sout
=
vlc_object_find
(
p_playlist
,
VLC_OBJECT_SOUT
,
FIND_CHILD
);
if
(
p_sout
&&
p_sout
->
p_parent
!=
(
vlc_object_t
*
)
p_playlist
)
{
vlc_object_release
(
p_sout
);
p_sout
=
NULL
;
}
if
(
p_sout
)
vlc_object_detach
(
p_sout
);
/* Remove it from the GC */
vlc_mutex_unlock
(
&
p_playlist
->
gc_lock
);
pl_Release
(
p_parent
);
/* */
if
(
p_sout
)
{
if
(
!
strcmp
(
p_sout
->
psz_sout
,
psz_dest
)
)
{
msg_Dbg
(
p_parent
,
"sout keep: reusing sout"
);
msg_Dbg
(
p_parent
,
"sout keep: you probably want to use "
"gather stream_out"
);
vlc_object_attach
(
p_sout
,
p_parent
);
vlc_object_release
(
p_sout
);
return
p_sout
;
}
msg_Dbg
(
p_parent
,
"sout keep: destroying unusable sout"
);
vlc_object_release
(
p_sout
);
sout_DeleteInstance
(
p_sout
);
}
}
/* *** Allocate descriptor *** */
p_sout
=
vlc_object_create
(
p_parent
,
VLC_OBJECT_SOUT
);
...
...
@@ -164,9 +125,6 @@ sout_instance_t *__sout_NewInstance( vlc_object_t *p_parent, char * psz_dest )
*****************************************************************************/
void
sout_DeleteInstance
(
sout_instance_t
*
p_sout
)
{
/* Unlink object */
vlc_object_detach
(
p_sout
);
/* remove the stream out chain */
sout_StreamDelete
(
p_sout
->
p_stream
);
...
...
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