Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(678)

Unified Diff: media/cast/receiver/frame_receiver.h

Issue 491953003: [Cast] Fix shutdown race between CastReceiverImpl/FrameReceiver and frame emit callback run. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/cast/receiver/frame_receiver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/receiver/frame_receiver.h
diff --git a/media/cast/receiver/frame_receiver.h b/media/cast/receiver/frame_receiver.h
index 695c8d0a9be9189befa77d4dd1eca4b11cd811d6..67f5417145e3c8d9580059e929c9816dd67a7302 100644
--- a/media/cast/receiver/frame_receiver.h
+++ b/media/cast/receiver/frame_receiver.h
@@ -89,6 +89,13 @@ class FrameReceiver : public RtpPayloadFeedback,
// EmitAvailableEncodedFrames().
void EmitAvailableEncodedFramesAfterWaiting();
+ // Helper that runs |callback|, passing ownership of |encoded_frame| to it.
+ // This method is used by EmitAvailableEncodedFrames() to return to the event
+ // loop, but make sure that FrameReceiver is still alive before the callback
+ // is run.
+ void EmitOneFrame(const ReceiveEncodedFrameCallback& callback,
+ scoped_ptr<EncodedFrame> encoded_frame) const;
+
// Computes the playout time for a frame with the given |rtp_timestamp|.
// Because lip-sync info is refreshed regularly, calling this method with the
// same argument may return different results.
« no previous file with comments | « no previous file | media/cast/receiver/frame_receiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698