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

Unified Diff: media/cast/transport/cast_transport_sender.h

Issue 126843003: Revert of Cast:Adding cast_transport_config and cleaning up (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | « media/cast/transport/cast_transport_defines.h ('k') | media/cast/transport/pacing/paced_sender.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/transport/cast_transport_sender.h
diff --git a/media/cast/transport/cast_transport_sender.h b/media/cast/transport/cast_transport_sender.h
index 55fb71d23dbd09d940bb27103783cc70e701bf7c..5cfb40d0605ffcf6eab2fc5e80470f2cacf23725 100644
--- a/media/cast/transport/cast_transport_sender.h
+++ b/media/cast/transport/cast_transport_sender.h
@@ -1,10 +1,10 @@
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-
-// This is the main interface for the cast transport sender. The cast sender
-// handles the cast pipeline from encoded frames (both audio and video), to
-// encryption, packetization and transport.
+//
+// This is the main interface for the cast net sender. The cast sender handles
+// the cast pipeline from encoded frames (both audio and video), to encryption,
+// packetization and transport.
// All configurations are done at creation.
#ifndef MEDIA_CAST_TRANSPORT_CAST_TRANSPORT_SENDER_H_
@@ -13,7 +13,7 @@
#include "base/basictypes.h"
#include "base/threading/non_thread_safe.h"
#include "base/time/tick_clock.h"
-#include "media/cast/transport/cast_transport_defines.h"
+#include "media/cast/net/cast_transport_defines.h"
namespace media {
class AudioBus;
@@ -24,53 +24,46 @@
namespace cast {
namespace transport {
-typedef base::Callback<void(CastTransportStatus status)>
- CastTransportStatusCallback;
+class CastNetNotification {
+ public:
+ enum CastNetStatus {
+ UNINITIALIZED,
+ INITIALIZED,
+ INVALID_CRYPTO_CONFIG,
+ SOCKET_ERROR,
+ // TODO(mikhal): Add.
+ };
+
+ virtual void NotifyStatusChange(CastNetStatus result) = 0;
+ virtual ~CastNetNotification() {}
+};
// This Class is not thread safe.
-// The application should only trigger this class from the transport thread.
-class CastTransportSender : public base::NonThreadSafe {
+// The application should only trigger this class from one thread.
+class CastNetSender : public base::NonThreadSafe {
public:
- static CastTransportSender* CreateCastNetSender(
+ static CastNetSender* CreateCastNetSender(
base::TickClock* clock,
- const CastTransportConfig& config,
- const CastTransportStatusCallback& status_callback,
- scoped_refptr<base::TaskRunner> transport_task_runner);
+ const CastNetConfig& config,
+ CastNetNotification* const notifier,
+ scoped_refptr<PacketReceiver> packet_receiver);
- virtual ~CastTransportSender() {}
-
- // Sets the Cast packet receiver. Should be called after creation on the
- // Cast sender.
- virtual void SetPacketReceiver(
- scoped_refptr<PacketReceiver> packet_receiver) = 0;
-
- // The following two functions handle the encoded media frames (audio and
- // video) to be processed.
- // Frames will be encrypted, packetized and transmitted to the network.
- virtual void InsertCodedAudioFrame(const EncodedAudioFrame* audio_frame,
+ virtual ~CastNetSender() {}
+ virtual void InsertCodedAudioFrame(const AudioBus* audio_bus,
const base::TimeTicks& recorded_time) = 0;
virtual void InsertCodedVideoFrame(const EncodedVideoFrame* video_frame,
const base::TimeTicks& capture_time) = 0;
- // Builds an RTCP packet and sends it to the network.
virtual void SendRtcpFromRtpSender(
uint32 packet_type_flags,
const RtcpSenderInfo& sender_info,
const RtcpDlrrReportBlock& dlrr,
const RtcpSenderLogMessage& sender_log) = 0;
- // Retransmision request.
virtual void ResendPackets(
const MissingFramesAndPacketsMap& missing_packets) = 0;
-
- // Retrieves audio RTP statistics.
- virtual void RtpAudioStatistics(const base::TimeTicks& now,
- RtcpSenderInfo* sender_info) = 0;
-
- // Retrieves audio RTP statistics.
- virtual void RtpVideoStatistics(const base::TimeTicks& now,
- RtcpSenderInfo* sender_info) = 0;
+};
} // namespace transport
} // namespace cast
« no previous file with comments | « media/cast/transport/cast_transport_defines.h ('k') | media/cast/transport/pacing/paced_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698