account: merge audio and video panel

AccVideoVC + AccAudioVC = AccMediaVC

Tuleap: #406
Change-Id: I757d66322975b9362e42cb313a6f50986591bef6
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0682748..b3be35e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -81,10 +81,8 @@
    src/PreferencesWC.h
    src/AccGeneralVC.mm
    src/AccGeneralVC.h
-   src/AccVideoVC.mm
-   src/AccVideoVC.h
-   src/AccAudioVC.mm
-   src/AccAudioVC.h
+   src/AccMediaVC.mm
+   src/AccMediaVC.h
    src/AccRingVC.mm
    src/AccRingVC.h
    src/AccAdvancedVC.mm
@@ -157,8 +155,7 @@
    GeneralPrefs
    Accounts
    AccGeneral
-   AccAudio
-   AccVideo
+   AccMedia
    AccRing
    AccAdvanced
    AccSecurity
diff --git a/src/AccAudioVC.mm b/src/AccAudioVC.mm
deleted file mode 100644
index 6e841e9..0000000
--- a/src/AccAudioVC.mm
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- *  Copyright (C) 2015-2016 Savoir-faire Linux Inc.
- *  Author: Alexandre Lision <alexandre.lision@savoirfairelinux.com>
- *
- *  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 3 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 "AccAudioVC.h"
-
-///Qt
-#import <QSortFilterProxyModel>
-#import <qitemselectionmodel.h>
-
-///LRC
-#import <audio/codecmodel.h>
-#import <accountmodel.h>
-#import <ringtonemodel.h>
-#import <ringtone.h>
-
-@interface AccAudioVC ()
-
-@property QNSTreeController* treeController;
-@property (assign) IBOutlet NSOutlineView* codecsView;
-@property (unsafe_unretained) IBOutlet NSPopUpButton* ringtonePopUpButton;
-@property (unsafe_unretained) IBOutlet NSButton* enableRingtone;
-@property (unsafe_unretained) IBOutlet NSButton* playRingtone;
-
-@end
-
-@implementation AccAudioVC
-@synthesize treeController;
-@synthesize codecsView;
-@synthesize ringtonePopUpButton, enableRingtone, playRingtone;
-
-NSInteger const TAG_CHECK       =   100;
-NSInteger const TAG_NAME        =   200;
-NSInteger const TAG_FREQUENCY   =   300;
-
-- (void) loadView
-{
-    [super loadView];
-    NSLog(@"INIT Audio VC");
-    QObject::connect(AccountModel::instance().selectionModel(),
-                     &QItemSelectionModel::currentChanged,
-                     [=](const QModelIndex &current, const QModelIndex &previous) {
-                         if(!current.isValid())
-                             return;
-                         [self loadAccount];
-                     });
-
-    QObject::connect(&RingtoneModel::instance(),
-                     &QAbstractItemModel::dataChanged,
-                     [=](const QModelIndex &current, const QModelIndex &previous) {
-                         if(!current.isValid())
-                             return;
-
-                         NSString* label;
-                         if (!RingtoneModel::instance().isPlaying()) {
-                             label = NSLocalizedString(@"Play", @"Button label");
-                         } else {
-                             label = NSLocalizedString(@"Pause", @"Button label");
-                         }
-                         [playRingtone setTitle:label];
-                     });
-}
-
-- (void)loadAccount
-{
-    auto account = AccountModel::instance().selectedAccount();
-    treeController = [[QNSTreeController alloc] initWithQModel:account->codecModel()->audioCodecs()];
-
-    [treeController setAvoidsEmptySelection:NO];
-    [treeController setChildrenKeyPath:@"children"];
-
-    [codecsView bind:@"content" toObject:treeController withKeyPath:@"arrangedObjects" options:nil];
-    [codecsView bind:@"sortDescriptors" toObject:treeController withKeyPath:@"sortDescriptors" options:nil];
-    [codecsView bind:@"selectionIndexPaths" toObject:treeController withKeyPath:@"selectionIndexPaths" options:nil];
-
-    QModelIndex qIdx = RingtoneModel::instance().selectionModel(account)->currentIndex();
-    [ringtonePopUpButton removeAllItems];
-    [ringtonePopUpButton addItemWithTitle:RingtoneModel::instance().data(qIdx, Qt::DisplayRole).toString().toNSString()];
-
-    [enableRingtone setState:account->isRingtoneEnabled()];
-    [ringtonePopUpButton setEnabled:account->isRingtoneEnabled()];
-}
-
-- (IBAction)startStopRingtone:(id)sender {
-    auto qIdx = RingtoneModel::instance().selectionModel(AccountModel::instance().selectedAccount())->currentIndex();
-    RingtoneModel::instance().play(qIdx);
-}
-
-- (IBAction)toggleRingtoneEnabled:(id)sender {
-    AccountModel::instance().selectedAccount()->setRingtoneEnabled([sender state]);
-    [ringtonePopUpButton setEnabled:[sender state]];
-}
-
-- (IBAction)chooseRingtone:(id)sender {
-    int index = [sender indexOfSelectedItem];
-    QModelIndex qIdx = RingtoneModel::instance().index(index, 0);
-    RingtoneModel::instance().selectionModel(AccountModel::instance().selectedAccount())->setCurrentIndex(qIdx, QItemSelectionModel::ClearAndSelect);
-}
-
-- (IBAction)moveUp:(id)sender {
-    if([[treeController selectedNodes] count] > 0) {
-        QModelIndex qIdx = [treeController toQIdx:[treeController selectedNodes][0]];
-        if(!qIdx.isValid())
-            return;
-
-        QMimeData* mime = AccountModel::instance().selectedAccount()->codecModel()->audioCodecs()->mimeData(QModelIndexList() << qIdx);
-        AccountModel::instance().selectedAccount()->codecModel()->audioCodecs()->dropMimeData(mime, Qt::MoveAction, qIdx.row() - 1, 0, QModelIndex());
-    }
-}
-
-- (IBAction)moveDown:(id)sender {
-    if([[treeController selectedNodes] count] > 0) {
-        QModelIndex qIdx = [treeController toQIdx:[treeController selectedNodes][0]];
-        if(!qIdx.isValid())
-            return;
-
-        QMimeData* mime = AccountModel::instance().selectedAccount()->codecModel()->audioCodecs()->mimeData(QModelIndexList() << qIdx);
-        AccountModel::instance().selectedAccount()->codecModel()->audioCodecs()->dropMimeData(mime, Qt::MoveAction, qIdx.row() + 1, 0, QModelIndex());
-    }
-}
-
-- (IBAction)toggleCodec:(NSButton*)sender {
-    NSInteger row = [codecsView rowForView:sender];
-    QModelIndex qIdx = AccountModel::instance().selectedAccount()->codecModel()->audioCodecs()->index(row, 0, QModelIndex());
-    AccountModel::instance().selectedAccount()->codecModel()->audioCodecs()->setData(qIdx, sender.state == NSOnState ? Qt::Checked : Qt::Unchecked, Qt::CheckStateRole);
-}
-
-#pragma mark - NSOutlineViewDelegate methods
-
-- (BOOL)outlineView:(NSOutlineView *)outlineView shouldSelectItem:(id)item;
-{
-    return YES;
-}
-
-- (NSView *)outlineView:(NSOutlineView *)outlineView viewForTableColumn:(NSTableColumn *)tableColumn item:(id)item
-{
-    NSTableView* result = [outlineView makeViewWithIdentifier:@"CodecView" owner:self];
-
-    QModelIndex qIdx = [treeController toQIdx:((NSTreeNode*)item)];
-    if(!qIdx.isValid())
-        return result;
-    NSTextField* name = [result viewWithTag:TAG_NAME];
-    NSTextField* frequency = [result viewWithTag:TAG_FREQUENCY];
-    NSButton* check = [result viewWithTag:TAG_CHECK];
-
-    [name setStringValue:AccountModel::instance().selectedAccount()->codecModel()->audioCodecs()->data(qIdx, CodecModel::Role::NAME).toString().toNSString()];
-    [frequency setStringValue:[NSString stringWithFormat:@"%@ Hz", AccountModel::instance().selectedAccount()->codecModel()->audioCodecs()->data(qIdx, CodecModel::Role::SAMPLERATE).toString().toNSString()]];
-    [check setState:AccountModel::instance().selectedAccount()->codecModel()->audioCodecs()->data(qIdx, Qt::CheckStateRole).value<BOOL>()?NSOnState:NSOffState];
-    return result;
-}
-
-#pragma mark - NSMenuDelegate methods
-
-- (BOOL)menu:(NSMenu *)menu updateItem:(NSMenuItem *)item atIndex:(NSInteger)index shouldCancel:(BOOL)shouldCancel
-{
-    QModelIndex qIdx;
-    qIdx = RingtoneModel::instance().index(index, 0);
-    [item setTitle:RingtoneModel::instance().data(qIdx, Qt::DisplayRole).toString().toNSString()];
-
-    if (qIdx == RingtoneModel::instance().selectionModel(AccountModel::instance().selectedAccount())->currentIndex()) {
-        [ringtonePopUpButton selectItem:item];
-    }
-    return YES;
-}
-
-- (NSInteger)numberOfItemsInMenu:(NSMenu *)menu
-{
-    return RingtoneModel::instance().rowCount();
-}
-
-@end
diff --git a/src/AccAudioVC.h b/src/AccMediaVC.h
similarity index 93%
rename from src/AccAudioVC.h
rename to src/AccMediaVC.h
index d871ded..9082adf 100644
--- a/src/AccAudioVC.h
+++ b/src/AccMediaVC.h
@@ -23,6 +23,6 @@
 
 #import "QNSTreeController.h"
 
