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
8db0cf17
Commit
8db0cf17
authored
Oct 12, 2011
by
jehan
Browse files
fix mediastream for macosx
parent
d632f7d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
tests/mediastream.c
tests/mediastream.c
+7
-6
No files found.
tests/mediastream.c
View file @
8db0cf17
...
...
@@ -45,7 +45,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifdef __APPLE__
#include <CoreFoundation/CFRunLoop.h>
#endif
#if TARGET_OS_IPHONE
==1
|| defined (ANDROID)
#if TARGET_OS_IPHONE || defined (ANDROID)
#import <UIKit/UIKit.h>
extern
void
ms_set_video_stream
(
VideoStream
*
video
);
#ifdef HAVE_X264
...
...
@@ -185,7 +185,7 @@ int main(int argc, char * argv[]) {
g_argc
=
argc
;
g_argv
=
argv
;
pthread_create
(
&
main_thread
,
NULL
,
apple_main
,
NULL
);
#if
def
TARGET_OS_MACOSX
#if TARGET_OS_MACOSX
CFRunLoopRun
();
return
0
;
#elif TARGET_OS_IPHONE
...
...
@@ -196,6 +196,7 @@ int main(int argc, char * argv[]) {
#endif
cond
=
0
;
pthread_join
(
main_thread
,
NULL
);
return
0
;
}
static
int
_main
(
int
argc
,
char
*
argv
[])
...
...
@@ -414,7 +415,7 @@ void setup_media_streams(MediastreamDatas* args) {
}
#if TARGET_OS_IPHONE
==1
|| defined (ANDROID)
#if TARGET_OS_IPHONE || defined (ANDROID)
#if defined (HAVE_X264) && defined (VIDEO_ENABLED)
libmsx264_init
();
/*no plugin on IOS*/
#endif
...
...
@@ -500,7 +501,7 @@ void setup_media_streams(MediastreamDatas* args) {
}
}
#if
ndef
TARGET_OS_IPHONE
#if TARGET_OS_IPHONE
if
(
args
->
zrtp_id
!=
NULL
)
{
OrtpZrtpParams
params
;
params
.
zid
=
args
->
zrtp_id
;
...
...
@@ -525,7 +526,7 @@ void setup_media_streams(MediastreamDatas* args) {
#endif
video_stream_set_sent_video_size
(
args
->
video
,
args
->
vs
);
video_stream_use_preview_video_window
(
args
->
video
,
args
->
two_windows
);
#if
def
TARGET_OS_IPHONE
#if TARGET_OS_IPHONE
NSBundle
*
myBundle
=
[
NSBundle
mainBundle
];
const
char
*
nowebcam
=
[[
myBundle
pathForResource
:
@
"nowebcamCIF"
ofType
:
@
"jpg"
]
cStringUsingEncoding
:
[
NSString
defaultCStringEncoding
]];
ms_static_image_set_default_image
(
nowebcam
);
...
...
@@ -590,7 +591,7 @@ void run_interactive_loop(MediastreamDatas* args) {
void
run_non_interactive_loop
(
MediastreamDatas
*
args
)
{
rtp_session_register_event_queue
(
args
->
session
,
args
->
q
);
#if TARGET_OS_IPHONE
==1
&& defined(VIDEO_ENABLED)
#if TARGET_OS_IPHONE && defined(VIDEO_ENABLED)
ms_set_video_stream
(
args
->
video
);
/*for IOS*/
#endif
...
...
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