vlc | branch: master | Marvin Scholz | Thu Jun 16 23:54:18
2016 +0200| [6f2093a7e443b06b6fd13346eddb1fff6c7f0e7b] | committer: Felix Paul
Kühne
macosx: Add Renderer Dialog
This adds a dialog to choose a renderer discovered with VLCRendererDiscovery,
this allows for example to render to Chromecast in the future.
Additionally edited the Makefile for the new classes to be compiled.
Signed-off-by: Felix Paul Kühne
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6f2093a7e443b06b6fd13346eddb1fff6c7f0e7b
---
modules/gui/macosx/Makefile.am |5 +-
modules/gui/macosx/VLCRendererDialog.h | 35
modules/gui/macosx/VLCRendererDialog.m | 155
3 files changed, 194 insertions(+), 1 deletion(-)
diff --git a/modules/gui/macosx/Makefile.am b/modules/gui/macosx/Makefile.am
index 1210d47..787f1cb 100644
--- a/modules/gui/macosx/Makefile.am
+++ b/modules/gui/macosx/Makefile.am
@@ -81,4 +81,7 @@ libmacosx_plugin_la_SOURCES = \
VLCHUDButtonCell.h VLCHUDButtonCell.m \
VLCHUDCheckboxCell.h VLCHUDCheckboxCell.m \
VLCHUDRadiobuttonCell.h VLCHUDRadiobuttonCell.m \
- VLCHUDTextFieldCell.h VLCHUDTextFieldCell.m
+ VLCHUDTextFieldCell.h VLCHUDTextFieldCell.m \
+ VLCRendererDiscovery.h VLCRendererDiscovery.m \
+ VLCRendererItem.h VLCRendererItem.m \
+ VLCRendererDialog.h VLCRendererDialog.m
diff --git a/modules/gui/macosx/VLCRendererDialog.h
b/modules/gui/macosx/VLCRendererDialog.h
new file mode 100644
index 000..4999294
--- /dev/null
+++ b/modules/gui/macosx/VLCRendererDialog.h
@@ -0,0 +1,35 @@
+/*
+ * VLCRendererDialog.h: View controller class for the renderer dialog
+ *
+ * Copyright (C) 2016 VLC authors and VideoLAN
+ * $Id$
+ *
+ * Authors: Marvin Scholz
+ *
+ * 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
+
+#import "VLCRendererItem.h"
+#import "VLCRendererDiscovery.h"
+
+@interface VLCRendererDialog : NSWindowController
+
+@property NSMutableArray *rendererItems;
+
+- (IBAction)selectRenderer:(id)sender;
+
+@end
diff --git a/modules/gui/macosx/VLCRendererDialog.m
b/modules/gui/macosx/VLCRendererDialog.m
new file mode 100644
index 000..f2f2d16
--- /dev/null
+++ b/modules/gui/macosx/VLCRendererDialog.m
@@ -0,0 +1,155 @@
+/*
+ * VLCRendererDialog.m: View controller class for the renderer dialog
+ *
+ * Copyright (C) 2016 VLC authors and VideoLAN
+ * $Id$
+ *
+ * Authors: Marvin Scholz
+ *
+ * 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 "VLCRendererDialog.h"
+
+#import "VLCRendererItem.h"
+#import "intf.h"
+
+#include
+
+
+@interface VLCRendererDialog ()
+{
+IBOutlet NSTableView *tableView;
+IBOutlet NSArrayController *arrayController;
+
+NSMutableArray *renderer_discoveries;
+
+intf_thread_t *p_intf;
+vlc_renderer_discovery *p_rd;
+}
+@end
+
+@implementation VLCRendererDialog
+
+- (id)init
+{
+self = [super initWithWindowNibName:@"VLCRendererDialog"];
+if (self) {
+_rendererItems = [[NSMutableArray