-@interface AccAudioVC : NSViewController <NSOutlineViewDelegate>
+@interface AccMediaVC : NSViewController <NSOutlineViewDelegate>
 
 @end
\ No newline at end of file
diff --git a/src/AccMediaVC.mm b/src/AccMediaVC.mm
new file mode 100644
index 0000000..22e4013
--- /dev/null
+++ b/src/AccMediaVC.mm
@@ -0,0 +1,268 @@
+/*
+ *  Copyright (C) 2015-2016 Savoir-faire Linux Inc.
+ *  Author: Alexandre Lision <alexandre.lision@savoirfairelinux.com>
+ *
+ *  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 3 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 "AccMediaVC.h"
+
+///Qt
+#import <QSortFilterProxyModel>
+#import <qitemselectionmodel.h>
+
+///LRC
+#import <audio/codecmodel.h>
+#import <accountmodel.h>
+#import <ringtonemodel.h>
+#import <ringtone.h>
+
+@interface AccMediaVC ()
+
+@property QNSTreeController* audioTreeController;
+@property QNSTreeController* videoTreeController;
+@property (unsafe_unretained) IBOutlet NSPopUpButton* ringtonePopUpButton;
+@property (unsafe_unretained) IBOutlet NSButton* enableRingtone;
+@property (unsafe_unretained) IBOutlet NSButton* playRingtone;
+@property (unsafe_unretained) IBOutlet NSButton *toggleVideoButton;
+@property (unsafe_unretained) IBOutlet NSOutlineView* audioCodecView;
+@property (unsafe_unretained) IBOutlet NSOutlineView* videoCodecView;
+@property (unsafe_unretained) IBOutlet NSView* videoPanelContainer;
+
+@end
+
+@implementation AccMediaVC
+@synthesize audioTreeController, videoTreeController;
+@synthesize audioCodecView, videoCodecView;
+@synthesize videoPanelContainer;
+@synthesize ringtonePopUpButton, enableRingtone, playRingtone, toggleVideoButton;
+
+NSInteger const TAG_CHECK       =   100;
+NSInteger const TAG_NAME        =   200;
+NSInteger const TAG_DETAILS     =   300;
+
+NSString*  const ID_AUDIO       =   @"audioview";
+NSString*  const ID_VIDEO       =   @"videoview";
+
+- (void) loadView
+{
+    [super loadView];
+    NSLog(@"INIT Media VC");
+    QObject::connect(AccountModel::instance().selectionModel(),
+                     &QItemSelectionModel::currentChanged,
+                     [=](const QModelIndex &current, const QModelIndex &previous) {
+                         if(!current.isValid())
+                             return;
+                         [self loadAccount];
+                     });
+
+    QObject::connect(&RingtoneModel::instance(),
+                     &QAbstractItemModel::dataChanged,
+                     [=](const QModelIndex &current, const QModelIndex &previous) {
+                         if(!current.isValid())
+                             return;
+
+                         NSString* label;
+                         if (!RingtoneModel::instance().isPlaying()) {
+                             label = NSLocalizedString(@"Play", @"Button label");
+                         } else {
+                             label = NSLocalizedString(@"Pause", @"Button label");
+                         }
+                         [playRingtone setTitle:label];
+                     });
+}
+
+- (void)loadAccount
+{
+    // AUDIO
+    [self loadAudioPrefs];
+
+    // VIDEO
+    [self loadVideoPrefs];
+
+}
+
+#pragma Audio Preferences method
+
+- (void) loadAudioPrefs
+{
+    auto account = AccountModel::instance().selectedAccount();
+    audioTreeController = [[QNSTreeController alloc] initWithQModel:account->codecModel()->audioCodecs()];
+    [audioTreeController setAvoidsEmptySelection:NO];
+    [audioTreeController setChildrenKeyPath:@"children"];
+    [audioCodecView bind:@"content" toObject:audioTreeController withKeyPath:@"arrangedObjects" options:nil];
+    [audioCodecView bind:@"sortDescriptors" toObject:audioTreeController withKeyPath:@"sortDescriptors" options:nil];
+    [audioCodecView bind:@"selectionIndexPaths" toObject:audioTreeController withKeyPath:@"selectionIndexPaths" options:nil];
+    [audioCodecView setIdentifier:ID_AUDIO];
+
+    QModelIndex qIdx = RingtoneModel::instance().selectionModel(account)->currentIndex();
+    [ringtonePopUpButton removeAllItems];
+    [ringtonePopUpButton addItemWithTitle:RingtoneModel::instance().data(qIdx, Qt::DisplayRole).toString().toNSString()];
+
+    [enableRingtone setState:account->isRingtoneEnabled()];
+    [ringtonePopUpButton setEnabled:account->isRingtoneEnabled()];
+}
+
+- (IBAction)startStopRingtone:(id)sender {
+    auto qIdx = RingtoneModel::instance().selectionModel(AccountModel::instance().selectedAccount())->currentIndex();
+    RingtoneModel::instance().play(qIdx);
+}
+
+- (IBAction)toggleRingtoneEnabled:(id)sender {
+    AccountModel::instance().selectedAccount()->setRingtoneEnabled([sender state]);
+    [ringtonePopUpButton setEnabled:[sender state]];
+}
+
+- (IBAction)chooseRingtone:(id)sender {
+    int index = [sender indexOfSelectedItem];
+    QModelIndex qIdx = RingtoneModel::instance().index(index, 0);
+    RingtoneModel::instance().selectionModel(AccountModel::instance().selectedAccount())->setCurrentIndex(qIdx, QItemSelectionModel::ClearAndSelect);
+}
+
+- (IBAction)moveAudioCodecUp:(id)sender {
+    if([[audioTreeController selectedNodes] count] > 0) {
+        QModelIndex qIdx = [audioTreeController toQIdx:[audioTreeController selectedNodes][0]];
+        if(!qIdx.isValid())
+            return;
+
+        QMimeData* mime = AccountModel::instance().selectedAccount()->codecModel()->audioCodecs()->mimeData(QModelIndexList() << qIdx);
+        AccountModel::instance().selectedAccount()->codecModel()->audioCodecs()->dropMimeData(mime, Qt::MoveAction, qIdx.row() - 1, 0, QModelIndex());
+    }
+}
+
+- (IBAction)moveAudioCodecDown:(id)sender {
+    if([[audioTreeController selectedNodes] count] > 0) {
+        QModelIndex qIdx = [audioTreeController toQIdx:[audioTreeController selectedNodes][0]];
+        if(!qIdx.isValid())
+            return;
+
+        QMimeData* mime = AccountModel::instance().selectedAccount()->codecModel()->audioCodecs()->mimeData(QModelIndexList() << qIdx);
+        AccountModel::instance().selectedAccount()->codecModel()->audioCodecs()->dropMimeData(mime, Qt::MoveAction, qIdx.row() + 1, 0, QModelIndex());
+    }
+}
+
+- (IBAction)toggleAudioCodec:(NSButton*)sender {
+    NSInteger row = [audioCodecView rowForView:sender];
+    QModelIndex qIdx = AccountModel::instance().selectedAccount()->codecModel()->audioCodecs()->index(row, 0, QModelIndex());
+    AccountModel::instance().selectedAccount()->codecModel()->audioCodecs()->setData(qIdx, sender.state == NSOnState ? Qt::Checked : Qt::Unchecked, Qt::CheckStateRole);
+}
+
+#pragma Video Preferences method
+
+-(void) loadVideoPrefs
+{
+    auto account = AccountModel::instance().selectedAccount();
+    videoTreeController = [[QNSTreeController alloc] initWithQModel:account->codecModel()->videoCodecs()];
+    [videoTreeController setAvoidsEmptySelection:NO];
+    [videoTreeController setChildrenKeyPath:@"children"];
+
+    [videoCodecView setIdentifier:ID_VIDEO];
+    [videoCodecView bind:@"content" toObject:videoTreeController withKeyPath:@"arrangedObjects" options:nil];
+    [videoCodecView bind:@"sortDescriptors" toObject:videoTreeController withKeyPath:@"sortDescriptors" options:nil];
+    [videoCodecView bind:@"selectionIndexPaths" toObject:videoTreeController withKeyPath:@"selectionIndexPaths" options:nil];
+    [videoPanelContainer setHidden:!account->isVideoEnabled()];
+    [toggleVideoButton setState:account->isVideoEnabled()?NSOnState:NSOffState];
+
+}
+
+- (IBAction)toggleVideoEnabled:(id)sender {
+    AccountModel::instance().selectedAccount()->setVideoEnabled([sender state] == NSOnState);
+    [videoPanelContainer setHidden:!AccountModel::instance().selectedAccount()->isVideoEnabled()];
+}
+
+- (IBAction)toggleVideoCodec:(NSButton*)sender {
+    NSInteger row = [videoCodecView rowForView:sender];
+    QModelIndex qIdx = AccountModel::instance().selectedAccount()->codecModel()->videoCodecs()->index(row, 0, QModelIndex());
+    AccountModel::instance().selectedAccount()->codecModel()->videoCodecs()->setData(qIdx, sender.state == NSOnState ? Qt::Checked : Qt::Unchecked, Qt::CheckStateRole);
+}
+
+- (IBAction)moveVideoCodecUp:(id)sender {
+
+    if([[videoTreeController selectedNodes] count] > 0) {
+        QModelIndex qIdx = [videoTreeController toQIdx:[videoTreeController selectedNodes][0]];
+        if(!qIdx.isValid())
+            return;
+
+        QMimeData* mime = AccountModel::instance().selectedAccount()->codecModel()->mimeData(QModelIndexList() << qIdx);
+        AccountModel::instance().selectedAccount()->codecModel()->dropMimeData(mime, Qt::MoveAction, qIdx.row() - 1, 0, QModelIndex());
+    }
+}
+
+- (IBAction)moveVideoCodecDown:(id)sender {
+    if([[videoTreeController selectedNodes] count] > 0) {
+        QModelIndex qIdx = [videoTreeController toQIdx:[videoTreeController selectedNodes][0]];
+        if(!qIdx.isValid())
+            return;
+
+        QMimeData* mime = AccountModel::instance().selectedAccount()->codecModel()->mimeData(QModelIndexList() << qIdx);
+        AccountModel::instance().selectedAccount()->codecModel()->dropMimeData(mime, Qt::MoveAction, qIdx.row() + 1, 0, QModelIndex());
+    }
+}
+
+
+#pragma mark - NSOutlineViewDelegate methods
+
+- (BOOL)outlineView:(NSOutlineView *)outlineView shouldSelectItem:(id)item;
+{
+    return YES;
+}
+
+- (NSView *)outlineView:(NSOutlineView *)outlineView viewForTableColumn:(NSTableColumn *)tableColumn item:(id)item
+{
+    NSTableView* result = [outlineView makeViewWithIdentifier:@"CodecView" owner:self];
+
+    QModelIndex qIdx;
+    if ([outlineView.identifier isEqualToString:ID_AUDIO])
+        qIdx = [audioTreeController toQIdx:((NSTreeNode*)item)];
+    else
+        qIdx = [videoTreeController toQIdx:((NSTreeNode*)item)];
+
+    if(!qIdx.isValid())
+        return result;
+    NSTextField* name = [result viewWithTag:TAG_NAME];
+    NSTextField* details = [result viewWithTag:TAG_DETAILS];
+    NSButton* check = [result viewWithTag:TAG_CHECK];
+
+    if ([outlineView.identifier isEqualToString:ID_AUDIO]) {
+        [name setStringValue:AccountModel::instance().selectedAccount()->codecModel()->audioCodecs()->data(qIdx, CodecModel::Role::NAME).toString().toNSString()];
+        [details setStringValue:[NSString stringWithFormat:@"%@ Hz", AccountModel::instance().selectedAccount()->codecModel()->audioCodecs()->data(qIdx, CodecModel::Role::SAMPLERATE).toString().toNSString()]];
+        [check setState:AccountModel::instance().selectedAccount()->codecModel()->audioCodecs()->data(qIdx, Qt::CheckStateRole).value<BOOL>()?NSOnState:NSOffState];
+    } else {
+        [name setStringValue:AccountModel::instance().selectedAccount()->codecModel()->videoCodecs()->data(qIdx, CodecModel::Role::NAME).toString().toNSString()];
+        [check setState:AccountModel::instance().selectedAccount()->codecModel()->videoCodecs()->data(qIdx, Qt::CheckStateRole).value<BOOL>()?NSOnState:NSOffState];
+    }
+
+    return result;
+}
+
+#pragma mark - NSMenuDelegate methods
+
+- (BOOL)menu:(NSMenu *)menu updateItem:(NSMenuItem *)item atIndex:(NSInteger)index shouldCancel:(BOOL)shouldCancel
+{
+    QModelIndex qIdx;
+    qIdx = RingtoneModel::instance().index(index, 0);
+    [item setTitle:RingtoneModel::instance().data(qIdx, Qt::DisplayRole).toString().toNSString()];
+
+    if (qIdx == RingtoneModel::instance().selectionModel(AccountModel::instance().selectedAccount())->currentIndex()) {
+        [ringtonePopUpButton selectItem:item];
+    }
+    return YES;
+}
+
+- (NSInteger)numberOfItemsInMenu:(NSMenu *)menu
+{
+    return RingtoneModel::instance().rowCount();
+}
+
+@end
diff --git a/src/AccVideoVC.h b/src/AccVideoVC.h
deleted file mode 100644
index 1cc0cb1..0000000
--- a/src/AccVideoVC.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- *  Copyright (C) 2015-2016 Savoir-faire Linux Inc.
- *  Author: Alexandre Lision <alexandre.lision@savoirfairelinux.com>
- *
- *  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 3 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 <Cocoa/Cocoa.h>
-
-#import <account.h>
-
-@interface AccVideoVC : NSViewController <NSOutlineViewDelegate>
-
-@end
\ No newline at end of file
diff --git a/src/AccVideoVC.mm b/src/AccVideoVC.mm
deleted file mode 100644
index 3ff97a9..0000000
--- a/src/AccVideoVC.mm
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
- *  Copyright (C) 2015-2016 Savoir-faire Linux Inc.
- *  Author: Alexandre Lision <alexandre.lision@savoirfairelinux.com>
- *
- *  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 3 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.
- */
-#define COLUMNID_STATE   @"VideoStateColumn"
-#define COLUMNID_CODECS   @"VideoCodecsColumn"
-#define COLUMNID_FREQ     @"VideoFrequencyColumn"
-#define COLUMNID_BITRATE  @"VideoBitrateColumn"
-
-#import "AccVideoVC.h"
-
-#include <QtCore/QSortFilterProxyModel>
-#import <audio/codecmodel.h>
-#import <accountmodel.h>
-#import <qitemselectionmodel.h>
-
-#import "QNSTreeController.h"
-
-@interface AccVideoVC ()
-
-@property QNSTreeController *treeController;
-@property (assign) IBOutlet NSOutlineView *codecsView;
-@property (assign) IBOutlet NSView *videoPanelContainer;
-@property (assign) IBOutlet NSButton *toggleVideoButton;
-
-@end
-
-@implementation AccVideoVC
-@synthesize treeController;
-@synthesize codecsView;
-@synthesize videoPanelContainer;
-@synthesize toggleVideoButton;
-
-- (void)awakeFromNib
-{
-    NSLog(@"INIT Video VC");
-    QObject::connect(AccountModel::instance().selectionModel(),
-                     &QItemSelectionModel::currentChanged,
-                     [=](const QModelIndex &current, const QModelIndex &previous) {
-                         if(!current.isValid())
-                             return;
-                         [self loadAccount];
-                     });
-}
-
-- (Account*) currentAccount
-{
-    auto accIdx = AccountModel::instance().selectionModel()->currentIndex();
-    return AccountModel::instance().getAccountByModelIndex(accIdx);
-}
-
-- (void)loadAccount
-{
-    auto account = [self currentAccount];
-
-    treeController = [[QNSTreeController alloc] initWithQModel:account->codecModel()->videoCodecs()];
-    [treeController setAvoidsEmptySelection:NO];
-    [treeController setChildrenKeyPath:@"children"];
-
-    [codecsView bind:@"content" toObject:treeController withKeyPath:@"arrangedObjects" options:nil];
-    [codecsView bind:@"sortDescriptors" toObject:treeController withKeyPath:@"sortDescriptors" options:nil];
-    [codecsView bind:@"selectionIndexPaths" toObject:treeController withKeyPath:@"selectionIndexPaths" options:nil];
-    [videoPanelContainer setHidden:!account->isVideoEnabled()];
-    [toggleVideoButton setState:account->isVideoEnabled()?NSOnState:NSOffState];
-}
-
-- (IBAction)toggleVideoEnabled:(id)sender {
-    [self currentAccount]->setVideoEnabled([sender state] == NSOnState);
-    [videoPanelContainer setHidden:![self currentAccount]->isVideoEnabled()];
-}
-
-- (IBAction)toggleCodec:(NSOutlineView*)sender {
-    NSInteger row = [sender clickedRow];
-    NSTableColumn *col = [sender tableColumnWithIdentifier:COLUMNID_STATE];
-    NSButtonCell *cell = [col dataCellForRow:row];
-    [self currentAccount]->codecModel()->videoCodecs()->setData([self currentAccount]->codecModel()->videoCodecs()->index(row, 0, QModelIndex()),
-        cell.state == NSOnState ? Qt::Unchecked : Qt::Checked, Qt::CheckStateRole);
-}
-
-- (IBAction)moveUp:(id)sender {
-
-    if([[treeController selectedNodes] count] > 0) {
-        QModelIndex qIdx = [treeController toQIdx:[treeController selectedNodes][0]];
-        if(!qIdx.isValid())
-            return;
-
-        QMimeData* mime = [self currentAccount]->codecModel()->mimeData(QModelIndexList() << qIdx);
-        [self currentAccount]->codecModel()->dropMimeData(mime, Qt::MoveAction, qIdx.row() - 1, 0, QModelIndex());
-    }
-}
-
-- (IBAction)moveDown:(id)sender {
-    if([[treeController selectedNodes] count] > 0) {
-        QModelIndex qIdx = [treeController toQIdx:[treeController selectedNodes][0]];
-        if(!qIdx.isValid())
-            return;
-
-        QMimeData* mime = [self currentAccount]->codecModel()->mimeData(QModelIndexList() << qIdx);
-        [self currentAccount]->codecModel()->dropMimeData(mime, Qt::MoveAction, qIdx.row() + 1, 0, QModelIndex());
-    }
-}
-
-#pragma mark - NSOutlineViewDelegate methods
-
-// -------------------------------------------------------------------------------
-//	shouldSelectItem:item
-// -------------------------------------------------------------------------------
-- (BOOL)outlineView:(NSOutlineView *)outlineView shouldSelectItem:(id)item;
-{
-    return YES;
-}
-
-// -------------------------------------------------------------------------------
-//	dataCellForTableColumn:tableColumn:item
-// -------------------------------------------------------------------------------
-- (NSCell *)outlineView:(NSOutlineView *)outlineView dataCellForTableColumn:(NSTableColumn *)tableColumn item:(id)item
-{
-    NSCell *returnCell = [tableColumn dataCell];
-
-    if(item == nil)
-        return returnCell;
-    return returnCell;
-}
-
-// -------------------------------------------------------------------------------
-//	textShouldEndEditing:fieldEditor
-// -------------------------------------------------------------------------------
-- (BOOL)control:(NSControl *)control textShouldEndEditing:(NSText *)fieldEditor
-{
-    if ([[fieldEditor string] length] == 0)
-    {
-        // don't allow empty node names
-        return NO;
-    }
-    else
-    {
-        return YES;
-    }
-}
-
-// -------------------------------------------------------------------------------
-//	shouldEditTableColumn:tableColumn:item
-//
-//	Decide to allow the edit of the given outline view "item".
-// -------------------------------------------------------------------------------
-- (BOOL)outlineView:(NSOutlineView *)outlineView shouldEditTableColumn:(NSTableColumn *)tableColumn item:(id)item
-{
-    return NO;
-}
-
-// -------------------------------------------------------------------------------
-//	outlineView:willDisplayCell:forTableColumn:item
-// -------------------------------------------------------------------------------
-- (void)outlineView:(NSOutlineView *)olv willDisplayCell:(NSCell*)cell forTableColumn:(NSTableColumn *)tableColumn item:(id)item
-{
-    QModelIndex qIdx = [treeController toQIdx:((NSTreeNode*)item)];
-    if(!qIdx.isValid())
-        return;
-
-    if([[tableColumn identifier] isEqualToString:COLUMNID_STATE]) {
-        [cell setState:[self currentAccount]->codecModel()->videoCodecs()->data(qIdx, Qt::CheckStateRole).value<BOOL>()?NSOnState:NSOffState];
-    } else if ([[tableColumn identifier] isEqualToString:COLUMNID_CODECS])
-    {
-        cell.title = [self currentAccount]->codecModel()->videoCodecs()->data(qIdx, CodecModel::Role::NAME).toString().toNSString();
-        [cell setState:[self currentAccount]->codecModel()->videoCodecs()->data(qIdx, Qt::CheckStateRole).value<BOOL>()?NSOnState:NSOffState];
-    } else if ([[tableColumn identifier] isEqualToString:COLUMNID_FREQ])
-    {
-        cell.title = [self currentAccount]->codecModel()->videoCodecs()->data(qIdx, CodecModel::Role::SAMPLERATE).toString().toNSString();
-    } else if ([[tableColumn identifier] isEqualToString:COLUMNID_BITRATE])
-    {
-        cell.title = [self currentAccount]->codecModel()->videoCodecs()->data(qIdx, CodecModel::Role::BITRATE).toString().toNSString();
-    }
-}
-
-// -------------------------------------------------------------------------------
-//	outlineViewSelectionDidChange:notification
-// -------------------------------------------------------------------------------
-- (void)outlineViewSelectionDidChange:(NSNotification *)notification
-{
-    // ask the tree controller for the current selection
-}
-
-@end
diff --git a/src/AccountsVC.mm b/src/AccountsVC.mm
index 84b4ca6..2c142e8 100644
--- a/src/AccountsVC.mm
+++ b/src/AccountsVC.mm
@@ -32,8 +32,7 @@
 
 #import "QNSTreeController.h"
 #import "AccGeneralVC.h"
