Detached Video display mostly works.
Originally committed to SVN as r883.
This commit is contained in:
parent
c232b625ff
commit
8231034cb1
9 changed files with 103 additions and 54 deletions
|
@ -97,6 +97,7 @@ Please visit http://aegisub.net to download latest version
|
||||||
- Added an audio clip export by right clicking on a line. (Dansolo)
|
- Added an audio clip export by right clicking on a line. (Dansolo)
|
||||||
- Added a clear button for shifting history. (Dansolo)
|
- Added a clear button for shifting history. (Dansolo)
|
||||||
- Fixed Custom Aspect Ratio input. (Dansolo)
|
- Fixed Custom Aspect Ratio input. (Dansolo)
|
||||||
|
- Made the video display detachable. (AMZ)
|
||||||
|
|
||||||
|
|
||||||
= 1.10 beta - 2006.08.07 ===========================
|
= 1.10 beta - 2006.08.07 ===========================
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
#include "dialog_detached_video.h"
|
#include "dialog_detached_video.h"
|
||||||
#include "video_box.h"
|
#include "video_box.h"
|
||||||
#include "video_context.h"
|
#include "video_context.h"
|
||||||
|
#include "video_display.h"
|
||||||
#include "frame_main.h"
|
#include "frame_main.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -56,11 +57,13 @@ DialogDetachedVideo::DialogDetachedVideo(FrameMain *par)
|
||||||
|
|
||||||
// Video area;
|
// Video area;
|
||||||
videoBox = new VideoBox(panel);
|
videoBox = new VideoBox(panel);
|
||||||
|
videoBox->videoDisplay->freeSize = true;
|
||||||
|
|
||||||
// Set sizer
|
// Set sizer
|
||||||
wxSizer *mainSizer = new wxBoxSizer(wxVERTICAL);
|
wxSizer *mainSizer = new wxBoxSizer(wxVERTICAL);
|
||||||
mainSizer->Add(videoBox,1,wxEXPAND | wxALL,5);
|
mainSizer->Add(videoBox,1,wxEXPAND | wxALL,5);
|
||||||
panel->SetSizer(mainSizer);
|
panel->SetSizer(mainSizer);
|
||||||
|
mainSizer->SetSizeHints(this);
|
||||||
|
|
||||||
// Update
|
// Update
|
||||||
parent->SetDisplayMode(0,-1);
|
parent->SetDisplayMode(0,-1);
|
||||||
|
|
|
@ -499,7 +499,7 @@ void FrameMain::DeInitContents() {
|
||||||
// Update toolbar
|
// Update toolbar
|
||||||
void FrameMain::UpdateToolbar() {
|
void FrameMain::UpdateToolbar() {
|
||||||
// Collect flags
|
// Collect flags
|
||||||
bool isVideo = showVideo;
|
bool isVideo = VideoContext::Get()->IsLoaded();
|
||||||
HasSelection = true;
|
HasSelection = true;
|
||||||
int selRows = SubsBox->GetNumberSelection();
|
int selRows = SubsBox->GetNumberSelection();
|
||||||
|
|
||||||
|
@ -838,7 +838,7 @@ void FrameMain::SynchronizeProject(bool fromSubs) {
|
||||||
if (curSubsVideo != _T("")) {
|
if (curSubsVideo != _T("")) {
|
||||||
LoadVideo(curSubsVideo);
|
LoadVideo(curSubsVideo);
|
||||||
if (VideoContext::Get()->IsLoaded()) {
|
if (VideoContext::Get()->IsLoaded()) {
|
||||||
videoBox->videoDisplay->SetAspectRatio(videoAr,videoArValue);
|
VideoContext::Get()->SetAspectRatio(videoAr,videoArValue);
|
||||||
videoBox->videoDisplay->SetZoomPos(videoZoom-1);
|
videoBox->videoDisplay->SetZoomPos(videoZoom-1);
|
||||||
VideoContext::Get()->JumpToFrame(videoPos);
|
VideoContext::Get()->JumpToFrame(videoPos);
|
||||||
}
|
}
|
||||||
|
@ -901,8 +901,8 @@ void FrameMain::SynchronizeProject(bool fromSubs) {
|
||||||
seekpos = wxString::Format(_T("%i"),videoBox->videoDisplay->ControlSlider->GetValue());
|
seekpos = wxString::Format(_T("%i"),videoBox->videoDisplay->ControlSlider->GetValue());
|
||||||
zoom = wxString::Format(_T("%i"),videoBox->videoDisplay->zoomBox->GetSelection()+1);
|
zoom = wxString::Format(_T("%i"),videoBox->videoDisplay->zoomBox->GetSelection()+1);
|
||||||
|
|
||||||
int arType = videoBox->videoDisplay->GetAspectRatioType();
|
int arType = VideoContext::Get()->GetAspectRatioType();
|
||||||
if (arType == 4) ar = wxString(_T("c")) + FloatToString(videoBox->videoDisplay->GetAspectRatioValue());
|
if (arType == 4) ar = wxString(_T("c")) + FloatToString(VideoContext::Get()->GetAspectRatioValue());
|
||||||
else ar = wxString::Format(_T("%i"),arType);
|
else ar = wxString::Format(_T("%i"),arType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -298,7 +298,7 @@ void FrameMain::OnMenuOpen (wxMenuEvent &event) {
|
||||||
MenuBar->Enable(Menu_Video_Save_Keyframes,VideoContext::Get()->KeyFramesLoaded());
|
MenuBar->Enable(Menu_Video_Save_Keyframes,VideoContext::Get()->KeyFramesLoaded());
|
||||||
|
|
||||||
// Set AR radio
|
// Set AR radio
|
||||||
int arType = videoBox->videoDisplay->GetAspectRatioType();
|
int arType = VideoContext::Get()->GetAspectRatioType();
|
||||||
MenuBar->Check(Menu_Video_AR_Default,false);
|
MenuBar->Check(Menu_Video_AR_Default,false);
|
||||||
MenuBar->Check(Menu_Video_AR_Full,false);
|
MenuBar->Check(Menu_Video_AR_Full,false);
|
||||||
MenuBar->Check(Menu_Video_AR_Wide,false);
|
MenuBar->Check(Menu_Video_AR_Wide,false);
|
||||||
|
@ -1191,7 +1191,7 @@ void FrameMain::OnReplace(wxCommandEvent &event) {
|
||||||
// Change aspect ratio to default
|
// Change aspect ratio to default
|
||||||
void FrameMain::OnSetARDefault (wxCommandEvent &event) {
|
void FrameMain::OnSetARDefault (wxCommandEvent &event) {
|
||||||
VideoContext::Get()->Stop();
|
VideoContext::Get()->Stop();
|
||||||
videoBox->videoDisplay->SetAspectRatio(0);
|
VideoContext::Get()->SetAspectRatio(0);
|
||||||
SetDisplayMode(-1,-1);
|
SetDisplayMode(-1,-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1200,7 +1200,7 @@ void FrameMain::OnSetARDefault (wxCommandEvent &event) {
|
||||||
// Change aspect ratio to fullscreen
|
// Change aspect ratio to fullscreen
|
||||||
void FrameMain::OnSetARFull (wxCommandEvent &event) {
|
void FrameMain::OnSetARFull (wxCommandEvent &event) {
|
||||||
VideoContext::Get()->Stop();
|
VideoContext::Get()->Stop();
|
||||||
videoBox->videoDisplay->SetAspectRatio(1);
|
VideoContext::Get()->SetAspectRatio(1);
|
||||||
SetDisplayMode(-1,-1);
|
SetDisplayMode(-1,-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1209,7 +1209,7 @@ void FrameMain::OnSetARFull (wxCommandEvent &event) {
|
||||||
// Change aspect ratio to widescreen
|
// Change aspect ratio to widescreen
|
||||||
void FrameMain::OnSetARWide (wxCommandEvent &event) {
|
void FrameMain::OnSetARWide (wxCommandEvent &event) {
|
||||||
VideoContext::Get()->Stop();
|
VideoContext::Get()->Stop();
|
||||||
videoBox->videoDisplay->SetAspectRatio(2);
|
VideoContext::Get()->SetAspectRatio(2);
|
||||||
SetDisplayMode(-1,-1);
|
SetDisplayMode(-1,-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1218,7 +1218,7 @@ void FrameMain::OnSetARWide (wxCommandEvent &event) {
|
||||||
// Change aspect ratio to 2:35
|
// Change aspect ratio to 2:35
|
||||||
void FrameMain::OnSetAR235 (wxCommandEvent &event) {
|
void FrameMain::OnSetAR235 (wxCommandEvent &event) {
|
||||||
VideoContext::Get()->Stop();
|
VideoContext::Get()->Stop();
|
||||||
videoBox->videoDisplay->SetAspectRatio(3);
|
VideoContext::Get()->SetAspectRatio(3);
|
||||||
SetDisplayMode(-1,-1);
|
SetDisplayMode(-1,-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1229,7 +1229,7 @@ void FrameMain::OnSetARCustom (wxCommandEvent &event) {
|
||||||
// Get text
|
// Get text
|
||||||
VideoContext::Get()->Stop();
|
VideoContext::Get()->Stop();
|
||||||
|
|
||||||
wxString value = wxGetTextFromUser(_("Enter aspect ratio in either decimal (e.g. 2.35) or fractional (e.g. 16:9) form. Enter a value like 853x480 to set a specific resolution."),_("Enter aspect ratio"),FloatToString(videoBox->videoDisplay->GetAspectRatioValue()));
|
wxString value = wxGetTextFromUser(_("Enter aspect ratio in either decimal (e.g. 2.35) or fractional (e.g. 16:9) form. Enter a value like 853x480 to set a specific resolution."),_("Enter aspect ratio"),FloatToString(VideoContext::Get()->GetAspectRatioValue()));
|
||||||
if (value.IsEmpty()) return;
|
if (value.IsEmpty()) return;
|
||||||
|
|
||||||
value.MakeLower();
|
value.MakeLower();
|
||||||
|
@ -1268,7 +1268,7 @@ void FrameMain::OnSetARCustom (wxCommandEvent &event) {
|
||||||
|
|
||||||
// Set value
|
// Set value
|
||||||
else {
|
else {
|
||||||
videoBox->videoDisplay->SetAspectRatio(4,numval);
|
VideoContext::Get()->SetAspectRatio(4,numval);
|
||||||
SetDisplayMode(-1,-1);
|
SetDisplayMode(-1,-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,6 +103,8 @@ VideoContext::VideoContext() {
|
||||||
keyFramesLoaded = false;
|
keyFramesLoaded = false;
|
||||||
overKeyFramesLoaded = false;
|
overKeyFramesLoaded = false;
|
||||||
frame_n = 0;
|
frame_n = 0;
|
||||||
|
arType = 0;
|
||||||
|
arValue = 1.0;
|
||||||
isPlaying = false;
|
isPlaying = false;
|
||||||
threaded = Options.AsBool(_T("Threaded Video"));
|
threaded = Options.AsBool(_T("Threaded Video"));
|
||||||
nextFrame = -1;
|
nextFrame = -1;
|
||||||
|
@ -415,7 +417,7 @@ GLuint VideoContext::GetFrameAsTexture(int n) {
|
||||||
// Set context
|
// Set context
|
||||||
GetGLContext(displayList.front())->SetCurrent(*displayList.front());
|
GetGLContext(displayList.front())->SetCurrent(*displayList.front());
|
||||||
glEnable(GL_TEXTURE_2D);
|
glEnable(GL_TEXTURE_2D);
|
||||||
if (glGetError() != 0) throw _T("Error enabling texturing.");
|
if (glGetError() != 0) throw _T("Error enabling texture.");
|
||||||
|
|
||||||
if (lastTex == 0) {
|
if (lastTex == 0) {
|
||||||
// Enable
|
// Enable
|
||||||
|
@ -700,3 +702,29 @@ bool VideoContext::OverKeyFramesLoaded() {
|
||||||
bool VideoContext::KeyFramesLoaded() {
|
bool VideoContext::KeyFramesLoaded() {
|
||||||
return overKeyFramesLoaded || keyFramesLoaded;
|
return overKeyFramesLoaded || keyFramesLoaded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//////////////////////////
|
||||||
|
// Calculate aspect ratio
|
||||||
|
double VideoContext::GetARFromType(int type) {
|
||||||
|
if (type == 0) return (double)VideoContext::Get()->GetWidth()/(double)VideoContext::Get()->GetHeight();
|
||||||
|
if (type == 1) return 4.0/3.0;
|
||||||
|
if (type == 2) return 16.0/9.0;
|
||||||
|
if (type == 3) return 2.35;
|
||||||
|
return 1.0; //error
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////
|
||||||
|
// Sets aspect ratio
|
||||||
|
void VideoContext::SetAspectRatio(int _type, double value) {
|
||||||
|
// Get value
|
||||||
|
if (_type != 4) value = GetARFromType(_type);
|
||||||
|
if (value < 0.5) value = 0.5;
|
||||||
|
if (value > 5.0) value = 5.0;
|
||||||
|
|
||||||
|
// Set
|
||||||
|
arType = _type;
|
||||||
|
arValue = value;
|
||||||
|
UpdateDisplays(true);
|
||||||
|
}
|
||||||
|
|
|
@ -102,6 +102,9 @@ private:
|
||||||
int length;
|
int length;
|
||||||
double fps;
|
double fps;
|
||||||
|
|
||||||
|
double arValue;
|
||||||
|
int arType;
|
||||||
|
|
||||||
void UnloadTexture();
|
void UnloadTexture();
|
||||||
void OnPlayTimer(wxTimerEvent &event);
|
void OnPlayTimer(wxTimerEvent &event);
|
||||||
|
|
||||||
|
@ -139,6 +142,11 @@ public:
|
||||||
double GetFPS() { return fps; }
|
double GetFPS() { return fps; }
|
||||||
void SetFPS(double _fps) { fps = _fps; }
|
void SetFPS(double _fps) { fps = _fps; }
|
||||||
|
|
||||||
|
double GetARFromType(int type);
|
||||||
|
void SetAspectRatio(int type,double value=1.0);
|
||||||
|
int GetAspectRatioType() { return arType; }
|
||||||
|
double GetAspectRatioValue() { return arValue; }
|
||||||
|
|
||||||
void SetVideo(const wxString &filename);
|
void SetVideo(const wxString &filename);
|
||||||
void Reset();
|
void Reset();
|
||||||
|
|
||||||
|
|
|
@ -103,9 +103,8 @@ VideoDisplay::VideoDisplay(wxWindow* parent, wxWindowID id, const wxPoint& pos,
|
||||||
ControlSlider = NULL;
|
ControlSlider = NULL;
|
||||||
PositionDisplay = NULL;
|
PositionDisplay = NULL;
|
||||||
origSize = size;
|
origSize = size;
|
||||||
arType = 0;
|
|
||||||
arValue = 1.0;
|
|
||||||
zoomValue = 1.0;
|
zoomValue = 1.0;
|
||||||
|
freeSize = false;
|
||||||
visual = new VideoDisplayVisual(this);
|
visual = new VideoDisplayVisual(this);
|
||||||
tracker = NULL;
|
tracker = NULL;
|
||||||
#if USE_FEXTRACKER == 1
|
#if USE_FEXTRACKER == 1
|
||||||
|
@ -143,11 +142,39 @@ void VideoDisplay::Render() {
|
||||||
pw = context->GetWidth();
|
pw = context->GetWidth();
|
||||||
ph = context->GetHeight();
|
ph = context->GetHeight();
|
||||||
|
|
||||||
|
// Freesized transform
|
||||||
|
dx1 = 0;
|
||||||
|
dy1 = 0;
|
||||||
|
dx2 = w;
|
||||||
|
dy2 = h;
|
||||||
|
if (freeSize) {
|
||||||
|
glClearColor(0,0,0,0);
|
||||||
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
|
float thisAr = float(w)/float(h);
|
||||||
|
float vidAr;
|
||||||
|
if (context->GetAspectRatioType() == 0) vidAr = float(pw)/float(ph);
|
||||||
|
else vidAr = context->GetAspectRatioValue();
|
||||||
|
|
||||||
|
// Window is wider than video, blackbox left/right
|
||||||
|
if (thisAr - vidAr > 0.01f) {
|
||||||
|
int delta = (w-vidAr*h);
|
||||||
|
dx1 += delta/2;
|
||||||
|
dx2 -= delta;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Video is wider than window, blackbox top/bottom
|
||||||
|
else if (vidAr - thisAr > 0.01f) {
|
||||||
|
int delta = (h-w/vidAr);
|
||||||
|
dy1 += delta/2;
|
||||||
|
dy2 -= delta;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Set viewport
|
// Set viewport
|
||||||
glEnable(GL_TEXTURE_2D);
|
glEnable(GL_TEXTURE_2D);
|
||||||
glMatrixMode(GL_MODELVIEW);
|
glMatrixMode(GL_MODELVIEW);
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
glViewport(0,0,w,h);
|
glViewport(dx1,dy1,dx2,dy2);
|
||||||
glMatrixMode(GL_PROJECTION);
|
glMatrixMode(GL_PROJECTION);
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
glOrtho(0.0f,sw,sh,0.0f,-1000.0f,1000.0f);
|
glOrtho(0.0f,sw,sh,0.0f,-1000.0f,1000.0f);
|
||||||
|
@ -209,13 +236,17 @@ void VideoDisplay::Render() {
|
||||||
///////////////
|
///////////////
|
||||||
// Update size
|
// Update size
|
||||||
void VideoDisplay::UpdateSize() {
|
void VideoDisplay::UpdateSize() {
|
||||||
|
// Free size?
|
||||||
|
if (freeSize) return;
|
||||||
|
|
||||||
// Loaded?
|
// Loaded?
|
||||||
if (!VideoContext::Get()->IsLoaded()) return;
|
VideoContext *con = VideoContext::Get();
|
||||||
|
if (!con->IsLoaded()) return;
|
||||||
|
|
||||||
// Get size
|
// Get size
|
||||||
if (arType == 0) w = VideoContext::Get()->GetWidth() * zoomValue;
|
if (con->GetAspectRatioType() == 0) w = con->GetWidth() * zoomValue;
|
||||||
else w = VideoContext::Get()->GetHeight() * zoomValue * arValue;
|
else w = con->GetHeight() * zoomValue * con->GetAspectRatioValue();
|
||||||
h = VideoContext::Get()->GetHeight() * zoomValue;
|
h = con->GetHeight() * zoomValue;
|
||||||
int _w,_h;
|
int _w,_h;
|
||||||
|
|
||||||
// Set the size for this control
|
// Set the size for this control
|
||||||
|
@ -330,32 +361,6 @@ void VideoDisplay::SetZoomPos(int value) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////
|
|
||||||
// Calculate aspect ratio
|
|
||||||
double VideoDisplay::GetARFromType(int type) {
|
|
||||||
if (type == 0) return (double)VideoContext::Get()->GetWidth()/(double)VideoContext::Get()->GetHeight();
|
|
||||||
if (type == 1) return 4.0/3.0;
|
|
||||||
if (type == 2) return 16.0/9.0;
|
|
||||||
if (type == 3) return 2.35;
|
|
||||||
return 1.0; //error
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////
|
|
||||||
// Sets aspect ratio
|
|
||||||
void VideoDisplay::SetAspectRatio(int _type, double value) {
|
|
||||||
// Get value
|
|
||||||
if (_type != 4) value = GetARFromType(_type);
|
|
||||||
if (value < 0.5) value = 0.5;
|
|
||||||
if (value > 5.0) value = 5.0;
|
|
||||||
|
|
||||||
// Set
|
|
||||||
arType = _type;
|
|
||||||
arValue = value;
|
|
||||||
UpdateSize();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////
|
////////////////////////////
|
||||||
// Updates position display
|
// Updates position display
|
||||||
void VideoDisplay::UpdatePositionDisplay() {
|
void VideoDisplay::UpdatePositionDisplay() {
|
||||||
|
@ -478,3 +483,12 @@ void VideoDisplay::DrawText( wxPoint Pos, wxString text ) {
|
||||||
//dc.DrawText(text,Pos.x,Pos.y);
|
//dc.DrawText(text,Pos.x,Pos.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////
|
||||||
|
// Convert mouse coordinates
|
||||||
|
void VideoDisplay::ConvertMouseCoords(int &x,int &y) {
|
||||||
|
int w,h;
|
||||||
|
GetClientSize(&w,&h);
|
||||||
|
x = (x-dx1)*w/dx2;
|
||||||
|
y = (y-dy1)*h/dy2;
|
||||||
|
}
|
||||||
|
|
|
@ -69,6 +69,7 @@ class VideoDisplay: public wxGLCanvas {
|
||||||
private:
|
private:
|
||||||
wxSize origSize;
|
wxSize origSize;
|
||||||
int w,h;
|
int w,h;
|
||||||
|
int dx1,dx2,dy1,dy2;
|
||||||
|
|
||||||
void OnPaint(wxPaintEvent& event);
|
void OnPaint(wxPaintEvent& event);
|
||||||
void OnKey(wxKeyEvent &event);
|
void OnKey(wxKeyEvent &event);
|
||||||
|
@ -85,9 +86,8 @@ public:
|
||||||
VideoDisplayFexTracker *tracker;
|
VideoDisplayFexTracker *tracker;
|
||||||
VideoBox *box;
|
VideoBox *box;
|
||||||
|
|
||||||
double arValue;
|
|
||||||
int arType;
|
|
||||||
double zoomValue;
|
double zoomValue;
|
||||||
|
bool freeSize;
|
||||||
|
|
||||||
VideoSlider *ControlSlider;
|
VideoSlider *ControlSlider;
|
||||||
wxComboBox *zoomBox;
|
wxComboBox *zoomBox;
|
||||||
|
@ -100,6 +100,7 @@ public:
|
||||||
|
|
||||||
void Render();
|
void Render();
|
||||||
|
|
||||||
|
void ConvertMouseCoords(int &x,int &y);
|
||||||
void DrawText(wxPoint Pos, wxString Text);
|
void DrawText(wxPoint Pos, wxString Text);
|
||||||
void UpdatePositionDisplay();
|
void UpdatePositionDisplay();
|
||||||
void UpdateSize();
|
void UpdateSize();
|
||||||
|
@ -107,11 +108,6 @@ public:
|
||||||
void SetZoomPos(int pos);
|
void SetZoomPos(int pos);
|
||||||
void UpdateSubsRelativeTime();
|
void UpdateSubsRelativeTime();
|
||||||
|
|
||||||
double GetARFromType(int type);
|
|
||||||
void SetAspectRatio(int type,double value=1.0);
|
|
||||||
int GetAspectRatioType() { return arType; }
|
|
||||||
double GetAspectRatioValue() { return arValue; }
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -745,14 +745,13 @@ void VideoDisplayVisual::OnMouseEvent (wxMouseEvent &event) {
|
||||||
// Coords
|
// Coords
|
||||||
int x = event.GetX();
|
int x = event.GetX();
|
||||||
int y = event.GetY();
|
int y = event.GetY();
|
||||||
|
parent->ConvertMouseCoords(x,y);
|
||||||
int w,h;
|
int w,h;
|
||||||
parent->GetClientSize(&w,&h);
|
parent->GetClientSize(&w,&h);
|
||||||
int orgx = -1;
|
int orgx = -1;
|
||||||
int orgy = -1;
|
int orgy = -1;
|
||||||
int sw,sh;
|
int sw,sh;
|
||||||
VideoContext::Get()->GetScriptSize(sw,sh);
|
VideoContext::Get()->GetScriptSize(sw,sh);
|
||||||
int mx = x * VideoContext::Get()->GetWidth() / w;
|
|
||||||
int my = y * VideoContext::Get()->GetHeight() / h;
|
|
||||||
int frame_n = VideoContext::Get()->GetFrameN();
|
int frame_n = VideoContext::Get()->GetFrameN();
|
||||||
SubtitlesGrid *grid = VideoContext::Get()->grid;
|
SubtitlesGrid *grid = VideoContext::Get()->grid;
|
||||||
bool hasOverlay = false;
|
bool hasOverlay = false;
|
||||||
|
|
Loading…
Reference in a new issue