]> git.sesse.net Git - vlc/commitdiff
macosx/framework: fixed MPEG2 exporting, updated iPod video profile (requires contrib...
authorFelix Paul Kühne <fkuehne@videolan.org>
Sat, 12 Dec 2009 23:09:13 +0000 (00:09 +0100)
committerFelix Paul Kühne <fkuehne@videolan.org>
Sat, 12 Dec 2009 23:09:28 +0000 (00:09 +0100)
projects/macosx/framework/Headers/Public/VLCStreamSession.h
projects/macosx/framework/Sources/VLCMedia.m
projects/macosx/framework/Sources/VLCStreamOutput.m
projects/macosx/framework/Sources/VLCStreamSession.m

index 2772e58580f248c9bc0f62a89bb297861dd28961..669d92b5621ad19f086897f4dcb98657711e37d3 100644 (file)
@@ -42,4 +42,5 @@
 @property (readonly) BOOL isComplete;
 
 - (void)startStreaming;
+- (void)stopStreaming;
 @end
index 11a0f334b21d2d09abb543056393cc569c20e13b..7a1bd7776d233c128fc8831c30a4921e941ef248 100644 (file)
@@ -354,6 +354,7 @@ static void HandleMediaSubItemAdded(const libvlc_event_t * event, void * self)
 {
     libvlc_media_t * p_md;
     p_md = libvlc_media_duplicate( [media libVLCMediaDescriptor] );
+
     for( NSString * key in [options allKeys] )
     {
         libvlc_media_add_option(p_md, [[NSString stringWithFormat:@"%@=#%@", key, [options objectForKey:key]] UTF8String]);
index ac1b46375edae0751fe030cd7c9cb88df34d7228..f33ca2217532b1936e78fe9c19d2226bfe7d49df 100644 (file)
     return [self streamOutputWithOptionDictionary:[NSDictionary dictionaryWithObjectsAndKeys:
                                             [NSDictionary dictionaryWithObjectsAndKeys:
                                                 @"h264", @"videoCodec",
-                                                @"1024",  @"videoBitrate",
+                                                @"1024",  @"videoBitrate", // max by Apple: 1.5 mbps
                                                 @"mp4a", @"audioCodec",
-                                                @"192", @"audioBitrate",
+                                                @"128", @"audioBitrate", // max by Apple: 160 kbps
                                                 @"2",   @"channels",
-                                                @"320", @"width",
-                                                @"240", @"canvasHeight",
+                                                @"640", @"width", // max by Apple: do.
+                                                @"480", @"canvasHeight", // max by Apple: do.
                                                 @"Yes", @"audio-sync",
                                                 nil
                                             ], @"transcodingOptions",
                                             [NSDictionary dictionaryWithObjectsAndKeys:
                                                 @"mp4", @"muxer",
                                                 @"file", @"access",
-                                                [[filePath copy] autorelease], @"destination", nil
+                                                [[filePath copy] autorelease], @"destination", 
+                                                nil
                                             ], @"outputOptions",
                                             nil
                                             ]
                                             [NSDictionary dictionaryWithObjectsAndKeys:
                                                 @"mp2v", @"videoCodec",
                                                 @"1024", @"videoBitrate",
-                                                @"mp2a",   @"audioCodec",
+                                                @"mpga",   @"audioCodec",
                                                 @"128",   @"audioBitrate",
                                                 @"Yes",   @"audio-sync",
                                                 nil
                                             ], @"transcodingOptions",
                                             [NSDictionary dictionaryWithObjectsAndKeys:
-                                                @"mpeg", @"muxer",
+                                                @"ps", @"muxer",
                                                 @"file", @"access",
                                                 [[filePath copy] autorelease], @"destination", nil
                                             ], @"outputOptions",
index d4884ce7e257738936b018e68360e340a704d124..136f3109f887d10c72fe54bb12533d89e5cc8ab5 100644 (file)
 }
 
 
-- (void)startStreaming;
+- (void)startStreaming
 {
     self.isComplete = NO;
     [self play];
 }
 
-- (BOOL)play;
+- (void)stopStreaming
+{
+    self.isComplete = YES;
+    [super stop];
+}
+
+- (BOOL)play
 {
     NSString * libvlcArgs;
     if( self.drawable )
         libvlcArgs = [NSString stringWithFormat:@"duplicate{dst=display,dst=\"%@\"}",[streamOutput representedLibVLCOptions]];
     else
         libvlcArgs = [streamOutput representedLibVLCOptions];
-
     if( libvlcArgs )
     {
         [super setMedia: [VLCMedia mediaWithMedia:originalMedia andLibVLCOptions: