discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] usrp_tv_rcv.py problem in OS X


From: Michael Dickens
Subject: Re: [Discuss-gnuradio] usrp_tv_rcv.py problem in OS X
Date: Wed, 24 Jan 2007 15:16:56 -0500

Sam - Here is an initial cut, to get primary functionality working. I still can't get it to play videos yet, but now it seems like an SDL issue as opposed to a GNU Radio / Cocoa issue ... meaning that I get the video window (and GUI, if using that), no video playing, then it crashes after a few seconds [tracing with GDB reveals that this is while blitting to the video window]. The appended patches are applied from your top gnuradio directory. - MLD

% svn diff
Index: gr-video-sdl/src/video_sdl_sink_s.cc
===================================================================
--- gr-video-sdl/src/video_sdl_sink_s.cc        (revision 4291)
+++ gr-video-sdl/src/video_sdl_sink_s.cc        (working copy)
@@ -36,8 +36,11 @@
#include <iostream>
#include <stdexcept>
+#ifdef __APPLE__
+//void NSApplicationLoad (void);
+#include <WebKit/CarbonUtils.h>
+#endif
-
video_sdl_sink_s::video_sdl_sink_s (double framerate,int width, int height,unsigned int format,int dst_width,int dst_height)
   : gr_sync_block ("video_sdl_sink_s",
                   gr_make_io_signature (1, 3, sizeof (short)),
@@ -56,6 +59,12 @@
     d_avg_delay(0.0),
     d_wanted_ticks(0)
{
+#ifdef __APPLE__
+  /* this must be called before SDL can work under Darwin */
+  //  NSApplicationLoad ();
+  WebInitForCarbon ();
+#endif
+
   if(framerate<=0.0)
     d_wanted_frametime_ms=0;//Go as fast as possible
   else
Index: gr-video-sdl/src/video_sdl_sink_uc.cc
===================================================================
--- gr-video-sdl/src/video_sdl_sink_uc.cc       (revision 4291)
+++ gr-video-sdl/src/video_sdl_sink_uc.cc       (working copy)
@@ -36,8 +36,11 @@
#include <iostream>
#include <stdexcept>
+#ifdef __APPLE__
+//void NSApplicationLoad (void);
+#include <WebKit/CarbonUtils.h>
+#endif
-
video_sdl_sink_uc::video_sdl_sink_uc (double framerate,int width, int height,unsigned int format,int dst_width,int dst_height)
   : gr_sync_block ("video_sdl_sink_uc",
                   gr_make_io_signature (1, 3, sizeof (unsigned char)),
@@ -56,6 +59,12 @@
     d_avg_delay(0.0),
     d_wanted_ticks(0)
{
+#ifdef __APPLE__
+  /* this must be called before SDL can work under Darwin */
+  //  NSApplicationLoad ();
+  WebInitForCarbon ();
+#endif
+
   if(framerate<=0.0)
     d_wanted_frametime_ms=0;//Go as fast as possible
   else
Index: config/sdl.m4
===================================================================
--- config/sdl.m4       (revision 4291)
+++ config/sdl.m4       (working copy)
@@ -44,6 +44,12 @@
     SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags`
     SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs`
+    case "$host_os" in
+       darwin*)
+         SDL_LIBS="$SDL_LIBS -Wl,-framework,WebKit"
+       ;;
+    esac
+
     sdl_major_version=`$SDL_CONFIG $sdl_args --version | \
            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
     sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \





reply via email to

[Prev in Thread] Current Thread [Next in Thread]