Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
8fa83541
Commit
8fa83541
authored
6 years ago
by
Philippe Gorley
Committed by
Philippe Gorley
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
encoder: get stream info parameters
Change-Id: I5f8fb9802290974a9cc74f535ff22365b56e50c6
parent
7226d738
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/media/media_encoder.cpp
+14
-0
14 additions, 0 deletions
src/media/media_encoder.cpp
src/media/media_encoder.h
+2
-0
2 additions, 0 deletions
src/media/media_encoder.h
with
16 additions
and
0 deletions
src/media/media_encoder.cpp
+
14
−
0
View file @
8fa83541
...
...
@@ -636,4 +636,18 @@ MediaEncoder::getStreamCount() const
return
0
;
}
MediaStream
MediaEncoder
::
getStream
(
const
std
::
string
&
name
,
int
streamIdx
)
const
{
// if streamIdx is negative, use currentStreamIdx_
if
(
streamIdx
<
0
)
streamIdx
=
currentStreamIdx_
;
// make sure streamIdx is valid
if
(
getStreamCount
()
<=
0
||
streamIdx
<
0
||
encoders_
.
size
()
<
(
unsigned
)(
streamIdx
+
1
))
return
{};
auto
enc
=
encoders_
[
streamIdx
];
// TODO set firstTimestamp
return
MediaStream
(
name
,
enc
);
}
}
// namespace ring
This diff is collapsed.
Click to expand it.
src/media/media_encoder.h
+
2
−
0
View file @
8fa83541
...
...
@@ -32,6 +32,7 @@
#include
"media_buffer.h"
#include
"media_codec.h"
#include
"media_device.h"
#include
"media_stream.h"
#include
<map>
#include
<memory>
...
...
@@ -97,6 +98,7 @@ public:
bool
useCodec
(
const
AccountCodecInfo
*
codec
)
const
noexcept
;
unsigned
getStreamCount
()
const
;
MediaStream
getStream
(
const
std
::
string
&
name
,
int
streamIdx
=
-
1
)
const
;
private
:
NON_COPYABLE
(
MediaEncoder
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment