Files
qt-migration-legatus/qt5-before/dlbo/Lts/Services/AudioVideoManagement/AvsCommands/choose_stream.h
T
torstenandCopilot 7173785915 Qt6 Migration: Complete migration with DDS/RTI support and build validation
Major Changes:
- Merged latest Qt5 devel content from dlbo (292 files changed, 7 new dirs)
- Consolidated forward-declarations and include folders
- Removed unneeded modules per Niklas' repo check list

Build System Fixes:
- Fixed CMake VERSION_GREATER syntax in ParticipantManagement/CMakeLists.txt
- Added VLC packages (libvlc-dev, vlc-plugin-base) to docker_build.sh
- Added PostgreSQL dev packages (libpq-dev, postgresql-server-dev-all) to Dockerfile
- Fixed locale warnings (ANSI_X3.4-1968 → C.UTF-8)
- Fixed ArcGIS SDK path warnings when BUILD_ARCGIS=OFF

Code Generation Fixes:
- Fixed IDL enum collisions (PortType→CorePortType/DdsutPortType, PdmEventType)
- Fixed Grantlee template svc_translation.cpp.grantlee:
  - Changed {{ idl_enum.name }}_def:: to {{ idl_enum.name }}::
  - Fixed .underlying() calls for C++11 scoped enums (enum class)
- Removed generated files from repo (moc_*, *_dtc.h, *_ftc.h)

Validation:
- BUILD_RTI=ON: SUCCESS
- BUILD_RTI=OFF: SUCCESS
- C++17 standard maintained for RTI 7.7 compatibility
- Ubuntu 26.04 Docker environment verified

Remaining Warnings (expected):
- BgViewer, KDChart, KDReports, Poppler-Qt6 not found (optional features)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-15 18:20:26 +00:00

99 lines
3.5 KiB
C++

/**
* @RDE_HEADER@
* ChooseStream
* $Id$
* $HeadURL$
* $Author$
* Created by Christian Fröbel, SLSE, 2017-06-29
*/
#pragma once
#include <AudioVideoManagement/icommand.h>
#include <AudioVideoManagement/ava_types.h>
#include <AudioVideoManagement/avm_export.h>
#include <QString>
#include <boost/optional.hpp>
namespace AudioVideoManagement
{
class IAvaComm;
class IAvaCommandDoneObserver;
namespace AvaCommands
{
/**
* Example protocol for chooseStream:
* @code
* ==> b'chooseStream "av_0045" 1 "CTCVideo-1"\n'
* <== b'200 OK\r\n'
* <== b'221 "av_0040" "CTCVideo-1" 1523026547.94 STREAMPOS\r\n' -- for each previously active stream
* <== b'221 "av_0053" "CTCVideo-1" 1523026547.94 STREAMPOS\r\n'
* <== b'221 "av_0045" "CTCVideo-1" 1523026547.94 STREAMPOS\r\n'
* <== b'221 "av_0036" "CTCVideo-1" 1523026547.94 STREAMPOS\r\n'
* <== b'223 "av_0036" "CTCVideo-1" 3 STREAMSTATE\r\n' -- for each previously active video *and* audio stream
* <== b'223 "av_0040" "CTCVideo-1" 3 STREAMSTATE\r\n'
* <== b'223 "av_0045" "CTCVideo-1" 3 STREAMSTATE\r\n'
* <== b'223 "av_0053" "CTCVideo-1" 3 STREAMSTATE\r\n'
* <== b'223 "av_0040" "CTCVideo-1" 3 STREAMSTATE\r\n'
* <== b'223 "av_0053" "CTCVideo-1" 3 STREAMSTATE\r\n'
* <== b'223 "av_0045" "CTCVideo-1" 3 STREAMSTATE\r\n'
* <== b'223 "av_0036" "CTCVideo-1" 3 STREAMSTATE\r\n'
* <== b'220 "av_0045" "CTCVideo-1" 1523026548.00 1523026548.00 0.00 STREAMINFO\r\n' -- for the newly chosen stream
* <== b'221 "av_0045" "CTCVideo-1" 1523026548.00 STREAMPOS\r\n'
* <== b'222 "av_0045" "CTCVideo-1" 100 STREAMSPEED\r\n'
* <== b'223 "av_0045" "CTCVideo-1" 0 STREAMSTATE\r\n'
* <== b'224 "av_0045" "CTCVideo-1" 1 0 STREAMMODE\r\n'
* <== b'225 "av_0045" "CTCVideo-1" 1 STREAMAUDIOMUTE\r\n' -- optional, in case the stream has an audio part
* <== b'228 "av_0045" "CTCVideo-1" 1 STREAMVOLUMECHANGED\r\n'
* <== b'225 "av_0045" "CTCVideo-1" 1 STREAMAUDIOMUTE\r\n'
* <== b'223 "av_0045" "CTCVideo-1" 1 STREAMSTATE\r\n'
* @endcode
*
* The order of those responses is deterministic.
* See AVS-Software src/app/AVS_Workstation/app/presentationgroup.cpp:
* int PresentationGroup::sendInfo(QString stream, int type)
*
* So we synchronize on the StreamMode response as everything thereafter is optional.
*
* @author Christian Fröbel
*/
class AVM_COMMON_EXPORT ChooseStream final : public ICommand
{
Q_OBJECT
public:
ChooseStream(IAvaComm *comm, IAvaCommandDoneObserver *doneObserver, const QString &dialogId, const QString &streamName);
void send() override;
QString debug() const override { return QLatin1String("ChooseStream: ") + m_streamName; }
/**
* May only be called after the command has successfully completed.
*/
///{@
AvaStreamInfo streamInfo() const { return *m_streamInfo; }
AvaStreamState streamState() const { return *m_streamState; }
///@}
private slots:
void onStreamInfoReceived(const QString &dialogId, const QString &streamName, const AvaStreamInfo &streamInfo);
void onStreamStateReceived(const QString &dialogId, const QString &streamName, AvaStreamState streamState);
void onStreamModeReceived(const QString &dialogId, const QString &streamName, bool pint, bool autoStop);
private:
void done();
const QString m_dialogId;
const QString m_streamName;
boost::optional<AvaStreamInfo> m_streamInfo;
boost::optional<AvaStreamState> m_streamState;
IAvaComm *m_comm;
IAvaCommandDoneObserver *m_observer;
};
}} // namespace AudioVideoManagement::AvaCommands