Rename some subtitle decoding / processing methods.
authorCarl Hetherington <cth@carlh.net>
Mon, 1 Mar 2021 20:36:36 +0000 (21:36 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 2 Mar 2021 14:40:18 +0000 (15:40 +0100)
src/lib/ffmpeg_decoder.cc
src/lib/ffmpeg_decoder.h

index 9b65e56394f15372bd6123c746f6d744c99b45ec..30993f88279bc037bc351f927c5ec6dc7c716eb5 100644 (file)
@@ -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...
index a0a93c9a04282377ba215f24145ee75e88b6b89e..bd35814df64d2cd3de24446ddc4749f8e67e9a20 100644 (file)
@@ -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<AudioBuffers> deinterleave_audio (std::shared_ptr<FFmpegAudioStream> stream) const;