From 109e63d7d77d5b60e63368e5ce6e9f70b463cfc5 Mon Sep 17 00:00:00 2001 From: Jan Berkel Date: Wed, 22 Apr 2015 14:43:07 +0100 Subject: [PATCH] playback/player: ios: Extract online media into plist https://github.com/sdroege/gst-player/pull/20 --- .../player/ios/GstPlay.xcodeproj/project.pbxproj | 4 +++ .../player/ios/GstPlay/LibraryViewController.m | 31 +--------------------- playback/player/ios/GstPlay/OnlineMedia.plist | 30 +++++++++++++++++++++ 3 files changed, 35 insertions(+), 30 deletions(-) create mode 100644 playback/player/ios/GstPlay/OnlineMedia.plist diff --git a/playback/player/ios/GstPlay.xcodeproj/project.pbxproj b/playback/player/ios/GstPlay.xcodeproj/project.pbxproj index 6b1d3fa..ee94d2d 100644 --- a/playback/player/ios/GstPlay.xcodeproj/project.pbxproj +++ b/playback/player/ios/GstPlay.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 19A17EFC8D41A75E8D3DB72E /* OnlineMedia.plist in Resources */ = {isa = PBXBuildFile; fileRef = 19A176455D27298FE4041DC3 /* OnlineMedia.plist */; }; AD2B881F198D631B0070367B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AD2B881E198D631B0070367B /* Foundation.framework */; }; AD2B8821198D631B0070367B /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AD2B8820198D631B0070367B /* CoreGraphics.framework */; }; AD2B8823198D631B0070367B /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AD2B8822198D631B0070367B /* UIKit.framework */; }; @@ -26,6 +27,7 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 19A176455D27298FE4041DC3 /* OnlineMedia.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = OnlineMedia.plist; sourceTree = ""; }; AD2B881B198D631B0070367B /* GstPlay.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GstPlay.app; sourceTree = BUILT_PRODUCTS_DIR; }; AD2B881E198D631B0070367B /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; AD2B8820198D631B0070367B /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; @@ -113,6 +115,7 @@ AD2B885F198D65780070367B /* VideoViewController.h */, AD2B8860198D65780070367B /* VideoViewController.m */, AD2B8827198D631B0070367B /* Supporting Files */, + 19A176455D27298FE4041DC3 /* OnlineMedia.plist */, ); path = GstPlay; sourceTree = ""; @@ -206,6 +209,7 @@ AD2B8835198D631B0070367B /* Ubuntu-R.ttf in Resources */, AD2B8833198D631B0070367B /* fonts.conf in Resources */, AD2B882B198D631B0070367B /* InfoPlist.strings in Resources */, + 19A17EFC8D41A75E8D3DB72E /* OnlineMedia.plist in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/playback/player/ios/GstPlay/LibraryViewController.m b/playback/player/ios/GstPlay/LibraryViewController.m index f1aead5..330328f 100644 --- a/playback/player/ios/GstPlay/LibraryViewController.m +++ b/playback/player/ios/GstPlay/LibraryViewController.m @@ -130,36 +130,7 @@ static NSString *CellIdentifier = @"CellIdentifier"; [entries addObject:[NSString stringWithFormat:@"file://%@/%@", docsPath, e]]; } self->mediaEntries = entries; - - /* Hardcoded list of Online media files */ - 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; + self->onlineEntries = [NSArray arrayWithContentsOfURL:[[NSBundle mainBundle] URLForResource:@"OnlineMedia" withExtension:@"plist"]]; } @end diff --git a/playback/player/ios/GstPlay/OnlineMedia.plist b/playback/player/ios/GstPlay/OnlineMedia.plist new file mode 100644 index 0000000..3a1c6c4 --- /dev/null +++ b/playback/player/ios/GstPlay/OnlineMedia.plist @@ -0,0 +1,30 @@ + + + + + + http://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_480p_surround-fix.avi + http://mirrorblender.top-ix.org/peach/bigbuckbunny_movies/big_buck_bunny_480p_h264.mov + http://mirrorblender.top-ix.org/peach/bigbuckbunny_movies/big_buck_bunny_480p_stereo.ogg + http://mirrorblender.top-ix.org/peach/bigbuckbunny_movies/big_buck_bunny_480p_stereo.avi + + + http://ftp.nluug.nl/ftp/graphics/blender/apricot/trailer/Sintel_Trailer1.480p.DivX_Plus_HD.mkv + http://ftp.nluug.nl/ftp/graphics/blender/apricot/trailer/sintel_trailer-480p.mp4 + http://ftp.nluug.nl/ftp/graphics/blender/apricot/trailer/sintel_trailer-480p.ogv + http://mirrorblender.top-ix.org/movies/sintel-1024-surround.mp4 + + + http://blender-mirror.kino3d.org/mango/download.blender.org/demo/movies/ToS/tears_of_steel_720p.mkv + http://blender-mirror.kino3d.org/mango/download.blender.org/demo/movies/ToS/tears_of_steel_720p.mov + http://media.xiph.org/mango/tears_of_steel_1080p.webm + + + http://radio.hbr1.com:19800/trance.ogg + http://radio.hbr1.com:19800/tronic.aac + + + http://non-existing.org/Non_Existing_Server + http://docs.gstreamer.com/Non_Existing_File + + -- 2.7.4