forked from mia/Aegisub
Removed all stray references to VideoDisplay throughout the code.
Originally committed to SVN as r865.
This commit is contained in:
parent
893361cca7
commit
afc19b74e1
23 changed files with 30 additions and 66 deletions
|
@ -55,7 +55,7 @@
|
|||
|
||||
///////////////
|
||||
// Constructor
|
||||
AudioBox::AudioBox(wxWindow *parent,VideoDisplay *display) :
|
||||
AudioBox::AudioBox(wxWindow *parent) :
|
||||
wxPanel(parent,-1,wxDefaultPosition,wxDefaultSize,wxTAB_TRAVERSAL|wxBORDER_RAISED)
|
||||
{
|
||||
// Setup
|
||||
|
@ -68,7 +68,7 @@ wxPanel(parent,-1,wxDefaultPosition,wxDefaultSize,wxTAB_TRAVERSAL|wxBORDER_RAISE
|
|||
audioScroll->SetToolTip(_("Seek bar"));
|
||||
Sash = new wxSashWindow(this,Audio_Sash,wxDefaultPosition,wxDefaultSize,wxCLIP_CHILDREN | wxSW_3DBORDER);
|
||||
sashSizer = new wxBoxSizer(wxVERTICAL);
|
||||
audioDisplay = new AudioDisplay(Sash,display);
|
||||
audioDisplay = new AudioDisplay(Sash);
|
||||
sashSizer->Add(audioDisplay,1,wxEXPAND,0);
|
||||
Sash->SetSizer(sashSizer);
|
||||
Sash->SetSashVisible(wxSASH_BOTTOM,true);
|
||||
|
|
|
@ -47,7 +47,6 @@
|
|||
//////////////
|
||||
// Prototypes
|
||||
class AudioDisplay;
|
||||
class VideoDisplay;
|
||||
class AudioKaraoke;
|
||||
class FrameMain;
|
||||
class wxToggleButton;
|
||||
|
@ -117,7 +116,7 @@ public:
|
|||
bool loaded;
|
||||
bool karaokeMode;
|
||||
|
||||
AudioBox(wxWindow *parent,VideoDisplay *display);
|
||||
AudioBox(wxWindow *parent);
|
||||
~AudioBox();
|
||||
|
||||
void SetFile(wxString file,bool FromVideo);
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
#include "audio_karaoke.h"
|
||||
#include "audio_box.h"
|
||||
#include "fft.h"
|
||||
#include "video_display.h"
|
||||
#include "video_context.h"
|
||||
#include "vfr.h"
|
||||
#include "colorspace.h"
|
||||
#include "hotkeys.h"
|
||||
|
@ -60,11 +60,10 @@
|
|||
|
||||
///////////////
|
||||
// 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"))
|
||||
{
|
||||
// Set variables
|
||||
video = NULL;
|
||||
origImage = NULL;
|
||||
spectrumDisplay = NULL;
|
||||
spectrumDisplaySelected = NULL;
|
||||
|
@ -90,7 +89,6 @@ AudioDisplay::AudioDisplay(wxWindow *parent,VideoDisplay *display)
|
|||
scale = 1.0f;
|
||||
provider = NULL;
|
||||
player = NULL;
|
||||
video = display;
|
||||
hold = 0;
|
||||
hasFocus = (wxWindow::FindFocus() == this);
|
||||
|
||||
|
@ -903,7 +901,7 @@ void AudioDisplay::Stop() {
|
|||
if (!player) return;
|
||||
|
||||
player->Stop();
|
||||
if (video && VideoContext::Get()->IsPlaying()) VideoContext::Get()->Stop();
|
||||
if (VideoContext::Get()->IsPlaying()) VideoContext::Get()->Stop();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -53,7 +53,6 @@ class StreamAudioProvider;
|
|||
class SubtitlesGrid;
|
||||
class AudioBox;
|
||||
class AudioKaraoke;
|
||||
class VideoDisplay;
|
||||
class VideoProvider;
|
||||
class FrameMain;
|
||||
|
||||
|
@ -66,7 +65,6 @@ private:
|
|||
SubtitlesGrid *grid;
|
||||
int line_n;
|
||||
AssDialogue *dialogue;
|
||||
VideoDisplay *video;
|
||||
|
||||
AudioSpectrum *spectrumRenderer;
|
||||
|
||||
|
@ -141,7 +139,7 @@ public:
|
|||
wxScrollBar *ScrollBar;
|
||||
wxTimer UpdateTimer;
|
||||
|
||||
AudioDisplay(wxWindow *parent,VideoDisplay *display);
|
||||
AudioDisplay(wxWindow *parent);
|
||||
~AudioDisplay();
|
||||
|
||||
void AddLead(bool in,bool out);
|
||||
|
|
|
@ -45,8 +45,9 @@
|
|||
#include "vfr.h"
|
||||
#include "subs_edit_box.h"
|
||||
#include "frame_main.h"
|
||||
#include "video_display.h"
|
||||
#include "video_box.h"
|
||||
#include "video_slider.h"
|
||||
#include "video_context.h"
|
||||
#include "audio_display.h"
|
||||
|
||||
|
||||
|
@ -945,8 +946,8 @@ void BaseGrid::OnKeyPress(wxKeyEvent &event) {
|
|||
// Left/right, forward to seek bar if video is loaded
|
||||
if (key == WXK_LEFT || key == WXK_RIGHT) {
|
||||
if (VideoContext::Get()->IsLoaded()) {
|
||||
video->ControlSlider->SetFocus();
|
||||
video->ControlSlider->AddPendingEvent(event);
|
||||
parentFrame->videoBox->videoSlider->SetFocus();
|
||||
parentFrame->videoBox->videoSlider->AddPendingEvent(event);
|
||||
return;
|
||||
}
|
||||
event.Skip();
|
||||
|
|
|
@ -51,7 +51,6 @@ class AssEntry;
|
|||
class AssDialogue;
|
||||
class SubsEditBox;
|
||||
class FrameMain;
|
||||
class VideoDisplay;
|
||||
typedef std::list<AssEntry*>::iterator entryIter;
|
||||
|
||||
|
||||
|
@ -87,7 +86,6 @@ protected:
|
|||
|
||||
public:
|
||||
SubsEditBox *editBox;
|
||||
VideoDisplay *video;
|
||||
|
||||
bool byFrame;
|
||||
std::vector<entryIter> diagMap;
|
||||
|
|
|
@ -38,17 +38,16 @@
|
|||
// Headers
|
||||
#include "dialog_jumpto.h"
|
||||
#include "vfr.h"
|
||||
#include "video_display.h"
|
||||
#include "video_context.h"
|
||||
|
||||
|
||||
///////////////
|
||||
// Constructor
|
||||
DialogJumpTo::DialogJumpTo (wxWindow *parent,VideoDisplay *_vid)
|
||||
DialogJumpTo::DialogJumpTo (wxWindow *parent)
|
||||
: wxDialog(parent, -1, _("Jump to"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE, _T("JumpTo"))
|
||||
{
|
||||
// Set initial values
|
||||
ready = false;
|
||||
vid = _vid;
|
||||
jumpframe = VideoContext::Get()->GetFrameN();
|
||||
jumptime.SetMS(VFR_Output.GetTimeAtFrame(jumpframe));
|
||||
|
||||
|
|
|
@ -44,11 +44,6 @@
|
|||
#include "ass_time.h"
|
||||
|
||||
|
||||
//////////////
|
||||
// Prototypes
|
||||
class VideoDisplay;
|
||||
|
||||
|
||||
/////////
|
||||
// Class
|
||||
class DialogJumpTo : public wxDialog {
|
||||
|
@ -57,13 +52,11 @@ private:
|
|||
long jumpframe;
|
||||
AssTime jumptime;
|
||||
|
||||
VideoDisplay *vid;
|
||||
|
||||
wxTextCtrl *JumpTime;
|
||||
wxTextCtrl *JumpFrame;
|
||||
|
||||
public:
|
||||
DialogJumpTo (wxWindow *parent,VideoDisplay *vid);
|
||||
DialogJumpTo (wxWindow *parent);
|
||||
|
||||
void OnKey(wxKeyEvent &event);
|
||||
void OnClose(bool ok);
|
||||
|
|
|
@ -50,8 +50,7 @@
|
|||
#include "ass_override.h"
|
||||
#include "subs_grid.h"
|
||||
#include "validators.h"
|
||||
#include "video_display.h"
|
||||
#include "video_provider.h"
|
||||
#include "video_context.h"
|
||||
|
||||
|
||||
///////////////
|
||||
|
@ -62,7 +61,6 @@ DialogKanjiTimer::DialogKanjiTimer(wxWindow *parent, SubtitlesGrid *_grid)
|
|||
// Variables
|
||||
AssFile *subs = AssFile::top;
|
||||
grid = _grid;
|
||||
vid = grid->video;
|
||||
RegroupSourceSelected = 0;
|
||||
|
||||
//Sizers
|
||||
|
|
|
@ -51,7 +51,6 @@
|
|||
//////////////
|
||||
// Prototypes
|
||||
class SubtitlesGrid;
|
||||
class VideoDisplay;
|
||||
class AssOverrideParameter;
|
||||
|
||||
|
||||
|
@ -60,7 +59,6 @@ class AssOverrideParameter;
|
|||
class DialogKanjiTimer : public wxDialog {
|
||||
private:
|
||||
SubtitlesGrid *grid;
|
||||
VideoDisplay *vid;
|
||||
|
||||
wxTextCtrl *SourceText, *DestText;
|
||||
wxComboBox *SourceStyle, *DestStyle;
|
||||
|
|
|
@ -46,11 +46,10 @@
|
|||
|
||||
///////////////
|
||||
// Constructor
|
||||
DialogProperties::DialogProperties (wxWindow *parent, VideoDisplay *_vid)
|
||||
DialogProperties::DialogProperties (wxWindow *parent)
|
||||
: wxDialog(parent, -1, _("Script Properties"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE)
|
||||
{
|
||||
// Setup
|
||||
vid = _vid;
|
||||
AssFile *subs = AssFile::top;
|
||||
|
||||
// Script details crap
|
||||
|
|
|
@ -42,16 +42,10 @@
|
|||
#include <wx/wxprec.h>
|
||||
|
||||
|
||||
//////////////
|
||||
// Prototypes
|
||||
class VideoDisplay;
|
||||
|
||||
|
||||
////////////////////
|
||||
// Properties class
|
||||
class DialogProperties : public wxDialog {
|
||||
private:
|
||||
VideoDisplay *vid;
|
||||
wxTextCtrl *TitleEdit;
|
||||
wxTextCtrl *OrigScriptEdit;
|
||||
wxTextCtrl *TranslationEdit;
|
||||
|
@ -74,7 +68,7 @@ private:
|
|||
int SetInfoIfDifferent(wxString key,wxString value);
|
||||
|
||||
public:
|
||||
DialogProperties(wxWindow *parent, VideoDisplay *vid);
|
||||
DialogProperties(wxWindow *parent);
|
||||
~DialogProperties();
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
|
|
@ -43,8 +43,7 @@
|
|||
#include "ass_override.h"
|
||||
#include "subs_grid.h"
|
||||
#include "validators.h"
|
||||
#include "video_display.h"
|
||||
#include "video_provider.h"
|
||||
#include "video_context.h"
|
||||
|
||||
|
||||
///////////////
|
||||
|
@ -55,7 +54,6 @@ DialogResample::DialogResample(wxWindow *parent, SubtitlesGrid *_grid)
|
|||
// Variables
|
||||
AssFile *subs = AssFile::top;
|
||||
grid = _grid;
|
||||
vid = grid->video;
|
||||
|
||||
// Resolution line
|
||||
wxSizer *ResBoxSizer = new wxStaticBoxSizer(wxVERTICAL,this,_("Resolution"));
|
||||
|
|
|
@ -46,7 +46,6 @@
|
|||
//////////////
|
||||
// Prototypes
|
||||
class SubtitlesGrid;
|
||||
class VideoDisplay;
|
||||
class AssOverrideParameter;
|
||||
|
||||
|
||||
|
@ -55,7 +54,6 @@ class AssOverrideParameter;
|
|||
class DialogResample : public wxDialog {
|
||||
private:
|
||||
SubtitlesGrid *grid;
|
||||
VideoDisplay *vid;
|
||||
wxString ResXValue,ResYValue;
|
||||
wxTextCtrl *ResX;
|
||||
wxTextCtrl *ResY;
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
|
||||
///////////////
|
||||
// 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"))
|
||||
{
|
||||
// Set initial values
|
||||
|
|
|
@ -46,7 +46,6 @@
|
|||
//////////////
|
||||
// Prototypes
|
||||
class SubtitlesGrid;
|
||||
class VideoDisplay;
|
||||
|
||||
|
||||
/////////
|
||||
|
@ -73,7 +72,7 @@ private:
|
|||
void OnClear(wxCommandEvent &event);
|
||||
|
||||
public:
|
||||
DialogShiftTimes (wxWindow *parent,SubtitlesGrid *grid,VideoDisplay *vid);
|
||||
DialogShiftTimes (wxWindow *parent,SubtitlesGrid *grid);
|
||||
|
||||
void OnKey(wxKeyEvent &event);
|
||||
void OnClose(wxCommandEvent &event);
|
||||
|
|
|
@ -446,7 +446,7 @@ void FrameMain::InitContents() {
|
|||
videoBox->videoDisplay->zoomBox = ZoomBox;
|
||||
|
||||
// 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);
|
||||
AssFile::StackReset();
|
||||
videoBox->videoSlider->grid = SubsBox;
|
||||
|
@ -455,14 +455,13 @@ void FrameMain::InitContents() {
|
|||
Search.grid = SubsBox;
|
||||
|
||||
// Audio area
|
||||
audioBox = new AudioBox(Panel,videoBox->videoDisplay);
|
||||
audioBox = new AudioBox(Panel);
|
||||
audioBox->frameMain = this;
|
||||
VideoContext::Get()->audio = audioBox->audioDisplay;
|
||||
|
||||
// Top sizer
|
||||
EditBox = new SubsEditBox(Panel,SubsBox);
|
||||
EditBox->audio = audioBox->audioDisplay;
|
||||
EditBox->video = videoBox->videoDisplay;
|
||||
ToolSizer = new wxBoxSizer(wxVERTICAL);
|
||||
ToolSizer->Add(audioBox,0,wxEXPAND | wxBOTTOM,5);
|
||||
ToolSizer->Add(EditBox,1,wxEXPAND,5);
|
||||
|
|
|
@ -858,7 +858,7 @@ void FrameMain::OnSetZoom(wxCommandEvent &event) {
|
|||
void FrameMain::OnJumpTo(wxCommandEvent& WXUNUSED(event)) {
|
||||
VideoContext::Get()->Stop();
|
||||
if (VideoContext::Get()->IsLoaded()) {
|
||||
DialogJumpTo JumpTo(this,videoBox->videoDisplay);
|
||||
DialogJumpTo JumpTo(this);
|
||||
JumpTo.ShowModal();
|
||||
videoBox->videoSlider->SetFocus();
|
||||
}
|
||||
|
@ -869,7 +869,7 @@ void FrameMain::OnJumpTo(wxCommandEvent& WXUNUSED(event)) {
|
|||
// Open shift dialog
|
||||
void FrameMain::OnShift(wxCommandEvent& WXUNUSED(event)) {
|
||||
VideoContext::Get()->Stop();
|
||||
DialogShiftTimes Shift(this,SubsBox,videoBox->videoDisplay);
|
||||
DialogShiftTimes Shift(this,SubsBox);
|
||||
Shift.ShowModal();
|
||||
}
|
||||
|
||||
|
@ -878,7 +878,7 @@ void FrameMain::OnShift(wxCommandEvent& WXUNUSED(event)) {
|
|||
// Open properties
|
||||
void FrameMain::OnOpenProperties (wxCommandEvent &event) {
|
||||
VideoContext::Get()->Stop();
|
||||
DialogProperties Properties(this, videoBox->videoDisplay);
|
||||
DialogProperties Properties(this);
|
||||
int res = Properties.ShowModal();
|
||||
if (res) {
|
||||
SubsBox->CommitChanges();
|
||||
|
|
|
@ -268,7 +268,7 @@ void SubsEditBox::Update (bool timeOnly,bool weak) {
|
|||
|
||||
// Video
|
||||
VideoContext::Get()->curLine = curdiag;
|
||||
video->UpdateSubsRelativeTime();
|
||||
VideoContext::Get()->UpdateDisplays(false);
|
||||
}
|
||||
else enabled = false;
|
||||
}
|
||||
|
@ -688,7 +688,7 @@ void SubsEditBox::CommitTimes(bool start,bool end,bool fromStart) {
|
|||
grid->CommitChanges();
|
||||
grid->EndBatch();
|
||||
audio->SetDialogue(grid,grid->GetDialogue(sel[0]),sel[0]);
|
||||
video->UpdateSubsRelativeTime();
|
||||
VideoContext::Get()->UpdateDisplays(false);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -50,7 +50,6 @@ class TimeEdit;
|
|||
class SubsEditBox;
|
||||
class AudioDisplay;
|
||||
class HiliModTextCtrl;
|
||||
class VideoDisplay;
|
||||
class wxScintilla;
|
||||
|
||||
|
||||
|
@ -143,7 +142,6 @@ private:
|
|||
public:
|
||||
int linen;
|
||||
AudioDisplay *audio;
|
||||
VideoDisplay *video;
|
||||
SubsTextEditCtrl *TextEdit;
|
||||
|
||||
SubsEditBox(wxWindow *parent,SubtitlesGrid *gridp);
|
||||
|
|
|
@ -88,13 +88,12 @@ END_EVENT_TABLE()
|
|||
|
||||
///////////////
|
||||
// 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)
|
||||
{
|
||||
// Vars
|
||||
byFrame = false;
|
||||
ass = NULL;
|
||||
video = _video;
|
||||
editBox = NULL;
|
||||
parentFrame = parentFr;
|
||||
}
|
||||
|
@ -148,7 +147,7 @@ void SubtitlesGrid::OnPopupMenu(bool alternate) {
|
|||
state = (sels == 1);
|
||||
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);
|
||||
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_AFTER_VIDEO,_("Insert at video time (after)"),_T("Inserts a line after current, starting at video time"))->Enable(state);
|
||||
menu.AppendSeparator();
|
||||
|
|
|
@ -55,7 +55,6 @@
|
|||
class AssFile;
|
||||
class AssEntry;
|
||||
class AssDialogue;
|
||||
class VideoDisplay;
|
||||
class SubsEditBox;
|
||||
class FrameMain;
|
||||
class AudioDisplay;
|
||||
|
@ -103,7 +102,7 @@ private:
|
|||
public:
|
||||
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();
|
||||
|
||||
void LoadDefault(AssFile *ass=NULL);
|
||||
|
|
|
@ -92,7 +92,6 @@ wxArrayString PRSSubtitleFormat::GetWriteWildcards() {
|
|||
void PRSSubtitleFormat::WriteFile(wxString filename,wxString encoding) {
|
||||
#ifdef __WINDOWS__
|
||||
// Video loaded?
|
||||
VideoDisplay *display = ((AegisubApp*)wxTheApp)->frame->videoBox->videoDisplay;
|
||||
if (VideoContext::Get()->IsLoaded()) throw _T("Video not loaded!");
|
||||
|
||||
// Create the PRS file
|
||||
|
|
Loading…
Reference in a new issue