From 04e94f01295463f2c910ba2b4306c1b76e340a45 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 1 Mar 2021 21:36:36 +0100 Subject: [PATCH] Rename some subtitle decoding / processing methods. --- src/lib/ffmpeg_decoder.cc | 12 ++++++------ src/lib/ffmpeg_decoder.h | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc index 9b65e5639..30993f882 100644 --- a/src/lib/ffmpeg_decoder.cc +++ b/src/lib/ffmpeg_decoder.cc @@ -192,7 +192,7 @@ FFmpegDecoder::pass () if (_video_stream && si == _video_stream.get() && video && !video->ignore()) { decode_video_packet (packet); } else if (fc->subtitle_stream() && fc->subtitle_stream()->uses_index(_format_context, si) && !only_text()->ignore()) { - decode_subtitle_packet (packet); + decode_and_process_subtitle_packet (packet); } else { decode_audio_packet (packet); } @@ -598,7 +598,7 @@ DCPOMATIC_ENABLE_WARNINGS void -FFmpegDecoder::decode_subtitle_packet (AVPacket* packet) +FFmpegDecoder::decode_and_process_subtitle_packet (AVPacket* packet) { int got_subtitle; AVSubtitle sub; @@ -641,13 +641,13 @@ FFmpegDecoder::decode_subtitle_packet (AVPacket* packet) case SUBTITLE_NONE: break; case SUBTITLE_BITMAP: - decode_bitmap_subtitle (rect, from); + process_bitmap_subtitle (rect, from); break; case SUBTITLE_TEXT: cout << "XXX: SUBTITLE_TEXT " << rect->text << "\n"; break; case SUBTITLE_ASS: - decode_ass_subtitle (rect->ass, from); + process_ass_subtitle (rect->ass, from); break; } } @@ -661,7 +661,7 @@ FFmpegDecoder::decode_subtitle_packet (AVPacket* packet) void -FFmpegDecoder::decode_bitmap_subtitle (AVSubtitleRect const * rect, ContentTime from) +FFmpegDecoder::process_bitmap_subtitle (AVSubtitleRect const * rect, ContentTime from) { /* Note BGRA is expressed little-endian, so the first byte in the word is B, second G, third R, fourth A. @@ -749,7 +749,7 @@ FFmpegDecoder::decode_bitmap_subtitle (AVSubtitleRect const * rect, ContentTime void -FFmpegDecoder::decode_ass_subtitle (string ass, ContentTime from) +FFmpegDecoder::process_ass_subtitle (string ass, ContentTime from) { /* We have no styles and no Format: line, so I'm assuming that FFmpeg produces a single format of Dialogue: lines... diff --git a/src/lib/ffmpeg_decoder.h b/src/lib/ffmpeg_decoder.h index a0a93c9a0..bd35814df 100644 --- a/src/lib/ffmpeg_decoder.h +++ b/src/lib/ffmpeg_decoder.h @@ -62,10 +62,10 @@ private: bool decode_video_packet (AVPacket* packet); void decode_audio_packet (AVPacket* packet); - void decode_subtitle_packet (AVPacket* packet); + void decode_and_process_subtitle_packet (AVPacket* packet); - void decode_bitmap_subtitle (AVSubtitleRect const * rect, dcpomatic::ContentTime from); - void decode_ass_subtitle (std::string ass, dcpomatic::ContentTime from); + void process_bitmap_subtitle (AVSubtitleRect const * rect, dcpomatic::ContentTime from); + void process_ass_subtitle (std::string ass, dcpomatic::ContentTime from); void maybe_add_subtitle (); std::shared_ptr deinterleave_audio (std::shared_ptr stream) const; -- 2.30.2