aboutsummaryrefslogtreecommitdiff
path: root/cast/streaming/receiver_session.h
AgeCommit message (Collapse)Author
2021-07-16[Cast Streaming] Add codec parameterJordan Bayles
This patch adds a new codec parameter to the OFFER/ANSWER exchange. This field respects the format laid out in RFC 6381, and is a strictly optional field that allows senders to provide more information about a given codec configuration. Bug: b/184429130 Change-Id: Ibd537f05e579b3bb2a488712b688edb407784841 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2984452 Commit-Queue: Jordan Bayles <jophba@chromium.org> Reviewed-by: mark a. foltz <mfoltz@chromium.org>
2021-07-01[Cast Streaming] Add codec negotiation over RPCJordan Bayles
This patch adds support for negotiating codec information over the RPC messenger class for both the standalone sender and receiver. Although a full remoting implementation in the standalone implementations is not a goal and not particularly practical, it is important that we exercise the public remoting APIs and get basic usage and flows handled in our library. To that end, this patch specifically adds support for sending RPC_DS_INITIALIZE and RPC_DS_INITIALIZE_CALLBACK messages, simulating the process of setting up a remoting media stream and demuxer in Chrome. NOTE: this does not enable "true" remoting--the standalone sender is still decoding and reencoding the video. For "true" remoting support we need the ability to unpack raw frames (probably exclusively from a WebM container that holds VP8 frames) and pass them directly. In future patches, we can also consider adding additional features to the standalone implementation, such as play/pause and volume control methods. Bug: b/190078859 Change-Id: I49c2acb537aa3c647b8c3a53c9545f5eb3893982 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2973373 Commit-Queue: Jordan Bayles <jophba@chromium.org> Reviewed-by: mark a. foltz <mfoltz@chromium.org>
2021-06-24Add SupportsAllAllowedBy() function to ReceiverSession inner classesRyan Keane
This CL does the following: - Add copy ctors for ReceiverSession inner classes. This is required so that a Preferences object may be copied to a unique_ptr for initialization of the `cast_streaming` component in Chromium, while also maintaining a local instance for use with the below function. - Add SupportsAllAllowedBy() functions for comparing the support provided by two different Preferences instances. This is required because the Cast Web Runtime allows for updating of supported AV settings during runtime, so it must be validated that the configuration used for negotiation is no more strict than that supported at any time by the runtime. Bug: 182427395 Change-Id: Ie7a8625ffbf8156e49e36c13dbcb91e8da214e7b Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2983166 Reviewed-by: Jordan Bayles <jophba@chromium.org> Commit-Queue: Ryan Keane <rwkeane@google.com>
2021-06-12[Cast Streaming] Update receiver commentingJordan Bayles
This patch updates the receiver commenting to remove some out of date comments and clarify some finer points of the API. Change-Id: Ic22083308408bfdf666c4c8769e083dd7e925baf Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2954247 Reviewed-by: Ryan Keane <rwkeane@google.com> Commit-Queue: Jordan Bayles <jophba@chromium.org>
2021-06-12[Cast Streaming] RpcBroker -> RpcMessengerJordan Bayles
This patch renames Open Screen's RpcBroker to RpcMessenger, in order to avoid confusion when discussing this implementation versus Chrome's RpcBroker implementation--which will be going away soon. Change-Id: I23127074db3f7d807c6f70c26c7b596b6edb503a Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2953900 Reviewed-by: Ryan Keane <rwkeane@google.com> Commit-Queue: Jordan Bayles <jophba@chromium.org>
2021-06-10[Cast Streaming] Improve remoting in ReceiverSession APIJordan Bayles
This patch continues the process of wrapping up remoting support, by adding some support to the standalone implementations and cleaning up the ReceiverSession API. From here, the actual media stream will have to be mocked out/a standalone implementation created so that we can properly test the entire remoting flow and set the stage for integration into chrome. Bug: b/184186390 Change-Id: Ib2a5526ce5db71cb093f228acbc64cf3060e677d Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2939634 Commit-Queue: Jordan Bayles <jophba@chromium.org> Reviewed-by: Ryan Keane <rwkeane@google.com>
2021-06-10[Cast Streaming] Messager -> MessengerJordan Bayles
Messager, while being proper English, is archaic and generally not in use. This patch updates SessionMessager and its related types to be named SessionMessenger. Change-Id: I8d9caa685f86fa5863db56b4514a4d16ed5f1a33 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2950433 Reviewed-by: Ryan Keane <rwkeane@google.com> Commit-Queue: Jordan Bayles <jophba@chromium.org>
2021-04-27[Cast] Add capabilities handling to ReceiverSessionJordan Bayles
This patch is the first in a series for finishing support for remoting in the ReceiverSession. In this patch, the public API for the session adds explicit remoting opt-in, and the session can now respond to capabilities. Bug: b/184186390 Change-Id: Ic1abcd32d240d9c64dec4b56fb01d6b3c74e9ddb Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2815610 Reviewed-by: mark a. foltz <mfoltz@chromium.org> Reviewed-by: Ryan Keane <rwkeane@google.com> Commit-Queue: Jordan Bayles <jophba@chromium.org>
2021-04-13[Cast] Remove deprecated WiFi status codeJordan Bayles
The WiFi status logs have been turned down in Chrome, and no longer need to be supported in libcast. This patch removes all references to the GET_STATUS and STATUS_RESPONSE messages. Bug: 1197178 Change-Id: Id48844c0e3dd921ec95d1cb803603161ddcdcbfe Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2815609 Reviewed-by: Brandon Tolsch <btolsch@chromium.org> Reviewed-by: Takumi Fujimoto <takumif@chromium.org> Commit-Queue: Jordan Bayles <jophba@chromium.org>
2021-04-08[HOTFIX] Fix Chrome issuesJordan Bayles
Chrome build is complaining about a missing constructor as well as a bunch of static initialized stuff due to const declarations. This patch should put Chrome in a good state by making things constexpr and adding constructors where expected. TBR=rwkeane@chromium.org Change-Id: I6b98e04a8a103092bdeb02cd78a4799b7115c498 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2815613 Reviewed-by: Jordan Bayles <jophba@chromium.org> Reviewed-by: Ryan Keane <rwkeane@google.com> Commit-Queue: Jordan Bayles <jophba@chromium.org>
2021-04-08[Cast] Cleanup Resolution + ReceiverSessionJordan Bayles
This patch changes the way Dimensions and Resolution objects are used in Open Screen--consolidating them into just one set of Dimensions and Resolution objects that can be used throughout the library, and updates the mirroring control protocol specification to be crisper about the difference between Resolution objects and Dimensions objects--and removing frame rates where they don't really make sense. As part of this cleanup, it also refactors the ReceiverSession to not expose the Answer messaging system at all, instead using new publicly exposed types. Finally, the capture recommendations are removed from the Receiver side, in favor of shared constants. Bug: b/184186374 Change-Id: I5e6a1c6798d07cb7f388ff5179c0bfa325d89229 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2808336 Reviewed-by: Ryan Keane <rwkeane@google.com> Commit-Queue: Jordan Bayles <jophba@chromium.org>
2021-04-02Revert "[Cast] Rename Negotiate/OnNegotiated methods"Jordan Bayles
This reverts commit 21f04aefd1b06a959576202fc3a7616bc4de0b1d. Reason for revert: Rename breaks Fuchsia build. Original change's description: > [Cast] Rename Negotiate/OnNegotiated methods > > This patch renames SenderSession Negotiate to NegotiateMirroring and > OnNegotiated to OnMirroringNegotiated, in advance of a larger patch that > exposes remoting on the SenderSession. > > Bug: b/184186374 > Change-Id: Ibfa38a822d6fdf5a39ebb83ef493442451fcc91e > Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2798518 > Reviewed-by: Ryan Keane <rwkeane@google.com> > Commit-Queue: Jordan Bayles <jophba@chromium.org> Bug: b/184186374 Change-Id: I8ac2534d47e27a3fa151b72aa0098688a771a410 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2801912 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2021-03-31[Cast] Rename Negotiate/OnNegotiated methodsJordan Bayles
This patch renames SenderSession Negotiate to NegotiateMirroring and OnNegotiated to OnMirroringNegotiated, in advance of a larger patch that exposes remoting on the SenderSession. Bug: b/184186374 Change-Id: Ibfa38a822d6fdf5a39ebb83ef493442451fcc91e Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2798518 Reviewed-by: Ryan Keane <rwkeane@google.com> Commit-Queue: Jordan Bayles <jophba@chromium.org>
2021-02-01Fix UDP bind timing issueJordan Bayles
This patch fixes a potential timing issue where we attempt to send an Answer message before the UDP socket is bound. The current behavior is that we construct an Answer with a UDP port value of 0, which results in the Answer failing validation and an error Answer message being sent back to the sender. The new behavior is that the Answer message is not sent until the environment is notified that the UDP socket has been bound. This is accomplished by an addition to the UDPSocket::Client abstract class, a new OnBound event. Bug: b/174501332 Change-Id: I4bcebe78d8d41c29bb4b4698c5565f0dd9ef2c17 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2645893 Commit-Queue: Jordan Bayles <jophba@chromium.org> Reviewed-by: mark a. foltz <mfoltz@chromium.org> Reviewed-by: Jordan Bayles <jophba@chromium.org>
2021-01-25[c++17] Make consistent use of noexceptJan Wilken Dörrie
This change makes openscreen ready to be compiled with -std=c++17. In particular, c++17 demands the consistent use of the noexcept keyword accross declaration and definition. Bug: chromium:752720 Change-Id: I4715cbc7ccc9576e33ad7dec0ce6c1f6ebd9935b Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2643286 Commit-Queue: mark a. foltz <mfoltz@chromium.org> Reviewed-by: mark a. foltz <mfoltz@chromium.org>
2020-12-10Refactor session message sendingJordan Bayles
This patch refactors session message sending to include multiple new message types, such as RPC and GET_STATUS. Integration tests are included. Bug: b/170756458, b/174188662 Change-Id: I8b5de8a668171e0ce7cb3e74651d207aa7911c24 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2506651 Commit-Queue: Jordan Bayles <jophba@chromium.org> Reviewed-by: Yuri Wiitala <miu@chromium.org>
2020-11-11[Open Screen] Fix noexcept usage.mark a. foltz
This patch consistently annotates move constructors with noexcept. This enables move optimization when std::vector is resized. Notes: - LLVM libcxx has been patched to no longer require this when -fno-exceptions is used [1] - However, libc++ still requires it as far as I can tell - There are no compilation issues with noexcept on clang or GCC so MAYBE_NOEXCEPT is no longer necessary - noexcept is only meaningful on declarations, not definitions Background: https://groups.google.com/a/chromium.org/g/chromium-dev/c/8i4tMqNpHhg [1] https://github.com/llvm/llvm-project/commit/2a573784f3679a7abab921018eb1c585dce8e669 Bug: b/160731444 Change-Id: Ib83e5c2fa5a2624665b76a3b2e0f6351a9196f8f Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2533433 Commit-Queue: mark a. foltz <mfoltz@chromium.org> Reviewed-by: Brandon Tolsch <btolsch@chromium.org>
2020-11-09Standalone Receiver: Integration with ApplicationAgent.Yuri Wiitala
Makes the standalone cast receiver a full Cast V2 Receiver with a launchable "Mirroring App." Replaces "CastAgent" with three modules: MirroringApplication (new): A front-end launcher and message port for a ReceiverSession (and a StreamingPlaybackController, which manages the playback UI). ApplicatonAgent (prior patch): An implementation of the Cast V2 Application Control spec, able to launch applications and route messages to/from them. CastService (new): Glues it all together, from a network server socket, through the Cast Channel infrastructure, through the ApplicationAgent and MirroringApplication, to a ReceiverSession and playback GUI. Bug: b/170134354 Change-Id: I9640a3d0c40f174d9f03bc26ee3c2f160736e290 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2481853 Commit-Queue: Yuri Wiitala <miu@chromium.org> Reviewed-by: Jordan Bayles <jophba@chromium.org>
2020-10-21Add SessionMessager classJordan Bayles
This patch cleans up message logic in the ReceiverSession and SenderSession classes, reducing duplicate code and ensuring more predictable behavior. A new SessionMessager class is added, using a callback model to handle message types. Bug: b/168238707 Change-Id: I44b3aa41f10c53ef98d9044be18c6fbf8f093412 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2462065 Commit-Queue: Jordan Bayles <jophba@chromium.org> Reviewed-by: Yuri Wiitala <miu@chromium.org>
2020-10-20[Cast Streaming] Remove deprecated ConfiguredReceiver fieldsJordan Bayles
This patch deletes the deprecated ConfiguredReceiver fields from our public API. Bug: 1132109 Change-Id: I2f9d1c254d6bdfb7e33cae151157d95760e9ac16 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2464917 Reviewed-by: Yuri Wiitala <miu@chromium.org> Commit-Queue: Jordan Bayles <jophba@chromium.org>
2020-09-25Cleanup Receiver, ReceiverSession APIsJordan Bayles
This patch does some cleanup to the Receiver and ReceiverSession APIs, including: 1. Adding SessionConfig as a property on Receiver. 2. Change ConfiguredReceivers to behave more like ConfiguredSenders 3. Removes abseil dependencies 4. Cleans up AudioCodec, VideoCodec usages 5. Replaces AudioStream, VideoStream usage with capture options, and renames capture options to capture configs. Bug: b/168651087, b/166640702 Change-Id: I4cd53a0681fd9756cd0a7556732b2991a0decb63 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2424641 Commit-Queue: Jordan Bayles <jophba@chromium.org> Reviewed-by: Jordan Bayles <jophba@chromium.org> Reviewed-by: Yuri Wiitala <miu@chromium.org> Reviewed-by: mark a. foltz <mfoltz@chromium.org>
2020-09-21[Cast Streaming] Implement CastAgent for standalone senderJordan Bayles
This patch adds a new CastAgent class for the standalone sender executable. It also updates the standalone sender to consume this CastAgent, as well as various fixes for issues exposed by testing with this class. Bug: b/162542753 Change-Id: I54ea372feea9e9f308d012f5495d1034cb61cb39 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2417831 Commit-Queue: Jordan Bayles <jophba@chromium.org> Reviewed-by: Yuri Wiitala <miu@chromium.org>
2020-09-21[Cast Streaming] Implement sender session classJordan Bayles
This patch adds a new SenderSession class along with unit testing for this class. Embedders can create an instance of this class in order to start a streaming session with an already known receiver. The embedder is expected to have a valid TLS connection already established with the receiver. Bug: b/162542753 Change-Id: Ia91df728d947e1fa20ed0b360f595f75d41bf11c Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2378540 Reviewed-by: Jordan Bayles <jophba@chromium.org> Reviewed-by: mark a. foltz <mfoltz@chromium.org> Reviewed-by: Yuri Wiitala <miu@chromium.org> Commit-Queue: Jordan Bayles <jophba@chromium.org>
2020-09-01Remove string_view from message portJordan Bayles
This patch removes the usage of absl::string_view from the message port class, as part of cleaning up the public API for streaming so the new sender session class won't have any abseil from the beginning. Bug: b/166640702 Change-Id: I14c76a6dbcc7dcfdc8f6aaf8caa658af2b618d35 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2380241 Commit-Queue: Jordan Bayles <jophba@chromium.org> Reviewed-by: Takumi Fujimoto <takumif@chromium.org>
2020-08-18Cast Streaming: Provide a reason code when destroying Receivers.Yuri Wiitala
This allows clients to determine whether they need to do a full tear- down (at end of session), or just prepare for a new set of Receivers (the result of a re-negotiation). In addition, the OnConfiguredReceiversDestroyed() method was renamed to OnReceiversDestroying() to correct the tense of the verb, and make the name unambiguously shorter. Bug: 1116185 Change-Id: Ib3a14834c47997608bd719450b9755f452fa3859 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2358195 Reviewed-by: mark a. foltz <mfoltz@chromium.org> Reviewed-by: Yuri Wiitala <miu@chromium.org>
2020-06-08Improve ReceiverSession test coverageJordan Bayles
Currently, the ReceiverSession has pretty poor coverage. This patch improves unittest coverage for this class. Bug: b/158336502 Change-Id: I4c37294794a7e6e69852dc4b4b0a80edf91ff675 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2233369 Commit-Queue: Jordan Bayles <jophba@chromium.org> Reviewed-by: mark a. foltz <mfoltz@chromium.org>
2020-06-05Implement Answer parsingJordan Bayles
This patch adds Answer parsing and testing, similar to how Offer messages are currently parsed. As part of this work, the following improvements are also included: 1. To avoid Abseil usage in public APIs, a new Optional type with unit tests is included. 2. message_util.h helpers have been greatly expanded, moved to util/json/parsing_helpers.h, and unit tests added. 3. SimpleFraction has been moved from util/ to platform/base/, so it can be properly used in public APIs. 4. SessionConfig has been cleaned up to follow coding style guidelines. 5. ANSWER message creation (that encapsulates the Answer struct) has been moved to the ReceiverSession. Bug: b/152633271, b/158030843 Change-Id: I59c20a140a5174d45378fb9b647ccbe5e6d23d1b Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2219571 Commit-Queue: Jordan Bayles <jophba@chromium.org> Reviewed-by: mark a. foltz <mfoltz@chromium.org> Reviewed-by: Ryan Keane <rwkeane@google.com>
2020-06-03Move std::chrono using statements to util/Jordan Bayles
This patch moves openscreen::<time type> using statements to be part of a new util/ header, chrono_helpers.h. Some helpful convenience functions are provided for doing conversions, and a new conversion method, to_duration, is added to the Clock implementation. Change-Id: I5a153c4da5266bceea97de0cad00a71a739f71ca Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2222684 Reviewed-by: mark a. foltz <mfoltz@chromium.org> Reviewed-by: Ryan Keane <rwkeane@google.com> Commit-Queue: Jordan Bayles <jophba@chromium.org>
2020-05-21Add basic functional tests for the CastAgentJordan Bayles
This patch adds some rudimentary test coverage to ensure that the CastAgent in the standalone receiver implementation is not entirely broken. Bug: b/153079471 Change-Id: Iff26badce61fbded172ff27c490440651909b0c3 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2169345 Reviewed-by: Brandon Tolsch <btolsch@chromium.org> Commit-Queue: Jordan Bayles <jophba@chromium.org>
2020-04-02Add cast socket messages to the standalone receiverJordan Bayles
This patch builds on the CastAgent skeleton patch, adding TLS server socket listening to the receiver, with a ReceiverSession being created once a sender has connected. Change-Id: I77e0be93ef3c5d77abfcb2f77069a9fc3d0b736c Bug: b/153079059 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2116870 Commit-Queue: Jordan Bayles <jophba@chromium.org> Reviewed-by: mark a. foltz <mfoltz@chromium.org>
2020-03-24Add CastAgent classJordan Bayles
This patch adds a skeleton CastAgent class. The current, hacky approach is left in place until the cast socketing work is done. Change-Id: I31481906f8bfc8e6eb4268f03f2c5c32ec77f1cc Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2102902 Commit-Queue: Jordan Bayles <jophba@chromium.org> Reviewed-by: Max Yakimakha <yakimakha@chromium.org> Reviewed-by: Ryan Keane <rwkeane@google.com>
2020-02-12Crash fix: Prevent a unit test from using a real UDP socket.Yuri Wiitala
The code in receiver_session_unittest.cc was creating an Environment instance that was binding a real UDP socket. Also, when the test was running in a Chrome embedder build of the openscreen_unittests, the result was a segfault because a full browser environment was not present. To fix this, a MockEnvironment class (subclass of Environment) is used to intercept socket calls and provide a fake local address/port for the tests to work with. Change-Id: I59a06ed12b58a1ba14d228cad7cd8dfffafc9bb2 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2051319 Reviewed-by: Jordan Bayles <jophba@chromium.org> Commit-Queue: Yuri Wiitala <miu@chromium.org>
2020-01-14Integrate ReceiverSession into standalone receiverJordan Bayles
This patch integrates the ReceiverSession into the standalone_receiver/receiver demo. A dummy messageport implementation is included. Change-Id: I78040197730c14531c33a1a45685574762b5562a Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/1985239 Commit-Queue: Jordan Bayles <jophba@chromium.org> Reviewed-by: mark a. foltz <mfoltz@chromium.org>
2020-01-11Add (Video|Audio)Stream to ConfiguredReceiversJordan Bayles
Currently, embedders have no way of knowing what stream that libcast selected, and the SessionConfig class we expose only has a limited set of fields available, and is missing several important fields, such as codec. This patch exposes the AudioStream and VideoStream that were selected, if any, from the initial offer message on the OnNegotiated callback. Change-Id: Ia276fb991618a3fb4f8a4cc8c4d77192446397ac Bug: http://crbug.com/openscreen/97 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/1990358 Reviewed-by: Yuri Wiitala <miu@chromium.org> Reviewed-by: Ryan Keane <rwkeane@google.com> Commit-Queue: Jordan Bayles <jophba@chromium.org>
2019-12-23Reland "Replace namespace cast::something with openscreen::cast."mark a. foltz
This is a reland of 80ed3d779e3e38de94656bf59ff4b62534c797fe Original change's description: > Replace namespace cast::something with openscreen::cast. > > ...and fixed a few C++ style issues around use of rvals in files > touched. > > Bug: openscreen:90 > Change-Id: Ib14fb1c47dfafec1fefe0cad31bce764aae0272e > Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/1959204 > Commit-Queue: Yuri Wiitala <miu@chromium.org> > Reviewed-by: Jordan Bayles <jophba@chromium.org> TBR=miu@chromium.org,jopbha@chromium.org Bug: openscreen:90 Change-Id: Ifa9afb75c4bb8ae939935cf97ea408f658f159bc Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/1980853 Reviewed-by: mark a. foltz <mfoltz@chromium.org> Commit-Queue: mark a. foltz <mfoltz@chromium.org>
2019-12-23Revert "Replace namespace cast::something with openscreen::cast."mark a. foltz
This reverts commit 80ed3d779e3e38de94656bf59ff4b62534c797fe. Reason for revert: Broke chromium bots Original change's description: > Replace namespace cast::something with openscreen::cast. > > ...and fixed a few C++ style issues around use of rvals in files > touched. > > Bug: openscreen:90 > Change-Id: Ib14fb1c47dfafec1fefe0cad31bce764aae0272e > Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/1959204 > Commit-Queue: Yuri Wiitala <miu@chromium.org> > Reviewed-by: Jordan Bayles <jophba@chromium.org> TBR=miu@chromium.org,jophba@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: openscreen:90 Change-Id: Ia67dd400b6ffcf98ec64d460855ebd8c3b8dc3de Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/1980852 Reviewed-by: mark a. foltz <mfoltz@chromium.org> Commit-Queue: mark a. foltz <mfoltz@chromium.org>
2019-12-21Replace namespace cast::something with openscreen::cast.Yuri Wiitala
...and fixed a few C++ style issues around use of rvals in files touched. Bug: openscreen:90 Change-Id: Ib14fb1c47dfafec1fefe0cad31bce764aae0272e Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/1959204 Commit-Queue: Yuri Wiitala <miu@chromium.org> Reviewed-by: Jordan Bayles <jophba@chromium.org>
2019-12-17Update Receiver ownershipJordan Bayles
Currently, the embedder is responsible for owning Receivers, but they are not guaranteed to remain valid and are deleted upon renegotiation. To avoid confusing ownership and lifetimes, this patch changes ConfiguredReceivers to use dumb pointers, and have the lifetime of both the audio and video receivers managed directly by the ReceiverSession. A new OnReceiversDestroyed event is created, and the unit tests are updated to ensure it is called appropriately. Change-Id: I0c4fef00ecbafcc4e9b9abf5af5b507b38fece4b Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/1961046 Reviewed-by: Ryan Keane <rwkeane@google.com> Commit-Queue: Jordan Bayles <jophba@chromium.org>
2019-12-10Add ANSWER message sending to ReceiverSessionJordan Bayles
This patch finishes the ANSWER subsection of work by constructing and sending an ANSWER message when the ReceiverSession finishing negotiating a session. Change-Id: I88aff140fd909ca061e1d94ec08b4cc72fcd1fad Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/1951823 Commit-Queue: Jordan Bayles <jophba@chromium.org> Reviewed-by: mark a. foltz <mfoltz@chromium.org> Reviewed-by: Yuri Wiitala <miu@chromium.org>
2019-12-06Remove Json(Reader|Writer) in favor of namespaceJordan Bayles
In a recent code review, it was determined that we generally don't want classes to store JsonWriter and JsonReader instances. Thus, there isn't really a point in having instances of these classes. This patch deletes both JsonReader and JsonWriter in favor of a new, proper json:: namespace in json_serialization.h that includes both json::Read and json::Write. Change-Id: Ib31c84339f1bf18919764fd0297a60d34cb66573 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/1956136 Commit-Queue: Jordan Bayles <jophba@chromium.org> Reviewed-by: Yuri Wiitala <miu@chromium.org>
2019-12-02Implement ReceiverSession offer handlingJordan Bayles
This patch adds support for parsing OFFER messages and constructing receivers with configurations from the offer. Change-Id: I9ecf514f8cebfccf4d57367c03085ccdbb51fa47 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/1929463 Reviewed-by: Jordan Bayles <jophba@chromium.org> Reviewed-by: Yuri Wiitala <miu@chromium.org> Commit-Queue: Jordan Bayles <jophba@chromium.org>
2019-11-22Move streaming/cast/* to cast/streaming/* and cast/standalone_receiver/*Yuri Wiitala
Moves the files from streaming/cast to cast/streaming, fixes #includes and header guards, adopts the cast::streaming namespace, and patches BUILD.gn and DEPS files. Change-Id: I77d467a98823f3c55ed38f9a298967e3a42d0549 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/1927135 Commit-Queue: Yuri Wiitala <miu@chromium.org> Reviewed-by: Jordan Bayles <jophba@chromium.org>
2019-11-19Start using ReceiverConfig, ReceiverSessionJordan Bayles
This patch begins the process of creating a receiver session class that is integrated with the Receiver implementation. This first step includes enhancements to the ReceiverConfig class that make it usable by the session and the receiver, and contains an API-only declaration of ReceiverSession. Finally, the Receiver class is modified to use the ReceiverConfig, giving us a base for a fleshed out ReceiverSession class. Change-Id: I7585622b95227c340cbdeb05f1ea2d3511bbcf30 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/1913312 Reviewed-by: Jordan Bayles <jophba@chromium.org> Reviewed-by: Ryan Keane <rwkeane@google.com> Reviewed-by: Yuri Wiitala <miu@chromium.org> Commit-Queue: Jordan Bayles <jophba@chromium.org>