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
50390eee
Commit
50390eee
authored
Jul 25, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: adaptative: pass language to stream & es
parent
ee31841e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
2 deletions
+25
-2
modules/demux/adaptative/Streams.cpp
modules/demux/adaptative/Streams.cpp
+21
-2
modules/demux/adaptative/Streams.hpp
modules/demux/adaptative/Streams.hpp
+4
-0
No files found.
modules/demux/adaptative/Streams.cpp
View file @
50390eee
...
@@ -86,6 +86,12 @@ void Stream::updateFormat(StreamFormat &newformat)
...
@@ -86,6 +86,12 @@ void Stream::updateFormat(StreamFormat &newformat)
output
=
streamOutputFactory
->
create
(
p_demux
,
format
);
output
=
streamOutputFactory
->
create
(
p_demux
,
format
);
if
(
!
output
)
if
(
!
output
)
throw
VLC_EGENERIC
;
throw
VLC_EGENERIC
;
output
->
setLanguage
(
language
);
}
void
Stream
::
setLanguage
(
const
std
::
string
&
lang
)
{
language
=
lang
;
}
}
bool
Stream
::
isEOF
()
const
bool
Stream
::
isEOF
()
const
...
@@ -318,6 +324,11 @@ AbstractStreamOutput::AbstractStreamOutput(demux_t *demux, const StreamFormat &f
...
@@ -318,6 +324,11 @@ AbstractStreamOutput::AbstractStreamOutput(demux_t *demux, const StreamFormat &f
format
=
format_
;
format
=
format_
;
}
}
void
AbstractStreamOutput
::
setLanguage
(
const
std
::
string
&
lang
)
{
language
=
lang
;
}
const
StreamFormat
&
AbstractStreamOutput
::
getStreamFormat
()
const
const
StreamFormat
&
AbstractStreamOutput
::
getStreamFormat
()
const
{
{
return
format
;
return
format
;
...
@@ -633,13 +644,21 @@ es_out_id_t * BaseStreamOutput::esOutAdd(const es_format_t *p_fmt)
...
@@ -633,13 +644,21 @@ es_out_id_t * BaseStreamOutput::esOutAdd(const es_format_t *p_fmt)
if
(
!
p_es
)
if
(
!
p_es
)
{
{
p_es
=
realdemux
->
out
->
pf_add
(
realdemux
->
out
,
p_fmt
);
es_format_t
fmtcpy
;
es_format_Init
(
&
fmtcpy
,
p_fmt
->
i_cat
,
p_fmt
->
i_codec
);
es_format_Copy
(
&
fmtcpy
,
p_fmt
);
if
(
!
fmtcpy
.
psz_language
&&
!
language
.
empty
())
fmtcpy
.
psz_language
=
strdup
(
language
.
c_str
());
if
(
!
fmtcpy
.
psz_description
&&
!
description
.
empty
())
fmtcpy
.
psz_description
=
strdup
(
description
.
c_str
());
p_es
=
realdemux
->
out
->
pf_add
(
realdemux
->
out
,
&
fmtcpy
);
if
(
p_es
)
if
(
p_es
)
{
{
Demuxed
*
pair
=
new
(
std
::
nothrow
)
Demuxed
(
p_es
,
p_fmt
);
Demuxed
*
pair
=
new
(
std
::
nothrow
)
Demuxed
(
p_es
,
&
fmtcpy
);
if
(
pair
)
if
(
pair
)
queues
.
push_back
(
pair
);
queues
.
push_back
(
pair
);
}
}
es_format_Clean
(
&
fmtcpy
);
}
}
vlc_mutex_unlock
(
&
lock
);
vlc_mutex_unlock
(
&
lock
);
...
...
modules/demux/adaptative/Streams.hpp
View file @
50390eee
...
@@ -68,6 +68,7 @@ namespace adaptative
...
@@ -68,6 +68,7 @@ namespace adaptative
void
create
(
AbstractAdaptationLogic
*
,
SegmentTracker
*
,
void
create
(
AbstractAdaptationLogic
*
,
SegmentTracker
*
,
const
AbstractStreamOutputFactory
*
);
const
AbstractStreamOutputFactory
*
);
void
updateFormat
(
StreamFormat
&
);
void
updateFormat
(
StreamFormat
&
);
void
setLanguage
(
const
std
::
string
&
);
bool
isEOF
()
const
;
bool
isEOF
()
const
;
mtime_t
getPCR
()
const
;
mtime_t
getPCR
()
const
;
mtime_t
getFirstDTS
()
const
;
mtime_t
getFirstDTS
()
const
;
...
@@ -95,6 +96,7 @@ namespace adaptative
...
@@ -95,6 +96,7 @@ namespace adaptative
SegmentChunk
*
currentChunk
;
SegmentChunk
*
currentChunk
;
bool
disabled
;
bool
disabled
;
bool
eof
;
bool
eof
;
std
::
string
language
;
const
AbstractStreamOutputFactory
*
streamOutputFactory
;
const
AbstractStreamOutputFactory
*
streamOutputFactory
;
};
};
...
@@ -105,6 +107,7 @@ namespace adaptative
...
@@ -105,6 +107,7 @@ namespace adaptative
AbstractStreamOutput
(
demux_t
*
,
const
StreamFormat
&
);
AbstractStreamOutput
(
demux_t
*
,
const
StreamFormat
&
);
virtual
~
AbstractStreamOutput
();
virtual
~
AbstractStreamOutput
();
void
setLanguage
(
const
std
::
string
&
);
const
StreamFormat
&
getStreamFormat
()
const
;
const
StreamFormat
&
getStreamFormat
()
const
;
virtual
void
pushBlock
(
block_t
*
,
bool
)
=
0
;
virtual
void
pushBlock
(
block_t
*
,
bool
)
=
0
;
virtual
mtime_t
getPCR
()
const
;
virtual
mtime_t
getPCR
()
const
;
...
@@ -123,6 +126,7 @@ namespace adaptative
...
@@ -123,6 +126,7 @@ namespace adaptative
demux_t
*
realdemux
;
demux_t
*
realdemux
;
mtime_t
pcr
;
mtime_t
pcr
;
int
group
;
int
group
;
std
::
string
language
;
private:
private:
StreamFormat
format
;
StreamFormat
format
;
...
...
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