VlcMacHowto: vlc-macosx.patch
| File vlc-macosx.patch, 5.6 KB (added by jdmol, 5 years ago) |
|---|
-
Makefile
old new 628 628 #noinst_DATA = vlc-bundle 629 629 630 630 # Create the MacOS X app 631 vlc_app_DATA = VLC.app632 631 vlc_appdir = $(bindir) 633 632 #DATA_win32_rc = $(noinst_share_vlc_win32_rc_DATA) 634 633 #noinst_share_vlc_win32_rc_DATA = share/vlc_win32_rc.$(OBJEXT) -
po/Makefile
old new 26 26 27 27 INSTALL = /usr/bin/install -c 28 28 INSTALL_DATA = ${INSTALL} -m 644 29 MKINSTALLDIRS = @MKINSTALLDIRS@29 MKINSTALLDIRS = autotools/mkinstalldirs 30 30 mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac` 31 31 32 32 GMSGFMT = /Users/jandavidmol/svn/vlc-trunk/./extras/contrib/bin/msgfmt -
vlc-config
old new 20 20 objcflags="" 21 21 ldflags="" 22 22 23 cflags_tuning=" -march=pentium-m -mtune=prescott"23 cflags_tuning="" 24 24 cflags_optim=" -O3 -ffast-math -funroll-loops" 25 25 cflags_optim_nodebug=" -fomit-frame-pointer" 26 26 cflags_nooptim=" -O2" … … 822 822 ;; 823 823 external) 824 824 echo_external=yes 825 ldflags="${ldflags} -lvlc -lvlc-control"825 ldflags="${ldflags} -lvlc" 826 826 ;; 827 827 *) 828 828 module="$1" -
modules/gui/macosx/voutgl.m
43 43 #include <OpenGL/gl.h> 44 44 45 45 #include <AGL/agl.h> 46 #include <Carbon/Carbon.h> 46 47 47 48 /***************************************************************************** 48 49 * VLCGLView interface … … 68 69 vlc_bool_t b_embedded; 69 70 AGLContext agl_ctx; 70 71 AGLDrawable agl_drawable; 72 ControlRef theControl; 71 73 int i_offx, i_offy; 72 74 int i_width, i_height; 73 75 WindowRef theWindow; 74 76 WindowGroupRef winGroup; 75 77 vlc_bool_t b_clipped_out; 78 vlc_bool_t b_viewport_set; 76 79 Rect clipBounds, viewBounds; 77 80 }; 78 81 … … 470 473 Rect clipBounds; 471 474 472 475 var_Get( p_vout->p_libvlc, "drawable", &val ); 473 p_vout->p_sys->agl_drawable = (AGLDrawable)val.i_int; 476 p_vout->p_sys->theControl = val.i_int; 477 p_vout->p_sys->agl_drawable = (AGLDrawable)GetWindowPort(GetControlOwner(val.i_int)); 474 478 aglSetDrawable(p_vout->p_sys->agl_ctx, p_vout->p_sys->agl_drawable); 475 479 476 480 var_Get( p_vout->p_libvlc, "drawable-view-top", &val ); … … 492 496 493 497 p_vout->p_sys->b_clipped_out = (clipBounds.top == clipBounds.bottom) 494 498 || (clipBounds.left == clipBounds.right); 495 if( ! p_vout->p_sys->b_clipped_out ) 499 p_vout->p_sys->b_viewport_set = viewBounds.top || viewBounds.bottom 500 || viewBounds.left || viewBounds.right; 501 if( !p_vout->p_sys->b_clipped_out && p_vout->p_sys->b_viewport_set ) 496 502 { 497 503 aglLock(p_vout); 498 504 aglSetViewport(p_vout, viewBounds, clipBounds); … … 590 596 Rect clipBounds; 591 597 592 598 var_Get( p_vout->p_libvlc, "drawable", &val ); 593 p_vout->p_sys->agl_drawable = (AGLDrawable)val.i_int; 599 p_vout->p_sys->theControl = val.i_int; 600 p_vout->p_sys->agl_drawable = (AGLDrawable)GetWindowPort(GetControlOwner(val.i_int)); 594 601 aglSetDrawable(p_vout->p_sys->agl_ctx, p_vout->p_sys->agl_drawable); 595 602 596 603 var_Get( p_vout->p_libvlc, "drawable-view-top", &val ); … … 714 721 715 722 p_vout->p_sys->b_clipped_out = (clipBounds.top == clipBounds.bottom) 716 723 || (clipBounds.left == clipBounds.right); 717 if( ! p_vout->p_sys->b_clipped_out ) 724 p_vout->p_sys->b_viewport_set = viewBounds.top || viewBounds.bottom 725 || viewBounds.left || viewBounds.right; 726 if( !p_vout->p_sys->b_clipped_out ) 718 727 { 719 728 /* ignore consecutive viewport update with identical parameters */ 720 729 if( memcmp(&clipBounds, &(p_vout->p_sys->clipBounds), sizeof(clipBounds) ) … … 769 778 770 779 static void aglSwap( vout_thread_t * p_vout ) 771 780 { 772 if( ! p_vout->p_sys->b_clipped_out )781 if( !p_vout->p_sys->b_clipped_out || !p_vout->p_sys->b_viewport_set ) 773 782 { 774 783 p_vout->p_sys->b_got_frame = VLC_TRUE; 775 784 aglSwapBuffers(p_vout->p_sys->agl_ctx); 785 786 if( !p_vout->p_sys->b_viewport_set ) { 787 WindowRef win; 788 Rect rect,clipBounds,viewBounds; 789 790 /* invalidate window data to force redraw */ 791 win = GetWindowFromPort( p_vout->p_sys->agl_drawable ); 792 //GetWindowPortBounds( win, &rect ); 793 GetControlBounds( p_vout->p_sys->theControl, &rect ); 794 InvalWindowRect( win, &rect ); 795 796 /* check for resizing -- ugly hack to do this in aglSwap, i.e. every frame */ 797 clipBounds = viewBounds = rect; 798 799 /* ignore consecutive viewport update with identical parameters */ 800 if( memcmp(&clipBounds, &(p_vout->p_sys->clipBounds), sizeof(clipBounds) ) 801 && memcmp(&viewBounds, &(p_vout->p_sys->viewBounds), sizeof(viewBounds)) ) 802 { 803 /* set first to avoid infinite recursion */ 804 p_vout->p_sys->clipBounds = clipBounds; 805 p_vout->p_sys->viewBounds = viewBounds; 806 807 aglSetViewport(p_vout, viewBounds, clipBounds); 808 aglReshape( p_vout ); 809 } 810 } 776 811 } 777 812 else 778 813 {
