• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
QTKit : Creating and saving a movie Reference to an URL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

QTKit : Creating and saving a movie Reference to an URL


  • Subject: QTKit : Creating and saving a movie Reference to an URL
  • From: "Pascal Vuylsteker" <email@hidden>
  • Date: Thu, 16 Nov 2006 12:58:18 +0100

Using QTKit, I want to build a small utility that will create a
quicktime file which should just be a reference to a media (mpeg layer
2 file) on a server.

Here is what I did :

// Creation of a QTMovie from a data reference

QTMovie *movie = [[QTMovie movieWithDataReference:[QTDataReference

dataReferenceWithReferenceToURL:[NSURL

URLWithString:@"http://localhost/test/128P00103_01.MPA";]]

                            error:&theError] retain];

// Little check : it seems to work until there :
		NSLog([NSString stringWithFormat:@"A movie was created pointing to
URL :  %@", [[movie attributeForKey:QTMovieURLAttribute]
absoluteString]]);

// Then save the movie file as a non flattened movie (containing just
the reference)

NSMutableDictionary *savedMovieAttributes = [NSDictionary
   dictionaryWithObject:[NSNumber numberWithBool:NO]
				  forKey:QTMovieFlatten];

if([movie writeToFile:@"/Users/pvk/Desktop/movie-ref.mov"
		withAttributes:savedMovieAttributes])
		NSLog(@"The movie was written to file /Users/pvk/Desktop/movie-ref.mov");
	else
		NSLog(@"Bug when writing the file /Users/pvk/Desktop/movie-ref.mov");

Here, I keep getting the "Bug when writing the file..."
When I open a local file, the code works well (save the file with a
correct, but local, reference), so I guess QTKit is trying to load the
remote file and refuse to save until it is loaded. But I do not want
to load that remote file : I just want to create a reference movie...

---
Pascal Vuylsteker  - http://www.vrarchitect.net/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Diggest [:.VIRUS.:]
  • Next by Date: Re: CoreData, reset a persistent store
  • Previous by thread: Re: Diggest [:.VIRUS.:]
  • Next by thread: escape special characters in HTML
  • Index(es):
    • Date
    • Thread