-#import "AccAudioVC.h"
-#import "AccVideoVC.h"
+#import "AccMediaVC.h"
 #import "AccAdvancedVC.h"
 #import "AccSecurityVC.h"
 #import "AccRingVC.h"
@@ -57,8 +56,7 @@
 
 @property (assign) IBOutlet NSTabView *configPanels;
 @property (retain) IBOutlet NSTabViewItem *generalTabItem;
-@property (retain) IBOutlet NSTabViewItem *audioTabItem;
-@property (retain) IBOutlet NSTabViewItem *videoTabItem;
+@property (retain) IBOutlet NSTabViewItem *mediaTabItem;
 @property (retain) IBOutlet NSTabViewItem *advancedTabItem;
 @property (retain) IBOutlet NSTabViewItem *securityTabItem;
 @property (retain) IBOutlet NSTabViewItem *ringTabItem;
@@ -70,8 +68,7 @@
 
 @property AccRingVC* ringVC;
 @property AccGeneralVC* generalVC;
-@property AccAudioVC* audioVC;
-@property AccVideoVC* videoVC;
+@property AccMediaVC* audioVC;
 @property AccAdvancedVC* advancedVC;
 @property AccSecurityVC* securityVC;
 
@@ -81,8 +78,7 @@
 @synthesize protocolList;
 @synthesize configPanels;
 @synthesize generalTabItem;
