Difference between revisions of "VLCKit"

From VideoLAN Wiki
Jump to navigation Jump to search
(Install CMake)
Line 2: Line 2:
 
You have '''two''' options:
 
You have '''two''' options:
 
=== One-click build ===
 
=== One-click build ===
 +
* Install '''CMake'''
 
* get the [[SVN|VLC Source Code from SVN]]
 
* get the [[SVN|VLC Source Code from SVN]]
 
* open vlc-trunk/extras/MacOSX/Framework/VLCKit.xcodeproj and make sure the '''vlc-contrib-core-framework''' target is selected.
 
* open vlc-trunk/extras/MacOSX/Framework/VLCKit.xcodeproj and make sure the '''vlc-contrib-core-framework''' target is selected.
Line 8: Line 9:
  
 
=== Terminal build ===
 
=== Terminal build ===
 +
* Install '''CMake'''
 
* get the [[SVN|VLC Source Code from SVN]]
 
* get the [[SVN|VLC Source Code from SVN]]
 
* type in a terminal:
 
* type in a terminal:

Revision as of 15:32, 6 February 2008

How to build the framework

You have two options:

One-click build

  • Install CMake
  • get the VLC Source Code from SVN
  • open vlc-trunk/extras/MacOSX/Framework/VLCKit.xcodeproj and make sure the vlc-contrib-core-framework target is selected.
  • Hit build.

Voilà!

Terminal build

$ cd extras/contrib && ./bootstrap && make && cd ../.. && ./bootstrap &&./configure && make && cd extras/MacOSX/Framework && make

Basic usage in your application

The code should speak by itself

  // Set up a videoView by hand. You can also do that in the nib file
   videoView = [[VLCVideoView alloc] initWithFrame:[[window contentView] bounds]];
   [[window contentView] addSubview:videoView];
   [videoView setAutoresizingMask: NSViewHeightSizable|NSViewWidthSizable];
  
   // Init the player object
   player = [[VLCMediaPlayer alloc] initWithVideoView:videoView];
 
   [player setMedia:[VLCMedia mediaWithPath:@"/to/my/movie"]];
   [player play];

Sample code

You should be able to find sample code in:

  • Framework/Examples: This is the folder that contains the VLC.framework basics usage.
  • vlc-trunk/extras/MacOSX/VLC_app: This is the VLC application that uses the framework intensivly, this is much more advanced.