}
_butler = std::make_shared<Butler>(
- _film, _player, map, _output_audio_channels, bind(&PlayerVideo::force, _1, FFmpegFileEncoder::pixel_format(format)), VideoRange::VIDEO, Image::Alignment::PADDED, false, false
+ _film, _player, map, _output_audio_channels, bind(&PlayerVideo::force, FFmpegFileEncoder::pixel_format(format)), VideoRange::VIDEO, Image::Alignment::PADDED, false, false
);
}
{
/* All our output formats are video range at the moment */
auto image = video->image (
- bind (&PlayerVideo::force, _1, _pixel_format),
+ bind (&PlayerVideo::force, _pixel_format),
VideoRange::VIDEO,
false
);
*/
+
#include "content.h"
#include "film.h"
#include "image.h"
#include <libxml++/libxml++.h>
#include <iostream>
+
using std::cout;
using std::dynamic_pointer_cast;
+using std::function;
using std::make_shared;
using std::shared_ptr;
using std::string;
using std::weak_ptr;
using boost::optional;
-using std::function;
using dcp::Data;
using dcp::raw_convert;
+
PlayerVideo::PlayerVideo (
shared_ptr<const ImageProxy> in,
Crop crop,
}
AVPixelFormat
-PlayerVideo::force (AVPixelFormat, AVPixelFormat force_to)
+PlayerVideo::force (AVPixelFormat force_to)
{
return force_to;
}
std::shared_ptr<Image> image (std::function<AVPixelFormat (AVPixelFormat)> pixel_format, VideoRange video_range, bool fast) const;
std::shared_ptr<const Image> raw_image () const;
- static AVPixelFormat force (AVPixelFormat, AVPixelFormat);
+ static AVPixelFormat force (AVPixelFormat);
static AVPixelFormat keep_xyz_or_rgb (AVPixelFormat);
void add_metadata (xmlpp::Node* node) const;
using std::shared_ptr;
using std::string;
using std::vector;
+using boost::bind;
using boost::optional;
#if BOOST_VERSION >= 106100
using namespace boost::placeholders;
_player,
Config::instance()->audio_mapping(_audio_channels),
_audio_channels,
- bind(&PlayerVideo::force, _1, AV_PIX_FMT_RGB24),
+ bind(&PlayerVideo::force, AV_PIX_FMT_RGB24),
VideoRange::FULL,
j2k_gl_optimised ? Image::Alignment::COMPACT : Image::Alignment::PADDED,
true,
using std::cout;
using std::shared_ptr;
using std::string;
+using boost::bind;
using boost::optional;
#if BOOST_VERSION >= 106100
using namespace boost::placeholders;
void
GLVideoView::set_image (shared_ptr<const PlayerVideo> pv)
{
- shared_ptr<const Image> video = _optimise_for_j2k ? pv->raw_image() : pv->image(bind(&PlayerVideo::force, _1, AV_PIX_FMT_RGB24), VideoRange::FULL, true);
+ shared_ptr<const Image> video = _optimise_for_j2k ? pv->raw_image() : pv->image(bind(&PlayerVideo::force, AV_PIX_FMT_RGB24), VideoRange::FULL, true);
/* Only the player's black frames should be aligned at this stage, so this should
* almost always have no work to do.
using std::max;
using std::shared_ptr;
using std::string;
+using boost::bind;
using boost::optional;
#if BOOST_VERSION >= 106100
using namespace boost::placeholders;
_state_timer.set ("get image");
- _image = player_video().first->image(bind(&PlayerVideo::force, _1, AV_PIX_FMT_RGB24), VideoRange::FULL, true);
+ _image = player_video().first->image(bind(&PlayerVideo::force, AV_PIX_FMT_RGB24), VideoRange::FULL, true);
_state_timer.set ("ImageChanged");
_viewer->image_changed (player_video().first);
using std::make_shared;
using std::shared_ptr;
+using boost::bind;
#if BOOST_VERSION >= 106100
using namespace boost::placeholders;
#endif
map.set (i, i, 1);
}
- Butler butler (film, make_shared<Player>(film, Image::Alignment::COMPACT), map, 6, bind(&PlayerVideo::force, _1, AV_PIX_FMT_RGB24), VideoRange::FULL, Image::Alignment::COMPACT, false, false);
+ Butler butler (film, make_shared<Player>(film, Image::Alignment::COMPACT), map, 6, bind(&PlayerVideo::force, AV_PIX_FMT_RGB24), VideoRange::FULL, Image::Alignment::COMPACT, false, false);
BOOST_CHECK (butler.get_video(Butler::Behaviour::BLOCKING, 0).second == DCPTime());
BOOST_CHECK (butler.get_video(Butler::Behaviour::BLOCKING, 0).second == DCPTime::from_frames(1, 24));
using std::make_shared;
using std::make_shared;
+using boost::bind;
#if BOOST_VERSION >= 106100
using namespace boost::placeholders;
#endif
make_shared<Player>(film, Image::Alignment::PADDED),
AudioMapping(6, 6),
6,
- bind(&PlayerVideo::force, _1, AV_PIX_FMT_RGB24),
+ bind(&PlayerVideo::force, AV_PIX_FMT_RGB24),
VideoRange::FULL,
Image::Alignment::PADDED,
true,
}
/* assuming DCP is 24fps/48kHz */
butler->get_audio (Butler::Behaviour::BLOCKING, audio_buffer.data(), 2000);
- p.first->image(bind(&PlayerVideo::force, _1, AV_PIX_FMT_RGB24), VideoRange::FULL, true);
+ p.first->image(bind(&PlayerVideo::force, AV_PIX_FMT_RGB24), VideoRange::FULL, true);
}
}
player->set_always_burn_open_subtitles ();
player->set_play_referenced ();
- auto butler = std::make_shared<Butler>(film, player, AudioMapping(), 2, bind(PlayerVideo::force, _1, AV_PIX_FMT_RGB24), VideoRange::FULL, Image::Alignment::PADDED, true, false);
+ auto butler = std::make_shared<Butler>(film, player, AudioMapping(), 2, bind(PlayerVideo::force, AV_PIX_FMT_RGB24), VideoRange::FULL, Image::Alignment::PADDED, true, false);
butler->disable_audio();
for (int i = 0; i < 10; ++i) {
butler->seek (t, true);
auto video = butler->get_video(Butler::Behaviour::BLOCKING, 0);
BOOST_CHECK_EQUAL(video.second.get(), t.get());
- write_image(video.first->image(bind(PlayerVideo::force, _1, AV_PIX_FMT_RGB24), VideoRange::FULL, true), String::compose("build/test/player_seek_test_%1.png", i));
+ write_image(video.first->image(bind(PlayerVideo::force, AV_PIX_FMT_RGB24), VideoRange::FULL, true), String::compose("build/test/player_seek_test_%1.png", i));
/* This 14.08 is empirically chosen (hopefully) to accept changes in rendering between the reference and a test machine
(17.10 and 16.04 seem to anti-alias a little differently) but to reject gross errors e.g. missing fonts or missing
text altogether.
player->set_always_burn_open_subtitles ();
player->set_play_referenced ();
- auto butler = std::make_shared<Butler>(film, player, AudioMapping(), 2, bind(PlayerVideo::force, _1, AV_PIX_FMT_RGB24), VideoRange::FULL, Image::Alignment::PADDED, true, false);
+ auto butler = std::make_shared<Butler>(film, player, AudioMapping(), 2, bind(PlayerVideo::force, AV_PIX_FMT_RGB24), VideoRange::FULL, Image::Alignment::PADDED, true, false);
butler->disable_audio();
butler->seek(DCPTime::from_seconds(5), true);
auto video = butler->get_video(Butler::Behaviour::BLOCKING, 0);
BOOST_CHECK_EQUAL(video.second.get(), t.get());
write_image(
- video.first->image(bind(PlayerVideo::force, _1, AV_PIX_FMT_RGB24), VideoRange::FULL, true), String::compose("build/test/player_seek_test2_%1.png", i)
+ video.first->image(bind(PlayerVideo::force, AV_PIX_FMT_RGB24), VideoRange::FULL, true), String::compose("build/test/player_seek_test2_%1.png", i)
);
check_image(TestPaths::private_data() / String::compose("player_seek_test2_%1.png", i), String::compose("build/test/player_seek_test2_%1.png", i), 14.08);
}
auto player = std::make_shared<Player>(film, Image::Alignment::COMPACT);
player->set_fast ();
- auto butler = std::make_shared<Butler>(film, player, AudioMapping(), 6, bind(&PlayerVideo::force, _1, AV_PIX_FMT_RGB24), VideoRange::FULL, Image::Alignment::COMPACT, true, false);
+ auto butler = std::make_shared<Butler>(film, player, AudioMapping(), 6, bind(&PlayerVideo::force, AV_PIX_FMT_RGB24), VideoRange::FULL, Image::Alignment::COMPACT, true, false);
/* Wait for the butler to fill */
dcpomatic_sleep_seconds (5);