]> git.sesse.net Git - vlc/blobdiff - projects/macosx/framework/Sources/VLCStreamOutput.m
VLCKit: QuickTime doesn't support mp4v but h264 in mp4.
[vlc] / projects / macosx / framework / Sources / VLCStreamOutput.m
index 0e9808674944bb4ac4b39ee4242fb16c123aef5b..01021ef9efd6f28388ca95d87c0df37875dc5191 100644 (file)
@@ -1,15 +1,30 @@
-//
-//  VLCStreamOutput.m
-//  VLCKit
-//
-//  Created by Pierre d'Herbemont on 1/12/08.
-//  Copyright 2008 __MyCompanyName__. All rights reserved.
-//
+/*****************************************************************************
+ * VLCStreamOutput.m: VLCKit.framework VLCStreamOutput implementation
+ *****************************************************************************
+ * Copyright (C) 2008 Pierre d'Herbemont
+ * Copyright (C) 2008 the VideoLAN team
+ * $Id$
+ *
+ * Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
 
 #import "VLCStreamOutput.h"
 #import "VLCLibVLCBridging.h"
 
-
 @implementation VLCStreamOutput
 - (id)initWithOptionDictionary:(NSDictionary *)dictionary
 {
 }
 + (id)rtpBroadcastStreamOutputWithSAPAnnounce:(NSString *)announceName
 {
-    return [self streamOutputWithOptionDictionary:[NSDictionary dictionaryWithObjectsAndKeys:
+    NSString *name = [announceName copy];
+    id output = [self streamOutputWithOptionDictionary:[NSDictionary dictionaryWithObjectsAndKeys:
                                             [NSDictionary dictionaryWithObjectsAndKeys:
                                                 @"ts", @"muxer",
                                                 @"file", @"access",
                                                 @"sap", @"sdp",
-                                                [announceName copy], @"name",
+                                                name, @"name",
                                                 @"239.255.1.1", @"destination", nil
                                             ], @"rtpOptions",
                                             nil
                                             ]
                                         ];
+    [name release];
+    return output;
 }
 
 + (id)rtpBroadcastStreamOutput
@@ -51,7 +69,7 @@
 {
     return [self streamOutputWithOptionDictionary:[NSDictionary dictionaryWithObjectsAndKeys:
                                             [NSDictionary dictionaryWithObjectsAndKeys:
-                                                @"mp4v", @"videoCodec",
+                                                @"h264", @"videoCodec",
                                                 @"1024",  @"videoBitrate",
                                                 @"mp4a", @"audioCodec",
                                                 @"192", @"audioBitrate",