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
30ed2c1a
Commit
30ed2c1a
authored
Jun 25, 2014
by
Ghislain MARY
Browse files
Fix compilation for Windows Phone 8.
parent
5711d097
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
35 deletions
+23
-35
include/mediastreamer2/mediastream.h
include/mediastreamer2/mediastream.h
+1
-1
tester/mediastreamer2_adaptive_tester.c
tester/mediastreamer2_adaptive_tester.c
+7
-10
tester/mediastreamer2_audio_stream_tester.c
tester/mediastreamer2_audio_stream_tester.c
+2
-6
tester/mediastreamer2_basic_audio_tester.c
tester/mediastreamer2_basic_audio_tester.c
+0
-5
tester/mediastreamer2_framework_tester.c
tester/mediastreamer2_framework_tester.c
+8
-13
tester/mediastreamer2_tester.c
tester/mediastreamer2_tester.c
+2
-0
tester/mediastreamer2_tester_private.h
tester/mediastreamer2_tester_private.h
+3
-0
No files found.
include/mediastreamer2/mediastream.h
View file @
30ed2c1a
...
...
@@ -251,7 +251,7 @@ MS2_PUBLIC float media_stream_get_down_bw(const MediaStream *stream);
MS2_PUBLIC
void
media_stream_reclaim_sessions
(
MediaStream
*
stream
,
MSMediaStreamSessions
*
sessions
);
void
media_stream_iterate
(
MediaStream
*
stream
);
MS2_PUBLIC
void
media_stream_iterate
(
MediaStream
*
stream
);
/**
* Returns TRUE if stream was still actively receiving packets (RTP or RTCP) in the last period specified in timeout_seconds.
...
...
tester/mediastreamer2_adaptive_tester.c
View file @
30ed2c1a
...
...
@@ -32,10 +32,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "CUnit/Basic.h"
#ifdef _MSC_VER
#define unlink _unlink
#endif
static
RtpProfile
rtp_profile
;
#define OPUS_PAYLOAD_TYPE 121
...
...
@@ -219,18 +215,19 @@ static void handle_queue_events(stream_manager_t * stream_mgr) {
static
void
start_adaptive_stream
(
StreamType
type
,
stream_manager_t
**
pmarielle
,
stream_manager_t
**
pmargaux
,
int
payload
,
int
initial_bitrate
,
int
target_bw
,
float
loss_rate
,
int
latency
,
float
dup_ratio
)
{
OrtpNetworkSimulatorParams
params
=
{
0
};
params
.
enabled
=
TRUE
;
params
.
loss_rate
=
loss_rate
;
params
.
max_bandwidth
=
target_bw
;
params
.
latency
=
latency
;
int
pause_time
=
0
;
PayloadType
*
pt
;
MediaStream
*
marielle_ms
,
*
margaux_ms
;
OrtpNetworkSimulatorParams
params
=
{
0
};
#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
);
params
.
enabled
=
TRUE
;
params
.
loss_rate
=
loss_rate
;
params
.
max_bandwidth
=
target_bw
;
params
.
latency
=
latency
;
if
(
type
==
AudioStreamType
){
marielle_ms
=&
marielle
->
audio_stream
->
ms
;
...
...
@@ -241,7 +238,7 @@ static void start_adaptive_stream(StreamType type, stream_manager_t ** pmarielle
}
/* Disable avpf. */
PayloadType
*
pt
=
rtp_profile_get_payload
(
&
rtp_profile
,
VP8_PAYLOAD_TYPE
);
pt
=
rtp_profile_get_payload
(
&
rtp_profile
,
VP8_PAYLOAD_TYPE
);
CU_ASSERT_PTR_NOT_NULL_FATAL
(
pt
);
payload_type_unset_flag
(
pt
,
PAYLOAD_TYPE_RTCP_FEEDBACK_ENABLED
);
...
...
tester/mediastreamer2_audio_stream_tester.c
View file @
30ed2c1a
...
...
@@ -31,10 +31,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "CUnit/Basic.h"
#ifdef _MSC_VER
#define unlink _unlink
#endif
static
RtpProfile
rtp_profile
;
#define OPUS_PAYLOAD_TYPE 121
...
...
@@ -206,14 +202,14 @@ static float adaptive_audio_stream(int codec_payload, int initial_bitrate,int ta
stream_manager_t
*
marielle
=
stream_manager_new
();
stream_manager_t
*
margaux
=
stream_manager_new
();
int
pause_time
=
0
;
float
bw_usage_ratio
;
float
marielle_send_bw
;
OrtpNetworkSimulatorParams
params
=
{
0
};
params
.
enabled
=
TRUE
;
params
.
loss_rate
=
0
;
params
.
max_bandwidth
=
target_bw
;
params
.
max_buffer_size
=
initial_bitrate
;
float
bw_usage_ratio
;
float
marielle_send_bw
;
media_stream_enable_adaptive_bitrate_control
(
&
marielle
->
stream
->
ms
,
TRUE
);
...
...
tester/mediastreamer2_basic_audio_tester.c
View file @
30ed2c1a
...
...
@@ -32,11 +32,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "CUnit/Basic.h"
#ifdef _MSC_VER
#define unlink _unlink
#endif
static
int
basic_audio_tester_init
(
void
)
{
ms_init
();
ms_filter_enable_statistics
(
TRUE
);
...
...
tester/mediastreamer2_framework_tester.c
View file @
30ed2c1a
...
...
@@ -32,11 +32,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "CUnit/Basic.h"
#ifdef _MSC_VER
#define unlink _unlink
#endif
static
int
tester_init
(
void
)
{
/* ms_init();
ms_filter_enable_statistics(TRUE);
...
...
@@ -48,28 +43,28 @@ static int tester_cleanup(void) {
/* ms_exit();*/
return
0
;
}
extern
MSFilterDesc
ms_alaw_dec_desc
;
extern
MSFilterDesc
ms_void_source_desc
;
static
void
filter_register_tester
(
void
)
{
MSFilter
*
filter
;
ms_init
();
ms_init
();
CU_ASSERT_PTR_NOT_NULL
(
ms_filter_lookup_by_name
(
ms_v
oid
_s
ource
_desc
.
name
));
MSFilter
*
filter
=
ms_filter_create_decoder
(
ms_alaw_dec_desc
.
enc_fmt
);
CU_ASSERT_PTR_NOT_NULL
(
ms_filter_lookup_by_name
(
"MSV
oid
S
ource
"
));
filter
=
ms_filter_create_decoder
(
"pcma"
);
CU_ASSERT_PTR_NOT_NULL
(
filter
);
ms_filter_destroy
(
filter
);
ms_exit
();
CU_ASSERT_PTR_NOT_NULL
(
ms_filter_lookup_by_name
(
ms_v
oid
_s
ource
_desc
.
name
));
filter
=
ms_filter_create_decoder
(
ms_alaw_dec_desc
.
enc_fmt
);
CU_ASSERT_PTR_NOT_NULL
(
ms_filter_lookup_by_name
(
"MSV
oid
S
ource
"
));
filter
=
ms_filter_create_decoder
(
"pcma"
);
CU_ASSERT_PTR_NOT_NULL
(
filter
);
ms_filter_destroy
(
filter
);
ms_exit
();
CU_ASSERT_PTR_NULL
(
ms_filter_lookup_by_name
(
ms_v
oid
_s
ource
_desc
.
name
));
filter
=
ms_filter_create_decoder
(
ms_alaw_dec_desc
.
enc_fmt
);
CU_ASSERT_PTR_NULL
(
ms_filter_lookup_by_name
(
"MSV
oid
S
ource
"
));
filter
=
ms_filter_create_decoder
(
"pcma"
);
CU_ASSERT_PTR_NULL
(
filter
);
}
...
...
tester/mediastreamer2_tester.c
View file @
30ed2c1a
...
...
@@ -20,7 +20,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "mediastreamer2_tester.h"
#include <mediastreamer2/mediastream.h>
#if HAVE_CONFIG_H
#include <mediastreamer-config.h>
#endif
#include <stdio.h>
#include "CUnit/Basic.h"
...
...
tester/mediastreamer2_tester_private.h
View file @
30ed2c1a
...
...
@@ -25,6 +25,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "mediastreamer2/msfilter.h"
#include "mediastreamer2/msticker.h"
#ifdef _MSC_VER
#define unlink _unlink
#endif
#if WINAPI_FAMILY_PHONE_APP
#define SOUND_FILE_PATH "Assets\\Sounds\\"
...
...
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