1 #import "ViewController.h"
2 #import "GStreamerBackend.h"
3 #import <UIKit/UIKit.h>
5 @interface ViewController () {
6 GStreamerBackend *gst_backend;
11 @implementation ViewController
14 * Methods from UIViewController
21 play_button.enabled = FALSE;
22 pause_button.enabled = FALSE;
24 gst_backend = [[GStreamerBackend alloc] init:self];
27 - (void)didReceiveMemoryWarning
29 [super didReceiveMemoryWarning];
30 // Dispose of any resources that can be recreated.
33 /* Called when the Play button is pressed */
34 -(IBAction) play:(id)sender
39 /* Called when the Pause button is pressed */
40 -(IBAction) pause:(id)sender
46 * Methods from GstreamerBackendDelegate
49 -(void) gstreamerInitialized
51 dispatch_async(dispatch_get_main_queue(), ^{
52 play_button.enabled = TRUE;
53 pause_button.enabled = TRUE;
54 message_label.text = @"Ready";
58 -(void) gstreamerSetUIMessage:(NSString *)message
60 dispatch_async(dispatch_get_main_queue(), ^{
61 message_label.text = message;