/*
- Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
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
std::vector<AudioPoint> _current;
float _overall_peak;
- AudioFrame _overall_peak_frame;
+ Frame _overall_peak_frame;
boost::shared_ptr<AudioAnalysis> _analysis;
/*
- Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
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
}
shared_ptr<ContentAudio>
-AudioDecoder::get_audio (AudioFrame frame, AudioFrame length, bool accurate)
+AudioDecoder::get_audio (Frame frame, Frame length, bool accurate)
{
shared_ptr<ContentAudio> dec;
- AudioFrame const end = frame + length - 1;
+ Frame const end = frame + length - 1;
if (frame < _decoded_audio.frame || end > (_decoded_audio.frame + length * 4)) {
/* Either we have no decoded data, or what we do have is a long way from what we want: seek */
/* Offset of the data that we want from the start of _decoded_audio.audio
(to be set up shortly)
*/
- AudioFrame decoded_offset = 0;
+ Frame decoded_offset = 0;
/* Now enough pass() calls will either:
* (a) give us what we want, or
/* The amount of data available in _decoded_audio.audio starting from `frame'. This could be -ve
if pass() returned true before we got enough data.
*/
- AudioFrame const available = _decoded_audio.audio->frames() - decoded_offset;
+ Frame const available = _decoded_audio.audio->frames() - decoded_offset;
/* We will return either that, or the requested amount, whichever is smaller */
- AudioFrame const to_return = max ((AudioFrame) 0, min (available, length));
+ Frame const to_return = max ((Frame) 0, min (available, length));
/* Copy our data to the output */
shared_ptr<AudioBuffers> out (new AudioBuffers (_decoded_audio.audio->channels(), to_return));
out->copy_from (_decoded_audio.audio.get(), to_return, decoded_offset, 0);
- AudioFrame const remaining = max ((AudioFrame) 0, available - to_return);
+ Frame const remaining = max ((Frame) 0, available - to_return);
/* Clean up decoded; first, move the data after what we just returned to the start of the buffer */
_decoded_audio.audio->move (decoded_offset + to_return, 0, remaining);
data = _processor->run (data);
}
- AudioFrame const frame_rate = _audio_content->resampled_audio_frame_rate ();
+ Frame const frame_rate = _audio_content->resampled_audio_frame_rate ();
if (_seek_reference) {
/* We've had an accurate seek and now we're seeing some data */
ContentTime const delta = time - _seek_reference.get ();
- AudioFrame const delta_frames = delta.frames (frame_rate);
+ Frame const delta_frames = delta.frames (frame_rate);
if (delta_frames > 0) {
/* This data comes after the seek time. Pad the data with some silence. */
shared_ptr<AudioBuffers> padded (new AudioBuffers (data->channels(), data->frames() + delta_frames));
time -= delta;
} else if (delta_frames < 0) {
/* This data comes before the seek time. Throw some data away */
- AudioFrame const to_discard = min (-delta_frames, static_cast<AudioFrame> (data->frames()));
- AudioFrame const to_keep = data->frames() - to_discard;
+ Frame const to_discard = min (-delta_frames, static_cast<Frame> (data->frames()));
+ Frame const to_keep = data->frames() - to_discard;
if (to_keep == 0) {
/* We have to throw all this data away, so keep _seek_reference and
try again next time some data arrives.
* @param accurate true to try hard to return frames from exactly `frame', false if we don't mind nearby frames.
* @return Time-stamped audio data which may or may not be from the location (and of the length) requested.
*/
- boost::shared_ptr<ContentAudio> get_audio (AudioFrame time, AudioFrame length, bool accurate);
+ boost::shared_ptr<ContentAudio> get_audio (Frame time, Frame length, bool accurate);
protected:
boost::shared_ptr<const AudioContent> _audio_content;
boost::shared_ptr<Resampler> _resampler;
boost::shared_ptr<AudioProcessor> _processor;
- boost::optional<AudioFrame> _audio_position;
+ boost::optional<Frame> _audio_position;
/** Currently-available decoded audio data */
ContentAudio _decoded_audio;
/** The time of an accurate seek after which we have not yet received any actual
, frame (0)
{}
- ContentAudio (boost::shared_ptr<AudioBuffers> a, AudioFrame f)
+ ContentAudio (boost::shared_ptr<AudioBuffers> a, Frame f)
: audio (a)
, frame (f)
{}
boost::shared_ptr<AudioBuffers> audio;
- AudioFrame frame;
+ Frame frame;
};
, part (PART_WHOLE)
{}
- ContentVideo (boost::shared_ptr<const ImageProxy> i, Eyes e, Part p, VideoFrame f)
+ ContentVideo (boost::shared_ptr<const ImageProxy> i, Eyes e, Part p, Frame f)
: image (i)
, eyes (e)
, part (p)
boost::shared_ptr<const ImageProxy> image;
Eyes eyes;
Part part;
- VideoFrame frame;
+ Frame frame;
};
#endif
boost::shared_ptr<const ImageContent> _image_content;
boost::shared_ptr<ImageProxy> _image;
- VideoFrame _video_position;
+ Frame _video_position;
};
setup_pieces ();
}
- AudioFrame const length_frames = length.frames (_film->audio_frame_rate ());
+ Frame const length_frames = length.frames (_film->audio_frame_rate ());
shared_ptr<AudioBuffers> audio (new AudioBuffers (_film->audio_channels(), length_frames));
audio->make_silent ();
/* The time that we should request from the content */
DCPTime request = time - DCPTime::from_seconds (content->audio_delay() / 1000.0);
- AudioFrame request_frames = length_frames;
+ Frame request_frames = length_frames;
DCPTime offset;
if (request < DCPTime ()) {
/* We went off the start of the content, so we will need to offset
request = DCPTime ();
}
- AudioFrame const content_frame = dcp_to_content_audio (*i, request);
+ Frame const content_frame = dcp_to_content_audio (*i, request);
/* Audio from this piece's decoder (which might be more or less than what we asked for) */
shared_ptr<ContentAudio> all = decoder->get_audio (content_frame, request_frames, accurate);
all->audio.get(),
content_frame - all->frame,
offset.frames (_film->audio_frame_rate()),
- min (AudioFrame (all->audio->frames()), request_frames)
+ min (Frame (all->audio->frames()), request_frames)
);
}
return audio;
}
-VideoFrame
+Frame
Player::dcp_to_content_video (shared_ptr<const Piece> piece, DCPTime t) const
{
/* s is the offset of t from the start position of this content */
}
DCPTime
-Player::content_video_to_dcp (shared_ptr<const Piece> piece, VideoFrame f) const
+Player::content_video_to_dcp (shared_ptr<const Piece> piece, Frame f) const
{
DCPTime t = DCPTime::from_frames (f * piece->frc.factor (), _film->video_frame_rate()) - piece->content->trim_start () + piece->content->position ();
if (t < DCPTime ()) {
return t;
}
-AudioFrame
+Frame
Player::dcp_to_content_audio (shared_ptr<const Piece> piece, DCPTime t) const
{
/* s is the offset of t from the start position of this content */
void film_changed (Film::Property);
std::list<PositionImage> transform_image_subtitles (std::list<ImageSubtitle>) const;
void update_subtitle_from_text ();
- VideoFrame dcp_to_content_video (boost::shared_ptr<const Piece> piece, DCPTime t) const;
- DCPTime content_video_to_dcp (boost::shared_ptr<const Piece> piece, VideoFrame f) const;
- AudioFrame dcp_to_content_audio (boost::shared_ptr<const Piece> piece, DCPTime t) const;
+ Frame dcp_to_content_video (boost::shared_ptr<const Piece> piece, DCPTime t) const;
+ DCPTime content_video_to_dcp (boost::shared_ptr<const Piece> piece, Frame f) const;
+ Frame dcp_to_content_audio (boost::shared_ptr<const Piece> piece, DCPTime t) const;
ContentTime dcp_to_content_subtitle (boost::shared_ptr<const Piece> piece, DCPTime t) const;
boost::shared_ptr<PlayerVideo> black_player_video_frame (DCPTime) const;
typedef std::vector<boost::shared_ptr<SubtitleContent> > SubtitleContentList;
typedef std::vector<boost::shared_ptr<FFmpegContent> > FFmpegContentList;
-typedef int64_t VideoFrame;
-typedef int64_t AudioFrame;
+typedef int64_t Frame;
enum VideoFrameType
{
extern void set_backtrace_file (boost::filesystem::path);
extern dcp::FrameInfo read_frame_info (FILE* file, int frame, Eyes eyes);
extern void write_frame_info (FILE* file, int frame, Eyes eyes, dcp::FrameInfo info);
-extern int64_t video_frames_to_audio_frames (VideoFrame v, float audio_sample_rate, float frames_per_second);
extern std::map<std::string, std::string> split_get_request (std::string url);
extern std::string video_mxf_filename (boost::shared_ptr<dcp::PictureMXF> mxf);
extern std::string audio_mxf_filename (boost::shared_ptr<dcp::SoundMXF> mxf);
}
optional<float>
-VideoContent::fade (VideoFrame f) const
+VideoContent::fade (Frame f) const
{
DCPOMATIC_ASSERT (f >= 0);
return float (f) / _fade_in.frames (video_frame_rate ());
}
- VideoFrame fade_out_start = ContentTime (video_length() - fade_out()).frames (video_frame_rate ());
+ Frame fade_out_start = ContentTime (video_length() - fade_out()).frames (video_frame_rate ());
if (f >= fade_out_start) {
return 1 - float (f - fade_out_start) / fade_out().frames (video_frame_rate ());
}
ContentTime dcp_time_to_content_time (DCPTime) const;
- boost::optional<float> fade (VideoFrame) const;
+ boost::optional<float> fade (Frame) const;
void scale_and_crop_to_fit_width ();
void scale_and_crop_to_fit_height ();
}
list<ContentVideo>
-VideoDecoder::decoded_video (VideoFrame frame)
+VideoDecoder::decoded_video (Frame frame)
{
list<ContentVideo> output;
* @return Frames; there may be none (if there is no video there), 1 for 2D or 2 for 3D.
*/
list<ContentVideo>
-VideoDecoder::get_video (VideoFrame frame, bool accurate)
+VideoDecoder::get_video (Frame frame, bool accurate)
{
/* At this stage, if we have get_video()ed before, _decoded_video will contain the last frame that this
method returned (and possibly a few more). If the requested frame is not in _decoded_video and it is not the next
/** Fill _decoded_video from `from' up to, but not including, `to' */
void
-VideoDecoder::fill_2d (VideoFrame from, VideoFrame to)
+VideoDecoder::fill_2d (Frame from, Frame to)
{
if (to == 0) {
/* Already OK */
filler_part = _decoded_video.back().part;
}
- VideoFrame filler_frame = from;
+ Frame filler_frame = from;
while (filler_frame < to) {
/** Fill _decoded_video from `from' up to, but not including, `to' */
void
-VideoDecoder::fill_3d (VideoFrame from, VideoFrame to, Eyes eye)
+VideoDecoder::fill_3d (Frame from, Frame to, Eyes eye)
{
if (to == 0 && eye == EYES_LEFT) {
/* Already OK */
}
}
- VideoFrame filler_frame = from;
+ Frame filler_frame = from;
Eyes filler_eye = _decoded_video.empty() ? EYES_LEFT : _decoded_video.back().eyes;
if (_decoded_video.empty ()) {
/** Called by subclasses when they have a video frame ready */
void
-VideoDecoder::video (shared_ptr<const ImageProxy> image, VideoFrame frame)
+VideoDecoder::video (shared_ptr<const ImageProxy> image, Frame frame)
{
if (_ignore_video) {
return;
and the things we are about to push.
*/
- boost::optional<VideoFrame> from;
- boost::optional<VideoFrame> to;
+ boost::optional<Frame> from;
+ boost::optional<Frame> to;
if (_decoded_video.empty() && _last_seek_time && _last_seek_accurate) {
from = _last_seek_time->frames (_video_content->video_frame_rate ());
public:
VideoDecoder (boost::shared_ptr<const VideoContent> c);
- std::list<ContentVideo> get_video (VideoFrame frame, bool accurate);
+ std::list<ContentVideo> get_video (Frame frame, bool accurate);
boost::shared_ptr<const VideoContent> video_content () const {
return _video_content;
friend struct video_decoder_fill_test2;
void seek (ContentTime time, bool accurate);
- void video (boost::shared_ptr<const ImageProxy>, VideoFrame frame);
- std::list<ContentVideo> decoded_video (VideoFrame frame);
- void fill_2d (VideoFrame from, VideoFrame to);
- void fill_3d (VideoFrame from, VideoFrame to, Eyes);
+ void video (boost::shared_ptr<const ImageProxy>, Frame frame);
+ std::list<ContentVideo> decoded_video (Frame frame);
+ void fill_2d (Frame from, Frame to);
+ void fill_3d (Frame from, Frame to, Eyes);
boost::shared_ptr<const VideoContent> _video_content;
std::list<ContentVideo> _decoded_video;
ID_add_file
};
-class Frame : public wxFrame
+class DOMFrame : public wxFrame
{
public:
- Frame (wxString const & title)
+ DOMFrame (wxString const & title)
: wxFrame (NULL, -1, title)
, _hints_dialog (0)
, _servers_list_dialog (0)
setup_menu (bar);
SetMenuBar (bar);
- _config_changed_connection = Config::instance()->Changed.connect (boost::bind (&Frame::config_changed, this));
+ _config_changed_connection = Config::instance()->Changed.connect (boost::bind (&DOMFrame::config_changed, this));
config_changed ();
- Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&Frame::file_new, this), ID_file_new);
- Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&Frame::file_open, this), ID_file_open);
- Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&Frame::file_save, this), ID_file_save);
- Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&Frame::file_properties, this), ID_file_properties);
- Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&Frame::file_history, this, _1), ID_file_history, ID_file_history + HISTORY_SIZE);
- Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&Frame::file_exit, this), wxID_EXIT);
- Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&Frame::edit_preferences, this), wxID_PREFERENCES);
- Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&Frame::content_scale_to_fit_width, this), ID_content_scale_to_fit_width);
- Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&Frame::content_scale_to_fit_height, this), ID_content_scale_to_fit_height);
- Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&Frame::jobs_make_dcp, this), ID_jobs_make_dcp);
- Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&Frame::jobs_make_kdms, this), ID_jobs_make_kdms);
- Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&Frame::jobs_send_dcp_to_tms, this), ID_jobs_send_dcp_to_tms);
- Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&Frame::jobs_show_dcp, this), ID_jobs_show_dcp);
- Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&Frame::tools_hints, this), ID_tools_hints);
- Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&Frame::tools_encoding_servers, this), ID_tools_encoding_servers);
- Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&Frame::tools_check_for_updates, this), ID_tools_check_for_updates);
- Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&Frame::tools_restore_default_preferences, this), ID_tools_restore_default_preferences);
- Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&Frame::help_about, this), wxID_ABOUT);
- Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&Frame::help_report_a_problem, this), ID_help_report_a_problem);
-
- Bind (wxEVT_CLOSE_WINDOW, boost::bind (&Frame::close, this, _1));
+ Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&DOMFrame::file_new, this), ID_file_new);
+ Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&DOMFrame::file_open, this), ID_file_open);
+ Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&DOMFrame::file_save, this), ID_file_save);
+ Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&DOMFrame::file_properties, this), ID_file_properties);
+ Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&DOMFrame::file_history, this, _1), ID_file_history, ID_file_history + HISTORY_SIZE);
+ Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&DOMFrame::file_exit, this), wxID_EXIT);
+ Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&DOMFrame::edit_preferences, this), wxID_PREFERENCES);
+ Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&DOMFrame::content_scale_to_fit_width, this), ID_content_scale_to_fit_width);
+ Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&DOMFrame::content_scale_to_fit_height, this), ID_content_scale_to_fit_height);
+ Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&DOMFrame::jobs_make_dcp, this), ID_jobs_make_dcp);
+ Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&DOMFrame::jobs_make_kdms, this), ID_jobs_make_kdms);
+ Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&DOMFrame::jobs_send_dcp_to_tms, this), ID_jobs_send_dcp_to_tms);
+ Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&DOMFrame::jobs_show_dcp, this), ID_jobs_show_dcp);
+ Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&DOMFrame::tools_hints, this), ID_tools_hints);
+ Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&DOMFrame::tools_encoding_servers, this), ID_tools_encoding_servers);
+ Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&DOMFrame::tools_check_for_updates, this), ID_tools_check_for_updates);
+ Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&DOMFrame::tools_restore_default_preferences, this), ID_tools_restore_default_preferences);
+ Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&DOMFrame::help_about, this), wxID_ABOUT);
+ Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&DOMFrame::help_report_a_problem, this), ID_help_report_a_problem);
+
+ Bind (wxEVT_CLOSE_WINDOW, boost::bind (&DOMFrame::close, this, _1));
/* Use a panel as the only child of the Frame so that we avoid
the dark-grey background on Windows.
set_menu_sensitivity ();
- _film_editor->FileChanged.connect (bind (&Frame::file_changed, this, _1));
+ _film_editor->FileChanged.connect (bind (&DOMFrame::file_changed, this, _1));
file_changed ("");
- JobManager::instance()->ActiveJobsChanged.connect (boost::bind (&Frame::set_menu_sensitivity, this));
+ JobManager::instance()->ActiveJobsChanged.connect (boost::bind (&DOMFrame::set_menu_sensitivity, this));
overall_panel->SetSizer (main_sizer);
*/
Config::drop ();
- _frame = new Frame (_("DCP-o-matic"));
+ _frame = new DOMFrame (_("DCP-o-matic"));
SetTopWindow (_frame);
_frame->Maximize ();
_frame->Show ();
}
}
- Frame* _frame;
+ DOMFrame* _frame;
shared_ptr<wxTimer> _timer;
string _film_to_load;
string _film_to_create;
m->Append (help, _("&Help"));
}
-class Frame : public wxFrame
+class DOMFrame : public wxFrame
{
public:
- Frame (wxString const & title)
+ DOMFrame (wxString const & title)
: wxFrame (NULL, -1, title)
, _sizer (new wxBoxSizer (wxVERTICAL))
{
setup_menu (bar);
SetMenuBar (bar);
- Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&Frame::file_add_film, this), ID_file_add_film);
- Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&Frame::file_quit, this), ID_file_quit);
- Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&Frame::help_about, this), ID_help_about);
+ Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&DOMFrame::file_add_film, this), ID_file_add_film);
+ Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&DOMFrame::file_quit, this), ID_file_quit);
+ Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&DOMFrame::help_about, this), ID_help_about);
wxPanel* panel = new wxPanel (this);
wxSizer* s = new wxBoxSizer (wxHORIZONTAL);
wxSizer* buttons = new wxBoxSizer (wxHORIZONTAL);
wxButton* add = new wxButton (panel, wxID_ANY, _("Add Film..."));
- add->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&Frame::add_film, this));
+ add->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&DOMFrame::add_film, this));
buttons->Add (add, 1, wxALL, 6);
_sizer->Add (buttons, 0, wxALL, 6);
panel->SetSizer (_sizer);
- Bind (wxEVT_CLOSE_WINDOW, boost::bind (&Frame::close, this, _1));
- Bind (wxEVT_SIZE, boost::bind (&Frame::sized, this, _1));
+ Bind (wxEVT_CLOSE_WINDOW, boost::bind (&DOMFrame::close, this, _1));
+ Bind (wxEVT_SIZE, boost::bind (&DOMFrame::sized, this, _1));
}
private:
*/
Config::drop ();
- Frame* f = new Frame (_("DCP-o-matic Batch Converter"));
+ DOMFrame* f = new DOMFrame (_("DCP-o-matic Batch Converter"));
SetTopWindow (f);
f->Maximize ();
f->Show ();
/*
- Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2014-2015 Carl Hetherington <cth@carlh.net>
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
bool pass (PassReason)
{
- AudioFrame const N = min (
- AudioFrame (2000),
+ Frame const N = min (
+ Frame (2000),
_audio_content->audio_length().frames (_audio_content->resampled_audio_frame_rate ()) - _position
);
}
private:
- AudioFrame _position;
+ Frame _position;
};
class TestAudioContent : public AudioContent
shared_ptr<TestAudioDecoder> decoder;
static shared_ptr<ContentAudio>
-get (AudioFrame from, AudioFrame length)
+get (Frame from, Frame length)
{
decoder->seek (ContentTime::from_frames (from, content->resampled_audio_frame_rate ()), true);
shared_ptr<ContentAudio> ca = decoder->get_audio (from, length, true);
}
static void
-check (AudioFrame from, AudioFrame length)
+check (Frame from, Frame length)
{
shared_ptr<ContentAudio> ca = get (from, length);
for (int i = 0; i < content->audio_channels(); ++i) {
/* Read off the end */
- AudioFrame const from = content->resampled_audio_frame_rate() * 61;
- AudioFrame const length = content->resampled_audio_frame_rate() * 4;
+ Frame const from = content->resampled_audio_frame_rate() * 61;
+ Frame const length = content->resampled_audio_frame_rate() * 4;
shared_ptr<ContentAudio> ca = get (from, length);
for (int i = 0; i < content->audio_channels(); ++i) {
BOOST_CHECK_CLOSE (decoder.video_content()->video_frame_rate(), fps, 0.01);
- VideoFrame const N = decoder.video_content()->video_length().frames (decoder.video_content()->video_frame_rate ());
+ Frame const N = decoder.video_content()->video_length().frames (decoder.video_content()->video_frame_rate ());
#ifdef DCPOMATIC_DEBUG
decoder.test_gaps = 0;
#endif
- for (VideoFrame i = 0; i < N; ++i) {
+ for (Frame i = 0; i < N; ++i) {
list<ContentVideo> v;
v = decoder.get_video (i, true);
BOOST_CHECK_EQUAL (v.size(), 1);
/*
- Copyright (C) 2013-2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
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
video_delay = ContentTime ();
}
- VideoFrame const first_frame = video_delay.round_up (content->video_frame_rate ()).frames (content->video_frame_rate ());
+ Frame const first_frame = video_delay.round_up (content->video_frame_rate ()).frames (content->video_frame_rate ());
FFmpegDecoder decoder (content, film->log());
list<ContentVideo> a = decoder.get_video (first_frame, true);