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 8caece4da2..a5a87f7a9f 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 @@ -105,7 +105,6 @@ 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 */ @@ -235,8 +234,6 @@ C6EB85B6173BEFF800C3953D /* appicon-4-iPad@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "appicon-4-iPad@2x.png"; sourceTree = ""; }; C6EB85B7173BEFF800C3953D /* appicon-4-iPhone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "appicon-4-iPhone.png"; sourceTree = ""; }; C6EB85B8173BEFF800C3953D /* appicon-4-iPhone@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "appicon-4-iPhone@2x.png"; sourceTree = ""; }; - C6EB85C5174233B200C3953D /* LibraryViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LibraryViewController.h; sourceTree = ""; }; - C6EB85C6174233B300C3953D /* LibraryViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LibraryViewController.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -531,8 +528,6 @@ C6EB8590173BEE5E00C3953D /* AppDelegate.m */, C6EB8598173BEE5E00C3953D /* MainStoryboard_iPhone.storyboard */, C6EB859B173BEE5E00C3953D /* MainStoryboard_iPad.storyboard */, - C6EB85C5174233B200C3953D /* LibraryViewController.h */, - C6EB85C6174233B300C3953D /* LibraryViewController.m */, C6EB859E173BEE5E00C3953D /* VideoViewController.h */, C6EB859F173BEE5E00C3953D /* VideoViewController.m */, C6EB8587173BEE5E00C3953D /* Supporting Files */, @@ -834,7 +829,6 @@ 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/LibraryViewController.h b/gst-sdk/tutorials/xcode iOS/Tutorial 4/LibraryViewController.h deleted file mode 100644 index db18bfaf2c..0000000000 --- a/gst-sdk/tutorials/xcode iOS/Tutorial 4/LibraryViewController.h +++ /dev/null @@ -1,11 +0,0 @@ -#import - -@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 deleted file mode 100644 index e0ec124205..0000000000 --- a/gst-sdk/tutorials/xcode iOS/Tutorial 4/LibraryViewController.m +++ /dev/null @@ -1,131 +0,0 @@ -#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; - - entries = [[NSMutableArray alloc] init]; - - // Big Buck Bunny - [entries addObject:@"http://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_480p_surround-fix.avi"]; - [entries addObject:@"http://mirrorblender.top-ix.org/peach/bigbuckbunny_movies/big_buck_bunny_480p_h264.mov"]; - [entries addObject:@"http://mirrorblender.top-ix.org/peach/bigbuckbunny_movies/big_buck_bunny_480p_stereo.ogg"]; - [entries addObject:@"http://mirrorblender.top-ix.org/peach/bigbuckbunny_movies/big_buck_bunny_480p_stereo.avi"]; - - // Sintel - [entries addObject:@"http://ftp.nluug.nl/ftp/graphics/blender/apricot/trailer/Sintel_Trailer1.480p.DivX_Plus_HD.mkv"]; - [entries addObject:@"http://ftp.nluug.nl/ftp/graphics/blender/apricot/trailer/sintel_trailer-480p.mp4"]; - [entries addObject:@"http://ftp.nluug.nl/ftp/graphics/blender/apricot/trailer/sintel_trailer-480p.ogv"]; - [entries addObject:@"http://mirrorblender.top-ix.org/movies/sintel-1024-surround.mp4"]; - - // Tears of Steel - [entries addObject:@"http://blender-mirror.kino3d.org/mango/download.blender.org/demo/movies/ToS/tears_of_steel_720p.mkv"]; - [entries addObject:@"http://blender-mirror.kino3d.org/mango/download.blender.org/demo/movies/ToS/tears_of_steel_720p.mov"]; - [entries addObject:@"http://media.xiph.org/mango/tears_of_steel_1080p.webm"]; - - // Radio stations - [entries addObject:@"http://radio.hbr1.com:19800/trance.ogg"]; - [entries addObject:@"http://radio.hbr1.com:19800/tronic.aac"]; - - // Non-existing entries (to debug error reporting facilities) - [entries addObject:@"http://non-existing.org/Non_Existing_Server"]; - [entries addObject:@"http://docs.gstreamer.com/Non_Existing_File"]; - - self->onlineEntries = entries; -} - -@end diff --git a/gst-sdk/tutorials/xcode iOS/Tutorial 4/VideoViewController.m b/gst-sdk/tutorials/xcode iOS/Tutorial 4/VideoViewController.m index 2ba633082e..68223e0074 100644 --- a/gst-sdk/tutorials/xcode iOS/Tutorial 4/VideoViewController.m +++ b/gst-sdk/tutorials/xcode iOS/Tutorial 4/VideoViewController.m @@ -21,7 +21,7 @@ * Private methods */ -/* The text widget acts as an slave for the seek bar, so it reflects what the seek bar shows, whether +/* The text widget acts as an slave for the seek bar, so it reflects what the seek bar shows, whether * it is an actual pipeline position or the position the user is currently dragging to. */ - (void) updateTimeWidget { @@ -66,6 +66,8 @@ media_width = 320; media_height = 240; + uri = @"http://docs.gstreamer.com/media/sintel_trailer-368p.ogv"; + gst_backend = [[GStreamerBackend alloc] init:self videoView:video_view]; } 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 d91286610f..5507fda167 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,30 +1,15 @@ - + - - - - - - - - - - - - - - - - + @@ -106,7 +91,6 @@ - @@ -125,68 +109,11 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/gst-sdk/tutorials/xcode iOS/Tutorial 4/en.lproj/MainStoryboard_iPhone.storyboard b/gst-sdk/tutorials/xcode iOS/Tutorial 4/en.lproj/MainStoryboard_iPhone.storyboard index deb9a86352..d538d99440 100644 --- a/gst-sdk/tutorials/xcode iOS/Tutorial 4/en.lproj/MainStoryboard_iPhone.storyboard +++ b/gst-sdk/tutorials/xcode iOS/Tutorial 4/en.lproj/MainStoryboard_iPhone.storyboard @@ -1,31 +1,15 @@ - + - - - - - - - - - - - - - - - - - + @@ -107,7 +91,6 @@ - @@ -126,72 +109,11 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -