Explorar o código

LibVideo: Remove hook to notify clients upon reaching end of the stream

This reverts commit 33047b38ec0d9ce55bea2f74c00972711e106a30.

This use case is now satisfied with on_playback_state_change and getting
the playback state from the PlaybackManager.
Timothy Flynn %!s(int64=2) %!d(string=hai) anos
pai
achega
f8f35fdaad

+ 0 - 4
Userland/Libraries/LibVideo/PlaybackManager.cpp

@@ -129,10 +129,6 @@ void PlaybackManager::dispatch_decoder_error(DecoderError error)
     case DecoderErrorCategory::EndOfStream:
     case DecoderErrorCategory::EndOfStream:
         dbgln_if(PLAYBACK_MANAGER_DEBUG, "{}", error.string_literal());
         dbgln_if(PLAYBACK_MANAGER_DEBUG, "{}", error.string_literal());
         TRY_OR_FATAL_ERROR(m_playback_handler->stop());
         TRY_OR_FATAL_ERROR(m_playback_handler->stop());
-
-        if (on_end_of_stream)
-            on_end_of_stream();
-
         break;
         break;
     default:
     default:
         dbgln("Playback error encountered: {}", error.string_literal());
         dbgln("Playback error encountered: {}", error.string_literal());

+ 0 - 1
Userland/Libraries/LibVideo/PlaybackManager.h

@@ -135,7 +135,6 @@ public:
 
 
     Function<void(RefPtr<Gfx::Bitmap>)> on_video_frame;
     Function<void(RefPtr<Gfx::Bitmap>)> on_video_frame;
     Function<void()> on_playback_state_change;
     Function<void()> on_playback_state_change;
-    Function<void()> on_end_of_stream;
     Function<void(DecoderError)> on_decoder_error;
     Function<void(DecoderError)> on_decoder_error;
     Function<void(Error)> on_fatal_playback_error;
     Function<void(Error)> on_fatal_playback_error;