forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Cast Streaming] Split Cast streaming encoding out to a separate folder
This moves encoding for Cast Streaming into media/cast/encoding and separates it from the generic sender library. This will facilitate migration of the sender to libcast and future upstreaming of encoding to libcast. Bug: 1304256 Change-Id: Idc0dd6ecc157f052222054d04a0f71e862964c01 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3612383 Reviewed-by: Joe Downing <joedow@chromium.org> Reviewed-by: Ryan Keane <rwkeane@google.com> Commit-Queue: Mark Foltz <mfoltz@chromium.org> Cr-Commit-Position: refs/heads/main@{#997415}
- Loading branch information
1 parent
5dfbf40
commit 1f26acf
Showing
74 changed files
with
460 additions
and
377 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright 2022 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. | ||
|
||
#ifndef MEDIA_CAST_CAST_CALLBACKS_H_ | ||
#define MEDIA_CAST_CAST_CALLBACKS_H_ | ||
|
||
#include "base/callback_forward.h" | ||
#include "media/cast/constants.h" | ||
|
||
namespace media { | ||
namespace cast { | ||
|
||
// Callback that is run to update the client with current status. This is used | ||
// to allow the client to wait for asynchronous initialization to complete | ||
// before sending frames, and also to be notified of any runtime errors that | ||
// have halted the session. | ||
using StatusChangeCallback = base::RepeatingCallback<void(OperationalStatus)>; | ||
|
||
// The equivalent of StatusChangeCallback when only one change is expected. | ||
using StatusChangeOnceCallback = base::OnceCallback<void(OperationalStatus)>; | ||
|
||
} // namespace cast | ||
} // namespace media | ||
|
||
#endif // MEDIA_CAST_CAST_CALLBACKS_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Copyright 2022 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. | ||
|
||
#include "media/cast/common/encoded_frame.h" | ||
|
||
#include "base/logging.h" | ||
|
||
namespace media { | ||
namespace cast { | ||
|
||
EncodedFrame::EncodedFrame() | ||
: dependency(UNKNOWN_DEPENDENCY), new_playout_delay_ms(0) {} | ||
|
||
EncodedFrame::~EncodedFrame() = default; | ||
|
||
void EncodedFrame::CopyMetadataTo(EncodedFrame* dest) const { | ||
DCHECK(dest); | ||
dest->dependency = this->dependency; | ||
dest->frame_id = this->frame_id; | ||
dest->referenced_frame_id = this->referenced_frame_id; | ||
dest->rtp_timestamp = this->rtp_timestamp; | ||
dest->reference_time = this->reference_time; | ||
dest->new_playout_delay_ms = this->new_playout_delay_ms; | ||
} | ||
|
||
} // namespace cast | ||
} // namespace media |
Oops, something went wrong.