rendered paste body#import "GstDelegate.h"
@implementation GstDelegate
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
NSLog(@"Init Gst Engine");
gst_init();
pipeline = gst_parse_launch ("videotestsrc ! osxvideosink");
}
- (IBAction)playOrPause:(id)sender
{
NSLog(@"Play or Pause");
NSString *title = [playButton title];
if (title == @"Play") {
[playButton setTitle: @"Pause"];
gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PAUSED);
} else {
[playButton setTitle: @"Play"];
gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING);
}
}
@end