summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavi Artigas <xartigas@fluendo.com>2013-05-14 17:11:05 +0200
committerXavi Artigas <xartigas@fluendo.com>2013-05-14 17:11:05 +0200
commit4ae44f9e1c1343b5f720cab24bb6f8bca9f01bd0 (patch)
tree0391d85013cc4832a0997c7f9cfc3e56de098384
parent4bd417f3398d2647b9a7598631e21065685e9463 (diff)
Initial iOS Tutorial 4, already working. No seek bar yet. iPhone storyboard missing. External files can be played if they are copied into the application through iTunes file sharing.
-rw-r--r--gst-sdk/tutorials/xcode iOS/GStreamer iOS Tutorials.xcodeproj/project.pbxproj20
-rw-r--r--gst-sdk/tutorials/xcode iOS/Tutorial 4/GStreamerBackend.h8
-rw-r--r--gst-sdk/tutorials/xcode iOS/Tutorial 4/GStreamerBackend.m30
-rw-r--r--gst-sdk/tutorials/xcode iOS/Tutorial 4/LibraryViewController.h11
-rw-r--r--gst-sdk/tutorials/xcode iOS/Tutorial 4/LibraryViewController.m106
-rw-r--r--gst-sdk/tutorials/xcode iOS/Tutorial 4/Tutorial 4-Info.plist2
-rw-r--r--gst-sdk/tutorials/xcode iOS/Tutorial 4/VideoViewController.h (renamed from gst-sdk/tutorials/xcode iOS/Tutorial 4/ViewController.h)4
-rw-r--r--gst-sdk/tutorials/xcode iOS/Tutorial 4/VideoViewController.m (renamed from gst-sdk/tutorials/xcode iOS/Tutorial 4/ViewController.m)17
-rw-r--r--gst-sdk/tutorials/xcode iOS/Tutorial 4/en.lproj/MainStoryboard_iPad.storyboard87
-rw-r--r--gst-sdk/tutorials/xcode iOS/Tutorial 4/gst_ios_init.h10
10 files changed, 259 insertions, 36 deletions
diff --git a/gst-sdk/tutorials/xcode iOS/GStreamer iOS Tutorials.xcodeproj/project.pbxproj b/gst-sdk/tutorials/xcode iOS/GStreamer iOS Tutorials.xcodeproj/project.pbxproj
index 061137b..85889fe 100644
--- a/gst-sdk/tutorials/xcode iOS/GStreamer iOS Tutorials.xcodeproj/project.pbxproj
+++ b/gst-sdk/tutorials/xcode iOS/GStreamer iOS Tutorials.xcodeproj/project.pbxproj
@@ -76,7 +76,7 @@
C6EB8597173BEE5E00C3953D /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C6EB8596173BEE5E00C3953D /* Default-568h@2x.png */; };
C6EB859A173BEE5E00C3953D /* MainStoryboard_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C6EB8598173BEE5E00C3953D /* MainStoryboard_iPhone.storyboard */; };
C6EB859D173BEE5E00C3953D /* MainStoryboard_iPad.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C6EB859B173BEE5E00C3953D /* MainStoryboard_iPad.storyboard */; };
- C6EB85A0173BEE5E00C3953D /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C6EB859F173BEE5E00C3953D /* ViewController.m */; };
+ C6EB85A0173BEE5E00C3953D /* VideoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C6EB859F173BEE5E00C3953D /* VideoViewController.m */; };
C6EB85B1173BEF2600C3953D /* EaglUIVIew.m in Sources */ = {isa = PBXBuildFile; fileRef = C6EB85AB173BEF2600C3953D /* EaglUIVIew.m */; };
C6EB85B2173BEF2600C3953D /* gst_ios_init.c in Sources */ = {isa = PBXBuildFile; fileRef = C6EB85AC173BEF2600C3953D /* gst_ios_init.c */; };
C6EB85B3173BEF2600C3953D /* GStreamerBackend.m in Sources */ = {isa = PBXBuildFile; fileRef = C6EB85AF173BEF2600C3953D /* GStreamerBackend.m */; };
@@ -84,6 +84,7 @@
C6EB85BA173BEFF800C3953D /* appicon-4-iPad@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C6EB85B6173BEFF800C3953D /* appicon-4-iPad@2x.png */; };
C6EB85BB173BEFF800C3953D /* appicon-4-iPhone.png in Resources */ = {isa = PBXBuildFile; fileRef = C6EB85B7173BEFF800C3953D /* appicon-4-iPhone.png */; };
C6EB85BC173BEFF800C3953D /* appicon-4-iPhone@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C6EB85B8173BEFF800C3953D /* appicon-4-iPhone@2x.png */; };
+ C6EB85C7174233B400C3953D /* LibraryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C6EB85C6174233B300C3953D /* LibraryViewController.m */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
@@ -173,11 +174,11 @@
C6EB8596173BEE5E00C3953D /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; };
C6EB8599173BEE5E00C3953D /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard_iPhone.storyboard; sourceTree = "<group>"; };
C6EB859C173BEE5E00C3953D /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard_iPad.storyboard; sourceTree = "<group>"; };
- C6EB859E173BEE5E00C3953D /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
- C6EB859F173BEE5E00C3953D /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
+ C6EB859E173BEE5E00C3953D /* VideoViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VideoViewController.h; sourceTree = "<group>"; };
+ C6EB859F173BEE5E00C3953D /* VideoViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VideoViewController.m; sourceTree = "<group>"; };
C6EB85AA173BEF2600C3953D /* EaglUIVIew.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EaglUIVIew.h; sourceTree = "<group>"; };
C6EB85AB173BEF2600C3953D /* EaglUIVIew.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EaglUIVIew.m; sourceTree = "<group>"; };
- C6EB85AC173BEF2600C3953D /* gst_ios_init.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = gst_ios_init.c; sourceTree = "<group>"; };
+ C6EB85AC173BEF2600C3953D /* gst_ios_init.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.c; path = gst_ios_init.c; sourceTree = "<group>"; tabWidth = 2; };
C6EB85AD173BEF2600C3953D /* gst_ios_init.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gst_ios_init.h; sourceTree = "<group>"; };
C6EB85AE173BEF2600C3953D /* GStreamerBackend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GStreamerBackend.h; sourceTree = "<group>"; };
C6EB85AF173BEF2600C3953D /* GStreamerBackend.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GStreamerBackend.m; sourceTree = "<group>"; };
@@ -186,6 +187,8 @@
C6EB85B6173BEFF800C3953D /* appicon-4-iPad@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "appicon-4-iPad@2x.png"; sourceTree = "<group>"; };
C6EB85B7173BEFF800C3953D /* appicon-4-iPhone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "appicon-4-iPhone.png"; sourceTree = "<group>"; };
C6EB85B8173BEFF800C3953D /* appicon-4-iPhone@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "appicon-4-iPhone@2x.png"; sourceTree = "<group>"; };
+ C6EB85C5174233B200C3953D /* LibraryViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LibraryViewController.h; sourceTree = "<group>"; };
+ C6EB85C6174233B300C3953D /* LibraryViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LibraryViewController.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -418,8 +421,10 @@
C6EB8590173BEE5E00C3953D /* AppDelegate.m */,
C6EB8598173BEE5E00C3953D /* MainStoryboard_iPhone.storyboard */,
C6EB859B173BEE5E00C3953D /* MainStoryboard_iPad.storyboard */,
- C6EB859E173BEE5E00C3953D /* ViewController.h */,
- C6EB859F173BEE5E00C3953D /* ViewController.m */,
+ C6EB85C5174233B200C3953D /* LibraryViewController.h */,
+ C6EB85C6174233B300C3953D /* LibraryViewController.m */,
+ C6EB859E173BEE5E00C3953D /* VideoViewController.h */,
+ C6EB859F173BEE5E00C3953D /* VideoViewController.m */,
C6EB8587173BEE5E00C3953D /* Supporting Files */,
);
path = "Tutorial 4";
@@ -666,10 +671,11 @@
files = (
C6EB858D173BEE5E00C3953D /* main.m in Sources */,
C6EB8591173BEE5E00C3953D /* AppDelegate.m in Sources */,
- C6EB85A0173BEE5E00C3953D /* ViewController.m in Sources */,
+ C6EB85A0173BEE5E00C3953D /* VideoViewController.m in Sources */,
C6EB85B1173BEF2600C3953D /* EaglUIVIew.m in Sources */,
C6EB85B2173BEF2600C3953D /* gst_ios_init.c in Sources */,
C6EB85B3173BEF2600C3953D /* GStreamerBackend.m in Sources */,
+ C6EB85C7174233B400C3953D /* LibraryViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/gst-sdk/tutorials/xcode iOS/Tutorial 4/GStreamerBackend.h b/gst-sdk/tutorials/xcode iOS/Tutorial 4/GStreamerBackend.h
index a23c4ce..1fe4853 100644
--- a/gst-sdk/tutorials/xcode iOS/Tutorial 4/GStreamerBackend.h
+++ b/gst-sdk/tutorials/xcode iOS/Tutorial 4/GStreamerBackend.h
@@ -8,10 +8,18 @@
* Pass also the UIView object that will hold the video window. */
-(id) init:(id) uiDelegate videoView:(UIView*) video_view;
+/* Quit the main loop and free all resources, including the pipeline and
+ * the references to the ui delegate and the UIView used for rendering, so
+ * these objects can be deallocated. */
+-(void) deinit;
+
/* Set the pipeline to PLAYING */
-(void) play;
/* Set the pipeline to PAUSED */
-(void) pause;
+/* Set the URI to be played */
+-(void) setUri:(NSString*)uri;
+
@end \ No newline at end of file
diff --git a/gst-sdk/tutorials/xcode iOS/Tutorial 4/GStreamerBackend.m b/gst-sdk/tutorials/xcode iOS/Tutorial 4/GStreamerBackend.m
index 8adceac..b15ef43 100644
--- a/gst-sdk/tutorials/xcode iOS/Tutorial 4/GStreamerBackend.m
+++ b/gst-sdk/tutorials/xcode iOS/Tutorial 4/GStreamerBackend.m
@@ -45,28 +45,28 @@ GST_DEBUG_CATEGORY_STATIC (debug_category);
return self;
}
--(void) dealloc
+-(void) deinit
{
- if (pipeline) {
- GST_DEBUG("Setting the pipeline to NULL");
- gst_element_set_state(pipeline, GST_STATE_NULL);
- gst_object_unref(pipeline);
- pipeline = NULL;
+ if (main_loop) {
+ g_main_loop_quit(main_loop);
}
}
-(void) play
{
- if(gst_element_set_state(pipeline, GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) {
- [self setUIMessage:"Failed to set pipeline to playing"];
- }
+ gst_element_set_state(pipeline, GST_STATE_PLAYING);
}
-(void) pause
{
- if(gst_element_set_state(pipeline, GST_STATE_PAUSED) == GST_STATE_CHANGE_FAILURE) {
- [self setUIMessage:"Failed to set pipeline to paused"];
- }
+ gst_element_set_state(pipeline, GST_STATE_PAUSED);
+}
+
+-(void) setUri:(NSString*)uri
+{
+ const char *char_uri = [uri UTF8String];
+ g_object_set(pipeline, "uri", char_uri, NULL);
+ GST_DEBUG ("URI set to %s", char_uri);
}
/*
@@ -140,7 +140,7 @@ static void state_changed_cb (GstBus *bus, GstMessage *msg, GStreamerBackend *se
g_main_context_push_thread_default(context);
/* Build pipeline */
- pipeline = gst_parse_launch("videotestsrc ! warptv ! ffmpegcolorspace ! autovideosink", &error);
+ pipeline = gst_parse_launch("playbin2", &error);
if (error) {
gchar *message = g_strdup_printf("Unable to build pipeline: %s", error->message);
g_clear_error (&error);
@@ -183,7 +183,11 @@ static void state_changed_cb (GstBus *bus, GstMessage *msg, GStreamerBackend *se
g_main_context_unref (context);
gst_element_set_state (pipeline, GST_STATE_NULL);
gst_object_unref (pipeline);
+ pipeline = NULL;
+ ui_delegate = NULL;
+ ui_video_view = NULL;
+
return;
}
diff --git a/gst-sdk/tutorials/xcode iOS/Tutorial 4/LibraryViewController.h b/gst-sdk/tutorials/xcode iOS/Tutorial 4/LibraryViewController.h
new file mode 100644
index 0000000..db18bfa
--- /dev/null
+++ b/gst-sdk/tutorials/xcode iOS/Tutorial 4/LibraryViewController.h
@@ -0,0 +1,11 @@
+#import <UIKit/UIKit.h>
+
+@interface LibraryViewController : UITableViewController
+{
+ NSArray *mediaEntries;
+ NSArray *onlineEntries;
+}
+
+- (IBAction)refresh:(id)sender;
+
+@end
diff --git a/gst-sdk/tutorials/xcode iOS/Tutorial 4/LibraryViewController.m b/gst-sdk/tutorials/xcode iOS/Tutorial 4/LibraryViewController.m
new file mode 100644
index 0000000..faa57ec
--- /dev/null
+++ b/gst-sdk/tutorials/xcode iOS/Tutorial 4/LibraryViewController.m
@@ -0,0 +1,106 @@
+#import "LibraryViewController.h"
+#import "VideoViewController.h"
+
+@interface LibraryViewController ()
+
+@end
+
+@implementation LibraryViewController
+
+- (void)viewDidLoad
+{
+ [super viewDidLoad];
+ [super setTitle:@"Library"];
+ [self refreshMediaItems];
+}
+
+- (IBAction)refresh:(id)sender
+{
+ [self refreshMediaItems];
+ [self.tableView reloadData];
+}
+
+static NSString *CellIdentifier = @"CellIdentifier";
+
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
+ return 2;
+}
+
+- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
+{
+ switch (section)
+ {
+ case 0: return @"Local files (iTunes file sharing)";
+ default: return @"Online files";
+ }
+}
+
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+ switch (section) {
+ case 0:
+ return [self->mediaEntries count];
+ case 1:
+ return [self->onlineEntries count];
+ default:
+ return 0;
+ }
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+ UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
+ // Configure Cell
+ UILabel *title = (UILabel *)[cell.contentView viewWithTag:10];
+ UILabel *subtitle = (UILabel *)[cell.contentView viewWithTag:11];
+
+ if(indexPath.section == 0)
+ {
+ subtitle.text = [NSString stringWithFormat:@"file://%@",
+ [self->mediaEntries objectAtIndex:indexPath.item], nil];
+ } else if (indexPath.section == 1)
+ {
+ subtitle.text = [self->onlineEntries objectAtIndex:indexPath.item];
+ }
+
+ NSArray *components = [subtitle.text pathComponents];
+ title.text = components.lastObject;
+
+ return cell;
+}
+
+- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
+ return NO;
+}
+
+- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
+ return NO;
+}
+
+- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
+ if ([segue.identifier isEqualToString:@"playVideo"]) {
+ NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow];
+ VideoViewController *destViewController = segue.destinationViewController;
+ UITableViewCell *cell = [[self tableView] cellForRowAtIndexPath:indexPath];
+ UILabel *label = (UILabel *)[cell.contentView viewWithTag:10];
+ destViewController.title = label.text;
+ label = (UILabel *)[cell.contentView viewWithTag:11];
+ destViewController.uri = label.text;
+ }
+}
+
+- (void)refreshMediaItems {
+ NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSAllDomainsMask, YES);
+ NSString *docsPath = [paths objectAtIndex:0];
+
+ NSMutableArray *entries = [[NSMutableArray alloc] init];
+ for (NSString *e in [[NSFileManager defaultManager] contentsOfDirectoryAtPath:docsPath error:nil])
+ {
+ [entries addObject:[NSString stringWithFormat:@"%@/%@",docsPath, e]];
+ }
+ self->mediaEntries = entries;
+ self->onlineEntries = [NSArray arrayWithObjects:
+ @"http://docs.gstreamer.com/media/sintel_trailer-368p.ogv",
+ @"http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_640x360.m4v",
+ nil];
+}
+
+@end
diff --git a/gst-sdk/tutorials/xcode iOS/Tutorial 4/Tutorial 4-Info.plist b/gst-sdk/tutorials/xcode iOS/Tutorial 4/Tutorial 4-Info.plist
index 68ea711..548df05 100644
--- a/gst-sdk/tutorials/xcode iOS/Tutorial 4/Tutorial 4-Info.plist
+++ b/gst-sdk/tutorials/xcode iOS/Tutorial 4/Tutorial 4-Info.plist
@@ -37,6 +37,8 @@
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
+ <key>UIFileSharingEnabled</key>
+ <true/>
<key>UIMainStoryboardFile</key>
<string>MainStoryboard_iPhone</string>
<key>UIMainStoryboardFile~ipad</key>
diff --git a/gst-sdk/tutorials/xcode iOS/Tutorial 4/ViewController.h b/gst-sdk/tutorials/xcode iOS/Tutorial 4/VideoViewController.h
index 677f65b..37064f1 100644
--- a/gst-sdk/tutorials/xcode iOS/Tutorial 4/ViewController.h
+++ b/gst-sdk/tutorials/xcode iOS/Tutorial 4/VideoViewController.h
@@ -1,7 +1,7 @@
#import <UIKit/UIKit.h>
#import "GStreamerBackendDelegate.h"
-@interface ViewController : UIViewController <GStreamerBackendDelegate> {
+@interface VideoViewController : UIViewController <GStreamerBackendDelegate> {
IBOutlet UILabel *message_label;
IBOutlet UIBarButtonItem *play_button;
IBOutlet UIBarButtonItem *pause_button;
@@ -11,6 +11,8 @@
IBOutlet NSLayoutConstraint *video_height_constraint;
}
+@property (retain,nonatomic) NSString *uri;
+
-(IBAction) play:(id)sender;
-(IBAction) pause:(id)sender;
diff --git a/gst-sdk/tutorials/xcode iOS/Tutorial 4/ViewController.m b/gst-sdk/tutorials/xcode iOS/Tutorial 4/VideoViewController.m
index 93eae20..d4bc16d 100644
--- a/gst-sdk/tutorials/xcode iOS/Tutorial 4/ViewController.m
+++ b/gst-sdk/tutorials/xcode iOS/Tutorial 4/VideoViewController.m
@@ -1,8 +1,8 @@
-#import "ViewController.h"
+#import "VideoViewController.h"
#import "GStreamerBackend.h"
#import <UIKit/UIKit.h>
-@interface ViewController () {
+@interface VideoViewController () {
GStreamerBackend *gst_backend;
int media_width;
int media_height;
@@ -10,7 +10,9 @@
@end
-@implementation ViewController
+@implementation VideoViewController
+
+@synthesize uri;
/*
* Methods from UIViewController
@@ -30,6 +32,14 @@
gst_backend = [[GStreamerBackend alloc] init:self videoView:video_view];
}
+- (void)viewDidDisappear:(BOOL)animated
+{
+ if (gst_backend)
+ {
+ [gst_backend deinit];
+ }
+}
+
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
@@ -75,6 +85,7 @@
play_button.enabled = TRUE;
pause_button.enabled = TRUE;
message_label.text = @"Ready";
+ [gst_backend setUri:uri];
});
}
diff --git a/gst-sdk/tutorials/xcode iOS/Tutorial 4/en.lproj/MainStoryboard_iPad.storyboard b/gst-sdk/tutorials/xcode iOS/Tutorial 4/en.lproj/MainStoryboard_iPad.storyboard
index 98d0b70..c1b9cf2 100644
--- a/gst-sdk/tutorials/xcode iOS/Tutorial 4/en.lproj/MainStoryboard_iPad.storyboard
+++ b/gst-sdk/tutorials/xcode iOS/Tutorial 4/en.lproj/MainStoryboard_iPad.storyboard
@@ -1,15 +1,30 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="3084" systemVersion="11G63" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" initialViewController="z7O-8l-Zeo">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="3084" systemVersion="11G63" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" initialViewController="b7k-ZL-0G1">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="2083"/>
</dependencies>
<scenes>
- <!--View Controller-->
+ <!--Navigation Controller-->
+ <scene sceneID="3gA-ZI-2k3">
+ <objects>
+ <navigationController definesPresentationContext="YES" id="b7k-ZL-0G1" sceneMemberID="viewController">
+ <navigationBar key="navigationBar" contentMode="scaleToFill" id="zhK-zc-ohc">
+ <autoresizingMask key="autoresizingMask"/>
+ </navigationBar>
+ <connections>
+ <segue destination="VW0-ax-bPv" kind="relationship" relationship="rootViewController" id="bWs-EK-FdN"/>
+ </connections>
+ </navigationController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="Sqh-T0-zkr" userLabel="First Responder" sceneMemberID="firstResponder"/>
+ </objects>
+ <point key="canvasLocation" x="-1459" y="-199"/>
+ </scene>
+ <!--VideoViewController-->
<scene sceneID="P93-nn-HBJ">
<objects>
- <viewController id="z7O-8l-Zeo" customClass="ViewController" sceneMemberID="viewController">
+ <viewController title="Playback" id="z7O-8l-Zeo" userLabel="VideoViewController" customClass="VideoViewController" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="CqS-Gu-I1O">
- <rect key="frame" x="0.0" y="20" width="768" height="1004"/>
+ <rect key="frame" x="0.0" y="64" width="768" height="960"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="xWd-bg-0b6" userLabel="VideoContainer">
@@ -71,6 +86,7 @@
<constraint firstItem="MUi-CE-Ydy" firstAttribute="bottom" secondItem="CqS-Gu-I1O" secondAttribute="bottom" constant="20" symbolic="YES" type="user" id="w6K-xy-EJe"/>
</constraints>
</view>
+ <navigationItem key="navigationItem" id="fGF-kQ-bge"/>
<simulatedOrientationMetrics key="simulatedOrientationMetrics"/>
<connections>
<outlet property="message_label" destination="iLX-h1-Ko5" id="Q0Y-3J-zis"/>
@@ -84,18 +100,75 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iRS-GG-bR6" sceneMemberID="firstResponder"/>
</objects>
+ <point key="canvasLocation" x="439" y="-199"/>
+ </scene>
+ <!--LibraryViewController-->
+ <scene sceneID="bq0-Ch-DBo">
+ <objects>
+ <tableViewController title="Library" id="VW0-ax-bPv" userLabel="LibraryViewController" customClass="LibraryViewController" sceneMemberID="viewController">
+ <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="singleLineEtched" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" id="hAr-jJ-10J">
+ <rect key="frame" x="0.0" y="64" width="768" height="960"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
+ <prototypes>
+ <tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="CellIdentifier" textLabel="HoX-KW-H9G" detailTextLabel="iD6-8p-XIU" style="IBUITableViewCellStyleSubtitle" id="ujV-TF-eMq">
+ <rect key="frame" x="0.0" y="54" width="768" height="46"/>
+ <autoresizingMask key="autoresizingMask"/>
+ <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
+ <rect key="frame" x="45" y="1" width="658" height="43"/>
+ <autoresizingMask key="autoresizingMask"/>
+ <subviews>
+ <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" tag="10" contentMode="left" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HoX-KW-H9G">
+ <fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
+ </label>
+ <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" tag="11" contentMode="left" text="Subtitle" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iD6-8p-XIU">
+ <fontDescription key="fontDescription" type="system" pointSize="14"/>
+ <color key="textColor" red="0.50196078431372548" green="0.50196078431372548" blue="0.50196078431372548" alpha="1" colorSpace="calibratedRGB"/>
+ <color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
+ </label>
+ </subviews>
+ <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
+ </view>
+ <connections>
+ <segue destination="z7O-8l-Zeo" kind="push" identifier="playVideo" id="wKB-w6-zJS"/>
+ </connections>
+ </tableViewCell>
+ </prototypes>
+ <connections>
+ <outlet property="dataSource" destination="VW0-ax-bPv" id="9qF-zP-TH5"/>
+ <outlet property="delegate" destination="VW0-ax-bPv" id="9Ss-rm-lAe"/>
+ </connections>
+ </tableView>
+ <navigationItem key="navigationItem" id="G3n-WN-bmw">
+ <barButtonItem key="rightBarButtonItem" systemItem="refresh" id="Gpf-LU-6E1" userLabel="Refresh">
+ <connections>
+ <action selector="refresh:" destination="VW0-ax-bPv" id="nUp-eS-LmM"/>
+ </connections>
+ </barButtonItem>
+ </navigationItem>
+ </tableViewController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="7RK-lx-45a" userLabel="First Responder" sceneMemberID="firstResponder"/>
+ </objects>
+ <point key="canvasLocation" x="-478" y="-199"/>
</scene>
</scenes>
<classes>
<class className="EaglUIView" superclassName="UIView">
<source key="sourceIdentifier" type="project" relativePath="./Classes/EaglUIView.h"/>
</class>
- <class className="ViewController" superclassName="UIViewController">
- <source key="sourceIdentifier" type="project" relativePath="./Classes/ViewController.h"/>
+ <class className="LibraryViewController" superclassName="UITableViewController">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/LibraryViewController.h"/>
+ <relationships>
+ <relationship kind="action" name="refresh:"/>
+ </relationships>
+ </class>
+ <class className="VideoViewController" superclassName="UIViewController">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/VideoViewController.h"/>
<relationships>
<relationship kind="action" name="pause:"/>
<relationship kind="action" name="play:"/>
- <relationship kind="outlet" name="label" candidateClass="UILabel"/>
<relationship kind="outlet" name="message_label" candidateClass="UILabel"/>
<relationship kind="outlet" name="pause_button" candidateClass="UIBarButtonItem"/>
<relationship kind="outlet" name="play_button" candidateClass="UIBarButtonItem"/>
diff --git a/gst-sdk/tutorials/xcode iOS/Tutorial 4/gst_ios_init.h b/gst-sdk/tutorials/xcode iOS/Tutorial 4/gst_ios_init.h
index 3e3406e..6129a94 100644
--- a/gst-sdk/tutorials/xcode iOS/Tutorial 4/gst_ios_init.h
+++ b/gst-sdk/tutorials/xcode iOS/Tutorial 4/gst_ios_init.h
@@ -11,17 +11,17 @@ G_BEGIN_DECLS
#define GST_IOS_PLUGINS_CORE
//#define GST_IOS_PLUGINS_CAPTURE
-//#define GST_IOS_PLUGINS_CODECS_RESTRICTED
+#define GST_IOS_PLUGINS_CODECS_RESTRICTED
//#define GST_IOS_PLUGINS_ENCODING
//#define GST_IOS_PLUGINS_DVD
-//#define GST_IOS_PLUGINS_CODECS_GPL
-//#define GST_IOS_PLUGINS_NET_RESTRICTED
+#define GST_IOS_PLUGINS_CODECS_GPL
+#define GST_IOS_PLUGINS_NET_RESTRICTED
#define GST_IOS_PLUGINS_SYS
//#define GST_IOS_PLUGINS_VIS
#define GST_IOS_PLUGINS_PLAYBACK
#define GST_IOS_PLUGINS_EFFECTS
-//#define GST_IOS_PLUGINS_CODECS
-//#define GST_IOS_PLUGINS_NET
+#define GST_IOS_PLUGINS_CODECS
+#define GST_IOS_PLUGINS_NET
void gst_ios_init ();