projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move locale_convert into libdcp.
[dcpomatic.git]
/
src
/
wx
/
video_waveform_plot.cc
diff --git
a/src/wx/video_waveform_plot.cc
b/src/wx/video_waveform_plot.cc
index a9100b4b48bf2661f1e468ddf698fcd02fcb6895..794922bff190fcfff2c3cb244f13029efab1a278 100644
(file)
--- a/
src/wx/video_waveform_plot.cc
+++ b/
src/wx/video_waveform_plot.cc
@@
-1,19
+1,20
@@
/*
Copyright (C) 2015 Carl Hetherington <cth@carlh.net>
/*
Copyright (C) 2015 Carl Hetherington <cth@carlh.net>
- This program is free software; you can redistribute it and/or modify
+ This file is part of DCP-o-matic.
+
+ DCP-o-matic is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
-
This program
is distributed in the hope that it will be useful,
+
DCP-o-matic
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
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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
*/
*/
@@
-21,8
+22,8
@@
#include "film_viewer.h"
#include "wx_util.h"
#include "lib/image.h"
#include "film_viewer.h"
#include "wx_util.h"
#include "lib/image.h"
-#include "lib/raw_convert.h"
#include "lib/dcp_video.h"
#include "lib/dcp_video.h"
+#include <dcp/locale_convert.h>
#include <dcp/openjpeg_image.h>
#include <wx/rawbmp.h>
#include <wx/graphics.h>
#include <dcp/openjpeg_image.h>
#include <wx/rawbmp.h>
#include <wx/graphics.h>
@@
-34,6
+35,7
@@
using std::min;
using std::string;
using boost::weak_ptr;
using boost::shared_ptr;
using std::string;
using boost::weak_ptr;
using boost::shared_ptr;
+using dcp::locale_convert;
int const VideoWaveformPlot::_vertical_margin = 8;
int const VideoWaveformPlot::_vertical_margin = 8;
@@
-117,7
+119,7
@@
VideoWaveformPlot::paint ()
} else if (n < 1000) {
x += extra[2];
}
} else if (n < 1000) {
x += extra[2];
}
- gc->DrawText (std_to_wx (
raw
_convert<string> (n)), x, y - (label_height / 2));
+ gc->DrawText (std_to_wx (
locale
_convert<string> (n)), x, y - (label_height / 2));
}
wxImage waveform (_waveform->size().width, height, _waveform->data()[0], true);
}
wxImage waveform (_waveform->size().width, height, _waveform->data()[0], true);
@@
-137,7
+139,7
@@
VideoWaveformPlot::create_waveform ()
}
dcp::Size const size = _image->size();
}
dcp::Size const size = _image->size();
- _waveform.reset (new Image (PIX_FMT_RGB24, dcp::Size (size.width, size.height), true));
+ _waveform.reset (new Image (
AV_
PIX_FMT_RGB24, dcp::Size (size.width, size.height), true));
for (int x = 0; x < size.width; ++x) {
for (int x = 0; x < size.width; ++x) {
@@
-166,7
+168,7
@@
VideoWaveformPlot::create_waveform ()
_waveform = _waveform->scale (
dcp::Size (GetSize().GetWidth() - 32, GetSize().GetHeight() - _vertical_margin * 2),
_waveform = _waveform->scale (
dcp::Size (GetSize().GetWidth() - 32, GetSize().GetHeight() - _vertical_margin * 2),
- dcp::YUV_TO_RGB_REC709,
PIX_FMT_RGB24, fals
e
+ dcp::YUV_TO_RGB_REC709,
AV_PIX_FMT_RGB24, false, tru
e
);
}
);
}