Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mediastreamer2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
External Wiki
External Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BC
public
mediastreamer2
Commits
0a024c50
Commit
0a024c50
authored
Jun 12, 2014
by
jehan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix compilation issue if VIDEO_ENABLED not defined
parent
e9c8fddc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
8 deletions
+29
-8
mediastream.h
include/mediastreamer2/mediastream.h
+2
-0
mediastream.c
src/voip/mediastream.c
+10
-7
mediastreamer2_adaptive_tester.c
tester/mediastreamer2_adaptive_tester.c
+17
-1
No files found.
include/mediastreamer2/mediastream.h
View file @
0a024c50
...
...
@@ -93,6 +93,8 @@ typedef enum StreamType {
VideoStreamType
}
StreamType
;
MS2_PUBLIC
const
char
*
ms_stream_type_to_string
(
StreamType
);
/**
* The MediaStream is an object describing a stream (one of AudioStream or VideoStream).
**/
...
...
src/voip/mediastream.c
View file @
0a024c50
...
...
@@ -175,13 +175,7 @@ void media_stream_start_ticker(MediaStream *stream) {
}
const
char
*
media_stream_type_str
(
MediaStream
*
stream
)
{
switch
(
stream
->
type
)
{
default:
case
AudioStreamType
:
return
"audio"
;
case
VideoStreamType
:
return
"video"
;
}
return
ms_stream_type_to_string
(
stream
->
type
);
}
void
ms_media_stream_sessions_uninit
(
MSMediaStreamSessions
*
sessions
){
...
...
@@ -652,4 +646,13 @@ int ms_crypto_suite_to_name_params(MSCryptoSuite cs, MSCryptoSuiteNameParams *pa
if
(
params
->
name
==
NULL
)
return
-
1
;
return
0
;
}
const
char
*
ms_stream_type_to_string
(
StreamType
type
)
{
switch
(
type
)
{
case
AudioStreamType
:
return
"audio"
;
case
VideoStreamType
:
return
"video"
;
}
return
"unknown"
;
}
tester/mediastreamer2_adaptive_tester.c
View file @
0a024c50
...
...
@@ -111,8 +111,13 @@ static stream_manager_t * stream_manager_new(StreamType type) {
mgr
->
audio_stream
=
audio_stream_new
(
mgr
->
local_rtp
,
mgr
->
local_rtcp
,
FALSE
);
rtp_session_register_event_queue
(
mgr
->
audio_stream
->
ms
.
sessions
.
rtp_session
,
mgr
->
evq
);
}
else
{
#if VIDEO_ENABLED
mgr
->
video_stream
=
video_stream_new
(
mgr
->
local_rtp
,
mgr
->
local_rtcp
,
FALSE
);
rtp_session_register_event_queue
(
mgr
->
video_stream
->
ms
.
sessions
.
rtp_session
,
mgr
->
evq
);
#else
ms_fatal
(
"Unsupported stream type [%s]"
,
ms_stream_type_to_string
(
mgr
->
type
));
#endif
}
return
mgr
;
}
...
...
@@ -124,8 +129,12 @@ static void stream_manager_delete(stream_manager_t * mgr) {
rtp_session_unregister_event_queue
(
mgr
->
audio_stream
->
ms
.
sessions
.
rtp_session
,
mgr
->
evq
);
audio_stream_stop
(
mgr
->
audio_stream
);
}
else
{
#if VIDEO_ENABLED
rtp_session_unregister_event_queue
(
mgr
->
video_stream
->
ms
.
sessions
.
rtp_session
,
mgr
->
evq
);
video_stream_stop
(
mgr
->
video_stream
);
#else
ms_fatal
(
"Unsupported stream type [%s]"
,
ms_stream_type_to_string
(
mgr
->
type
));
#endif
}
ortp_ev_queue_destroy
(
mgr
->
evq
);
ms_free
(
mgr
);
...
...
@@ -155,6 +164,7 @@ static void audio_manager_start(stream_manager_t * mgr
,
0
),
0
);
}
#if VIDEO_ENABLED
static
void
video_manager_start
(
stream_manager_t
*
mgr
,
int
payload_type
,
int
remote_port
...
...
@@ -173,6 +183,7 @@ static void video_manager_start( stream_manager_t * mgr
,
cam
);
CU_ASSERT_EQUAL
(
result
,
0
);
}
#endif
static
void
handle_queue_events
(
stream_manager_t
*
stream_mgr
)
{
OrtpEvent
*
ev
;
...
...
@@ -215,8 +226,9 @@ static void start_adaptive_stream(StreamType type, stream_manager_t ** pmarielle
params
.
latency
=
latency
;
int
pause_time
=
0
;
MediaStream
*
marielle_ms
,
*
margaux_ms
;
#if VIDEO_ENABLED
MSWebCam
*
marielle_webcam
=
ms_web_cam_manager_get_default_cam
(
ms_web_cam_manager_get
());
#endif
stream_manager_t
*
marielle
=*
pmarielle
=
stream_manager_new
(
type
);
stream_manager_t
*
margaux
=*
pmargaux
=
stream_manager_new
(
type
);
...
...
@@ -243,10 +255,14 @@ static void start_adaptive_stream(StreamType type, stream_manager_t ** pmarielle
audio_manager_start
(
margaux
,
payload
,
marielle
->
local_rtp
,
0
,
NULL
,
RECORDED_16K_1S_FILE
);
}
else
{
#if VIDEO_ENABLED
video_manager_start
(
marielle
,
payload
,
margaux
->
local_rtp
,
0
,
marielle_webcam
);
video_stream_set_direction
(
margaux
->
video_stream
,
VideoStreamRecvOnly
);
video_manager_start
(
margaux
,
payload
,
marielle
->
local_rtp
,
0
,
NULL
);
#else
ms_fatal
(
"Unsupported stream type [%s]"
,
ms_stream_type_to_string
(
marielle
->
type
));
#endif
}
rtp_session_enable_network_simulation
(
margaux_ms
->
sessions
.
rtp_session
,
&
params
);
...
...
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