Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
aa102fee
Commit
aa102fee
authored
Dec 02, 2010
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Revert "input: Fill in the input_item es""
This reverts commit
2ca4cf27
.
parent
d61f3b7f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
0 deletions
+36
-0
src/input/es_out.c
src/input/es_out.c
+3
-0
src/input/item.c
src/input/item.c
+32
-0
src/input/item.h
src/input/item.h
+1
-0
No files found.
src/input/es_out.c
View file @
aa102fee
...
...
@@ -45,6 +45,7 @@
#include "es_out.h"
#include "event.h"
#include "info.h"
#include "item.h"
#include "../stream_output/stream_output.h"
...
...
@@ -2855,6 +2856,8 @@ static void EsOutUpdateInfo( es_out_t *out, es_out_id_t *es, const es_format_t *
const
es_format_t
*
p_fmt_es
=
&
es
->
fmt
;
lldiv_t
div
;
input_item_UpdateTracksInfo
(
input_GetItem
(
p_input
),
fmt
);
/* Create category */
char
psz_cat
[
128
];
snprintf
(
psz_cat
,
sizeof
(
psz_cat
),
_
(
"Stream %d"
),
es
->
i_meta_id
);
...
...
src/input/item.c
View file @
aa102fee
...
...
@@ -1050,3 +1050,35 @@ void input_item_node_PostAndDelete( input_item_node_t *p_root )
input_item_node_Delete
(
p_root
);
}
/* Called by es_out when a new Elementary Stream is added or updated. */
void
input_item_UpdateTracksInfo
(
input_item_t
*
item
,
const
es_format_t
*
fmt
)
{
int
i
;
es_format_t
*
fmt_copy
=
malloc
(
sizeof
*
fmt_copy
);
if
(
!
fmt_copy
)
return
;
es_format_Copy
(
fmt_copy
,
fmt
);
/* XXX: we could free p_extra to save memory, we will likely not need
* the decoder specific data */
vlc_mutex_lock
(
&
item
->
lock
);
for
(
i
=
0
;
i
<
item
->
i_es
;
i
++
)
{
if
(
item
->
es
[
i
]
->
i_id
!=
fmt
->
i_id
)
continue
;
/* We've found the right ES, replace it */
es_format_Clean
(
item
->
es
[
i
]);
free
(
item
->
es
[
i
]);
item
->
es
[
i
]
=
fmt_copy
;
vlc_mutex_unlock
(
&
item
->
lock
);
return
;
}
/* ES not found, insert it */
TAB_APPEND
(
item
->
i_es
,
item
->
es
,
fmt_copy
);
vlc_mutex_unlock
(
&
item
->
lock
);
}
src/input/item.h
View file @
aa102fee
...
...
@@ -27,5 +27,6 @@
#include "input_interface.h"
void
input_item_SetErrorWhenReading
(
input_item_t
*
p_i
,
bool
b_error
);
void
input_item_UpdateTracksInfo
(
input_item_t
*
item
,
const
es_format_t
*
fmt
);
#endif
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