[vlc-devel] commit: macosx/framework: fixed MPEG2 exporting, updated iPod video profile (requires contribs with mp4a encoder) and added a method to stop all this ( Felix Paul Kühne )
git version control
git at videolan.org
Sun Dec 13 00:09:30 CET 2009
vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sun Dec 13 00:09:13 2009 +0100| [251c4c88810d2249bd4dec514b4555d7b2cef2a7] | committer: Felix Paul Kühne
macosx/framework: fixed MPEG2 exporting, updated iPod video profile (requires contribs with mp4a encoder) and added a method to stop all this
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=251c4c88810d2249bd4dec514b4555d7b2cef2a7
---
.../framework/Headers/Public/VLCStreamSession.h | 1 +
projects/macosx/framework/Sources/VLCMedia.m | 1 +
.../macosx/framework/Sources/VLCStreamOutput.m | 15 ++++++++-------
.../macosx/framework/Sources/VLCStreamSession.m | 11 ++++++++---
4 files changed, 18 insertions(+), 10 deletions(-)
diff --git a/projects/macosx/framework/Headers/Public/VLCStreamSession.h b/projects/macosx/framework/Headers/Public/VLCStreamSession.h
index 2772e58..669d92b 100644
--- a/projects/macosx/framework/Headers/Public/VLCStreamSession.h
+++ b/projects/macosx/framework/Headers/Public/VLCStreamSession.h
@@ -42,4 +42,5 @@
@property (readonly) BOOL isComplete;
- (void)startStreaming;
+- (void)stopStreaming;
@end
diff --git a/projects/macosx/framework/Sources/VLCMedia.m b/projects/macosx/framework/Sources/VLCMedia.m
index 11a0f33..7a1bd77 100644
--- a/projects/macosx/framework/Sources/VLCMedia.m
+++ b/projects/macosx/framework/Sources/VLCMedia.m
@@ -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]);
diff --git a/projects/macosx/framework/Sources/VLCStreamOutput.m b/projects/macosx/framework/Sources/VLCStreamOutput.m
index ac1b463..f33ca22 100644
--- a/projects/macosx/framework/Sources/VLCStreamOutput.m
+++ b/projects/macosx/framework/Sources/VLCStreamOutput.m
@@ -70,19 +70,20 @@
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
]
@@ -128,13 +129,13 @@
[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",
diff --git a/projects/macosx/framework/Sources/VLCStreamSession.m b/projects/macosx/framework/Sources/VLCStreamSession.m
index d4884ce..136f310 100644
--- a/projects/macosx/framework/Sources/VLCStreamSession.m
+++ b/projects/macosx/framework/Sources/VLCStreamSession.m
@@ -57,20 +57,25 @@
}
-- (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:
More information about the vlc-devel
mailing list