Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
mediastreamer2
Commits
aede223b
Commit
aede223b
authored
Apr 25, 2018
by
François Grisez
Browse files
Reorganize interfaces
parent
3cedee87
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
22 deletions
+22
-22
src/voip/rfc3984.cpp
src/voip/rfc3984.cpp
+1
-1
src/voip/rfc3984.hpp
src/voip/rfc3984.hpp
+21
-21
No files found.
src/voip/rfc3984.cpp
View file @
aede223b
...
...
@@ -218,7 +218,7 @@ void H264NaluToFuaSpliter::feedNalu(mblk_t *nalu) {
// Unpacker
// ========
Unpacker
::
Unpacker
(
Nalu
AggregatorInterface
*
aggregator
,
Nalu
SpliterInterface
*
spliter
)
:
_naluAggregator
(
aggregator
),
_naluSpliter
(
spliter
)
{
Unpacker
::
Unpacker
(
AggregatorInterface
*
aggregator
,
SpliterInterface
*
spliter
)
:
_naluAggregator
(
aggregator
),
_naluSpliter
(
spliter
)
{
ms_queue_init
(
&
_q
);
}
...
...
src/voip/rfc3984.hpp
View file @
aede223b
...
...
@@ -33,22 +33,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
namespace
mediastreamer2
{
class
NaluAggregatorInterface
{
public:
virtual
~
NaluAggregatorInterface
()
=
default
;
virtual
mblk_t
*
feedNalu
(
mblk_t
*
nalu
)
=
0
;
virtual
bool
isAggregating
()
const
=
0
;
virtual
void
reset
()
=
0
;
virtual
mblk_t
*
completeAggregation
()
=
0
;
};
class
NaluSpliterInterface
{
public:
virtual
~
NaluSpliterInterface
()
=
default
;
virtual
void
feedNalu
(
mblk_t
*
nalu
)
=
0
;
virtual
MSQueue
*
getNalus
()
=
0
;
};
class
Packer
{
public:
enum
PacketizationMode
{
...
...
@@ -170,7 +154,23 @@ public:
};
typedef
std
::
bitset
<
3
>
Status
;
Unpacker
(
NaluAggregatorInterface
*
aggregator
,
NaluSpliterInterface
*
spliter
);
class
AggregatorInterface
{
public:
virtual
~
AggregatorInterface
()
=
default
;
virtual
mblk_t
*
feedNalu
(
mblk_t
*
nalu
)
=
0
;
virtual
bool
isAggregating
()
const
=
0
;
virtual
void
reset
()
=
0
;
virtual
mblk_t
*
completeAggregation
()
=
0
;
};
class
SpliterInterface
{
public:
virtual
~
SpliterInterface
()
=
default
;
virtual
void
feedNalu
(
mblk_t
*
nalu
)
=
0
;
virtual
MSQueue
*
getNalus
()
=
0
;
};
Unpacker
(
AggregatorInterface
*
aggregator
,
SpliterInterface
*
spliter
);
virtual
~
Unpacker
()
{
ms_queue_flush
(
&
_q
);}
/**
...
...
@@ -200,8 +200,8 @@ protected:
uint32_t
_lastTs
=
0x943FEA43
;
bool
_initializedRefCSeq
=
false
;
uint16_t
_refCSeq
=
0
;
std
::
unique_ptr
<
Nalu
AggregatorInterface
>
_naluAggregator
;
std
::
unique_ptr
<
Nalu
SpliterInterface
>
_naluSpliter
;
std
::
unique_ptr
<
AggregatorInterface
>
_naluAggregator
;
std
::
unique_ptr
<
SpliterInterface
>
_naluSpliter
;
};
class
H264Tools
{
...
...
@@ -210,7 +210,7 @@ public:
static
mblk_t
*
prependFuIndicatorAndHeader
(
mblk_t
*
m
,
uint8_t
indicator
,
bool_t
start
,
bool_t
end
,
uint8_t
type
);
};
class
H264FUAAggregator
:
public
Nalu
AggregatorInterface
{
class
H264FUAAggregator
:
public
Unpacker
::
AggregatorInterface
{
public:
~
H264FUAAggregator
()
{
if
(
_m
)
freemsg
(
_m
);}
mblk_t
*
feedNalu
(
mblk_t
*
im
)
override
;
...
...
@@ -222,7 +222,7 @@ private:
mblk_t
*
_m
=
nullptr
;
};
class
H264StapASpliter
:
public
Nalu
SpliterInterface
{
class
H264StapASpliter
:
public
Unpacker
::
SpliterInterface
{
public:
H264StapASpliter
()
{
ms_queue_init
(
&
_q
);}
~
H264StapASpliter
()
{
ms_queue_flush
(
&
_q
);}
...
...
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