-@synthesize audioTabItem;
-@synthesize videoTabItem;
+@synthesize mediaTabItem;
 @synthesize advancedTabItem;
 @synthesize securityTabItem;
 @synthesize ringTabItem;
@@ -122,15 +118,10 @@
     [[self.generalVC view] setBounds:[self.generalTabItem.view bounds]];
     [self.generalTabItem setView:self.generalVC.view];
 
-    self.audioVC = [[AccAudioVC alloc] initWithNibName:@"AccAudio" bundle:nil];
-    [[self.audioVC view] setFrame:[self.audioTabItem.view frame]];
-    [[self.audioVC view] setBounds:[self.audioTabItem.view bounds]];
-    [self.audioTabItem setView:self.audioVC.view];
-
-    self.videoVC = [[AccVideoVC alloc] initWithNibName:@"AccVideo" bundle:nil];
-    [[self.videoVC view] setFrame:[self.videoTabItem.view frame]];
-    [[self.videoVC view] setBounds:[self.videoTabItem.view bounds]];
-    [self.videoTabItem setView:self.videoVC.view];
+    self.audioVC = [[AccMediaVC alloc] initWithNibName:@"AccMedia" bundle:nil];
+    [[self.audioVC view] setFrame:[self.mediaTabItem.view frame]];
+    [[self.audioVC view] setBounds:[self.mediaTabItem.view bounds]];
+    [self.mediaTabItem setView:self.audioVC.view];
 
     self.advancedVC = [[AccAdvancedVC alloc] initWithNibName:@"AccAdvanced" bundle:nil];
     [[self.advancedVC view] setFrame:[self.advancedTabItem.view frame]];
@@ -196,10 +187,9 @@
     }
 
     [configPanels insertTabViewItem:generalTabItem atIndex:0];
-    [configPanels insertTabViewItem:audioTabItem atIndex:1];
-    [configPanels insertTabViewItem:videoTabItem atIndex:2];
-    [configPanels insertTabViewItem:advancedTabItem atIndex:3];
-    [configPanels insertTabViewItem:securityTabItem atIndex:4];
+    [configPanels insertTabViewItem:mediaTabItem atIndex:1];
+    [configPanels insertTabViewItem:advancedTabItem atIndex:2];
+    [configPanels insertTabViewItem:securityTabItem atIndex:3];
 }
 
 - (void) setupIAXPanels
@@ -210,8 +200,7 @@
     }
 
     [configPanels insertTabViewItem:generalTabItem atIndex:0];
-    [configPanels insertTabViewItem:audioTabItem atIndex:1];
-    [configPanels insertTabViewItem:videoTabItem atIndex:2];
+    [configPanels insertTabViewItem:mediaTabItem atIndex:1];
 }
 
 - (void) setupRINGPanels
@@ -222,9 +211,8 @@
     }
 
     [configPanels insertTabViewItem:ringTabItem atIndex:0];
-    [configPanels insertTabViewItem:audioTabItem atIndex:1];
-    [configPanels insertTabViewItem:videoTabItem atIndex:2];
-    [configPanels insertTabViewItem:advancedTabItem atIndex:3];
+    [configPanels insertTabViewItem:mediaTabItem atIndex:1];
+    [configPanels insertTabViewItem:advancedTabItem atIndex:2];
 
 }
 
