Removed all stray references to VideoDisplay throughout the code.

Originally committed to SVN as r865.
This commit is contained in:
Rodrigo Braz Monteiro 2007-01-21 17:01:22 +00:00
parent 893361cca7
commit afc19b74e1
23 changed files with 30 additions and 66 deletions

View file

@ -55,7 +55,7 @@
/////////////// ///////////////
// Constructor // Constructor
AudioBox::AudioBox(wxWindow *parent,VideoDisplay *display) : AudioBox::AudioBox(wxWindow *parent) :
wxPanel(parent,-1,wxDefaultPosition,wxDefaultSize,wxTAB_TRAVERSAL|wxBORDER_RAISED) wxPanel(parent,-1,wxDefaultPosition,wxDefaultSize,wxTAB_TRAVERSAL|wxBORDER_RAISED)
{ {
// Setup // Setup
@ -68,7 +68,7 @@ wxPanel(parent,-1,wxDefaultPosition,wxDefaultSize,wxTAB_TRAVERSAL|wxBORDER_RAISE
audioScroll->SetToolTip(_("Seek bar")); audioScroll->SetToolTip(_("Seek bar"));
Sash = new wxSashWindow(this,Audio_Sash,wxDefaultPosition,wxDefaultSize,wxCLIP_CHILDREN | wxSW_3DBORDER); Sash = new wxSashWindow(this,Audio_Sash,wxDefaultPosition,wxDefaultSize,wxCLIP_CHILDREN | wxSW_3DBORDER);
sashSizer = new wxBoxSizer(wxVERTICAL); sashSizer = new wxBoxSizer(wxVERTICAL);
audioDisplay = new AudioDisplay(Sash,display); audioDisplay = new AudioDisplay(Sash);
sashSizer->Add(audioDisplay,1,wxEXPAND,0); sashSizer->Add(audioDisplay,1,wxEXPAND,0);
Sash->SetSizer(sashSizer); Sash->SetSizer(sashSizer);
Sash->SetSashVisible(wxSASH_BOTTOM,true); Sash->SetSashVisible(wxSASH_BOTTOM,true);

View file

@ -47,7 +47,6 @@
////////////// //////////////
// Prototypes // Prototypes
class AudioDisplay; class AudioDisplay;
class VideoDisplay;
class AudioKaraoke; class AudioKaraoke;
class FrameMain; class FrameMain;
class wxToggleButton; class wxToggleButton;
@ -117,7 +116,7 @@ public:
bool loaded; bool loaded;
bool karaokeMode; bool karaokeMode;
AudioBox(wxWindow *parent,VideoDisplay *display); AudioBox(wxWindow *parent);
~AudioBox(); ~AudioBox();
void SetFile(wxString file,bool FromVideo); void SetFile(wxString file,bool FromVideo);

View file

@ -50,7 +50,7 @@
#include "audio_karaoke.h" #include "audio_karaoke.h"
#include "audio_box.h" #include "audio_box.h"
#include "fft.h" #include "fft.h"
#include "video_display.h" #include "video_context.h"
#include "vfr.h" #include "vfr.h"
#include "colorspace.h" #include "colorspace.h"
#include "hotkeys.h" #include "hotkeys.h"
@ -60,11 +60,10 @@
/////////////// ///////////////
// Constructor // Constructor
AudioDisplay::AudioDisplay(wxWindow *parent,VideoDisplay *display) AudioDisplay::AudioDisplay(wxWindow *parent)
: wxWindow (parent, -1, wxDefaultPosition, wxSize(200,Options.AsInt(_T("Audio Display Height"))), wxSUNKEN_BORDER | wxWANTS_CHARS , _T("Audio Display")) : wxWindow (parent, -1, wxDefaultPosition, wxSize(200,Options.AsInt(_T("Audio Display Height"))), wxSUNKEN_BORDER | wxWANTS_CHARS , _T("Audio Display"))
{ {
// Set variables // Set variables
video = NULL;
origImage = NULL; origImage = NULL;
spectrumDisplay = NULL; spectrumDisplay = NULL;
spectrumDisplaySelected = NULL; spectrumDisplaySelected = NULL;
@ -90,7 +89,6 @@ AudioDisplay::AudioDisplay(wxWindow *parent,VideoDisplay *display)
scale = 1.0f; scale = 1.0f;
provider = NULL; provider = NULL;
player = NULL; player = NULL;
video = display;
hold = 0; hold = 0;
hasFocus = (wxWindow::FindFocus() == this); hasFocus = (wxWindow::FindFocus() == this);
@ -903,7 +901,7 @@ void AudioDisplay::Stop() {
if (!player) return; if (!player) return;
player->Stop(); player->Stop();
if (video && VideoContext::Get()->IsPlaying()) VideoContext::Get()->Stop(); if (VideoContext::Get()->IsPlaying()) VideoContext::Get()->Stop();
} }

View file

@ -53,7 +53,6 @@ class StreamAudioProvider;
class SubtitlesGrid; class SubtitlesGrid;
class AudioBox; class AudioBox;
class AudioKaraoke; class AudioKaraoke;
class VideoDisplay;
class VideoProvider; class VideoProvider;
class FrameMain; class FrameMain;
@ -66,7 +65,6 @@ private:
SubtitlesGrid *grid; SubtitlesGrid *grid;
int line_n; int line_n;
AssDialogue *dialogue; AssDialogue *dialogue;
VideoDisplay *video;
AudioSpectrum *spectrumRenderer; AudioSpectrum *spectrumRenderer;
@ -141,7 +139,7 @@ public:
wxScrollBar *ScrollBar; wxScrollBar *ScrollBar;
wxTimer UpdateTimer; wxTimer UpdateTimer;
AudioDisplay(wxWindow *parent,VideoDisplay *display); AudioDisplay(wxWindow *parent);
~AudioDisplay(); ~AudioDisplay();
void AddLead(bool in,bool out); void AddLead(bool in,bool out);

View file

@ -45,8 +45,9 @@
#include "vfr.h" #include "vfr.h"
#include "subs_edit_box.h" #include "subs_edit_box.h"
#include "frame_main.h" #include "frame_main.h"
#include "video_display.h" #include "video_box.h"
#include "video_slider.h" #include "video_slider.h"
#include "video_context.h"
#include "audio_display.h" #include "audio_display.h"
@ -945,8 +946,8 @@ void BaseGrid::OnKeyPress(wxKeyEvent &event) {
// Left/right, forward to seek bar if video is loaded // Left/right, forward to seek bar if video is loaded
if (key == WXK_LEFT || key == WXK_RIGHT) { if (key == WXK_LEFT || key == WXK_RIGHT) {
if (VideoContext::Get()->IsLoaded()) { if (VideoContext::Get()->IsLoaded()) {
video->ControlSlider->SetFocus(); parentFrame->videoBox->videoSlider->SetFocus();
video->ControlSlider->AddPendingEvent(event); parentFrame->videoBox->videoSlider->AddPendingEvent(event);
return; return;
} }
event.Skip(); event.Skip();

View file

@ -51,7 +51,6 @@ class AssEntry;
class AssDialogue; class AssDialogue;
class SubsEditBox; class SubsEditBox;
class FrameMain; class FrameMain;
class VideoDisplay;
typedef std::list<AssEntry*>::iterator entryIter; typedef std::list<AssEntry*>::iterator entryIter;
@ -87,7 +86,6 @@ protected:
public: public:
SubsEditBox *editBox; SubsEditBox *editBox;
VideoDisplay *video;
bool byFrame; bool byFrame;
std::vector<entryIter> diagMap; std::vector<entryIter> diagMap;

View file

@ -38,17 +38,16 @@
// Headers // Headers
#include "dialog_jumpto.h" #include "dialog_jumpto.h"
#include "vfr.h" #include "vfr.h"
#include "video_display.h" #include "video_context.h"
/////////////// ///////////////
// Constructor // Constructor
DialogJumpTo::DialogJumpTo (wxWindow *parent,VideoDisplay *_vid) DialogJumpTo::DialogJumpTo (wxWindow *parent)
: wxDialog(parent, -1, _("Jump to"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE, _T("JumpTo")) : wxDialog(parent, -1, _("Jump to"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE, _T("JumpTo"))
{ {
// Set initial values // Set initial values
ready = false; ready = false;
vid = _vid;
jumpframe = VideoContext::Get()->GetFrameN(); jumpframe = VideoContext::Get()->GetFrameN();
jumptime.SetMS(VFR_Output.GetTimeAtFrame(jumpframe)); jumptime.SetMS(VFR_Output.GetTimeAtFrame(jumpframe));

View file

@ -44,11 +44,6 @@
#include "ass_time.h" #include "ass_time.h"
//////////////
// Prototypes
class VideoDisplay;
///////// /////////
// Class // Class
class DialogJumpTo : public wxDialog { class DialogJumpTo : public wxDialog {
@ -57,13 +52,11 @@ private:
long jumpframe; long jumpframe;
AssTime jumptime; AssTime jumptime;
VideoDisplay *vid;
wxTextCtrl *JumpTime; wxTextCtrl *JumpTime;
wxTextCtrl *JumpFrame; wxTextCtrl *JumpFrame;
public: public:
DialogJumpTo (wxWindow *parent,VideoDisplay *vid); DialogJumpTo (wxWindow *parent);
void OnKey(wxKeyEvent &event); void OnKey(wxKeyEvent &event);
void OnClose(bool ok); void OnClose(bool ok);

View file

@ -50,8 +50,7 @@
#include "ass_override.h" #include "ass_override.h"
#include "subs_grid.h" #include "subs_grid.h"
#include "validators.h" #include "validators.h"
#include "video_display.h" #include "video_context.h"
#include "video_provider.h"
/////////////// ///////////////
@ -62,7 +61,6 @@ DialogKanjiTimer::DialogKanjiTimer(wxWindow *parent, SubtitlesGrid *_grid)
// Variables // Variables
AssFile *subs = AssFile::top; AssFile *subs = AssFile::top;
grid = _grid; grid = _grid;
vid = grid->video;
RegroupSourceSelected = 0; RegroupSourceSelected = 0;
//Sizers //Sizers

View file

@ -51,7 +51,6 @@
////////////// //////////////
// Prototypes // Prototypes
class SubtitlesGrid; class SubtitlesGrid;
class VideoDisplay;
class AssOverrideParameter; class AssOverrideParameter;
@ -60,7 +59,6 @@ class AssOverrideParameter;
class DialogKanjiTimer : public wxDialog { class DialogKanjiTimer : public wxDialog {
private: private:
SubtitlesGrid *grid; SubtitlesGrid *grid;
VideoDisplay *vid;
wxTextCtrl *SourceText, *DestText; wxTextCtrl *SourceText, *DestText;
wxComboBox *SourceStyle, *DestStyle; wxComboBox *SourceStyle, *DestStyle;

View file

@ -46,11 +46,10 @@
/////////////// ///////////////
// Constructor // Constructor
DialogProperties::DialogProperties (wxWindow *parent, VideoDisplay *_vid) DialogProperties::DialogProperties (wxWindow *parent)
: wxDialog(parent, -1, _("Script Properties"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE) : wxDialog(parent, -1, _("Script Properties"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE)
{ {
// Setup // Setup
vid = _vid;
AssFile *subs = AssFile::top; AssFile *subs = AssFile::top;
// Script details crap // Script details crap

View file

@ -42,16 +42,10 @@
#include <wx/wxprec.h> #include <wx/wxprec.h>
//////////////
// Prototypes
class VideoDisplay;
//////////////////// ////////////////////
// Properties class // Properties class
class DialogProperties : public wxDialog { class DialogProperties : public wxDialog {
private: private:
VideoDisplay *vid;
wxTextCtrl *TitleEdit; wxTextCtrl *TitleEdit;
wxTextCtrl *OrigScriptEdit; wxTextCtrl *OrigScriptEdit;
wxTextCtrl *TranslationEdit; wxTextCtrl *TranslationEdit;
@ -74,7 +68,7 @@ private:
int SetInfoIfDifferent(wxString key,wxString value); int SetInfoIfDifferent(wxString key,wxString value);
public: public:
DialogProperties(wxWindow *parent, VideoDisplay *vid); DialogProperties(wxWindow *parent);
~DialogProperties(); ~DialogProperties();
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()

View file

@ -43,8 +43,7 @@
#include "ass_override.h" #include "ass_override.h"
#include "subs_grid.h" #include "subs_grid.h"
#include "validators.h" #include "validators.h"
#include "video_display.h" #include "video_context.h"
#include "video_provider.h"
/////////////// ///////////////
@ -55,7 +54,6 @@ DialogResample::DialogResample(wxWindow *parent, SubtitlesGrid *_grid)
// Variables // Variables
AssFile *subs = AssFile::top; AssFile *subs = AssFile::top;
grid = _grid; grid = _grid;
vid = grid->video;
// Resolution line // Resolution line
wxSizer *ResBoxSizer = new wxStaticBoxSizer(wxVERTICAL,this,_("Resolution")); wxSizer *ResBoxSizer = new wxStaticBoxSizer(wxVERTICAL,this,_("Resolution"));

View file

@ -46,7 +46,6 @@
////////////// //////////////
// Prototypes // Prototypes
class SubtitlesGrid; class SubtitlesGrid;
class VideoDisplay;
class AssOverrideParameter; class AssOverrideParameter;
@ -55,7 +54,6 @@ class AssOverrideParameter;
class DialogResample : public wxDialog { class DialogResample : public wxDialog {
private: private:
SubtitlesGrid *grid; SubtitlesGrid *grid;
VideoDisplay *vid;
wxString ResXValue,ResYValue; wxString ResXValue,ResYValue;
wxTextCtrl *ResX; wxTextCtrl *ResX;
wxTextCtrl *ResY; wxTextCtrl *ResY;

View file

@ -57,7 +57,7 @@
/////////////// ///////////////
// Constructor // Constructor
DialogShiftTimes::DialogShiftTimes (wxWindow *parent,SubtitlesGrid *_grid,VideoDisplay *vid) DialogShiftTimes::DialogShiftTimes (wxWindow *parent,SubtitlesGrid *_grid)
: wxDialog(parent, -1, _("Shift Times"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE, _T("JumpTo")) : wxDialog(parent, -1, _("Shift Times"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE, _T("JumpTo"))
{ {
// Set initial values // Set initial values

View file

@ -46,7 +46,6 @@
////////////// //////////////
// Prototypes // Prototypes
class SubtitlesGrid; class SubtitlesGrid;
class VideoDisplay;
///////// /////////
@ -73,7 +72,7 @@ private:
void OnClear(wxCommandEvent &event); void OnClear(wxCommandEvent &event);
public: public:
DialogShiftTimes (wxWindow *parent,SubtitlesGrid *grid,VideoDisplay *vid); DialogShiftTimes (wxWindow *parent,SubtitlesGrid *grid);
void OnKey(wxKeyEvent &event); void OnKey(wxKeyEvent &event);
void OnClose(wxCommandEvent &event); void OnClose(wxCommandEvent &event);

View file

@ -446,7 +446,7 @@ void FrameMain::InitContents() {
videoBox->videoDisplay->zoomBox = ZoomBox; videoBox->videoDisplay->zoomBox = ZoomBox;
// Subtitles area // Subtitles area
SubsBox = new SubtitlesGrid(this,Panel,-1,videoBox->videoDisplay,wxDefaultPosition,wxSize(600,100),wxWANTS_CHARS | wxSUNKEN_BORDER,_T("Subs grid")); SubsBox = new SubtitlesGrid(this,Panel,-1,wxDefaultPosition,wxSize(600,100),wxWANTS_CHARS | wxSUNKEN_BORDER,_T("Subs grid"));
BottomSizer->Add(SubsBox,1,wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM,0); BottomSizer->Add(SubsBox,1,wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM,0);
AssFile::StackReset(); AssFile::StackReset();
videoBox->videoSlider->grid = SubsBox; videoBox->videoSlider->grid = SubsBox;
@ -455,14 +455,13 @@ void FrameMain::InitContents() {
Search.grid = SubsBox; Search.grid = SubsBox;
// Audio area // Audio area
audioBox = new AudioBox(Panel,videoBox->videoDisplay); audioBox = new AudioBox(Panel);
audioBox->frameMain = this; audioBox->frameMain = this;
VideoContext::Get()->audio = audioBox->audioDisplay; VideoContext::Get()->audio = audioBox->audioDisplay;
// Top sizer // Top sizer
EditBox = new SubsEditBox(Panel,SubsBox); EditBox = new SubsEditBox(Panel,SubsBox);
EditBox->audio = audioBox->audioDisplay; EditBox->audio = audioBox->audioDisplay;
EditBox->video = videoBox->videoDisplay;
ToolSizer = new wxBoxSizer(wxVERTICAL); ToolSizer = new wxBoxSizer(wxVERTICAL);
ToolSizer->Add(audioBox,0,wxEXPAND | wxBOTTOM,5); ToolSizer->Add(audioBox,0,wxEXPAND | wxBOTTOM,5);
ToolSizer->Add(EditBox,1,wxEXPAND,5); ToolSizer->Add(EditBox,1,wxEXPAND,5);

View file

@ -858,7 +858,7 @@ void FrameMain::OnSetZoom(wxCommandEvent &event) {
void FrameMain::OnJumpTo(wxCommandEvent& WXUNUSED(event)) { void FrameMain::OnJumpTo(wxCommandEvent& WXUNUSED(event)) {
VideoContext::Get()->Stop(); VideoContext::Get()->Stop();
if (VideoContext::Get()->IsLoaded()) { if (VideoContext::Get()->IsLoaded()) {
DialogJumpTo JumpTo(this,videoBox->videoDisplay); DialogJumpTo JumpTo(this);
JumpTo.ShowModal(); JumpTo.ShowModal();
videoBox->videoSlider->SetFocus(); videoBox->videoSlider->SetFocus();
} }
@ -869,7 +869,7 @@ void FrameMain::OnJumpTo(wxCommandEvent& WXUNUSED(event)) {
// Open shift dialog // Open shift dialog
void FrameMain::OnShift(wxCommandEvent& WXUNUSED(event)) { void FrameMain::OnShift(wxCommandEvent& WXUNUSED(event)) {
VideoContext::Get()->Stop(); VideoContext::Get()->Stop();
DialogShiftTimes Shift(this,SubsBox,videoBox->videoDisplay); DialogShiftTimes Shift(this,SubsBox);
Shift.ShowModal(); Shift.ShowModal();
} }
@ -878,7 +878,7 @@ void FrameMain::OnShift(wxCommandEvent& WXUNUSED(event)) {
// Open properties // Open properties
void FrameMain::OnOpenProperties (wxCommandEvent &event) { void FrameMain::OnOpenProperties (wxCommandEvent &event) {
VideoContext::Get()->Stop(); VideoContext::Get()->Stop();
DialogProperties Properties(this, videoBox->videoDisplay); DialogProperties Properties(this);
int res = Properties.ShowModal(); int res = Properties.ShowModal();
if (res) { if (res) {
SubsBox->CommitChanges(); SubsBox->CommitChanges();

View file

@ -268,7 +268,7 @@ void SubsEditBox::Update (bool timeOnly,bool weak) {
// Video // Video
VideoContext::Get()->curLine = curdiag; VideoContext::Get()->curLine = curdiag;
video->UpdateSubsRelativeTime(); VideoContext::Get()->UpdateDisplays(false);
} }
else enabled = false; else enabled = false;
} }
@ -688,7 +688,7 @@ void SubsEditBox::CommitTimes(bool start,bool end,bool fromStart) {
grid->CommitChanges(); grid->CommitChanges();
grid->EndBatch(); grid->EndBatch();
audio->SetDialogue(grid,grid->GetDialogue(sel[0]),sel[0]); audio->SetDialogue(grid,grid->GetDialogue(sel[0]),sel[0]);
video->UpdateSubsRelativeTime(); VideoContext::Get()->UpdateDisplays(false);
} }

View file

@ -50,7 +50,6 @@ class TimeEdit;
class SubsEditBox; class SubsEditBox;
class AudioDisplay; class AudioDisplay;
class HiliModTextCtrl; class HiliModTextCtrl;
class VideoDisplay;
class wxScintilla; class wxScintilla;
@ -143,7 +142,6 @@ private:
public: public:
int linen; int linen;
AudioDisplay *audio; AudioDisplay *audio;
VideoDisplay *video;
SubsTextEditCtrl *TextEdit; SubsTextEditCtrl *TextEdit;
SubsEditBox(wxWindow *parent,SubtitlesGrid *gridp); SubsEditBox(wxWindow *parent,SubtitlesGrid *gridp);

View file

@ -88,13 +88,12 @@ END_EVENT_TABLE()
/////////////// ///////////////
// Constructor // Constructor
SubtitlesGrid::SubtitlesGrid(FrameMain* parentFr, wxWindow *parent, wxWindowID id, VideoDisplay *_video, const wxPoint& pos, const wxSize& size, long style, const wxString& name) SubtitlesGrid::SubtitlesGrid(FrameMain* parentFr, wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name)
: BaseGrid(parent,id,pos,size,style,name) : BaseGrid(parent,id,pos,size,style,name)
{ {
// Vars // Vars
byFrame = false; byFrame = false;
ass = NULL; ass = NULL;
video = _video;
editBox = NULL; editBox = NULL;
parentFrame = parentFr; parentFrame = parentFr;
} }
@ -148,7 +147,7 @@ void SubtitlesGrid::OnPopupMenu(bool alternate) {
state = (sels == 1); state = (sels == 1);
menu.Append(MENU_INSERT_BEFORE,_("&Insert (before)"),_T("Inserts a line before current"))->Enable(state); menu.Append(MENU_INSERT_BEFORE,_("&Insert (before)"),_T("Inserts a line before current"))->Enable(state);
menu.Append(MENU_INSERT_AFTER,_("Insert (after)"),_T("Inserts a line after current"))->Enable(state); menu.Append(MENU_INSERT_AFTER,_("Insert (after)"),_T("Inserts a line after current"))->Enable(state);
state = (sels == 1 && video && VideoContext::Get()->IsLoaded()); state = (sels == 1 && VideoContext::Get()->IsLoaded());
menu.Append(MENU_INSERT_BEFORE_VIDEO,_("Insert at video time (before)"),_T("Inserts a line after current, starting at video time"))->Enable(state); menu.Append(MENU_INSERT_BEFORE_VIDEO,_("Insert at video time (before)"),_T("Inserts a line after current, starting at video time"))->Enable(state);
menu.Append(MENU_INSERT_AFTER_VIDEO,_("Insert at video time (after)"),_T("Inserts a line after current, starting at video time"))->Enable(state); menu.Append(MENU_INSERT_AFTER_VIDEO,_("Insert at video time (after)"),_T("Inserts a line after current, starting at video time"))->Enable(state);
menu.AppendSeparator(); menu.AppendSeparator();

View file

@ -55,7 +55,6 @@
class AssFile; class AssFile;
class AssEntry; class AssEntry;
class AssDialogue; class AssDialogue;
class VideoDisplay;
class SubsEditBox; class SubsEditBox;
class FrameMain; class FrameMain;
class AudioDisplay; class AudioDisplay;
@ -103,7 +102,7 @@ private:
public: public:
AssFile *ass; AssFile *ass;
SubtitlesGrid(FrameMain* parentFrame,wxWindow *parent, wxWindowID id, VideoDisplay* video, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxWANTS_CHARS, const wxString& name = wxPanelNameStr); SubtitlesGrid(FrameMain* parentFrame,wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxWANTS_CHARS, const wxString& name = wxPanelNameStr);
~SubtitlesGrid(); ~SubtitlesGrid();
void LoadDefault(AssFile *ass=NULL); void LoadDefault(AssFile *ass=NULL);

View file

@ -92,7 +92,6 @@ wxArrayString PRSSubtitleFormat::GetWriteWildcards() {
void PRSSubtitleFormat::WriteFile(wxString filename,wxString encoding) { void PRSSubtitleFormat::WriteFile(wxString filename,wxString encoding) {
#ifdef __WINDOWS__ #ifdef __WINDOWS__
// Video loaded? // Video loaded?
VideoDisplay *display = ((AegisubApp*)wxTheApp)->frame->videoBox->videoDisplay;
if (VideoContext::Get()->IsLoaded()) throw _T("Video not loaded!"); if (VideoContext::Get()->IsLoaded()) throw _T("Video not loaded!");
// Create the PRS file // Create the PRS file