Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
3258f429
Commit
3258f429
authored
Jul 17, 2015
by
François Cartegnie
🤞
Browse files
demux: adaptative: report es selection
parent
c7e83e1c
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/demux/adaptative/Streams.cpp
View file @
3258f429
...
...
@@ -141,6 +141,11 @@ bool Stream::seekAble() const
return
(
output
&&
output
->
seekAble
());
}
bool
Stream
::
isSelected
()
const
{
return
output
&&
output
->
isSelected
();
}
Stream
::
status
Stream
::
demux
(
HTTPConnectionManager
*
connManager
,
mtime_t
nz_deadline
,
bool
send
)
{
if
(
!
output
)
...
...
@@ -442,6 +447,21 @@ bool BaseStreamOutput::switchAllowed() const
return
b_allowed
;
}
bool
BaseStreamOutput
::
isSelected
()
const
{
bool
b_selected
=
false
;
vlc_mutex_lock
(
const_cast
<
vlc_mutex_t
*>
(
&
lock
));
std
::
list
<
Demuxed
*>::
const_iterator
it
;
for
(
it
=
queues
.
begin
();
it
!=
queues
.
end
()
&&
!
b_selected
;
++
it
)
{
const
Demuxed
*
pair
=
*
it
;
if
(
pair
->
es_id
)
es_out_Control
(
realdemux
->
out
,
ES_OUT_GET_ES_STATE
,
pair
->
es_id
,
&
b_selected
);
}
vlc_mutex_unlock
(
const_cast
<
vlc_mutex_t
*>
(
&
lock
));
return
b_selected
;
}
void
BaseStreamOutput
::
sendToDecoder
(
mtime_t
nzdeadline
)
{
vlc_mutex_lock
(
&
lock
);
...
...
modules/demux/adaptative/Streams.hpp
View file @
3258f429
...
...
@@ -74,6 +74,7 @@ namespace adaptative
int
getGroup
()
const
;
int
esCount
()
const
;
bool
seekAble
()
const
;
bool
isSelected
()
const
;
typedef
enum
{
status_eof
,
status_buffering
,
status_demuxed
}
status
;
status
demux
(
HTTPConnectionManager
*
,
mtime_t
,
bool
);
bool
setPosition
(
mtime_t
,
bool
);
...
...
@@ -112,6 +113,7 @@ namespace adaptative
virtual
void
sendToDecoder
(
mtime_t
)
=
0
;
virtual
bool
reinitsOnSeek
()
const
=
0
;
virtual
bool
switchAllowed
()
const
=
0
;
virtual
bool
isSelected
()
const
=
0
;
protected:
demux_t
*
realdemux
;
...
...
@@ -142,6 +144,7 @@ namespace adaptative
virtual
void
sendToDecoder
(
mtime_t
);
/* reimpl */
virtual
bool
reinitsOnSeek
()
const
;
/* reimpl */
virtual
bool
switchAllowed
()
const
;
/* reimpl */
virtual
bool
isSelected
()
const
;
/* reimpl */
void
setTimestampOffset
(
mtime_t
);
protected:
...
...
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