diff --git a/ui/Base.lproj/AccAudio.xib b/ui/Base.lproj/AccAudio.xib
deleted file mode 100644
index 4770a68..0000000
--- a/ui/Base.lproj/AccAudio.xib
+++ /dev/null
@@ -1,174 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="9532"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="AccAudioVC">
-            <connections>
-                <outlet property="codecsView" destination="Hoj-hM-iTN" id="GJZ-DG-jsP"/>
-                <outlet property="enableRingtone" destination="Hmk-UR-N3c" id="mlo-Rs-aK3"/>
-                <outlet property="playRingtone" destination="sIN-vg-V1h" id="Tr4-B3-jjq"/>
-                <outlet property="ringtonePopUpButton" destination="eWp-24-n2G" id="hyf-7f-sbH"/>
-                <outlet property="view" destination="c22-O7-iKe" id="PBG-fI-bZm"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <customView id="c22-O7-iKe">
-            <rect key="frame" x="0.0" y="0.0" width="385" height="470"/>
-            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-            <subviews>
-                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="qs3-sN-wPV">
-                    <rect key="frame" x="18" y="361" width="53" height="17"/>
-                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Codecs" id="biN-bX-qM1">
-                        <font key="font" metaFont="systemBold"/>
-                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                        <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
-                    </textFieldCell>
-                </textField>
-                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ipf-oU-a70">
-                    <rect key="frame" x="18" y="433" width="72" height="17"/>
-                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Ringtones" id="aMg-uJ-Krx">
-                        <font key="font" metaFont="systemBold"/>
-                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                        <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
-                    </textFieldCell>
-                </textField>
-                <button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Hmk-UR-N3c">
-                    <rect key="frame" x="30" y="399" width="128" height="18"/>
-                    <buttonCell key="cell" type="check" title="Enable ringtones" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="KkI-i1-mfY">
-                        <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                        <font key="font" metaFont="system"/>
-                    </buttonCell>
-                    <connections>
-                        <action selector="toggleRingtoneEnabled:" target="-2" id="f96-LJ-xp0"/>
-                    </connections>
-                </button>
-                <popUpButton verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="eWp-24-n2G">
-                    <rect key="frame" x="162" y="394" width="144" height="26"/>
-                    <popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="Gqo-nO-EkC">
-                        <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
-                        <font key="font" metaFont="menu"/>
-                        <menu key="menu" id="Zb8-jY-Oso">
-                            <connections>
-                                <outlet property="delegate" destination="-2" id="tuo-Ys-8vs"/>
-                            </connections>
-                        </menu>
-                    </popUpButtonCell>
-                    <connections>
-                        <action selector="chooseRingtone:" target="-2" id="5OO-Kz-xvM"/>
-                    </connections>
-                </popUpButton>
-                <scrollView fixedFrame="YES" autohidesScrollers="YES" horizontalLineScroll="42" horizontalPageScroll="10" verticalLineScroll="42" verticalPageScroll="10" hasVerticalScroller="NO" usesPredominantAxisScrolling="NO" horizontalScrollElasticity="none" translatesAutoresizingMaskIntoConstraints="NO" id="1xr-Cs-qFP">
-                    <rect key="frame" x="32" y="48" width="245" height="305"/>
-                    <clipView key="contentView" ambiguous="YES" id="cqt-a3-hZH">
-                        <rect key="frame" x="1" y="1" width="243" height="303"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <subviews>
-                            <outlineView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" multipleSelection="NO" autosaveColumns="NO" rowHeight="40" rowSizeStyle="automatic" viewBased="YES" indentationPerLevel="16" outlineTableColumn="CzT-TV-KoW" id="Hoj-hM-iTN">
-                                <rect key="frame" x="0.0" y="0.0" width="243" height="303"/>
-                                <autoresizingMask key="autoresizingMask"/>
-                                <size key="intercellSpacing" width="3" height="2"/>
-                                <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                <color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
-                                <tableColumns>
-                                    <tableColumn width="240" minWidth="40" maxWidth="1000" id="CzT-TV-KoW">
-                                        <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border">
-                                            <font key="font" metaFont="smallSystem"/>
-                                            <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
-                                            <color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
-                                        </tableHeaderCell>
-                                        <textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" title="Text Cell" id="s2y-pc-JzP">
-                                            <font key="font" metaFont="system"/>
-                                            <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                                            <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                        </textFieldCell>
-                                        <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
-                                        <prototypeCellViews>
-                                            <tableCellView identifier="CodecView" id="52c-Sj-zSn">
-                                                <rect key="frame" x="1" y="1" width="240" height="40"/>
-                                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                                                <subviews>
-                                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" tag="200" translatesAutoresizingMaskIntoConstraints="NO" id="xSu-Oj-Kce">
-                                                        <rect key="frame" x="35" y="20" width="185" height="17"/>
-                                                        <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" placeholderString="Name" id="rU5-XQ-Ixc">
-                                                            <font key="font" metaFont="system"/>
-                                                            <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
-                                                            <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
-                                                        </textFieldCell>
-                                                    </textField>
-                                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" tag="300" translatesAutoresizingMaskIntoConstraints="NO" id="2FR-NB-tMy">
-                                                        <rect key="frame" x="35" y="2" width="185" height="17"/>
-                                                        <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" placeholderString="Frequency" id="dwG-Ro-bIS">
-                                                            <font key="font" metaFont="smallSystem"/>
-                                                            <color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
-                                                            <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
-                                                        </textFieldCell>
-                                                    </textField>
-                                                    <button fixedFrame="YES" tag="100" translatesAutoresizingMaskIntoConstraints="NO" id="v16-wU-2zM">
-                                                        <rect key="frame" x="1" y="5" width="30" height="30"/>
-                                                        <buttonCell key="cell" type="check" bezelStyle="regularSquare" imagePosition="overlaps" state="on" inset="2" id="kdp-cm-f6N">
-                                                            <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                                                            <font key="font" metaFont="system"/>
-                                                        </buttonCell>
-                                                        <connections>
-                                                            <action selector="toggleCodec:" target="-2" id="6h1-sT-6Yq"/>
-                                                        </connections>
-                                                    </button>
-                                                </subviews>
-                                            </tableCellView>
-                                        </prototypeCellViews>
-                                    </tableColumn>
-                                </tableColumns>
-                                <connections>
-                                    <outlet property="delegate" destination="-2" id="BM0-gX-GhX"/>
-                                </connections>
-                            </outlineView>
-                        </subviews>
-                        <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
-                    </clipView>
-                    <scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="wwL-yp-CBf">
-                        <rect key="frame" x="1" y="-15" width="0.0" height="16"/>
-                        <autoresizingMask key="autoresizingMask"/>
-                    </scroller>
-                    <scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="YWW-4n-DSr">
-                        <rect key="frame" x="-100" y="-100" width="15" height="102"/>
-                        <autoresizingMask key="autoresizingMask"/>
-                    </scroller>
-                </scrollView>
-                <button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="zaU-3l-OYA">
-                    <rect key="frame" x="26" y="13" width="58" height="32"/>
-                    <buttonCell key="cell" type="push" title="Up" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="MbZ-7X-K5I">
-                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                        <font key="font" metaFont="system"/>
-                    </buttonCell>
-                    <connections>
-                        <action selector="moveUp:" target="-2" id="3SD-Po-WZK"/>
-                    </connections>
-                </button>
-                <button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="xN7-EP-314">
-                    <rect key="frame" x="77" y="13" width="76" height="32"/>
-                    <buttonCell key="cell" type="push" title="Down" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="Bbz-hd-1CE">
-                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                        <font key="font" metaFont="system"/>
-                    </buttonCell>
-                    <connections>
-                        <action selector="moveDown:" target="-2" id="mQQ-dj-CAq"/>
-                    </connections>
-                </button>
-                <button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="sIN-vg-V1h">
-                    <rect key="frame" x="305" y="390" width="66" height="32"/>
-                    <buttonCell key="cell" type="push" title="Play" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="hHf-uc-NlW">
-                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                        <font key="font" metaFont="system"/>
-                    </buttonCell>
-                    <connections>
-                        <action selector="startStopRingtone:" target="-2" id="GFh-TD-9Fs"/>
-                    </connections>
-                </button>
-            </subviews>
-            <point key="canvasLocation" x="69.5" y="37"/>
-        </customView>
-    </objects>
-</document>
diff --git a/ui/Base.lproj/AccMedia.xib b/ui/Base.lproj/AccMedia.xib
new file mode 100644
index 0000000..8fdde84
--- /dev/null
+++ b/ui/Base.lproj/AccMedia.xib
@@ -0,0 +1,298 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+    <dependencies>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="9532"/>
+    </dependencies>
+    <objects>
+        <customObject id="-2" userLabel="File's Owner" customClass="AccMediaVC">
+            <connections>
+                <outlet property="audioCodecView" destination="Hoj-hM-iTN" id="bAp-p8-i65"/>
+                <outlet property="enableRingtone" destination="Hmk-UR-N3c" id="vlb-nT-QF0"/>
+                <outlet property="playRingtone" destination="sIN-vg-V1h" id="xrY-CY-D2c"/>
+                <outlet property="ringtonePopUpButton" destination="eWp-24-n2G" id="soS-v1-Smv"/>
+                <outlet property="toggleVideoButton" destination="yIN-c8-0R3" id="tnt-2Z-eAt"/>
+                <outlet property="videoCodecView" destination="yNY-ds-8Rl" id="bAG-gZ-7op"/>
+                <outlet property="videoPanelContainer" destination="Y2B-8B-e3u" id="MDU-zI-E7B"/>
+                <outlet property="view" destination="c22-O7-iKe" id="PBG-fI-bZm"/>
+            </connections>
+        </customObject>
+        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
+        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
+        <customView id="c22-O7-iKe">
+            <rect key="frame" x="0.0" y="0.0" width="533" height="470"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+            <subviews>
+                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="qs3-sN-wPV">
+                    <rect key="frame" x="18" y="361" width="53" height="17"/>
+                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Codecs" id="biN-bX-qM1">
+                        <font key="font" metaFont="systemBold"/>
+                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                    </textFieldCell>
+                </textField>
+                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ipf-oU-a70">
+                    <rect key="frame" x="18" y="433" width="72" height="17"/>
+                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Ringtones" id="aMg-uJ-Krx">
+                        <font key="font" metaFont="systemBold"/>
+                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                    </textFieldCell>
+                </textField>
+                <button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Hmk-UR-N3c">
+                    <rect key="frame" x="30" y="399" width="128" height="18"/>
+                    <buttonCell key="cell" type="check" title="Enable ringtones" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="KkI-i1-mfY">
+                        <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
+                        <font key="font" metaFont="system"/>
+                    </buttonCell>
+                    <connections>
+                        <action selector="toggleRingtoneEnabled:" target="-2" id="pnq-2w-ygB"/>
+                    </connections>
+                </button>
+                <popUpButton verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="eWp-24-n2G">
+                    <rect key="frame" x="162" y="395" width="144" height="26"/>
+                    <popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="Gqo-nO-EkC">
+                        <behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
+                        <font key="font" metaFont="menu"/>
+                        <menu key="menu" id="Zb8-jY-Oso">
+                            <connections>
+                                <outlet property="delegate" destination="-2" id="tuo-Ys-8vs"/>
+                            </connections>
+                        </menu>
+                    </popUpButtonCell>
+                    <connections>
+                        <action selector="chooseRingtone:" target="-2" id="fmj-Wk-tZP"/>
+                    </connections>
+                </popUpButton>
+                <scrollView fixedFrame="YES" autohidesScrollers="YES" horizontalLineScroll="42" horizontalPageScroll="10" verticalLineScroll="42" verticalPageScroll="10" hasVerticalScroller="NO" usesPredominantAxisScrolling="NO" horizontalScrollElasticity="none" translatesAutoresizingMaskIntoConstraints="NO" id="1xr-Cs-qFP">
+                    <rect key="frame" x="32" y="81" width="200" height="205"/>
+                    <clipView key="contentView" ambiguous="YES" copiesOnScroll="NO" id="cqt-a3-hZH">
+                        <rect key="frame" x="1" y="1" width="198" height="203"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <outlineView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" multipleSelection="NO" autosaveColumns="NO" rowHeight="40" rowSizeStyle="automatic" viewBased="YES" indentationPerLevel="16" outlineTableColumn="CzT-TV-KoW" id="Hoj-hM-iTN">
+                                <rect key="frame" x="0.0" y="0.0" width="198" height="203"/>
+                                <autoresizingMask key="autoresizingMask"/>
+                                <size key="intercellSpacing" width="3" height="2"/>
+                                <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                <color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
+                                <tableColumns>
+                                    <tableColumn width="195" minWidth="40" maxWidth="1000" id="CzT-TV-KoW">
+                                        <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border">
+                                            <font key="font" metaFont="smallSystem"/>
+                                            <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
+                                            <color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
+                                        </tableHeaderCell>
+                                        <textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" title="Text Cell" id="s2y-pc-JzP">
+                                            <font key="font" metaFont="system"/>
+                                            <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                                            <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                        </textFieldCell>
+                                        <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
+                                        <prototypeCellViews>
+                                            <tableCellView identifier="CodecView" id="52c-Sj-zSn">
+                                                <rect key="frame" x="1" y="1" width="195" height="40"/>
+                                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                                <subviews>
+                                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" tag="200" translatesAutoresizingMaskIntoConstraints="NO" id="xSu-Oj-Kce">
+                                                        <rect key="frame" x="35" y="20" width="159" height="17"/>
+                                                        <textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" placeholderString="Name" id="rU5-XQ-Ixc">
+                                                            <font key="font" metaFont="system"/>
+                                                            <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                                                            <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                                                        </textFieldCell>
+                                                    </textField>
+                                                    <button fixedFrame="YES" tag="100" translatesAutoresizingMaskIntoConstraints="NO" id="v16-wU-2zM">
+                                                        <rect key="frame" x="1" y="5" width="30" height="30"/>
+                                                        <buttonCell key="cell" type="check" bezelStyle="regularSquare" imagePosition="overlaps" state="on" inset="2" id="kdp-cm-f6N">
+                                                            <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
+                                                            <font key="font" metaFont="system"/>
+                                                        </buttonCell>
+                                                        <connections>
+                                                            <action selector="toggleAudioCodec:" target="-2" id="9jD-HM-7oo"/>
+                                                        </connections>
+                                                    </button>
+                                                    <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" tag="300" translatesAutoresizingMaskIntoConstraints="NO" id="2FR-NB-tMy">
+                                                        <rect key="frame" x="35" y="3" width="159" height="17"/>
+                                                        <textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="details" placeholderString="Frequency" id="dwG-Ro-bIS">
+                                                            <font key="font" metaFont="smallSystem"/>
+                                                            <color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
+                                                            <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                                                        </textFieldCell>
+                                                    </textField>
+                                                </subviews>
+                                            </tableCellView>
+                                        </prototypeCellViews>
+                                    </tableColumn>
+                                </tableColumns>
+                                <connections>
+                                    <outlet property="delegate" destination="-2" id="mjW-rM-OtO"/>
+                                </connections>
+                            </outlineView>
+                        </subviews>
+                        <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
+                    </clipView>
+                    <scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="wwL-yp-CBf">
+                        <rect key="frame" x="1" y="-15" width="0.0" height="16"/>
+                        <autoresizingMask key="autoresizingMask"/>
+                    </scroller>
+                    <scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="YWW-4n-DSr">
+                        <rect key="frame" x="-100" y="-100" width="15" height="102"/>
+                        <autoresizingMask key="autoresizingMask"/>
+                    </scroller>
+                </scrollView>
+                <button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="sIN-vg-V1h">
+                    <rect key="frame" x="305" y="390" width="66" height="32"/>
+                    <buttonCell key="cell" type="push" title="Play" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="hHf-uc-NlW">
+                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                        <font key="font" metaFont="system"/>
+                    </buttonCell>
+                    <connections>
+                        <action selector="startStopRingtone:" target="-2" id="3lj-lV-hen"/>
+                    </connections>
+                </button>
+                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="iuV-An-36N">
+                    <rect key="frame" x="135" y="294" width="39" height="17"/>
+                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Audio" id="gzX-Wc-S6g">
+                        <font key="font" metaFont="system"/>
+                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                    </textFieldCell>
+                </textField>
+                <customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Y2B-8B-e3u">
+                    <rect key="frame" x="240" y="20" width="233" height="266"/>
+                    <subviews>
+                        <scrollView fixedFrame="YES" autohidesScrollers="YES" horizontalLineScroll="42" horizontalPageScroll="10" verticalLineScroll="42" verticalPageScroll="10" hasVerticalScroller="NO" usesPredominantAxisScrolling="NO" horizontalScrollElasticity="none" translatesAutoresizingMaskIntoConstraints="NO" id="72G-E0-wtX">
+                            <rect key="frame" x="13" y="61" width="200" height="205"/>
+                            <clipView key="contentView" ambiguous="YES" copiesOnScroll="NO" id="oo6-Wd-J44">
+                                <rect key="frame" x="1" y="1" width="198" height="203"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                <subviews>
+                                    <outlineView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" multipleSelection="NO" autosaveColumns="NO" rowHeight="40" rowSizeStyle="automatic" viewBased="YES" indentationPerLevel="16" outlineTableColumn="Xys-sR-hUl" id="yNY-ds-8Rl">
+                                        <rect key="frame" x="0.0" y="0.0" width="198" height="203"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <size key="intercellSpacing" width="3" height="2"/>
+                                        <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                        <color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
+                                        <tableColumns>
+                                            <tableColumn width="195" minWidth="40" maxWidth="1000" id="Xys-sR-hUl">
+                                                <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border">
+                                                    <font key="font" metaFont="smallSystem"/>
+                                                    <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
+                                                    <color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
+                                                </tableHeaderCell>
+                                                <textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" title="Text Cell" id="9GC-2s-75b">
+                                                    <font key="font" metaFont="system"/>
+                                                    <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                                                    <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
+                                                </textFieldCell>
+                                                <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
+                                                <prototypeCellViews>
+                                                    <tableCellView identifier="CodecView" id="eGA-KK-H6t">
+                                                        <rect key="frame" x="1" y="1" width="195" height="40"/>
+                                                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                                        <subviews>
+                                                            <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" tag="200" translatesAutoresizingMaskIntoConstraints="NO" id="2Wg-ix-gd0">
+                                                                <rect key="frame" x="35" y="12" width="159" height="17"/>
+                                                                <textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" placeholderString="Name" id="pvl-9U-X4l">
+                                                                    <font key="font" metaFont="system"/>
+                                                                    <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                                                                    <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                                                                </textFieldCell>
+                                                            </textField>
+                                                            <button fixedFrame="YES" tag="100" translatesAutoresizingMaskIntoConstraints="NO" id="bmj-hW-xma">
+                                                                <rect key="frame" x="1" y="5" width="30" height="30"/>
+                                                                <buttonCell key="cell" type="check" bezelStyle="regularSquare" imagePosition="overlaps" state="on" inset="2" id="HHE-ru-HhM">
+                                                                    <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
+                                                                    <font key="font" metaFont="system"/>
+                                                                </buttonCell>
+                                                                <connections>
+                                                                    <action selector="toggleVideoCodec:" target="-2" id="b9P-eA-oYM"/>
+                                                                </connections>
+                                                            </button>
+                                                        </subviews>
+                                                    </tableCellView>
+                                                </prototypeCellViews>
+                                            </tableColumn>
+                                        </tableColumns>
+                                        <connections>
+                                            <outlet property="delegate" destination="-2" id="e3T-vQ-3Nj"/>
+                                        </connections>
+                                    </outlineView>
+                                </subviews>
+                                <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
+                            </clipView>
+                            <scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="IIE-4D-V6r">
+                                <rect key="frame" x="1" y="-15" width="0.0" height="16"/>
+                                <autoresizingMask key="autoresizingMask"/>
+                            </scroller>
+                            <scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="63m-L6-hzA">
+                                <rect key="frame" x="-100" y="-100" width="15" height="102"/>
+                                <autoresizingMask key="autoresizingMask"/>
+                            </scroller>
+                        </scrollView>
+                        <button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="6XD-mL-R1J">
+                            <rect key="frame" x="58" y="13" width="76" height="32"/>
+                            <buttonCell key="cell" type="push" title="Down" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="gza-RF-yKF">
+                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                <font key="font" metaFont="system"/>
+                            </buttonCell>
+                            <connections>
+                                <action selector="moveVideoCodecDown:" target="-2" id="DBE-il-C01"/>
+                            </connections>
+                        </button>
+                        <button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="d0K-3G-ydc">
+                            <rect key="frame" x="7" y="13" width="58" height="32"/>
+                            <buttonCell key="cell" type="push" title="Up" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="CO7-VF-04Q">
+                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                <font key="font" metaFont="system"/>
+                            </buttonCell>
+                            <connections>
+                                <action selector="moveVideoCodecUp:" target="-2" id="akN-15-2pP"/>
+                            </connections>
+                        </button>
+                    </subviews>
+                </customView>
+                <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="oh2-sl-p3s">
+                    <rect key="frame" x="30" y="319" width="485" height="34"/>
+                    <textFieldCell key="cell" sendsActionOnEndEditing="YES" id="rRr-la-G9L">
+                        <font key="font" metaFont="system"/>
+                        <string key="title">Codecs are used when establishing a communication with someone. They are activable and reorderable (first enabled in list preferred)</string>
+                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
+                    </textFieldCell>
+                </textField>
+                <button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="yIN-c8-0R3">
+                    <rect key="frame" x="341" y="295" width="71" height="18"/>
+                    <buttonCell key="cell" type="check" title="Video" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="OSC-eG-2kt">
+                        <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
+                        <font key="font" metaFont="system"/>
+                    </buttonCell>
+                    <connections>
+                        <action selector="toggleVideoEnabled:" target="-2" id="Q4i-b7-zYa"/>
+                    </connections>
+                </button>
+                <button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="zaU-3l-OYA">
+                    <rect key="frame" x="26" y="33" width="58" height="32"/>
+                    <buttonCell key="cell" type="push" title="Up" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="MbZ-7X-K5I">
+                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                        <font key="font" metaFont="system"/>
+                    </buttonCell>
+                    <connections>
+                        <action selector="moveAudioCodecUp:" target="-2" id="Fxa-M6-ybo"/>
+                    </connections>
+                </button>
+                <button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="xN7-EP-314">
+                    <rect key="frame" x="77" y="33" width="76" height="32"/>
+                    <buttonCell key="cell" type="push" title="Down" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="Bbz-hd-1CE">
+                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                        <font key="font" metaFont="system"/>
+                    </buttonCell>
+                    <connections>
+                        <action selector="moveAudioCodecDown:" target="-2" id="wVw-fT-HRo"/>
+                    </connections>
+                </button>
+            </subviews>
+            <point key="canvasLocation" x="143.5" y="37"/>
+        </customView>
+    </objects>
+</document>
diff --git a/ui/Base.lproj/AccVideo.xib b/ui/Base.lproj/AccVideo.xib
deleted file mode 100644
index 8cc6e17..0000000
--- a/ui/Base.lproj/AccVideo.xib
+++ /dev/null
@@ -1,159 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="8191" systemVersion="14F27" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="8191"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="AccVideoVC">
-            <connections>
-                <outlet property="codecsView" destination="H2b-i2-whr" id="bYR-bH-sP6"/>
-                <outlet property="toggleVideoButton" destination="cmS-cV-mVo" id="gSM-x9-hli"/>
-                <outlet property="videoPanelContainer" destination="qN4-Se-Waf" id="dfa-7c-bzY"/>
-                <outlet property="view" destination="c22-O7-iKe" id="H3B-2k-h1y"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <customView id="c22-O7-iKe">
-            <rect key="frame" x="0.0" y="0.0" width="432" height="342"/>
-            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-            <subviews>
-                <button ambiguous="YES" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="cmS-cV-mVo">
-                    <rect key="frame" x="18" y="306" width="102" height="18"/>
-                    <constraints>
-                        <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="98" id="cjj-gb-QeP"/>
-                    </constraints>
-                    <buttonCell key="cell" type="check" title="Enable video" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="ZYO-6G-DC2">
-                        <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                        <font key="font" metaFont="system"/>
-                    </buttonCell>
-                    <connections>
-                        <action selector="toggleVideoEnabled:" target="-2" id="nS4-3Q-Exm"/>
-                    </connections>
-                </button>
-                <customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="qN4-Se-Waf">
-                    <rect key="frame" x="33" y="55" width="379" height="245"/>
-                    <subviews>
-                        <scrollView focusRingType="none" fixedFrame="YES" autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0Xq-Du-JwG">
-                            <rect key="frame" x="0.0" y="46" width="315" height="170"/>
-                            <clipView key="contentView" focusRingType="none" ambiguous="YES" id="rmO-Zw-KC1">
-                                <rect key="frame" x="1" y="17" width="313" height="152"/>
-                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                                <subviews>
-                                    <outlineView focusRingType="none" verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" multipleSelection="NO" autosaveColumns="NO" headerView="bYO-LR-nVo" indentationPerLevel="16" outlineTableColumn="DSk-Vi-l91" id="H2b-i2-whr">
-                                        <rect key="frame" x="0.0" y="0.0" width="366" height="152"/>
-                                        <autoresizingMask key="autoresizingMask"/>
-                                        <size key="intercellSpacing" width="3" height="2"/>
-                                        <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                        <color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
-                                        <tableColumns>
-                                            <tableColumn identifier="VideoStateColumn" width="50" minWidth="10" maxWidth="100" id="eGS-FS-4hO" userLabel="State">
-                                                <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="Enabled">
-                                                    <font key="font" metaFont="smallSystem"/>
-                                                    <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
-                                                    <color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
-                                                </tableHeaderCell>
-                                                <buttonCell key="dataCell" type="check" bezelStyle="regularSquare" imagePosition="overlaps" inset="2" id="bwc-hf-hZK">
-                                                    <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
-                                                    <font key="font" metaFont="system"/>
-                                                    <connections>
-                                                        <action selector="toggleCodec:" target="-2" id="A0P-gP-mz3"/>
-                                                    </connections>
-                                                </buttonCell>
-                                                <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
-                                            </tableColumn>
-                                            <tableColumn identifier="VideoCodecsColumn" width="116" minWidth="40" maxWidth="1000" id="DSk-Vi-l91">
-                                                <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="Codecs">
-                                                    <font key="font" metaFont="smallSystem"/>
-                                                    <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
-                                                    <color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
-                                                </tableHeaderCell>
-                                                <textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" title="Text" id="DmR-7J-s8s">
-                                                    <font key="font" metaFont="system"/>
-                                                    <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                                                    <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
-                                                </textFieldCell>
-                                                <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
-                                            </tableColumn>
-                                            <tableColumn identifier="VideoFrequencyColumn" width="64" minWidth="10" maxWidth="3.4028234663852886e+38" id="WAr-DG-2aa">
-                                                <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="Frequency">
-                                                    <font key="font" metaFont="smallSystem"/>
-                                                    <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
-                                                    <color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
-                                                </tableHeaderCell>
-                                                <textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" alignment="left" title="Text Cell" id="dRe-pp-ok2">
-                                                    <font key="font" metaFont="system"/>
-                                                    <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                                                    <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                                </textFieldCell>
-                                                <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
-                                            </tableColumn>
-                                            <tableColumn identifier="VideoBitrateColumn" width="124" minWidth="10" maxWidth="3.4028234663852886e+38" id="jvv-dK-jMu">
-                                                <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left" title="Bitrate">
-                                                    <font key="font" metaFont="smallSystem"/>
-                                                    <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
-                                                    <color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
-                                                </tableHeaderCell>
-                                                <textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" alignment="left" title="Text Cell" id="HcP-F1-RiZ">
-                                                    <font key="font" metaFont="system"/>
-                                                    <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                                                    <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
-                                                </textFieldCell>
-                                                <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
-                                            </tableColumn>
-                                        </tableColumns>
-                                        <connections>
-                                            <outlet property="delegate" destination="-2" id="cLl-c7-8rg"/>
-                                        </connections>
-                                    </outlineView>
-                                </subviews>
-                                <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
-                            </clipView>
-                            <scroller key="horizontalScroller" verticalHuggingPriority="750" horizontal="YES" id="TDX-wc-woT">
-                                <rect key="frame" x="1" y="153" width="313" height="16"/>
-                                <autoresizingMask key="autoresizingMask"/>
-                            </scroller>
-                            <scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="d7s-2o-Oxb">
-                                <rect key="frame" x="-15" y="17" width="16" height="0.0"/>
-                                <autoresizingMask key="autoresizingMask"/>
-                            </scroller>
-                            <tableHeaderView key="headerView" id="bYO-LR-nVo">
-                                <rect key="frame" x="0.0" y="0.0" width="366" height="17"/>
-                                <autoresizingMask key="autoresizingMask"/>
-                            </tableHeaderView>
-                        </scrollView>
-                        <button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Kgn-Ue-zMe">
-                            <rect key="frame" x="42" y="13" width="76" height="32"/>
-                            <buttonCell key="cell" type="push" title="Down" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="YYh-3p-JG5">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
-                            <connections>
-                                <action selector="moveDown:" target="-2" id="Eew-cq-oSJ"/>
-                            </connections>
-                        </button>
-                        <button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="8M7-MC-vJE">
-                            <rect key="frame" x="-6" y="13" width="58" height="32"/>
-                            <buttonCell key="cell" type="push" title="Up" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="ZYZ-Vd-MXi">
-                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
-                                <font key="font" metaFont="system"/>
-                            </buttonCell>
-                            <connections>
-                                <action selector="moveUp:" target="-2" id="y2e-P5-leK"/>
-                            </connections>
-                        </button>
-                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="flI-L9-J7Q">
-                            <rect key="frame" x="3" y="224" width="53" height="17"/>
-                            <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Codecs" id="DlW-RF-2xv">
-                                <font key="font" metaFont="systemBold"/>
-                                <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
-                                <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
-                            </textFieldCell>
-                        </textField>
-                    </subviews>
-                </customView>
-            </subviews>
-            <point key="canvasLocation" x="273" y="167"/>
-        </customView>
-    </objects>
-</document>
diff --git a/ui/Base.lproj/Accounts.xib b/ui/Base.lproj/Accounts.xib
index 7b8bea3..dd87e05 100644
--- a/ui/Base.lproj/Accounts.xib
+++ b/ui/Base.lproj/Accounts.xib
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="7706" systemVersion="14F27" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
     <dependencies>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="7706"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="9532"/>
     </dependencies>
     <objects>
         <customObject id="-2" userLabel="File's Owner" customClass="AccountsVC">
