diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-07-19 22:44:53 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-07-19 23:45:23 +0100 |
| commit | 27b83475435dda4e84a90cf59a52f150905c4ab1 (patch) | |
| tree | 51d0158c7a879f6b2f3c40843c5e5e455069a1dc /src/wx | |
| parent | 9cb73fbc0fa4643612f01665bc6d9fc430656f32 (diff) | |
Clean up after previous commit.
Diffstat (limited to 'src/wx')
| -rw-r--r-- | src/wx/caption_panel.cc | 90 | ||||
| -rw-r--r-- | src/wx/content_panel.cc | 8 | ||||
| -rw-r--r-- | src/wx/dcp_panel.cc | 6 | ||||
| -rw-r--r-- | src/wx/fonts_dialog.cc | 8 | ||||
| -rw-r--r-- | src/wx/paste_dialog.cc | 12 | ||||
| -rw-r--r-- | src/wx/paste_dialog.h | 6 | ||||
| -rw-r--r-- | src/wx/player_information.cc | 2 | ||||
| -rw-r--r-- | src/wx/subtitle_appearance_dialog.cc | 44 | ||||
| -rw-r--r-- | src/wx/subtitle_view.cc | 8 | ||||
| -rw-r--r-- | src/wx/subtitle_view.h | 4 | ||||
| -rw-r--r-- | src/wx/timeline.cc | 4 | ||||
| -rw-r--r-- | src/wx/timeline_text_content_view.cc | 6 | ||||
| -rw-r--r-- | src/wx/timing_panel.cc | 6 |
13 files changed, 102 insertions, 102 deletions
diff --git a/src/wx/caption_panel.cc b/src/wx/caption_panel.cc index 20a0ad143..c70a9ad8c 100644 --- a/src/wx/caption_panel.cc +++ b/src/wx/caption_panel.cc @@ -28,11 +28,11 @@ #include "lib/ffmpeg_content.h" #include "lib/text_caption_file_content.h" #include "lib/ffmpeg_subtitle_stream.h" -#include "lib/dcp_text_content.h" +#include "lib/dcp_subtitle_content.h" #include "lib/text_caption_file_decoder.h" -#include "lib/dcp_text_decoder.h" +#include "lib/dcp_subtitle_decoder.h" #include "lib/dcp_content.h" -#include "lib/text_content.h" +#include "lib/caption_content.h" #include "lib/decoder_factory.h" #include <wx/spinctrl.h> #include <boost/foreach.hpp> @@ -216,16 +216,16 @@ CaptionPanel::film_content_changed (int property) } } setup_sensitivity (); - } else if (property == TextContentProperty::USE) { - checked_set (_use, scs ? scs->subtitle->use() : false); + } else if (property == CaptionContentProperty::USE) { + checked_set (_use, scs ? scs->caption->use() : false); setup_sensitivity (); - } else if (property == TextContentProperty::TYPE) { + } else if (property == CaptionContentProperty::TYPE) { if (scs) { - switch (scs->subtitle->type()) { - case TEXT_SUBTITLE: + switch (scs->caption->type()) { + case CAPTION_OPEN: _type->SetSelection (0); break; - case TEXT_CLOSED_CAPTION: + case CAPTION_CLOSED: _type->SetSelection (1); break; default: @@ -235,20 +235,20 @@ CaptionPanel::film_content_changed (int property) _type->SetSelection (0); } setup_sensitivity (); - } else if (property == TextContentProperty::BURN) { - checked_set (_burn, scs ? scs->subtitle->burn() : false); - } else if (property == TextContentProperty::X_OFFSET) { - checked_set (_x_offset, scs ? lrint (scs->subtitle->x_offset() * 100) : 0); - } else if (property == TextContentProperty::Y_OFFSET) { - checked_set (_y_offset, scs ? lrint (scs->subtitle->y_offset() * 100) : 0); - } else if (property == TextContentProperty::X_SCALE) { - checked_set (_x_scale, scs ? lrint (scs->subtitle->x_scale() * 100) : 100); - } else if (property == TextContentProperty::Y_SCALE) { - checked_set (_y_scale, scs ? lrint (scs->subtitle->y_scale() * 100) : 100); - } else if (property == TextContentProperty::LINE_SPACING) { - checked_set (_line_spacing, scs ? lrint (scs->subtitle->line_spacing() * 100) : 100); - } else if (property == TextContentProperty::LANGUAGE) { - checked_set (_language, scs ? scs->subtitle->language() : ""); + } else if (property == CaptionContentProperty::BURN) { + checked_set (_burn, scs ? scs->caption->burn() : false); + } else if (property == CaptionContentProperty::X_OFFSET) { + checked_set (_x_offset, scs ? lrint (scs->caption->x_offset() * 100) : 0); + } else if (property == CaptionContentProperty::Y_OFFSET) { + checked_set (_y_offset, scs ? lrint (scs->caption->y_offset() * 100) : 0); + } else if (property == CaptionContentProperty::X_SCALE) { + checked_set (_x_scale, scs ? lrint (scs->caption->x_scale() * 100) : 100); + } else if (property == CaptionContentProperty::Y_SCALE) { + checked_set (_y_scale, scs ? lrint (scs->caption->y_scale() * 100) : 100); + } else if (property == CaptionContentProperty::LINE_SPACING) { + checked_set (_line_spacing, scs ? lrint (scs->caption->line_spacing() * 100) : 100); + } else if (property == CaptionContentProperty::LANGUAGE) { + checked_set (_language, scs ? scs->caption->language() : ""); } else if (property == DCPContentProperty::REFERENCE_SUBTITLE) { if (scs) { shared_ptr<DCPContent> dcp = dynamic_pointer_cast<DCPContent> (scs); @@ -267,7 +267,7 @@ void CaptionPanel::use_toggled () { BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_subtitle ()) { - i->subtitle->set_use (_use->GetValue()); + i->caption->set_use (_use->GetValue()); } } @@ -277,10 +277,10 @@ CaptionPanel::type_changed () BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_subtitle()) { switch (_type->GetSelection()) { case 0: - i->subtitle->set_type (TEXT_SUBTITLE); + i->caption->set_type (CAPTION_OPEN); break; case 1: - i->subtitle->set_type (TEXT_CLOSED_CAPTION); + i->caption->set_type (CAPTION_CLOSED); break; } } @@ -290,7 +290,7 @@ void CaptionPanel::burn_toggled () { BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_subtitle ()) { - i->subtitle->set_burn (_burn->GetValue()); + i->caption->set_burn (_burn->GetValue()); } } @@ -305,9 +305,9 @@ CaptionPanel::setup_sensitivity () shared_ptr<const FFmpegContent> fc = boost::dynamic_pointer_cast<const FFmpegContent> (i); shared_ptr<const TextCaptionFileContent> sc = boost::dynamic_pointer_cast<const TextCaptionFileContent> (i); shared_ptr<const DCPContent> dc = boost::dynamic_pointer_cast<const DCPContent> (i); - shared_ptr<const DCPTextContent> dsc = boost::dynamic_pointer_cast<const DCPTextContent> (i); + shared_ptr<const DCPSubtitleContent> dsc = boost::dynamic_pointer_cast<const DCPSubtitleContent> (i); if (fc) { - if (fc->subtitle) { + if (fc->caption) { ++ffmpeg_subs; ++any_subs; } @@ -373,7 +373,7 @@ void CaptionPanel::x_offset_changed () { BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_subtitle ()) { - i->subtitle->set_x_offset (_x_offset->GetValue() / 100.0); + i->caption->set_x_offset (_x_offset->GetValue() / 100.0); } } @@ -381,7 +381,7 @@ void CaptionPanel::y_offset_changed () { BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_subtitle ()) { - i->subtitle->set_y_offset (_y_offset->GetValue() / 100.0); + i->caption->set_y_offset (_y_offset->GetValue() / 100.0); } } @@ -390,7 +390,7 @@ CaptionPanel::x_scale_changed () { ContentList c = _parent->selected_subtitle (); if (c.size() == 1) { - c.front()->subtitle->set_x_scale (_x_scale->GetValue() / 100.0); + c.front()->caption->set_x_scale (_x_scale->GetValue() / 100.0); } } @@ -398,7 +398,7 @@ void CaptionPanel::y_scale_changed () { BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_subtitle ()) { - i->subtitle->set_y_scale (_y_scale->GetValue() / 100.0); + i->caption->set_y_scale (_y_scale->GetValue() / 100.0); } } @@ -406,7 +406,7 @@ void CaptionPanel::line_spacing_changed () { BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_subtitle ()) { - i->subtitle->set_line_spacing (_line_spacing->GetValue() / 100.0); + i->caption->set_line_spacing (_line_spacing->GetValue() / 100.0); } } @@ -414,7 +414,7 @@ void CaptionPanel::language_changed () { BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_subtitle ()) { - i->subtitle->set_language (wx_to_std (_language->GetValue())); + i->caption->set_language (wx_to_std (_language->GetValue())); } } @@ -422,16 +422,16 @@ void CaptionPanel::content_selection_changed () { film_content_changed (FFmpegContentProperty::SUBTITLE_STREAMS); - film_content_changed (TextContentProperty::USE); - film_content_changed (TextContentProperty::BURN); - film_content_changed (TextContentProperty::X_OFFSET); - film_content_changed (TextContentProperty::Y_OFFSET); - film_content_changed (TextContentProperty::X_SCALE); - film_content_changed (TextContentProperty::Y_SCALE); - film_content_changed (TextContentProperty::LINE_SPACING); - film_content_changed (TextContentProperty::LANGUAGE); - film_content_changed (TextContentProperty::FONTS); - film_content_changed (TextContentProperty::TYPE); + film_content_changed (CaptionContentProperty::USE); + film_content_changed (CaptionContentProperty::BURN); + film_content_changed (CaptionContentProperty::X_OFFSET); + film_content_changed (CaptionContentProperty::Y_OFFSET); + film_content_changed (CaptionContentProperty::X_SCALE); + film_content_changed (CaptionContentProperty::Y_SCALE); + film_content_changed (CaptionContentProperty::LINE_SPACING); + film_content_changed (CaptionContentProperty::LANGUAGE); + film_content_changed (CaptionContentProperty::FONTS); + film_content_changed (CaptionContentProperty::TYPE); film_content_changed (DCPContentProperty::REFERENCE_SUBTITLE); } diff --git a/src/wx/content_panel.cc b/src/wx/content_panel.cc index 3dc0e2b63..9d6d9a006 100644 --- a/src/wx/content_panel.cc +++ b/src/wx/content_panel.cc @@ -28,7 +28,7 @@ #include "image_sequence_dialog.h" #include "film_viewer.h" #include "lib/audio_content.h" -#include "lib/text_content.h" +#include "lib/caption_content.h" #include "lib/video_content.h" #include "lib/ffmpeg_content.h" #include "lib/content_factory.h" @@ -40,7 +40,7 @@ #include "lib/log.h" #include "lib/compose.hpp" #include "lib/text_caption_file_content.h" -#include "lib/plain_text_file.h" +#include "lib/text_caption_file.h" #include <wx/wx.h> #include <wx/notebook.h> #include <wx/listctrl.h> @@ -196,7 +196,7 @@ ContentPanel::selected_subtitle () ContentList sc; BOOST_FOREACH (shared_ptr<Content> i, selected ()) { - if (i->subtitle) { + if (i->caption) { sc.push_back (i); } } @@ -447,7 +447,7 @@ ContentPanel::setup_sensitivity () _video_panel->Enable (_generally_sensitive && video_selection.size() > 0); _audio_panel->Enable (_generally_sensitive && audio_selection.size() > 0); - _caption_panel->Enable (_generally_sensitive && selection.size() == 1 && selection.front()->subtitle); + _caption_panel->Enable (_generally_sensitive && selection.size() == 1 && selection.front()->caption); _timing_panel->Enable (_generally_sensitive); } diff --git a/src/wx/dcp_panel.cc b/src/wx/dcp_panel.cc index 5a380ec4e..fcec93a31 100644 --- a/src/wx/dcp_panel.cc +++ b/src/wx/dcp_panel.cc @@ -32,7 +32,7 @@ #include "lib/ffmpeg_content.h" #include "lib/audio_processor.h" #include "lib/video_content.h" -#include "lib/text_content.h" +#include "lib/caption_content.h" #include "lib/dcp_content.h" #include "lib/audio_content.h" #include <dcp/locale_convert.h> @@ -433,8 +433,8 @@ void DCPPanel::film_content_changed (int property) { if (property == AudioContentProperty::STREAMS || - property == TextContentProperty::USE || - property == TextContentProperty::BURN || + property == CaptionContentProperty::USE || + property == CaptionContentProperty::BURN || property == VideoContentProperty::SCALE || property == DCPContentProperty::REFERENCE_VIDEO || property == DCPContentProperty::REFERENCE_AUDIO || diff --git a/src/wx/fonts_dialog.cc b/src/wx/fonts_dialog.cc index c295ec327..528b3999b 100644 --- a/src/wx/fonts_dialog.cc +++ b/src/wx/fonts_dialog.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2014-2016 Carl Hetherington <cth@carlh.net> + Copyright (C) 2014-2018 Carl Hetherington <cth@carlh.net> This file is part of DCP-o-matic. @@ -24,7 +24,7 @@ #include "font_files_dialog.h" #include "lib/font.h" #include "lib/content.h" -#include "lib/text_content.h" +#include "lib/caption_content.h" #include <wx/wx.h> #include <boost/foreach.hpp> #include <iostream> @@ -105,7 +105,7 @@ FontsDialog::setup () _fonts->DeleteAllItems (); size_t n = 0; - BOOST_FOREACH (shared_ptr<Font> i, content->subtitle->fonts ()) { + BOOST_FOREACH (shared_ptr<Font> i, content->caption->fonts ()) { wxListItem item; item.SetId (n); _fonts->InsertItem (item); @@ -145,7 +145,7 @@ FontsDialog::edit_clicked () int const item = _fonts->GetNextItem (-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED); string const id = wx_to_std (_fonts->GetItemText (item, 0)); shared_ptr<Font> font; - BOOST_FOREACH (shared_ptr<Font> i, content->subtitle->fonts()) { + BOOST_FOREACH (shared_ptr<Font> i, content->caption->fonts()) { if (i->id() == id) { font = i; } diff --git a/src/wx/paste_dialog.cc b/src/wx/paste_dialog.cc index eade31490..07a3b156c 100644 --- a/src/wx/paste_dialog.cc +++ b/src/wx/paste_dialog.cc @@ -20,7 +20,7 @@ #include "paste_dialog.h" -PasteDialog::PasteDialog (wxWindow* parent, bool video, bool audio, bool subtitle) +PasteDialog::PasteDialog (wxWindow* parent, bool video, bool audio, bool caption) : TableDialog (parent, _("Paste"), 1, 0, true) { _video = new wxCheckBox (this, wxID_ANY, _("Paste video settings")); @@ -29,9 +29,9 @@ PasteDialog::PasteDialog (wxWindow* parent, bool video, bool audio, bool subtitl _audio = new wxCheckBox (this, wxID_ANY, _("Paste audio settings")); _audio->Enable (audio); add (_audio); - _subtitle = new wxCheckBox (this, wxID_ANY, _("Paste subtitle settings")); - _subtitle->Enable (subtitle); - add (_subtitle); + _caption = new wxCheckBox (this, wxID_ANY, _("Paste caption settings")); + _caption->Enable (caption); + add (_caption); layout (); } @@ -49,7 +49,7 @@ PasteDialog::audio () const } bool -PasteDialog::subtitle () const +PasteDialog::caption () const { - return _subtitle->GetValue (); + return _caption->GetValue (); } diff --git a/src/wx/paste_dialog.h b/src/wx/paste_dialog.h index 204f421d8..7de38fd2c 100644 --- a/src/wx/paste_dialog.h +++ b/src/wx/paste_dialog.h @@ -23,14 +23,14 @@ class PasteDialog : public TableDialog { public: - PasteDialog (wxWindow* parent, bool video, bool audio, bool subtitle); + PasteDialog (wxWindow* parent, bool video, bool audio, bool caption); bool video () const; bool audio () const; - bool subtitle () const; + bool caption () const; private: wxCheckBox* _video; wxCheckBox* _audio; - wxCheckBox* _subtitle; + wxCheckBox* _caption; }; diff --git a/src/wx/player_information.cc b/src/wx/player_information.cc index 9c5684e74..aab8c2cd5 100644 --- a/src/wx/player_information.cc +++ b/src/wx/player_information.cc @@ -131,7 +131,7 @@ PlayerInformation::triggered_update () if (dcp->audio && !dcp->audio->streams().empty()) { checked_set (_dcp[r++], wxString::Format(_("Audio channels: %d"), dcp->audio->streams().front()->channels())); } - if (dcp->subtitle) { + if (dcp->caption) { checked_set (_dcp[r++], _("Subtitles: yes")); } else { checked_set (_dcp[r++], _("Subtitles: no")); diff --git a/src/wx/subtitle_appearance_dialog.cc b/src/wx/subtitle_appearance_dialog.cc index de6f1c8e8..c0a6a0df6 100644 --- a/src/wx/subtitle_appearance_dialog.cc +++ b/src/wx/subtitle_appearance_dialog.cc @@ -21,7 +21,7 @@ #include "subtitle_appearance_dialog.h" #include "rgba_colour_picker.h" #include "lib/text_caption_file_content.h" -#include "lib/text_content.h" +#include "lib/caption_content.h" #include "lib/ffmpeg_subtitle_stream.h" #include "lib/ffmpeg_content.h" #include <wx/wx.h> @@ -126,7 +126,7 @@ SubtitleAppearanceDialog::SubtitleAppearanceDialog (wxWindow* parent, shared_ptr _effect->Append (_("Outline")); _effect->Append (_("Shadow"));; - optional<dcp::Colour> colour = _content->subtitle->colour(); + optional<dcp::Colour> colour = _content->caption->colour(); _force_colour->SetValue (static_cast<bool>(colour)); if (colour) { _colour->SetColour (wxColour (colour->r, colour->g, colour->b)); @@ -134,7 +134,7 @@ SubtitleAppearanceDialog::SubtitleAppearanceDialog (wxWindow* parent, shared_ptr _colour->SetColour (wxColour (255, 255, 255)); } - optional<dcp::Effect> effect = _content->subtitle->effect(); + optional<dcp::Effect> effect = _content->caption->effect(); _force_effect->SetValue (static_cast<bool>(effect)); if (effect) { switch (*effect) { @@ -152,7 +152,7 @@ SubtitleAppearanceDialog::SubtitleAppearanceDialog (wxWindow* parent, shared_ptr _effect->SetSelection (NONE); } - optional<dcp::Colour> effect_colour = _content->subtitle->effect_colour(); + optional<dcp::Colour> effect_colour = _content->caption->effect_colour(); _force_effect_colour->SetValue (static_cast<bool>(effect_colour)); if (effect_colour) { _effect_colour->SetColour (wxColour (effect_colour->r, effect_colour->g, effect_colour->b)); @@ -160,7 +160,7 @@ SubtitleAppearanceDialog::SubtitleAppearanceDialog (wxWindow* parent, shared_ptr _effect_colour->SetColour (wxColour (0, 0, 0)); } - optional<ContentTime> fade_in = _content->subtitle->fade_in(); + optional<ContentTime> fade_in = _content->caption->fade_in(); _force_fade_in->SetValue (static_cast<bool>(fade_in)); if (fade_in) { _fade_in->set (*fade_in, _content->active_video_frame_rate()); @@ -168,7 +168,7 @@ SubtitleAppearanceDialog::SubtitleAppearanceDialog (wxWindow* parent, shared_ptr _fade_in->set (ContentTime(), _content->active_video_frame_rate()); } - optional<ContentTime> fade_out = _content->subtitle->fade_out(); + optional<ContentTime> fade_out = _content->caption->fade_out(); _force_fade_out->SetValue (static_cast<bool>(fade_out)); if (fade_out) { _fade_out->set (*fade_out, _content->active_video_frame_rate ()); @@ -176,7 +176,7 @@ SubtitleAppearanceDialog::SubtitleAppearanceDialog (wxWindow* parent, shared_ptr _fade_out->set (ContentTime(), _content->active_video_frame_rate ()); } - _outline_width->SetValue (_content->subtitle->outline_width ()); + _outline_width->SetValue (_content->caption->outline_width ()); _force_colour->Bind (wxEVT_CHECKBOX, bind (&SubtitleAppearanceDialog::setup_sensitivity, this)); _force_effect_colour->Bind (wxEVT_CHECKBOX, bind (&SubtitleAppearanceDialog::setup_sensitivity, this)); @@ -206,42 +206,42 @@ SubtitleAppearanceDialog::apply () { if (_force_colour->GetValue ()) { wxColour const c = _colour->GetColour (); - _content->subtitle->set_colour (dcp::Colour (c.Red(), c.Green(), c.Blue())); + _content->caption->set_colour (dcp::Colour (c.Red(), c.Green(), c.Blue())); } else { - _content->subtitle->unset_colour (); + _content->caption->unset_colour (); } if (_force_effect->GetValue()) { switch (_effect->GetSelection()) { case NONE: - _content->subtitle->set_effect (dcp::NONE); + _content->caption->set_effect (dcp::NONE); break; case OUTLINE: - _content->subtitle->set_effect (dcp::BORDER); + _content->caption->set_effect (dcp::BORDER); break; case SHADOW: - _content->subtitle->set_effect (dcp::SHADOW); + _content->caption->set_effect (dcp::SHADOW); break; } } else { - _content->subtitle->unset_effect (); + _content->caption->unset_effect (); } if (_force_effect_colour->GetValue ()) { wxColour const ec = _effect_colour->GetColour (); - _content->subtitle->set_effect_colour (dcp::Colour (ec.Red(), ec.Green(), ec.Blue())); + _content->caption->set_effect_colour (dcp::Colour (ec.Red(), ec.Green(), ec.Blue())); } else { - _content->subtitle->unset_effect_colour (); + _content->caption->unset_effect_colour (); } if (_force_fade_in->GetValue ()) { - _content->subtitle->set_fade_in (_fade_in->get (_content->active_video_frame_rate ())); + _content->caption->set_fade_in (_fade_in->get (_content->active_video_frame_rate ())); } else { - _content->subtitle->unset_fade_in (); + _content->caption->unset_fade_in (); } if (_force_fade_out->GetValue ()) { - _content->subtitle->set_fade_out (_fade_out->get (_content->active_video_frame_rate ())); + _content->caption->set_fade_out (_fade_out->get (_content->active_video_frame_rate ())); } else { - _content->subtitle->unset_fade_out (); + _content->caption->unset_fade_out (); } - _content->subtitle->set_outline_width (_outline_width->GetValue ()); + _content->caption->set_outline_width (_outline_width->GetValue ()); if (_stream) { for (map<RGBA, RGBAColourPicker*>::const_iterator i = _pickers.begin(); i != _pickers.end(); ++i) { @@ -272,11 +272,11 @@ SubtitleAppearanceDialog::setup_sensitivity () _fade_in->Enable (_force_fade_in->GetValue ()); _fade_out->Enable (_force_fade_out->GetValue ()); - bool const can_outline_width = _effect->GetSelection() == OUTLINE && _content->subtitle->burn (); + bool const can_outline_width = _effect->GetSelection() == OUTLINE && _content->caption->burn (); _outline_width->Enable (can_outline_width); if (can_outline_width) { _outline_width->UnsetToolTip (); } else { - _outline_width->SetToolTip (_("Outline width cannot be set unless you are burning in subtitles")); + _outline_width->SetToolTip (_("Outline width cannot be set unless you are burning in captions")); } } diff --git a/src/wx/subtitle_view.cc b/src/wx/subtitle_view.cc index f33d6eddf..6d34a93db 100644 --- a/src/wx/subtitle_view.cc +++ b/src/wx/subtitle_view.cc @@ -19,13 +19,13 @@ */ #include "lib/text_caption_file_decoder.h" -#include "lib/content_text.h" +#include "lib/content_caption.h" #include "lib/video_decoder.h" #include "lib/audio_decoder.h" #include "lib/film.h" #include "lib/config.h" #include "lib/text_caption_file_content.h" -#include "lib/text_decoder.h" +#include "lib/caption_decoder.h" #include "subtitle_view.h" #include "film_viewer.h" #include "wx_util.h" @@ -85,8 +85,8 @@ SubtitleView::SubtitleView (wxWindow* parent, shared_ptr<Film> film, shared_ptr< _subs = 0; _frc = film->active_frame_rate_change (content->position()); - decoder->subtitle->PlainStart.connect (bind (&SubtitleView::data_start, this, _1)); - decoder->subtitle->Stop.connect (bind (&SubtitleView::data_stop, this, _1)); + decoder->caption->PlainStart.connect (bind (&SubtitleView::data_start, this, _1)); + decoder->caption->Stop.connect (bind (&SubtitleView::data_stop, this, _1)); while (!decoder->pass ()) {} SetSizerAndFit (sizer); } diff --git a/src/wx/subtitle_view.h b/src/wx/subtitle_view.h index 222fc3890..445f646aa 100644 --- a/src/wx/subtitle_view.h +++ b/src/wx/subtitle_view.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2014-2016 Carl Hetherington <cth@carlh.net> + Copyright (C) 2014-2018 Carl Hetherington <cth@carlh.net> This file is part of DCP-o-matic. @@ -18,7 +18,7 @@ */ -#include "lib/content_text.h" +#include "lib/content_caption.h" #include <boost/shared_ptr.hpp> #include <wx/wx.h> #include <wx/listctrl.h> diff --git a/src/wx/timeline.cc b/src/wx/timeline.cc index d0a898b18..d3b291a9b 100644 --- a/src/wx/timeline.cc +++ b/src/wx/timeline.cc @@ -34,7 +34,7 @@ #include "lib/image_content.h" #include "lib/timer.h" #include "lib/audio_content.h" -#include "lib/text_content.h" +#include "lib/caption_content.h" #include "lib/video_content.h" #include "lib/atmos_mxf_content.h" #include <wx/graphics.h> @@ -228,7 +228,7 @@ Timeline::recreate_views () _views.push_back (shared_ptr<TimelineView> (new TimelineAudioContentView (*this, i))); } - if (i->subtitle) { + if (i->caption) { _views.push_back (shared_ptr<TimelineView> (new TimelineTextContentView (*this, i))); } diff --git a/src/wx/timeline_text_content_view.cc b/src/wx/timeline_text_content_view.cc index b4820bfea..bb874449e 100644 --- a/src/wx/timeline_text_content_view.cc +++ b/src/wx/timeline_text_content_view.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2016 Carl Hetherington <cth@carlh.net> + Copyright (C) 2013-2018 Carl Hetherington <cth@carlh.net> This file is part of DCP-o-matic. @@ -19,7 +19,7 @@ */ #include "timeline_text_content_view.h" -#include "lib/text_content.h" +#include "lib/caption_content.h" #include "lib/content.h" using boost::shared_ptr; @@ -55,5 +55,5 @@ TimelineTextContentView::active () const { shared_ptr<Content> c = _content.lock (); DCPOMATIC_ASSERT (c); - return c->subtitle && c->subtitle->use(); + return c->caption && c->caption->use(); } diff --git a/src/wx/timing_panel.cc b/src/wx/timing_panel.cc index 2a97f405f..9b516ccfa 100644 --- a/src/wx/timing_panel.cc +++ b/src/wx/timing_panel.cc @@ -26,8 +26,8 @@ #include "move_to_dialog.h" #include "lib/content.h" #include "lib/image_content.h" -#include "lib/text_content.h" -#include "lib/dcp_text_content.h" +#include "lib/caption_content.h" +#include "lib/dcp_subtitle_content.h" #include "lib/audio_content.h" #include "lib/text_caption_file_content.h" #include "lib/video_content.h" @@ -282,7 +282,7 @@ TimingPanel::film_content_changed (int property) ++count_ac; content = i; } - if (i->subtitle && i->video_frame_rate()) { + if (i->caption && i->video_frame_rate()) { ++count_sc; content = i; } |