@@ -9,30 +9,29 @@
                 <outlet property="accountDetailsView" destination="Jki-s4-F1W" id="8zf-XP-bql"/>
                 <outlet property="accountsListView" destination="Dsf-ph-Qfe" id="uT8-nv-e0W"/>
                 <outlet property="advancedTabItem" destination="RT7-u6-bhe" id="eAT-ce-MyD"/>
-                <outlet property="audioTabItem" destination="hiU-GG-6Eg" id="D2g-nf-MQS"/>
                 <outlet property="configPanels" destination="Jki-s4-F1W" id="nY4-dc-CQg"/>
                 <outlet property="generalTabItem" destination="tPR-Ac-N5Y" id="39S-pz-1Xs"/>
+                <outlet property="mediaTabItem" destination="lxr-my-vH8" id="BhJ-cS-yVi"/>
                 <outlet property="protocolList" destination="rZv-qd-BGe" id="yU0-6C-Vt1"/>
                 <outlet property="ringTabItem" destination="1HC-kF-Jun" id="FJZ-2g-Y1i"/>
                 <outlet property="securityTabItem" destination="Vp5-yV-ScC" id="FDx-0T-3t9"/>
-                <outlet property="videoTabItem" destination="GIU-kn-D57" id="oH6-MT-bSN"/>
                 <outlet property="view" destination="Hz6-mo-xeY" id="eBn-rZ-84z"/>
             </connections>
         </customObject>
         <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
         <customObject id="-3" userLabel="Application" customClass="NSObject"/>
         <customView id="Hz6-mo-xeY">
-            <rect key="frame" x="0.0" y="0.0" width="944" height="635"/>
+            <rect key="frame" x="0.0" y="0.0" width="880" height="635"/>
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
             <subviews>
                 <scrollView focusRingType="none" misplaced="YES" autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="USD-1t-wb3">
                     <rect key="frame" x="20" y="274" width="262" height="341"/>
-                    <clipView key="contentView" misplaced="YES" id="fqt-7S-Xp4">
-                        <rect key="frame" x="1" y="17" width="238" height="117"/>
+                    <clipView key="contentView" id="fqt-7S-Xp4">
+                        <rect key="frame" x="1" y="0.0" width="260" height="340"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <outlineView focusRingType="none" verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" multipleSelection="NO" autosaveColumns="NO" headerView="0lm-pU-hrg" indentationPerLevel="16" outlineTableColumn="Ppv-dQ-Azf" id="Dsf-ph-Qfe">
-                                <rect key="frame" x="0.0" y="0.0" width="318" height="19"/>
+                                <rect key="frame" x="0.0" y="0.0" width="260" height="317"/>
                                 <autoresizingMask key="autoresizingMask"/>
                                 <size key="intercellSpacing" width="3" height="2"/>
                                 <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
@@ -89,7 +88,7 @@
                         <constraint firstAttribute="width" constant="262" id="L7g-ZA-zfy"/>
                     </constraints>
                     <scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="2Jz-0X-Ltx">
-                        <rect key="frame" x="1" y="117.97246444225311" width="238" height="16"/>
+                        <rect key="frame" x="1" y="117" width="238" height="16"/>
                         <autoresizingMask key="autoresizingMask"/>
                     </scroller>
                     <scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="0TD-fd-ht6">
@@ -97,7 +96,7 @@
                         <autoresizingMask key="autoresizingMask"/>
                     </scroller>
                     <tableHeaderView key="headerView" id="0lm-pU-hrg">
-                        <rect key="frame" x="0.0" y="0.0" width="10000" height="17"/>
+                        <rect key="frame" x="0.0" y="0.0" width="260" height="23"/>
                         <autoresizingMask key="autoresizingMask"/>
                     </tableHeaderView>
                 </scrollView>
@@ -155,42 +154,36 @@
                     </connections>
                 </popUpButton>
                 <tabView hidden="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Jki-s4-F1W">
-                    <rect key="frame" x="283" y="11" width="648" height="610"/>
+                    <rect key="frame" x="283" y="11" width="584" height="610"/>
                     <font key="font" metaFont="system"/>
                     <tabViewItems>
                         <tabViewItem label="General" identifier="1" id="tPR-Ac-N5Y">
                             <view key="view" id="8c3-Js-oxO">
-                                <rect key="frame" x="10" y="33" width="628" height="564"/>
+                                <rect key="frame" x="10" y="33" width="564" height="564"/>
                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                             </view>
                         </tabViewItem>
-                        <tabViewItem label="Audio" identifier="2" id="hiU-GG-6Eg">
-                            <view key="view" id="yYL-8c-xzR">
-                                <rect key="frame" x="10" y="33" width="578" height="565"/>
-                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                            </view>
-                        </tabViewItem>
-                        <tabViewItem label="Video" identifier="" id="GIU-kn-D57">
-                            <view key="view" id="hD4-t0-Nbw">
-                                <rect key="frame" x="10" y="33" width="578" height="565"/>
+                        <tabViewItem label="Media" identifier="2" id="lxr-my-vH8">
+                            <view key="view" id="p9F-kK-hRx">
+                                <rect key="frame" x="10" y="33" width="564" height="564"/>
                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                             </view>
                         </tabViewItem>
                         <tabViewItem label="Advanced" identifier="" id="RT7-u6-bhe">
                             <view key="view" id="Pp4-JG-r1v">
-                                <rect key="frame" x="10" y="33" width="578" height="565"/>
+                                <rect key="frame" x="10" y="33" width="564" height="564"/>
                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                             </view>
                         </tabViewItem>
                         <tabViewItem label="Security" identifier="" id="Vp5-yV-ScC">
                             <view key="view" id="p3d-5C-tAZ">
-                                <rect key="frame" x="10" y="33" width="578" height="565"/>
+                                <rect key="frame" x="10" y="33" width="564" height="564"/>
                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                             </view>
                         </tabViewItem>
                         <tabViewItem label="Ring" identifier="" id="1HC-kF-Jun">
                             <view key="view" id="asB-J0-2bi">
-                                <rect key="frame" x="10" y="33" width="578" height="565"/>
+                                <rect key="frame" x="10" y="33" width="564" height="564"/>
                                 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                             </view>
                         </tabViewItem>
@@ -246,7 +239,7 @@
                 <constraint firstItem="rZv-qd-BGe" firstAttribute="leading" secondItem="zWn-Zy-Uau" secondAttribute="trailing" constant="8" id="y2z-JO-Y63"/>
                 <constraint firstItem="IqR-Q4-2bh" firstAttribute="leading" secondItem="dxk-Wh-H0B" secondAttribute="trailing" constant="12" id="yYZ-UL-F0F"/>
             </constraints>
-            <point key="canvasLocation" x="542" y="304.5"/>
+            <point key="canvasLocation" x="510" y="304.5"/>
         </customView>
     </objects>
     <resources>