diff --git a/AampCMCDCollector.cpp b/AampCMCDCollector.cpp index 4a5d807d1..68b9290e8 100644 --- a/AampCMCDCollector.cpp +++ b/AampCMCDCollector.cpp @@ -114,18 +114,6 @@ void AampCMCDCollector::Initialize(bool enableDisable , std::string &traceId) pCMCDMetrics->SetMediaType("INIT_AUDIO"); delete mCMCDStreamData[eMEDIATYPE_INIT_AUDIO]; mCMCDStreamData[eMEDIATYPE_INIT_AUDIO] = pCMCDMetrics; - // for Aux Audio - pCMCDMetrics = new AudioCMCDHeaders(); - pCMCDMetrics->SetSessionId(mTraceId); - pCMCDMetrics->SetMediaType("AUXAUDIO"); - delete mCMCDStreamData[eMEDIATYPE_AUX_AUDIO]; - mCMCDStreamData[eMEDIATYPE_AUX_AUDIO] = pCMCDMetrics; - // for Aux Audio Init - pCMCDMetrics = new AudioCMCDHeaders(); - pCMCDMetrics->SetSessionId(mTraceId); - pCMCDMetrics->SetMediaType("INIT_AUDIO"); - delete mCMCDStreamData[eMEDIATYPE_INIT_AUX_AUDIO]; - mCMCDStreamData[eMEDIATYPE_INIT_AUX_AUDIO] = pCMCDMetrics; // for Subtitle pCMCDMetrics = new SubtitleCMCDHeaders(); pCMCDMetrics->SetSessionId(mTraceId); @@ -326,7 +314,6 @@ void AampCMCDCollector::SetTrackData(AampMediaType mediaType,bool bufferRedStatu pCMCDMetrics->SetBufferStarvation(bufferRedStatus); pCMCDMetrics->SetBufferLength(bufferedDuration); } - // No data for Aux Audio now ////////////// } } diff --git a/AampDefine.h b/AampDefine.h index 225ca103c..c0fd7c537 100644 --- a/AampDefine.h +++ b/AampDefine.h @@ -113,9 +113,9 @@ #define DEFAULT_AD_FULFILLMENT_TIMEOUT 2000 /**< Default Ad fulfillment timeout in milliseconds */ #define MAX_AD_FULFILLMENT_TIMEOUT 5000 /**< Max Ad fulfillment timeout in milliseconds */ -#define AAMP_TRACK_COUNT 4 /**< internal use - audio+video+sub+aux track */ +#define AAMP_TRACK_COUNT 3 /**< internal use - audio+video+sub track */ #define DEFAULT_CURL_INSTANCE_COUNT (AAMP_TRACK_COUNT + 1) /**< One for Manifest/Playlist + Number of tracks */ -#define AAMP_DRM_CURL_COUNT 4 /**< audio+video+sub+aux track DRMs */ +#define AAMP_DRM_CURL_COUNT 3 /**< audio+video+sub track DRMs */ //#define CURL_FRAGMENT_DL_TIMEOUT 10L /**< Curl timeout for fragment download */ #define DEFAULT_PLAYLIST_DL_TIMEOUT 10L /**< Curl timeout for playlist download */ #define DEFAULT_CURL_TIMEOUT 5L /**< Default timeout for Curl downloads */ diff --git a/AampMPDUtils.cpp b/AampMPDUtils.cpp index d01a74936..2d8398663 100644 --- a/AampMPDUtils.cpp +++ b/AampMPDUtils.cpp @@ -172,7 +172,6 @@ bool IsCompatibleMimeType(const std::string& mimeType, AampMediaType mediaType) break; case eMEDIATYPE_AUDIO: - case eMEDIATYPE_AUX_AUDIO: if ((mimeType == "audio/webm") || (mimeType == "audio/mp4")) isCompatible = true; diff --git a/AampMediaType.h b/AampMediaType.h index a5d2120bb..f28db1101 100644 --- a/AampMediaType.h +++ b/AampMediaType.h @@ -30,7 +30,7 @@ * @enum AampMediaType * @brief Media types */ -// Please maintain the order video, audio, subtitle and aux_audio in future +// Please maintain the order video, audio and subtitle in future // Above order to be maintained across fragment, init and playlist media types // These enums are used in a lot of calculation in AAMP code and breaking the order will bring a lot of issues // This order is also followed in other enums like AampCurlInstance and TrackType @@ -39,18 +39,15 @@ enum AampMediaType eMEDIATYPE_VIDEO, /**< Type video */ eMEDIATYPE_AUDIO, /**< Type audio */ eMEDIATYPE_SUBTITLE, /**< Type subtitle */ - eMEDIATYPE_AUX_AUDIO, /**< Type auxiliary audio */ eMEDIATYPE_MANIFEST, /**< Type manifest */ eMEDIATYPE_LICENCE, /**< Type license */ eMEDIATYPE_IFRAME, /**< Type iframe */ eMEDIATYPE_INIT_VIDEO, /**< Type video init fragment */ eMEDIATYPE_INIT_AUDIO, /**< Type audio init fragment */ eMEDIATYPE_INIT_SUBTITLE, /**< Type subtitle init fragment */ - eMEDIATYPE_INIT_AUX_AUDIO, /**< Type auxiliary audio init fragment */ eMEDIATYPE_PLAYLIST_VIDEO, /**< Type video playlist */ eMEDIATYPE_PLAYLIST_AUDIO, /**< Type audio playlist */ eMEDIATYPE_PLAYLIST_SUBTITLE, /**< Type subtitle playlist */ - eMEDIATYPE_PLAYLIST_AUX_AUDIO, /**< Type auxiliary audio playlist */ eMEDIATYPE_PLAYLIST_IFRAME, /**< Type Iframe playlist */ eMEDIATYPE_INIT_IFRAME, /**< Type IFRAME init fragment */ eMEDIATYPE_DSM_CC, /**< Type digital storage media command and control (DSM-CC) */ diff --git a/AampProfiler.h b/AampProfiler.h index b56c74001..09e01aa37 100644 --- a/AampProfiler.h +++ b/AampProfiler.h @@ -48,22 +48,18 @@ typedef enum PROFILE_BUCKET_PLAYLIST_VIDEO, /**< Video playlist download bucket*/ PROFILE_BUCKET_PLAYLIST_AUDIO, /**< Audio playlist download bucket*/ PROFILE_BUCKET_PLAYLIST_SUBTITLE, /**< Subtitle playlist download bucket*/ - PROFILE_BUCKET_PLAYLIST_AUXILIARY, /**< Auxiliary playlist download bucket*/ PROFILE_BUCKET_INIT_VIDEO, /**< Video init fragment download bucket*/ PROFILE_BUCKET_INIT_AUDIO, /**< Audio init fragment download bucket*/ PROFILE_BUCKET_INIT_SUBTITLE, /**< Subtitle fragment download bucket*/ - PROFILE_BUCKET_INIT_AUXILIARY, /**< Auxiliary fragment download bucket*/ PROFILE_BUCKET_FRAGMENT_VIDEO, /**< Video fragment download bucket*/ PROFILE_BUCKET_FRAGMENT_AUDIO, /**< Audio fragment download bucket*/ PROFILE_BUCKET_FRAGMENT_SUBTITLE, /**< Subtitle fragment download bucket*/ - PROFILE_BUCKET_FRAGMENT_AUXILIARY, /**< Auxiliary fragment download bucket*/ PROFILE_BUCKET_DECRYPT_VIDEO, /**< Video decryption bucket*/ PROFILE_BUCKET_DECRYPT_AUDIO, /**< Audio decryption bucket*/ PROFILE_BUCKET_DECRYPT_SUBTITLE, /**< Subtitle decryption bucket*/ - PROFILE_BUCKET_DECRYPT_AUXILIARY, /**< Auxiliary decryption bucket*/ PROFILE_BUCKET_LA_TOTAL, /**< License acquisition total bucket*/ PROFILE_BUCKET_LA_PREPROC, /**< License acquisition pre-processing bucket*/ diff --git a/AampStreamSinkInactive.h b/AampStreamSinkInactive.h index 363dc1b64..6ea68047f 100644 --- a/AampStreamSinkInactive.h +++ b/AampStreamSinkInactive.h @@ -47,7 +47,7 @@ class AampStreamSinkInactive : public StreamSink * @fn Configure * @brief stub implementation for Inactive aamp instance */ - virtual void Configure(StreamOutputFormat format, StreamOutputFormat audioFormat, StreamOutputFormat auxFormat, StreamOutputFormat subFormat, bool bESChangeStatus, bool forwardAudioToAux, bool setReadyAfterPipelineCreation=false) + virtual void Configure(StreamOutputFormat format, StreamOutputFormat audioFormat, StreamOutputFormat subFormat, bool bESChangeStatus, bool setReadyAfterPipelineCreation=false) { AAMPLOG_WARN("Called AAMPGstPlayer()::%s stub", __FUNCTION__); } diff --git a/AampTSBSessionManager.cpp b/AampTSBSessionManager.cpp index 99486595e..26be986ae 100644 --- a/AampTSBSessionManager.cpp +++ b/AampTSBSessionManager.cpp @@ -662,10 +662,6 @@ AampMediaType AampTSBSessionManager::ConvertMediaType(AampMediaType actualMediat { mediaType = eMEDIATYPE_SUBTITLE; } - else if (mediaType == eMEDIATYPE_INIT_AUX_AUDIO) - { - mediaType = eMEDIATYPE_AUX_AUDIO; - } else if (mediaType == eMEDIATYPE_INIT_IFRAME) { mediaType = eMEDIATYPE_IFRAME; diff --git a/AampUtils.cpp b/AampUtils.cpp index 513850081..b2fc12897 100644 --- a/AampUtils.cpp +++ b/AampUtils.cpp @@ -607,18 +607,15 @@ enum HarvestConfigType eHARVEST_ENABLE_VIDEO = 0x00000001, /**< Enable Harvest Video fragments - set 1st bit*/ eHARVEST_ENABLE_AUDIO = 0x00000002, /**< Enable Harvest audio - set 2nd bit*/ eHARVEST_ENABLE_SUBTITLE = 0x00000004, /**< Enable Harvest subtitle - set 3rd bit */ - eHARVEST_ENABLE_AUX_AUDIO = 0x00000008, /**< Enable Harvest auxiliary audio - set 4th bit*/ eHARVEST_ENABLE_MANIFEST = 0x00000010, /**< Enable Harvest manifest - set 5th bit */ eHARVEST_ENABLE_LICENCE = 0x00000020, /**< Enable Harvest license - set 6th bit */ eHARVEST_ENABLE_IFRAME = 0x00000040, /**< Enable Harvest iframe - set 7th bit */ eHARVEST_ENABLE_INIT_VIDEO = 0x00000080, /**< Enable Harvest video init fragment - set 8th bit*/ eHARVEST_ENABLE_INIT_AUDIO = 0x00000100, /**< Enable Harvest audio init fragment - set 9th bit*/ eHARVEST_ENABLE_INIT_SUBTITLE = 0x00000200, /**< Enable Harvest subtitle init fragment - set 10th bit*/ - eHARVEST_ENABLE_INIT_AUX_AUDIO = 0x00000400, /**< Enable Harvest auxiliary audio init fragment - set 11th bit*/ eHARVEST_ENABLE_PLAYLIST_VIDEO = 0x00000800, /**< Enable Harvest video playlist - set 12th bit*/ eHARVEST_ENABLE_PLAYLIST_AUDIO = 0x00001000, /**< Enable Harvest audio playlist - set 13th bit*/ eHARVEST_ENABLE_PLAYLIST_SUBTITLE = 0x00002000, /**< Enable Harvest subtitle playlist - set 14th bit*/ - eHARVEST_ENABLE_PLAYLIST_AUX_AUDIO = 0x00004000, /**< Enable Harvest auxiliary audio playlist - set 15th bit*/ eHARVEST_ENABLE_PLAYLIST_IFRAME = 0x00008000, /**< Enable Harvest Iframe playlist - set 16th bit*/ eHARVEST_ENABLE_INIT_IFRAME = 0x00010000, /**< Enable Harvest IFRAME init fragment - set 17th bit*/ eHARVEST_ENABLE_DSM_CC = 0x00020000, /**< Enable Harvest digital storage media command and control (DSM-CC)- set 18th bit */ @@ -1136,18 +1133,15 @@ const char *GetMediaTypeName(AampMediaType mediaType) "video",//eMEDIATYPE_VIDEO "audio",//eMEDIATYPE_AUDIO "text",//eMEDIATYPE_SUBTITLE - "aux_audio",//eMEDIATYPE_AUX_AUDIO "manifest",//eMEDIATYPE_MANIFEST "licence",//eMEDIATYPE_LICENCE "iframe",//eMEDIATYPE_IFRAME "init_video",//eMEDIATYPE_INIT_VIDEO "init_audio",//eMEDIATYPE_INIT_AUDIO "init_text",//eMEDIATYPE_INIT_SUBTITLE - "init_aux_audio",//eMEDIATYPE_INIT_AUX_AUDIO "playlist_video",//eMEDIATYPE_PLAYLIST_VIDEO "playlist_audio",//eMEDIATYPE_PLAYLIST_AUDIO "playlist_text",//eMEDIATYPE_PLAYLIST_SUBTITLE - "playlist_aux_audio",//eMEDIATYPE_PLAYLIST_AUX_AUDIO "playlist_iframe",//eMEDIATYPE_PLAYLIST_IFRAME "init_iframe",//eMEDIATYPE_INIT_IFRAME "dsm_cc",//eMEDIATYPE_DSM_CC diff --git a/CMakeLists.txt b/CMakeLists.txt index ce45f586b..92574352b 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -396,12 +396,6 @@ if (COVERAGE_ENABLED) set(LIBAAMP_DEPENDS ${LIBAAMP_DEPENDS} "--coverage") endif() - -if(CMAKE_AUXILIARY_AUDIO_ENABLED) - message("CMAKE_AUXILIARY_AUDIO_ENABLED set") - set(LIBAAMP_DEFINES "${LIBAAMP_DEFINES} -DAAMP_AUXILIARY_AUDIO_ENABLED") -endif() - if(CMAKE_ENABLE_PTS_RESTAMP) message("ENABLE_PTS_RESTAMP set") set(LIBAAMP_DEFINES "${LIBAAMP_DEFINES} -DENABLE_PTS_RESTAMP") diff --git a/README.md b/README.md index bf0f3eb65..d0ff41182 100644 --- a/README.md +++ b/README.md @@ -264,19 +264,16 @@ playlistTimeout Playlist download time out in sec. Default: 10s By default aamp will dump all the type of data, set 0 for disabling harvest 0x00000001 (1) - Enable Harvest Video fragments - set 1st bit 0x00000002 (2) - Enable Harvest audio - set 2nd bit - 0x00000004 (4) - Enable Harvest subtitle - set 3rd bit - 0x00000008 (8) - Enable Harvest auxiliary audio - set 4th bit + 0x00000004 (4) - Enable Harvest subtitle - set 3rd bit 0x00000010 (16) - Enable Harvest manifest - set 5th bit 0x00000020 (32) - Enable Harvest license - set 6th bit , TODO: not yet supported license dumping 0x00000040 (64) - Enable Harvest iframe - set 7th bit 0x00000080 (128) - Enable Harvest video init fragment - set 8th bit 0x00000100 (256) - Enable Harvest audio init fragment - set 9th bit 0x00000200 (512) - Enable Harvest subtitle init fragment - set 10th bit - 0x00000400 (1024) - Enable Harvest auxiliary audio init fragment - set 11th bit 0x00000800 (2048) - Enable Harvest video playlist - set 12th bit 0x00001000 (4096) - Enable Harvest audio playlist - set 13th bit 0x00002000 (8192) - Enable Harvest subtitle playlist - set 14th bit - 0x00004000 (16384) - Enable Harvest auxiliary audio playlist - set 15th bit 0x00008000 (32768) - Enable Harvest Iframe playlist - set 16th bit 0x00010000 (65536) - Enable Harvest IFRAME init fragment - set 17th bit example :- if you want harvest only manifest and video fragments , set value like 0x00000001 + 0x00000010 = 0x00000011 = 17 diff --git a/StreamAbstractionAAMP.h b/StreamAbstractionAAMP.h index c77c51cf7..4854cc9c8 100644 --- a/StreamAbstractionAAMP.h +++ b/StreamAbstractionAAMP.h @@ -55,7 +55,6 @@ typedef enum eTRACK_VIDEO, /**< Video track */ eTRACK_AUDIO, /**< Audio track */ eTRACK_SUBTITLE, /**< Subtitle track */ - eTRACK_AUX_AUDIO /**< Auxiliary audio track */ } TrackType; AampMediaType TrackTypeToMediaType( TrackType trackType ); @@ -973,10 +972,10 @@ class StreamAbstractionAAMP : public AampLicenseFetcher * * @param[out] primaryOutputFormat - format of primary track * @param[out] audioOutputFormat - format of audio track - * @param[out] auxAudioOutputFormat - format of aux audio track + * @param[out] subtitleOutputFormat - format of subtitle track * @return void */ - virtual void GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &auxAudioOutputFormat, StreamOutputFormat &subtitleOutputFormat) = 0; + virtual void GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &subtitleOutputFormat) = 0; /** * @brief Get current stream position. @@ -1841,13 +1840,6 @@ class StreamAbstractionAAMP : public AampLicenseFetcher */ void MuteSubtitles(bool mute); - /** - * @fn WaitForVideoTrackCatchupForAux - * - * @return void - */ - void WaitForVideoTrackCatchupForAux(); - /** * @brief Set Content Restrictions * @param[in] restrictions - restrictions to be applied @@ -1871,21 +1863,6 @@ class StreamAbstractionAAMP : public AampLicenseFetcher */ virtual void EnableContentRestrictions(){}; - /** - * @brief Get audio forward to aux pipeline status - * - * @return bool true if audio buffers are to be forwarded - */ - bool GetAudioFwdToAuxStatus() { return mFwdAudioToAux; } - - /** - * @brief Set audio forward to aux pipeline status - * - * @param[in] status - enabled/disabled - * @return void - */ - void SetAudioFwdToAuxStatus(bool status) { mFwdAudioToAux = status; } - /** * @brief Notify playlist downloader threads of tracks * @@ -2052,7 +2029,6 @@ class StreamAbstractionAAMP : public AampLicenseFetcher std::mutex mLock; /**< lock for A/V track catchup logic*/ std::condition_variable mCond; /**< condition for A/V track catchup logic*/ std::condition_variable mSubCond; /**< condition for Audio/Subtitle track catchup logic*/ - std::condition_variable mAuxCond; /**< condition for Aux and video track catchup logic*/ // abr variables long mCurrentBandwidth; /**< stores current bandwidth*/ @@ -2088,7 +2064,6 @@ class StreamAbstractionAAMP : public AampLicenseFetcher MediaTrackDiscontinuityState mTrackState; /**< stores the discontinuity status of tracks*/ std::string mAudioTrackIndex; /**< Current audio track index in track list */ std::string mTextTrackIndex; /**< Current text track index in track list */ - bool mFwdAudioToAux; /**< If audio buffers are to be forwarded to auxiliary pipeline, happens if both are playing same language */ id3_callback_t mID3Handler; /**< Function to be used to emit the ID3 event */ diff --git a/StreamSink.h b/StreamSink.h index b9d211380..828d4417b 100644 --- a/StreamSink.h +++ b/StreamSink.h @@ -46,14 +46,11 @@ class StreamSink * * @param[in] format - Video output format. * @param[in] audioFormat - Audio output format. - * @param[in] auxFormat - Aux audio output format. * @param[in] bESChangeStatus - Flag to keep force configure the pipeline value - * @param[in] forwardAudioToAux - Flag denotes if audio buffers have to be forwarded to aux pipeline * @param[in] setReadyAfterPipelineCreation - Flag denotes if pipeline has to be reset to ready or not * @return void */ - virtual void Configure(StreamOutputFormat format, StreamOutputFormat audioFormat, StreamOutputFormat auxFormat, StreamOutputFormat subFormat, bool bESChangeStatus, bool forwardAudioToAux, bool setReadyAfterPipelineCreation=false){} - + virtual void Configure(StreamOutputFormat format, StreamOutputFormat audioFormat, StreamOutputFormat subFormat, bool bESChangeStatus, bool setReadyAfterPipelineCreation=false){} /** * @brief API to send audio/video buffer into the sink. * diff --git a/aampgstplayer.cpp b/aampgstplayer.cpp index 775e44058..b9cb49d69 100644 --- a/aampgstplayer.cpp +++ b/aampgstplayer.cpp @@ -785,14 +785,14 @@ void AAMPGstPlayer::Stream() /** * @brief Configure pipeline based on A/V formats */ -void AAMPGstPlayer::Configure(StreamOutputFormat format, StreamOutputFormat audioFormat, StreamOutputFormat auxFormat, StreamOutputFormat subFormat, bool bESChangeStatus, bool forwardAudioToAux, bool setReadyAfterPipelineCreation) +void AAMPGstPlayer::Configure(StreamOutputFormat format, StreamOutputFormat audioFormat, StreamOutputFormat subFormat, bool bESChangeStatus, bool setReadyAfterPipelineCreation) { bool isSubEnable = aamp->IsGstreamerSubsEnabled(); int32_t trackId = aamp->GetCurrentAudioTrackId(); int PipelinePriority; gint rate = INVALID_RATE; - AAMPLOG_MIL("videoFormat %d audioFormat %d auxFormat %d subFormat %d",format, audioFormat, auxFormat, subFormat); + AAMPLOG_MIL("videoFormat %d audioFormat %d subFormat %d",format, audioFormat, subFormat); playerInstance->SetPreferredDRM(GetDrmSystemID(aamp->GetPreferredDRM())); // pass the preferred DRM to Interface InitializePlayerConfigs(this, playerInstance); @@ -803,8 +803,8 @@ void AAMPGstPlayer::Configure(StreamOutputFormat format, StreamOutputFormat audi bool FirstFrameFlag = aamp->IsFirstVideoFrameDisplayedRequired(); /*Configure and create the pipeline*/ - playerInstance->ConfigurePipeline(static_cast(format),static_cast(audioFormat),static_cast(auxFormat),static_cast(subFormat), - bESChangeStatus,forwardAudioToAux,setReadyAfterPipelineCreation, + playerInstance->ConfigurePipeline(static_cast(format),static_cast(audioFormat),static_cast(subFormat), + bESChangeStatus,setReadyAfterPipelineCreation, isSubEnable, trackId, rate, PIPELINE_NAME, PipelinePriority, FirstFrameFlag, aamp->GetManifestUrl().c_str()); AAMPLOG_TRACE("exiting AAMPGstPlayer"); StartMonitorAvTimer(); diff --git a/aampgstplayer.h b/aampgstplayer.h index 31502fd9d..9d486895f 100644 --- a/aampgstplayer.h +++ b/aampgstplayer.h @@ -112,13 +112,11 @@ class AAMPGstPlayer : public StreamSink * @fn Configure * @param[in] format video format * @param[in] audioFormat audio format - * @param[in] auxFormat aux audio format * @param[in] subFormat subtitle format * @param[in] bESChangeStatus flag to indicate if the audio type changed in mid stream - * @param[in] forwardAudioToAux if audio buffers to be forwarded to aux pipeline * @param[in] setReadyAfterPipelineCreation True/False for pipeline is created */ - void Configure(StreamOutputFormat format, StreamOutputFormat audioFormat, StreamOutputFormat auxFormat, StreamOutputFormat subFormat, bool bESChangeStatus, bool forwardAudioToAux, bool setReadyAfterPipelineCreation=false) override; + void Configure(StreamOutputFormat format, StreamOutputFormat audioFormat, StreamOutputFormat subFormat, bool bESChangeStatus, bool setReadyAfterPipelineCreation=false) override; /** * @fn SendCopy * @param[in] mediaType stream type diff --git a/downloader/AampCurlDefine.h b/downloader/AampCurlDefine.h index 28dda058e..975d83813 100644 --- a/downloader/AampCurlDefine.h +++ b/downloader/AampCurlDefine.h @@ -91,12 +91,10 @@ enum AampCurlInstance eCURLINSTANCE_VIDEO, eCURLINSTANCE_AUDIO, eCURLINSTANCE_SUBTITLE, - eCURLINSTANCE_AUX_AUDIO, eCURLINSTANCE_MANIFEST_MAIN, eCURLINSTANCE_MANIFEST_PLAYLIST_VIDEO, eCURLINSTANCE_MANIFEST_PLAYLIST_AUDIO, eCURLINSTANCE_MANIFEST_PLAYLIST_SUBTITLE, - eCURLINSTANCE_MANIFEST_PLAYLIST_AUX_AUDIO, eCURLINSTANCE_DAI, eCURLINSTANCE_AES, eCURLINSTANCE_PLAYLISTPRECACHE, diff --git a/drm/DrmInterface.cpp b/drm/DrmInterface.cpp index 0d764046d..06ce6db27 100644 --- a/drm/DrmInterface.cpp +++ b/drm/DrmInterface.cpp @@ -136,7 +136,6 @@ ProfilerBucketType DrmInterface::MapDrmToProfilerBucket(DrmProfilerBucketType dr case DRM_PROFILE_BUCKET_DECRYPT_VIDEO: return PROFILE_BUCKET_DECRYPT_VIDEO; case DRM_PROFILE_BUCKET_DECRYPT_AUDIO: return PROFILE_BUCKET_DECRYPT_AUDIO; case DRM_PROFILE_BUCKET_DECRYPT_SUBTITLE: return PROFILE_BUCKET_DECRYPT_SUBTITLE; - case DRM_PROFILE_BUCKET_DECRYPT_AUXILIARY:return PROFILE_BUCKET_DECRYPT_AUXILIARY; case DRM_PROFILE_BUCKET_LA_TOTAL: return PROFILE_BUCKET_LA_TOTAL; case DRM_PROFILE_BUCKET_LA_PREPROC: return PROFILE_BUCKET_LA_PREPROC; diff --git a/fragmentcollector_hls.cpp b/fragmentcollector_hls.cpp index 1031d4671..07fcdb4cd 100644 --- a/fragmentcollector_hls.cpp +++ b/fragmentcollector_hls.cpp @@ -80,10 +80,10 @@ extern DrmHelperPtr ProcessContentProtection(std::string attrName, bool propagat /// Variable initialization for media profiler buckets static const ProfilerBucketType mediaTrackBucketTypes[AAMP_TRACK_COUNT] = - { PROFILE_BUCKET_FRAGMENT_VIDEO, PROFILE_BUCKET_FRAGMENT_AUDIO, PROFILE_BUCKET_FRAGMENT_SUBTITLE, PROFILE_BUCKET_FRAGMENT_AUXILIARY }; + { PROFILE_BUCKET_FRAGMENT_VIDEO, PROFILE_BUCKET_FRAGMENT_AUDIO, PROFILE_BUCKET_FRAGMENT_SUBTITLE }; /// Variable initialization for media decrypt buckets static const ProfilerBucketType mediaTrackDecryptBucketTypes[AAMP_DRM_CURL_COUNT] = - { PROFILE_BUCKET_DECRYPT_VIDEO, PROFILE_BUCKET_DECRYPT_AUDIO, PROFILE_BUCKET_DECRYPT_SUBTITLE, PROFILE_BUCKET_DECRYPT_AUXILIARY}; + { PROFILE_BUCKET_DECRYPT_VIDEO, PROFILE_BUCKET_DECRYPT_AUDIO, PROFILE_BUCKET_DECRYPT_SUBTITLE }; /*************************************************************************** * @fn ParseKeyAttributeCallback @@ -2586,20 +2586,6 @@ std::string StreamAbstractionAAMP_HLS::GetPlaylistURI(TrackType trackType, Strea } } break; - case eTRACK_AUX_AUDIO: - { - int index = -1; - // Plain comparison to get the audio track with matching language - index = GetMediaIndexForLanguage(aamp->GetAuxiliaryAudioLanguage(), trackType); - if (index != -1) - { - playlistURI = mediaInfoStore[index].uri; - AAMPLOG_INFO("GetPlaylistURI : Auxiliary Track: Audio selected name is %s", GetLanguageCode(index).c_str()); - //No need to update back, matching track is either there or not - format = GetStreamOutputFormatForTrack(trackType); - } - } - break; } return playlistURI; } @@ -2750,16 +2736,7 @@ AAMPStatusType StreamAbstractionAAMP_HLS::SyncTracksForDiscontinuity() TrackState *audio = trackState[eMEDIATYPE_AUDIO]; TrackState *video = trackState[eMEDIATYPE_VIDEO]; TrackState *subtitle = trackState[eMEDIATYPE_SUBTITLE]; - TrackState *aux = NULL; - if (!audio->enabled) - { - AAMPLOG_WARN("Attempting to sync between muxed track and auxiliary audio track"); - audio = trackState[eMEDIATYPE_AUX_AUDIO]; - } - else - { - aux = trackState[eMEDIATYPE_AUX_AUDIO]; - } + AAMPStatusType retVal = eAAMPSTATUS_OK; AampTime roundedPlayTarget{(double)video->playTarget.nearestSecond()}; @@ -2889,15 +2866,9 @@ AAMPStatusType StreamAbstractionAAMP_HLS::SyncTracksForDiscontinuity() } } - //lets go with a simple sync operation for the moment for subtitle and aux - for (int index = eMEDIATYPE_SUBTITLE; index <= eMEDIATYPE_AUX_AUDIO; index++) + //lets go with a simple sync operation for the moment for subtitle { - TrackState *track = trackState[index]; - if (index == eMEDIATYPE_AUX_AUDIO && !trackState[eMEDIATYPE_AUDIO]->enabled) - { - // Case of muxed track and separate aux track - its already sync'ed - break; - } + TrackState *track = trackState[eMEDIATYPE_SUBTITLE]; if (track->enabled) { if (audio->GetNumberOfPeriods() == track->GetNumberOfPeriods()) @@ -2931,13 +2902,13 @@ AAMPStatusType StreamAbstractionAAMP_HLS::SyncTracksForDiscontinuity() if (!trackState[eMEDIATYPE_AUDIO]->enabled) { - AAMPLOG_WARN("Exit : aux track start %f, muxed track start %f sub track start %f", - audio->playTarget.inSeconds(), video->playTarget.inSeconds(), subtitle->playTarget.inSeconds()); + AAMPLOG_WARN("Exit : muxed track start %f sub track start %f", + video->playTarget.inSeconds(), subtitle->playTarget.inSeconds()); } - else if (aux) + else { - AAMPLOG_WARN("Exit : audio track start %f, vid track start %f sub track start %f aux track start %f", - audio->playTarget.inSeconds(), video->playTarget.inSeconds(), subtitle->playTarget.inSeconds(), aux->playTarget.inSeconds()); + AAMPLOG_WARN("Exit : audio track start %f, vid track start %f sub track start %f", + audio->playTarget.inSeconds(), video->playTarget.inSeconds(), subtitle->playTarget.inSeconds()); } } @@ -2957,7 +2928,6 @@ AAMPStatusType StreamAbstractionAAMP_HLS::SyncTracks(void) TrackState *audio = trackState[eMEDIATYPE_AUDIO]; TrackState *video = trackState[eMEDIATYPE_VIDEO]; TrackState *subtitle = trackState[eMEDIATYPE_SUBTITLE]; - TrackState *aux = NULL; AampTime diffBetweenStartTimes{}; for(int i = 0; iReleasePlaylistLock(); } - if (audio->enabled) - { - aux = trackState[eMEDIATYPE_AUX_AUDIO]; - } - else - { - mediaSequenceNumber[eMEDIATYPE_AUDIO] = mediaSequenceNumber[eMEDIATYPE_AUX_AUDIO]; - audio = trackState[eMEDIATYPE_AUX_AUDIO]; - } - if (startTimeAvailable) { //Logging irregularities in the playlist for debugging purposes @@ -3085,23 +3045,17 @@ AAMPStatusType StreamAbstractionAAMP_HLS::SyncTracks(void) syncedUsingSeqNum = true; } - //lets go with a simple sync operation for the moment for subtitle and aux - for (int index = eMEDIATYPE_SUBTITLE; (syncedUsingSeqNum && index <= eMEDIATYPE_AUX_AUDIO); index++) + //lets go with a simple sync operation for the moment for subtitle { - TrackState *track = trackState[index]; - if (index == eMEDIATYPE_AUX_AUDIO && !trackState[eMEDIATYPE_AUDIO]->enabled) - { - // Case of muxed track and separate aux track and its already sync'ed - break; - } + TrackState *track = trackState[eMEDIATYPE_SUBTITLE]; if (track->enabled) { - long long diff = mediaSequenceNumber[eMEDIATYPE_AUDIO] - mediaSequenceNumber[index]; + long long diff = mediaSequenceNumber[eMEDIATYPE_AUDIO] - mediaSequenceNumber[eMEDIATYPE_SUBTITLE]; //We can only support track to catch-up to audio. The opposite will cause a/v sync issues if (diff > 0 && diff <= MAX_SEQ_NUMBER_LAG_COUNT) { AAMPLOG_WARN("sync %s using sequence number. diff [%lld] A [%lld] T [%lld] a-f-uri [%.*s] t-f-uri [%.*s]", - track->name, diff, mediaSequenceNumber[eMEDIATYPE_AUDIO], mediaSequenceNumber[index], + track->name, diff, mediaSequenceNumber[eMEDIATYPE_AUDIO], mediaSequenceNumber[eMEDIATYPE_SUBTITLE], audio->fragmentURI.getLen(), audio->fragmentURI.getPtr(), track->fragmentURI.getLen(), track->fragmentURI.getPtr() ); //Track catch up to audio @@ -3125,7 +3079,7 @@ AAMPStatusType StreamAbstractionAAMP_HLS::SyncTracks(void) { //Audio can't catch up with track, since its already sync-ed with video. AAMPLOG_WARN("sync using sequence number failed, %s will be starting late. diff [%lld] A [%lld] T [%lld] a-f-uri [%.*s] t-f-uri [%.*s]", - track->name, diff, mediaSequenceNumber[eMEDIATYPE_AUDIO], mediaSequenceNumber[index], + track->name, diff, mediaSequenceNumber[eMEDIATYPE_AUDIO], mediaSequenceNumber[eMEDIATYPE_SUBTITLE], audio->fragmentURI.getLen(), audio->fragmentURI.getPtr(), track->fragmentURI.getLen(), track->fragmentURI.getPtr() ); } @@ -3190,15 +3144,9 @@ AAMPStatusType StreamAbstractionAAMP_HLS::SyncTracks(void) } } - //lets go with a simple sync operation for the moment for subtitle and aux - for (int index = eMEDIATYPE_SUBTITLE; (syncedUsingSeqNum && index <= eMEDIATYPE_AUX_AUDIO); index++) + //lets go with a simple sync operation for the moment for subtitle { - TrackState *track = trackState[index]; - if (index == eMEDIATYPE_AUX_AUDIO && !trackState[eMEDIATYPE_AUDIO]->enabled) - { - // Case of muxed track and separate aux track and its already sync'ed - break; - } + TrackState *track = trackState[eMEDIATYPE_SUBTITLE]; if (track->enabled) { //Compare track and audio start time @@ -3247,13 +3195,13 @@ AAMPStatusType StreamAbstractionAAMP_HLS::SyncTracks(void) video->playTargetBufferCalc = video->playTarget; if (!trackState[eMEDIATYPE_AUDIO]->enabled) { - AAMPLOG_WARN("Exit : aux track start %f, muxed track start %f sub track start %f", - audio->playTarget.inSeconds(), video->playTarget.inSeconds(), subtitle->playTarget.inSeconds()); + AAMPLOG_WARN("Exit : muxed track start %f sub track start %f", + video->playTarget.inSeconds(), subtitle->playTarget.inSeconds()); } - else if (aux) + else { - AAMPLOG_WARN("Exit : audio track start %f, vid track start %f sub track start %f aux track start %f", - audio->playTarget.inSeconds(), video->playTarget.inSeconds(), subtitle->playTarget.inSeconds(), aux->playTarget.inSeconds()); + AAMPLOG_WARN("Exit : audio track start %f, vid track start %f sub track start %f", + audio->playTarget.inSeconds(), video->playTarget.inSeconds(), subtitle->playTarget.inSeconds()); } return retval; @@ -3489,7 +3437,6 @@ AAMPStatusType StreamAbstractionAAMP_HLS::Init(TuneType tuneType) TrackState *audio = trackState[eMEDIATYPE_AUDIO]; TrackState *video = trackState[eMEDIATYPE_VIDEO]; TrackState *subtitle = trackState[eMEDIATYPE_SUBTITLE]; - TrackState *aux = trackState[eMEDIATYPE_AUX_AUDIO]; //Store Bitrate info to Video Track if(video) @@ -3513,10 +3460,6 @@ AAMPStatusType StreamAbstractionAAMP_HLS::Init(TuneType tuneType) } subtitle->enabled = false; subtitle->streamOutputFormat = FORMAT_INVALID; - - //No need to enable auxiliary audio feature for audio only playback scenarios - aux->enabled = false; - aux->streamOutputFormat = FORMAT_INVALID; } aamp->profiler.SetBandwidthBitsPerSecondAudio(audio->GetCurrentBandWidth()); if (audio->enabled) @@ -3605,24 +3548,6 @@ AAMPStatusType StreamAbstractionAAMP_HLS::Init(TuneType tuneType) subtitle->enabled = false; } } - if (aux->enabled) - { - if (aamp->getAampCacheHandler()->RetrieveFromPlaylistCache(aux->mPlaylistUrl, &aux->playlist, aux->mEffectiveUrl, eMEDIATYPE_PLAYLIST_AUX_AUDIO)) - { - AAMPLOG_INFO("StreamAbstractionAAMP_HLS::auxiliary audio playlist retrieved from cache"); - } - if (!aux->playlist.GetLen() ) - { - aux->FetchPlaylist(); - } - if (!aux->playlist.GetLen() ) - { - //TODO: This is logged as a warning. Decide if its critical for playback - AAMPLOG_ERR("StreamAbstractionAAMP_HLS::Auxiliary audio playlist download failed"); - aux->enabled = false; - aux->streamOutputFormat = FORMAT_INVALID; - } - } if (video && video->enabled && !video->playlist.GetLen() ) { AAMPLOG_ERR("StreamAbstractionAAMP_HLS::Video Playlist download failed"); @@ -3689,8 +3614,7 @@ AAMPStatusType StreamAbstractionAAMP_HLS::Init(TuneType tuneType) } if (ts->mDuration == 0.0f) { - //TODO: Confirm if aux audio playlist has issues, it should be deemed as a playback failure - if (iTrack == eTRACK_SUBTITLE || iTrack == eTRACK_AUX_AUDIO) + if (iTrack == eTRACK_SUBTITLE) { //Subtitle is optional and not critical to playback ts->enabled = false; @@ -3738,14 +3662,6 @@ AAMPStatusType StreamAbstractionAAMP_HLS::Init(TuneType tuneType) ts->fragmentURI.clear(); ts->enabled = false; } - //TODO: Extend auxiliary audio support for fragmented mp4 asset in future - else if (eMEDIATYPE_AUX_AUDIO == iTrack) - { - AAMPLOG_WARN("StreamAbstractionAAMP_HLS::Auxiliary audio not supported for FORMAT_ISO_BMFF, disabling!"); - ts->streamOutputFormat = FORMAT_INVALID; - ts->fragmentURI.clear(); - ts->enabled = false; - } else { ts->streamOutputFormat = FORMAT_ISO_BMFF; @@ -3848,44 +3764,6 @@ AAMPStatusType StreamAbstractionAAMP_HLS::Init(TuneType tuneType) } continue; //no playcontext config for subtitle } - else if (eMEDIATYPE_AUX_AUDIO == iTrack) - { - if (this->rate == AAMP_NORMAL_PLAY_RATE) - { - if (format == FORMAT_MPEGTS) - { - AAMPLOG_WARN("Configure auxiliary audio TS track demuxing"); - ts->playContext = std::make_shared(aamp, eStreamOp_DEMUX_AUX, mID3Handler); - ts->SourceFormat(FORMAT_MPEGTS); - if (ts->playContext) - { - ts->playContext->setRate(this->rate, PlayMode_normal); - ts->playContext->setThrottleEnable(false); - playContextConfigured = true; - } - else - { - ts->streamOutputFormat = format; - } - } - else if (FORMAT_INVALID != format) - { - AAMPLOG_WARN("Configure auxiliary audio format based on extension"); - ts->streamOutputFormat = format; - } - else - { - AAMPLOG_WARN("Keeping auxiliary audio format from playlist"); - } - } - else - { - AAMPLOG_WARN("Disable auxiliary audio format - trick play"); - ts->streamOutputFormat = FORMAT_INVALID; - ts->fragmentURI.clear(); - ts->enabled = false; - } - } else if (eMEDIATYPE_AUDIO == iTrack) { if (this->rate == AAMP_NORMAL_PLAY_RATE) @@ -3942,12 +3820,7 @@ AAMPStatusType StreamAbstractionAAMP_HLS::Init(TuneType tuneType) if (FORMAT_INVALID != format) { ts->streamOutputFormat = format; - // Check if auxiliary audio is muxed here, by confirming streamOutputFormat != FORMAT_INVALID - if (!aux->enabled && (aux->streamOutputFormat != FORMAT_INVALID) && (AAMP_NORMAL_PLAY_RATE == rate)) - { - ts->demuxOp = eStreamOp_DEMUX_VIDEO_AND_AUX; - } - else if ((trackState[eTRACK_AUDIO]->enabled) || (AAMP_NORMAL_PLAY_RATE != rate)) + if ((trackState[eTRACK_AUDIO]->enabled) || (AAMP_NORMAL_PLAY_RATE != rate)) { ts->demuxOp = eStreamOp_DEMUX_VIDEO; } @@ -3977,8 +3850,7 @@ AAMPStatusType StreamAbstractionAAMP_HLS::Init(TuneType tuneType) } AAMPLOG_WARN("StreamAbstractionAAMP_HLS::Init : Configure video TS track demuxing demuxOp %d", ts->demuxOp); ts->playContext = std::make_shared(aamp, ts->demuxOp, mID3Handler, eMEDIATYPE_VIDEO, - std::static_pointer_cast (trackState[eMEDIATYPE_AUDIO]->playContext).get(), - std::static_pointer_cast(trackState[eMEDIATYPE_AUX_AUDIO]->playContext).get()); + std::static_pointer_cast (trackState[eMEDIATYPE_AUDIO]->playContext).get()); ts->SourceFormat(FORMAT_MPEGTS); if(ts->playContext) @@ -4129,7 +4001,6 @@ AAMPStatusType StreamAbstractionAAMP_HLS::Init(TuneType tuneType) audio->playTarget = 0; video->playTarget = 0; subtitle->playTarget = 0; - aux->playTarget = 0; aamp->NotifyOnEnteringLive(); aamp->mDisableRateCorrection = false; } @@ -4152,7 +4023,6 @@ AAMPStatusType StreamAbstractionAAMP_HLS::Init(TuneType tuneType) audio->playTarget = 0; video->playTarget = 0; subtitle->playTarget = 0; - aux->playTarget = 0; if (eTUNETYPE_SEEK == tuneType) { aamp->NotifyOnEnteringLive(); @@ -4168,8 +4038,6 @@ AAMPStatusType StreamAbstractionAAMP_HLS::Init(TuneType tuneType) audio->fragmentURI.clear(); subtitle->eosReached = true; subtitle->fragmentURI.clear(); - aux->eosReached = true; - aux->fragmentURI.clear(); AAMPLOG_WARN("StreamAbstractionAAMP_HLS: seek target out of range, mark EOS. playTarget:%f End:%f. ", video->playTarget.inSeconds(), seekWindowEnd.inSeconds()); @@ -4178,11 +4046,9 @@ AAMPStatusType StreamAbstractionAAMP_HLS::Init(TuneType tuneType) } } - // in case of muxed a/v and auxiliary track scenario // For demuxed a/v, we will handle it in SyncTracks...() function - if (audio->enabled || aux->enabled) + if (audio->enabled) { - TrackState *other = audio->enabled ? audio : aux; if (!aamp->IsLive()) { retval = SyncTracksForDiscontinuity(); @@ -4196,7 +4062,7 @@ AAMPStatusType StreamAbstractionAAMP_HLS::Init(TuneType tuneType) if(!ISCONFIGSET(eAAMPConfig_AudioOnlyPlayback)) { auto count = video->mDiscontinuityIndex.size(); - if (!liveAdjust && count>0 && count == other->mDiscontinuityIndex.size() ) + if (!liveAdjust && count>0 && count == audio->mDiscontinuityIndex.size() ) { // FIXME SyncTracksForDiscontinuity(); } @@ -4232,7 +4098,7 @@ AAMPStatusType StreamAbstractionAAMP_HLS::Init(TuneType tuneType) // b) Set to minimum value among video /audio instead of setting to 0 position AampTime offsetToLiveVideo{}, offsetToLiveAudio{}, offsetToLive{}; offsetToLiveVideo = offsetToLiveAudio = video->mDuration - offsetFromLive.inSeconds() - video->playTargetOffset; - //TODO: Handle case for muxed a/v and aux track + //TODO: Handle case for muxed a/v track if (audio->enabled) { offsetToLiveAudio = 0; @@ -4256,16 +4122,11 @@ AAMPStatusType StreamAbstractionAAMP_HLS::Init(TuneType tuneType) subtitle->playTarget += offsetToLive; subtitle->playTargetBufferCalc = subtitle->playTarget; } - if (aux->enabled) - { - aux->playTarget += offsetToLive; - aux->playTargetBufferCalc = aux->playTarget; - } // Entering live will happen if offset is adjusted , if its 0 playback is starting from beginning if(offsetToLive != 0.0) mIsAtLivePoint = true; - AAMPLOG_WARN("aamp: after live adjust - V-target %f A-target %f S-target %f Aux-target %f offsetFromLive %f offsetToLive %f offsetVideo[%f] offsetAudio[%f] AtLivePoint[%d]", - video->playTarget.inSeconds(), audio->playTarget.inSeconds(), subtitle->playTarget.inSeconds(), aux->playTarget.inSeconds(), offsetFromLive.inSeconds(), offsetToLive.inSeconds(),offsetToLiveVideo.inSeconds(),offsetToLiveAudio.inSeconds(),mIsAtLivePoint); + AAMPLOG_WARN("aamp: after live adjust - V-target %f A-target %f S-target %f offsetFromLive %f offsetToLive %f offsetVideo[%f] offsetAudio[%f] AtLivePoint[%d]", + video->playTarget.inSeconds(), audio->playTarget.inSeconds(), subtitle->playTarget.inSeconds(), offsetFromLive.inSeconds(), offsetToLive.inSeconds(),offsetToLiveVideo.inSeconds(),offsetToLiveAudio.inSeconds(),mIsAtLivePoint); } else { @@ -4277,13 +4138,12 @@ AAMPStatusType StreamAbstractionAAMP_HLS::Init(TuneType tuneType) } /*Adjust for discontinuity*/ - if ((audio->enabled || aux->enabled) && (aamp->IsLive()) && !ISCONFIGSET(eAAMPConfig_AudioOnlyPlayback)) - { - TrackState *otherTrack = audio->enabled ? audio : aux; + if ((audio->enabled) && (aamp->IsLive()) && !ISCONFIGSET(eAAMPConfig_AudioOnlyPlayback)) + { auto discontinuityIndexCount = video->mDiscontinuityIndex.size(); if (discontinuityIndexCount > 0) { - if (discontinuityIndexCount == otherTrack->mDiscontinuityIndex.size()) + if (discontinuityIndexCount == audio->mDiscontinuityIndex.size()) { if (liveAdjust) { @@ -4308,12 +4168,12 @@ AAMPStatusType StreamAbstractionAAMP_HLS::Init(TuneType tuneType) audioNextDiscontinuity = videoNextDiscontinuity; } if ((videoNextDiscontinuity > (video->playTarget + 5)) - && (audioNextDiscontinuity > (otherTrack->playTarget + 5))) + && (audioNextDiscontinuity > (audio->playTarget + 5))) { AAMPLOG_WARN( "StreamAbstractionAAMP_HLS: video->playTarget %f videoPrevDiscontinuity %f videoNextDiscontinuity %f", video->playTarget.inSeconds(), videoPrevDiscontinuity.inSeconds(), videoNextDiscontinuity.inSeconds()); AAMPLOG_WARN( "StreamAbstractionAAMP_HLS: %s->playTarget %f audioPrevDiscontinuity %f audioNextDiscontinuity %f", - otherTrack->name, otherTrack->playTarget.inSeconds(), audioPrevDiscontinuity.inSeconds(), audioNextDiscontinuity.inSeconds()); + audio->name, audio->playTarget.inSeconds(), audioPrevDiscontinuity.inSeconds(), audioNextDiscontinuity.inSeconds()); if (video->playTarget < videoPrevDiscontinuity) { AAMPLOG_WARN( "StreamAbstractionAAMP_HLS: [video] playTarget(%f) advance to discontinuity(%f)", @@ -4321,12 +4181,12 @@ AAMPStatusType StreamAbstractionAAMP_HLS::Init(TuneType tuneType) video->playTarget = videoPrevDiscontinuity; video->playTargetBufferCalc = video->playTarget; } - if (otherTrack->playTarget < audioPrevDiscontinuity) + if (audio->playTarget < audioPrevDiscontinuity) { AAMPLOG_WARN( "StreamAbstractionAAMP_HLS: [%s] playTarget(%f) advance to discontinuity(%f)", - otherTrack->name, otherTrack->playTarget.inSeconds(), audioPrevDiscontinuity.inSeconds()); - otherTrack->playTarget = audioPrevDiscontinuity; - otherTrack->playTargetBufferCalc = otherTrack->playTarget; + audio->name, audio->playTarget.inSeconds(), audioPrevDiscontinuity.inSeconds()); + audio->playTarget = audioPrevDiscontinuity; + audio->playTargetBufferCalc = audio->playTarget; } break; } @@ -4337,7 +4197,7 @@ AAMPStatusType StreamAbstractionAAMP_HLS::Init(TuneType tuneType) else { AAMPLOG_WARN("StreamAbstractionAAMP_HLS: videoPeriodPositionIndex.size %zu audioPeriodPositionIndex.size %zu", - video->mDiscontinuityIndex.size(), otherTrack->mDiscontinuityIndex.size()); + video->mDiscontinuityIndex.size(), audio->mDiscontinuityIndex.size()); } } else @@ -4349,7 +4209,6 @@ AAMPStatusType StreamAbstractionAAMP_HLS::Init(TuneType tuneType) audio->lastPlaylistDownloadTimeMS = aamp_GetCurrentTimeMS(); video->lastPlaylistDownloadTimeMS = audio->lastPlaylistDownloadTimeMS; subtitle->lastPlaylistDownloadTimeMS = audio->lastPlaylistDownloadTimeMS; - aux->lastPlaylistDownloadTimeMS = audio->lastPlaylistDownloadTimeMS; /*Use start timestamp as zero when audio is not elementary stream*/ mStartTimestampZero = ((video->streamOutputFormat == FORMAT_ISO_BMFF || audio->streamOutputFormat == FORMAT_ISO_BMFF) || (rate == AAMP_NORMAL_PLAY_RATE && (!audio->enabled || audio->playContext))); @@ -4532,10 +4391,6 @@ void StreamAbstractionAAMP_HLS::InitTracks() { trackName = "audio"; } - else if (eTRACK_AUX_AUDIO == iTrack) - { - trackName = "aux-audio"; - } trackState[iTrack] = new TrackState((TrackType)iTrack, this, aamp, trackName, mID3Handler, mPtsOffsetUpdate); TrackState *ts = trackState[iTrack]; ts->playlistPosition = -1; @@ -4548,24 +4403,6 @@ void StreamAbstractionAAMP_HLS::InitTracks() ts->streamOutputFormat = FORMAT_INVALID; continue; } - if (iTrack == eTRACK_AUX_AUDIO) - { - if (!aamp->IsAuxiliaryAudioEnabled()) - { - AAMPLOG_INFO("StreamAbstractionAAMP_HLS::auxiliary audio disabled"); - ts->enabled = false; - ts->streamOutputFormat = FORMAT_INVALID; - continue; - } - else if (aamp->GetAuxiliaryAudioLanguage() == aamp->mAudioTuple.language) - { - AAMPLOG_INFO("StreamAbstractionAAMP_HLS::auxiliary audio same as primary audio, set forward audio flag"); - ts->enabled = false; - ts->streamOutputFormat = FORMAT_INVALID; - SetAudioFwdToAuxStatus(true); - continue; - } - } std::string uri = GetPlaylistURI((TrackType)iTrack, ts->streamOutputFormat); if( !uri.empty() ) { @@ -5209,11 +5046,10 @@ void StreamAbstractionAAMP_HLS::Stop(bool clearChannelData) /*************************************************************************** * @brief Function to get stream format ***************************************************************************/ -void StreamAbstractionAAMP_HLS::GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &auxOutputFormat, StreamOutputFormat &subOutputFormat) +void StreamAbstractionAAMP_HLS::GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &subOutputFormat) { primaryOutputFormat = trackState[eMEDIATYPE_VIDEO]->streamOutputFormat; audioOutputFormat = trackState[eMEDIATYPE_AUDIO]->streamOutputFormat; - auxOutputFormat = trackState[eMEDIATYPE_AUX_AUDIO]->streamOutputFormat; subOutputFormat = trackState[eMEDIATYPE_SUBTITLE]->streamOutputFormat; } /*************************************************************************** @@ -5895,11 +5731,6 @@ void TrackState::FetchPlaylist() bucketId = PROFILE_BUCKET_PLAYLIST_SUBTITLE; mType = eMEDIATYPE_PLAYLIST_SUBTITLE; } - else if (type == eTRACK_AUX_AUDIO) - { - bucketId = PROFILE_BUCKET_PLAYLIST_AUXILIARY; - mType = eMEDIATYPE_PLAYLIST_AUX_AUDIO; - } int iCurrentRate = aamp->rate; // Store it as back up, As sometimes by the time File is downloaded, rate might have changed due to user initiated Trick-Play AampCurlInstance dnldCurlInstance = aamp->GetPlaylistCurlInstance(mType , true); @@ -6406,10 +6237,6 @@ bool TrackState::FetchInitFragmentHelper(int &http_code, bool forcePushEncrypted { actualType = eMEDIATYPE_INIT_SUBTITLE; } - else if (eTRACK_AUX_AUDIO == type) - { - actualType = eMEDIATYPE_INIT_AUX_AUDIO; - } #ifdef CHECK_PERFORMANCE long long ts_start, ts_end; @@ -7377,11 +7204,7 @@ int StreamAbstractionAAMP_HLS::GetMediaIndexForLanguage(std::string lang, TrackT if(streamInfo != nullptr) { - if (type == eTRACK_AUX_AUDIO) - { - group = streamInfo->audio.c_str(); - } - else if (type == eTRACK_SUBTITLE) + if (type == eTRACK_SUBTITLE) { group = streamInfo->subtitles.c_str(); } @@ -7424,7 +7247,7 @@ StreamOutputFormat StreamAbstractionAAMP_HLS::GetStreamOutputFormatForTrack(Trac { map = GetVideoFormatForCodec(streamInfo->codecs.c_str()); } - else if ((type == eTRACK_AUDIO) || (type == eTRACK_AUX_AUDIO)) + else if (type == eTRACK_AUDIO) { map = GetAudioFormatForCodec(streamInfo->codecs.c_str()); } @@ -7434,7 +7257,7 @@ StreamOutputFormat StreamAbstractionAAMP_HLS::GetStreamOutputFormatForTrack(Trac format = map->format; AAMPLOG_WARN("StreamAbstractionAAMP_HLS::Track[%d] format is %d [%s]", type, map->format, map->codec); } - else if ((type == eTRACK_AUDIO) || (type == eTRACK_AUX_AUDIO)) + else if (type == eTRACK_AUDIO) { // HACK AAMPLOG_WARN("StreamAbstractionAAMP_HLS::assuming stereo"); format = FORMAT_AUDIO_ES_AAC; diff --git a/fragmentcollector_hls.h b/fragmentcollector_hls.h index 387f74d96..e9ee0101a 100644 --- a/fragmentcollector_hls.h +++ b/fragmentcollector_hls.h @@ -744,11 +744,10 @@ class StreamAbstractionAAMP_HLS : public StreamAbstractionAAMP * * @param[out] primaryOutputFormat video format * @param[out] audioOutputFormat audio format - * @param[out] auxOutputFormat auxiliary audio format * @param[out] subFormat subtitle format * @return void ***************************************************************************/ - void GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &auxOutputFormat, StreamOutputFormat &subOutputFormat) override; + void GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &subOutputFormat) override; /*************************************************************************** * @fn GetStreamPosition * @brief Function to return current playing position of stream @@ -988,7 +987,7 @@ class StreamAbstractionAAMP_HLS : public StreamAbstractionAAMP ***************************************************************************/ StreamOutputFormat GetStreamOutputFormatForTrack(TrackType type); /*************************************************************************** - * @brief Function to get output format for audio/aux track + * @brief Function to get output format for audio track * *************************************************************************/ StreamOutputFormat GetStreamOutputFormatForAudio(void); @@ -1002,7 +1001,7 @@ class StreamAbstractionAAMP_HLS : public StreamAbstractionAAMP /*************************************************************************** - * @brief Function to get output format for audio/aux track + * @brief Function to get output format for audio track * *************************************************************************/ void InitiateDrmProcess(); diff --git a/fragmentcollector_mpd.cpp b/fragmentcollector_mpd.cpp index 06faa00cf..3e799448d 100644 --- a/fragmentcollector_mpd.cpp +++ b/fragmentcollector_mpd.cpp @@ -532,8 +532,6 @@ static AampMediaType MediaTypeToPlaylist( AampMediaType mediaType ) return eMEDIATYPE_PLAYLIST_AUDIO; case eMEDIATYPE_SUBTITLE: return eMEDIATYPE_PLAYLIST_SUBTITLE; - case eMEDIATYPE_AUX_AUDIO: - return eMEDIATYPE_PLAYLIST_AUX_AUDIO; case eMEDIATYPE_IFRAME: return eMEDIATYPE_PLAYLIST_IFRAME; default: @@ -565,7 +563,6 @@ static AampCurlInstance getCurlInstanceByMediaType(AampMediaType type) default: instance = eCURLINSTANCE_VIDEO; break; - // what about eMEDIATYPE_AUX_AUDIO? } return instance; @@ -6827,20 +6824,7 @@ void StreamAbstractionAAMP_MPD::StreamSelection( bool newTune, bool forceSpeedsC //if isFrstAvailableTxtTrackSelected is true, we should look for the best option (aamp->mSubLanguage) among all the tracks if (AAMP_NORMAL_PLAY_RATE == mPlayRate) { - if (eMEDIATYPE_AUX_AUDIO == i && aamp->IsAuxiliaryAudioEnabled()) - { - if (aamp->GetAuxiliaryAudioLanguage() == aamp->mAudioTuple.language) - { - AAMPLOG_WARN("PrivateStreamAbstractionMPD: auxiliary audio same as primary audio, set forward audio flag"); - SetAudioFwdToAuxStatus(true); - break; - } - else if (IsMatchingLanguageAndMimeType((AampMediaType)i, aamp->GetAuxiliaryAudioLanguage(), adaptationSet, selRepresentationIndex) == true) - { - selAdaptationSetIndex = iAdaptationSet; - } - } - else if (eMEDIATYPE_AUDIO == i) + if (eMEDIATYPE_AUDIO == i) { selAdaptationSetIndex = audioAdaptationSetIndex; selRepresentationIndex = audioRepresentationIndex; @@ -6950,18 +6934,6 @@ void StreamAbstractionAAMP_MPD::StreamSelection( bool newTune, bool forceSpeedsC AAMPLOG_MIL("StreamAbstractionAAMP_MPD: Media[%s] %s", GetMediaTypeName(AampMediaType(i)), pMediaStreamContext->enabled?"enabled":"disabled"); - //This is for cases where subtitle is not enabled, but auxiliary audio track is enabled - if (eMEDIATYPE_AUX_AUDIO == i && pMediaStreamContext->enabled && !mMediaStreamContext[eMEDIATYPE_SUBTITLE]->enabled) - { - AAMPLOG_WARN("PrivateStreamAbstractionMPD: Auxiliary enabled, but subtitle disabled, swap MediaStreamContext of both"); - mMediaStreamContext[eMEDIATYPE_SUBTITLE]->enabled = mMediaStreamContext[eMEDIATYPE_AUX_AUDIO]->enabled; - mMediaStreamContext[eMEDIATYPE_SUBTITLE]->adaptationSetIdx = mMediaStreamContext[eMEDIATYPE_AUX_AUDIO]->adaptationSetIdx; - mMediaStreamContext[eMEDIATYPE_SUBTITLE]->representationIndex = mMediaStreamContext[eMEDIATYPE_AUX_AUDIO]->representationIndex; - mMediaStreamContext[eMEDIATYPE_SUBTITLE]->mediaType = eMEDIATYPE_AUX_AUDIO; - mMediaStreamContext[eMEDIATYPE_SUBTITLE]->type = eTRACK_AUX_AUDIO; - mMediaStreamContext[eMEDIATYPE_SUBTITLE]->profileChanged = true; - mMediaStreamContext[eMEDIATYPE_AUX_AUDIO]->enabled = false; - } if( aamp->IsLocalAAMPTsbFromConfig() && aamp->IsIframeExtractionEnabled()) { @@ -10478,7 +10450,7 @@ StreamOutputFormat GetSubtitleFormat(std::string mimeType) * @brief Get output format of stream. * */ -void StreamAbstractionAAMP_MPD::GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &auxOutputFormat, StreamOutputFormat &subtitleOutputFormat) +void StreamAbstractionAAMP_MPD::GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &subtitleOutputFormat) { if(mMediaStreamContext[eMEDIATYPE_VIDEO] && mMediaStreamContext[eMEDIATYPE_VIDEO]->enabled ) { @@ -10496,22 +10468,11 @@ void StreamAbstractionAAMP_MPD::GetStreamFormat(StreamOutputFormat &primaryOutpu { audioOutputFormat = FORMAT_INVALID; } - //if subtitle is disabled, but aux is enabled, then its status is saved in place of eMEDIATYPE_SUBTITLE - if ((mMediaStreamContext[eMEDIATYPE_AUX_AUDIO] && mMediaStreamContext[eMEDIATYPE_AUX_AUDIO]->enabled) || - (mMediaStreamContext[eMEDIATYPE_SUBTITLE] && mMediaStreamContext[eMEDIATYPE_SUBTITLE]->enabled && mMediaStreamContext[eMEDIATYPE_SUBTITLE]->type == eTRACK_AUX_AUDIO)) - { - auxOutputFormat = FORMAT_ISO_BMFF; - } - else - { - auxOutputFormat = FORMAT_INVALID; - } - //TODO - check whether the ugly hack above is in operation - // This is again a dirty hack, the check for PTS restamp enabled. TODO: We need to remove this in future + // The check for PTS restamp enabled is a hack. // For cases where subtitles is enabled mid-playback, we need to configure the pipeline at the beginning. FORMAT_SUBTITLE_MP4 will be set - if (mMediaStreamContext[eMEDIATYPE_SUBTITLE] && - mMediaStreamContext[eMEDIATYPE_SUBTITLE]->type != eTRACK_AUX_AUDIO) + // TODO: We need to remove this in future + if (mMediaStreamContext[eMEDIATYPE_SUBTITLE]) { if (mMediaStreamContext[eMEDIATYPE_SUBTITLE]->enabled || ISCONFIGSET(eAAMPConfig_EnablePTSReStamp)) { diff --git a/fragmentcollector_mpd.h b/fragmentcollector_mpd.h index 21d8f132b..703b283da 100644 --- a/fragmentcollector_mpd.h +++ b/fragmentcollector_mpd.h @@ -158,10 +158,9 @@ class StreamAbstractionAAMP_MPD : public StreamAbstractionAAMP * @fn GetStreamFormat * @param[out] primaryOutputFormat - format of primary track * @param[out] audioOutputFormat - format of audio track - * @param[out] auxOutputFormat - format of aux audio track * @param[out] subtitleOutputFormat - format of subtitle track */ - void GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &auxOutputFormat, StreamOutputFormat &subtitleOutputFormat) override; + void GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &subtitleOutputFormat) override; /** * @fn GetStreamPosition */ diff --git a/fragmentcollector_progressive.cpp b/fragmentcollector_progressive.cpp index 5940f0c2c..424137847 100644 --- a/fragmentcollector_progressive.cpp +++ b/fragmentcollector_progressive.cpp @@ -256,11 +256,10 @@ void StreamAbstractionAAMP_PROGRESSIVE::Stop(bool clearChannelData) /** * @brief Get output format of stream. */ -void StreamAbstractionAAMP_PROGRESSIVE::GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &auxAudioOutputFormat, StreamOutputFormat &subtitleOutputFormat) +void StreamAbstractionAAMP_PROGRESSIVE::GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &subtitleOutputFormat) { primaryOutputFormat = FORMAT_ISO_BMFF; audioOutputFormat = FORMAT_INVALID; - auxAudioOutputFormat = FORMAT_INVALID; subtitleOutputFormat = FORMAT_INVALID; } diff --git a/fragmentcollector_progressive.h b/fragmentcollector_progressive.h index 1c5b73e42..0eba37086 100644 --- a/fragmentcollector_progressive.h +++ b/fragmentcollector_progressive.h @@ -81,10 +81,9 @@ class StreamAbstractionAAMP_PROGRESSIVE : public StreamAbstractionAAMP * @fn GetStreamFormat * @param[out] primaryOutputFormat - format of primary track * @param[out] audioOutputFormat - format of audio track - * @param[out] auxOutputFormat - format of aux audio track * @param[out] subtitleOutputFormat - format of subtitle track */ - void GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &auxOutputFormat, StreamOutputFormat &subtitleOutputFormat) override; + void GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &subtitleOutputFormat) override; /** * @fn GetStreamPosition * diff --git a/jsbindings/jsbindings.cpp b/jsbindings/jsbindings.cpp index 1d2747582..500562a72 100644 --- a/jsbindings/jsbindings.cpp +++ b/jsbindings/jsbindings.cpp @@ -4131,42 +4131,6 @@ static JSValueRef AAMP_setLicenseCaching(JSContextRef context, JSObjectRef funct return JSValueMakeUndefined(context); } -/** - * @brief Callback invoked from JS to set auxiliary audio language - * @param[in] context JS execution context - * @param[in] function JSObject that is the function being called - * @param[in] thisObject JSObject that is the 'this' variable in the function's scope - * @param[in] argumentCount number of args - * @param[in] arguments[] JSValue array of args - * @param[out] exception pointer to a JSValueRef in which to return an exception, if any - * @retval JSValue that is the function's return value - */ -static JSValueRef AAMP_setAuxiliaryLanguage(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef *exception) -{ - LOG_TRACE("Enter"); - AAMP_JS* pAAMP = (AAMP_JS*)JSObjectGetPrivate(thisObject); - if(!pAAMP) - { - LOG_ERROR_EX("JSObjectGetPrivate returned NULL!"); - *exception = aamp_GetException(context, AAMPJS_MISSING_OBJECT, "Can only call AAMP.setAuxiliaryLanguage on instances of AAMP"); - return JSValueMakeUndefined(context); - } - - if (argumentCount != 1) - { - LOG_ERROR(pAAMP,"InvalidArgument: argumentCount=%zu, expected: 1", argumentCount); - *exception = aamp_GetException(context, AAMPJS_INVALID_ARGUMENT, "Failed to execute 'AAMP.setAuxiliaryLanguage' - 1 argument required"); - } - else - { - char* lang = aamp_JSValueToCString(context, arguments[0], exception); - LOG_WARN(pAAMP," _aamp->SetAuxiliaryLanguage(%s)", lang); - pAAMP->_aamp->SetAuxiliaryLanguage(lang); - SAFE_DELETE_ARRAY(lang); - } - return JSValueMakeUndefined(context); -} - /** * @brief Callback invoked from JS to get playback stats * @param[in] context JS execution context @@ -4354,7 +4318,6 @@ static const JSStaticFunction AAMP_staticfunctions[] = { "getTextStyleOptions", AAMP_getTextStyleOptions, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, { "setLanguageFormat", AAMP_setLanguageFormat, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, { "setLicenseCaching", AAMP_setLicenseCaching, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, - { "setAuxiliaryLanguage", AAMP_setAuxiliaryLanguage, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, { "getPlaybackStatistics", AAMP_getPlaybackStats, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, { "setContentProtectionDataConfig", AAMP_setContentProtectionDataConfig, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, { "setContentProtectionDataUpdateTimeout", AAMP_setContentProtectionDataUpdateTimeout, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, diff --git a/jsbindings/jsmediaplayer.cpp b/jsbindings/jsmediaplayer.cpp index 3586144b4..7ab60db30 100644 --- a/jsbindings/jsmediaplayer.cpp +++ b/jsbindings/jsmediaplayer.cpp @@ -3301,45 +3301,6 @@ JSValueRef AAMPMediaPlayerJS_enableContentRestrictions (JSContextRef ctx, JSObje return JSValueMakeUndefined(ctx); } -/** - * @brief API invoked from JS when executing AAMPMediaPlayer.setAuxiliaryLanguage() - * @param[in] ctx JS execution context - * @param[in] function JSObject that is the function being called - * @param[in] thisObject JSObject that is the 'this' variable in the function's scope - * @param[in] argumentCount number of args - * @param[in] arguments[] JSValue array of args - * @param[out] exception pointer to a JSValueRef in which to return an exception, if any - * @retval JSValue that is the function's return value - */ -static JSValueRef AAMPMediaPlayerJS_setAuxiliaryLanguage(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef *exception) -{ - LOG_TRACE("Enter"); - bool bRet = false; - AAMPMediaPlayer_JS* privObj = (AAMPMediaPlayer_JS*)JSObjectGetPrivate(thisObject); - if(!privObj || !privObj->_aamp) - { - LOG_ERROR_EX("JSObjectGetPrivate returned NULL!"); - *exception = aamp_GetException(ctx, AAMPJS_MISSING_OBJECT, "Can only call setAuxiliaryLanguage() on instances of AAMPPlayer"); - } - else - { - if (argumentCount == 1) - { - const char *lang = aamp_JSValueToCString(ctx, arguments[0], NULL); - LOG_WARN(privObj,"_aamp->SetAuxiliaryLanguage(%s)",lang); - privObj->_aamp->SetAuxiliaryLanguage(std::string(lang)); - bRet = true; - SAFE_DELETE_ARRAY(lang); - } - else - { - LOG_ERROR(privObj,"InvalidArgument - argumentCount=%zu, expected: 1", argumentCount); - *exception = aamp_GetException(ctx, AAMPJS_INVALID_ARGUMENT, "Failed to execute setAuxiliaryLanguage() - 1 argument required"); - } - } - LOG_TRACE("Exit"); - return JSValueMakeBoolean(ctx, bRet); -} /** * @brief API invoked from JS when executing AAMPMediaPlayer.getPlaybackStats() * @param[in] ctx JS execution context @@ -3670,7 +3631,6 @@ static const JSStaticFunction AAMPMediaPlayer_JS_static_functions[] = { { "setPreferredAudioLanguage", AAMPMediaPlayerJS_setPreferredAudioLanguage, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly}, { "setPreferredTextLanguage", AAMPMediaPlayerJS_setPreferredTextLanguage, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly}, { "setPreferredAudioCodec", AAMPMediaPlayerJS_setPreferredAudioCodec, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly}, - { "setAuxiliaryLanguage", AAMPMediaPlayerJS_setAuxiliaryLanguage, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, { "getPlaybackStatistics", AAMPMediaPlayerJS_getPlaybackStats, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, { "setContentProtectionDataConfig", AAMPMediaPlayerJS_setContentProtectionDataConfig, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, { "setContentProtectionDataUpdateTimeout", AAMPMediaPlayerJS_setContentProtectionDataUpdateTimeout, kJSPropertyAttributeDontDelete | kJSPropertyAttributeReadOnly }, diff --git a/main_aamp.cpp b/main_aamp.cpp index d3a351f8c..5afd991b9 100755 --- a/main_aamp.cpp +++ b/main_aamp.cpp @@ -657,7 +657,7 @@ void PlayerInstanceAAMP::SetRateInternal(float rate,int overshootcorrection) StreamSink *sink = AampStreamSinkManager::GetInstance().GetStreamSink(aamp); if (sink) { - sink->Configure(aamp->mVideoFormat, aamp->mAudioFormat, aamp->mAuxFormat, aamp->mSubtitleFormat, aamp->mpStreamAbstractionAAMP->GetESChangeStatus(), aamp->mpStreamAbstractionAAMP->GetAudioFwdToAuxStatus()); + sink->Configure(aamp->mVideoFormat, aamp->mAudioFormat, aamp->mSubtitleFormat, aamp->mpStreamAbstractionAAMP->GetESChangeStatus()); aamp->ResumeDownloads(); //To make sure that the playback resumes after a player switch if player was in paused state before being at background aamp->mpStreamAbstractionAAMP->StartInjection(); sink->Stream(); @@ -3224,67 +3224,6 @@ std::string PlayerInstanceAAMP::GetAAMPConfig() return jsonStr; } -/** - * @brief Set auxiliary language - */ -void PlayerInstanceAAMP::SetAuxiliaryLanguage(const std::string &language) -{ - if(mAsyncTuneEnabled) - { - - mScheduler.ScheduleTask(AsyncTaskObj([language](void *data) - { - PlayerInstanceAAMP *instance = static_cast(data); - instance->SetAuxiliaryLanguageInternal(language); - }, (void *)this , __FUNCTION__)); - } - else - { - SetAuxiliaryLanguageInternal(language); - } - -} - -/** - * @brief Set auxiliary track language. - */ -void PlayerInstanceAAMP::SetAuxiliaryLanguageInternal(const std::string &language) -{ // note: this feature available only on bluetooth enabled devices - if( aamp ) - { - UsingPlayerId playerId(aamp->mPlayerId); - std::string currentLanguage = aamp->GetAuxiliaryAudioLanguage(); - AAMPLOG_WARN("aamp_SetAuxiliaryLanguage(%s)->(%s)", currentLanguage.c_str(), language.c_str()); - if(language != currentLanguage) - { - - AAMPPlayerState state = aamp->GetState(); - // There is no active playback session, save the language for later - if (state == eSTATE_IDLE || state == eSTATE_RELEASED) - { - aamp->SetAuxiliaryLanguage(language); - } - // check if language is supported in manifest languagelist - else if((aamp->IsAudioLanguageSupported(language.c_str())) || (!aamp->mMaxLanguageCount)) - { - aamp->SetAuxiliaryLanguage(language); - if (aamp->mpStreamAbstractionAAMP) - { - AAMPLOG_WARN("aamp_SetAuxiliaryLanguage(%s) retuning", language.c_str()); - - aamp->discardEnteringLiveEvt = true; - - aamp->seek_pos_seconds = aamp->GetPositionSeconds(); - aamp->TeardownStream(false); - aamp->TuneHelper(eTUNETYPE_SEEK); - - aamp->discardEnteringLiveEvt = false; - } - } - } - } -} - /** * @brief Set License Custom Data */ diff --git a/main_aamp.h b/main_aamp.h index de4e38e84..03cb031b9 100644 --- a/main_aamp.h +++ b/main_aamp.h @@ -1348,14 +1348,6 @@ class PlayerInstanceAAMP */ void SetRepairIframes(bool configState); - /** - * @fn SetAuxiliaryLanguage - * - * @param[in] language - auxiliary language - * @return void - */ - void SetAuxiliaryLanguage(const std::string &language); - /** * @fn SetLicenseCustomData * @@ -1465,12 +1457,6 @@ class PlayerInstanceAAMP * @return void */ void SetAudioTrackInternal(std::string language, std::string rendition, std::string codec, std::string type, unsigned int channel, std::string label); - /** - * @fn SetAuxiliaryLanguageInternal - * @param[in][optional] language - * @return void - */ - void SetAuxiliaryLanguageInternal(const std::string &language); /** * @fn SetTextTrackInternal * @param[in] trackId diff --git a/middleware/GstUtils.h b/middleware/GstUtils.h index cffd05f0a..fd8e0bc4b 100644 --- a/middleware/GstUtils.h +++ b/middleware/GstUtils.h @@ -26,7 +26,7 @@ * @enum GstMediaType * @brief Media types * - * @note Please maintain the order video, audio, subtitle, and aux_audio in future. + * @note Please maintain the order video, audio and subtitle in future. * This order is to be maintained across fragment, init, and playlist media types. * These enums are used in a lot of calculations in AAMP code and breaking the order will bring a lot of issues. * This order is also followed in other enums like AampCurlInstance and TrackType. @@ -36,18 +36,15 @@ enum GstMediaType eGST_MEDIATYPE_VIDEO, /**< Type video */ eGST_MEDIATYPE_AUDIO, /**< Type audio */ eGST_MEDIATYPE_SUBTITLE, /**< Type subtitle */ - eGST_MEDIATYPE_AUX_AUDIO, /**< Type auxiliary audio */ eGST_MEDIATYPE_MANIFEST, /**< Type manifest */ eGST_MEDIATYPE_LICENCE, /**< Type license */ eGST_MEDIATYPE_IFRAME, /**< Type iframe */ eGST_MEDIATYPE_INIT_VIDEO, /**< Type video init fragment */ eGST_MEDIATYPE_INIT_AUDIO, /**< Type audio init fragment */ eGST_MEDIATYPE_INIT_SUBTITLE, /**< Type subtitle init fragment */ - eGST_MEDIATYPE_INIT_AUX_AUDIO, /**< Type auxiliary audio init fragment */ eGST_MEDIATYPE_PLAYLIST_VIDEO, /**< Type video playlist */ eGST_MEDIATYPE_PLAYLIST_AUDIO, /**< Type audio playlist */ eGST_MEDIATYPE_PLAYLIST_SUBTITLE, /**< Type subtitle playlist */ - eGST_MEDIATYPE_PLAYLIST_AUX_AUDIO, /**< Type auxiliary audio playlist */ eGST_MEDIATYPE_PLAYLIST_IFRAME, /**< Type Iframe playlist */ eGST_MEDIATYPE_INIT_IFRAME, /**< Type IFRAME init fragment */ eGST_MEDIATYPE_DSM_CC, /**< Type digital storage media command and control (DSM-CC) */ diff --git a/middleware/InterfacePlayerPriv.h b/middleware/InterfacePlayerPriv.h index 6006c7ff6..470a5ebb9 100755 --- a/middleware/InterfacePlayerPriv.h +++ b/middleware/InterfacePlayerPriv.h @@ -42,7 +42,7 @@ #include "GstUtils.h" #define GST_ELEMENT_GET_STATE_RETRY_CNT_MAX 5 -#define GST_TRACK_COUNT 4 /**< internal use - audio+video+sub+aux track */ +#define GST_TRACK_COUNT 3 /**< internal use - audio+video+sub track */ #define VIDEO_COORDINATES_SIZE 32 #define GST_TASK_ID_INVALID 0 #define GST_NORMAL_PLAY_RATE 1 @@ -221,7 +221,6 @@ struct GstPlayerPriv int decodeErrorCBCount; /**< Total decode error cb received within threshold time */ bool progressiveBufferingEnabled; bool progressiveBufferingStatus; - bool forwardAudioBuffers; /**< flag denotes if audio buffers to be forwarded to aux pipeline */ bool enableSEITimeCode; /**< Enables SEI Time Code handling */ bool firstVideoFrameReceived; /**< flag that denotes if first video frame was notified. */ bool firstAudioFrameReceived; /**< flag that denotes if first audio frame was notified */ @@ -302,13 +301,5 @@ class InterfacePlayerPriv * @ret TRUE if override is enabled, FALSE otherwise */ gboolean SendQtDemuxOverrideEvent(int mediaType, GstClockTime pts, bool enablePTSReStamp, int vodTrickModeFPS, const void *ptr = nullptr, size_t len = 0); - - /** - * @fn ForwardBuffersToAuxPipeline - * - * @param[in] buffer - input buffer to be forwarded - */ - void ForwardBuffersToAuxPipeline(GstBuffer *buffer, bool pauseInjector, void *user_data); - }; #endif diff --git a/middleware/InterfacePlayerRDK.cpp b/middleware/InterfacePlayerRDK.cpp index 1466ccf42..1f253c153 100644 --- a/middleware/InterfacePlayerRDK.cpp +++ b/middleware/InterfacePlayerRDK.cpp @@ -131,7 +131,7 @@ paused(false), pipelineState(GST_STATE_NULL), firstVideoFrameDisplayedCallbackTask("FirstVideoFrameDisplayedCallback"), firstTuneWithWesterosSinkOff(false), decodeErrorMsgTimeMS(0), decodeErrorCBCount(0), -progressiveBufferingEnabled(false), progressiveBufferingStatus(false), forwardAudioBuffers(false), +progressiveBufferingEnabled(false), progressiveBufferingStatus(false), enableSEITimeCode(true), firstVideoFrameReceived(false), firstAudioFrameReceived(false), NumberOfTracks(0), playbackQuality{}, filterAudioDemuxBuffers(false), aSyncControl(), syncControl(), callbackControl(), seekPosition(0) @@ -212,18 +212,15 @@ const char *gstGetMediaTypeName(GstMediaType mediaType) "video",//eMEDIATYPE_VIDEO "audio",//eMEDIATYPE_AUDIO "text",//eMEDIATYPE_SUBTITLE - "aux_audio",//eMEDIATYPE_AUX_AUDIO "manifest",//eMEDIATYPE_MANIFEST "licence",//eMEDIATYPE_LICENCE "iframe",//eMEDIATYPE_IFRAME "init_video",//eMEDIATYPE_INIT_VIDEO "init_audio",//eMEDIATYPE_INIT_AUDIO "init_text",//eMEDIATYPE_INIT_SUBTITLE - "init_aux_audio",//eMEDIATYPE_INIT_AUX_AUDIO "playlist_video",//eMEDIATYPE_PLAYLIST_VIDEO "playlist_audio",//eMEDIATYPE_PLAYLIST_AUDIO "playlist_text",//eMEDIATYPE_PLAYLIST_SUBTITLE - "playlist_aux_audio",//eMEDIATYPE_PLAYLIST_AUX_AUDIO "playlist_iframe",//eMEDIATYPE_PLAYLIST_IFRAME "init_iframe",//eMEDIATYPE_INIT_IFRAME "dsm_cc",//eMEDIATYPE_DSM_CC @@ -245,10 +242,8 @@ static GstStateChangeReturn SetStateWithWarnings(GstElement *element, GstState t * @brief Configures the GStreamer pipeline. * @param format Video format. * @param audioFormat Audio format. - * @param auxFormat Auxiliary format. * @param subFormat Whether subtitle format is enabled. * @param bESChangeStatus Whether ES change status is enabled. - * @param forwardAudioToAux Whether audio should be forwarded to the auxiliary output. * @param setReadyAfterPipelineCreation Whether to set the player as ready after pipeline creation. * @param isSubEnable Whether subtitles are enabled. * @param trackId Track ID. @@ -256,14 +251,13 @@ static GstStateChangeReturn SetStateWithWarnings(GstElement *element, GstState t * @param pipelineName Pipeline name. * @param PipelinePriority Pipeline priority. */ -void InterfacePlayerRDK::ConfigurePipeline(int format, int audioFormat, int auxFormat, - int subFormat, bool bESChangeStatus, bool forwardAudioToAux, bool setReadyAfterPipelineCreation, +void InterfacePlayerRDK::ConfigurePipeline(int format, int audioFormat, int subFormat, + bool bESChangeStatus, bool setReadyAfterPipelineCreation, bool isSubEnable, int32_t trackId, gint rate, const char *pipelineName, int PipelinePriority, bool FirstFrameFlag, std::string manifestUrl) { mFirstFrameRequired = FirstFrameFlag; GstStreamOutputFormat gstFormat = static_cast(format); GstStreamOutputFormat gstAudioFormat = static_cast(audioFormat); - GstStreamOutputFormat gstAuxFormat = static_cast(auxFormat); GstStreamOutputFormat gstSubFormat = static_cast(subFormat); GstStreamOutputFormat newFormat[GST_TRACK_COUNT]; @@ -283,19 +277,6 @@ void InterfacePlayerRDK::ConfigurePipeline(int format, int audioFormat, int auxF newFormat[eGST_MEDIATYPE_SUBTITLE]=GST_FORMAT_INVALID; } - /*Enable sending of audio data to the auxiliary output*/ - if(forwardAudioToAux) - { - MW_LOG_MIL("InterfacePlayerRDK: Override auxFormat %d -> %d", auxFormat, audioFormat); - interfacePlayerPriv->gstPrivateContext->forwardAudioBuffers = true; - newFormat[eGST_MEDIATYPE_AUX_AUDIO] = gstAudioFormat; - } - else - { - interfacePlayerPriv->gstPrivateContext->forwardAudioBuffers = false; - newFormat[eGST_MEDIATYPE_AUX_AUDIO] = gstAuxFormat; - } - if(!(m_gstConfigParam->useWesterosSink)) { interfacePlayerPriv->gstPrivateContext->using_westerossink = false; @@ -888,7 +869,7 @@ static void GstPlayer_SignalEOS(GstPlayerPriv* gstPrivateContext) if(gstPrivateContext && gstPrivateContext->pipeline) { - for(int mediaType=eGST_MEDIATYPE_VIDEO; mediaType<=eGST_MEDIATYPE_AUX_AUDIO; mediaType++) + for(int mediaType=eGST_MEDIATYPE_VIDEO; mediaType<=eGST_MEDIATYPE_SUBTITLE; mediaType++) { GstPlayer_SignalEOS(gstPrivateContext->stream[mediaType]); } @@ -1714,7 +1695,7 @@ static GstMediaType gstGetMediaTypeForSource(const void *source, const void *_t InterfacePlayerPriv* privatePlayer = pInterfacePlayerRDK->GetPrivatePlayer(); for (int i = 0; i < GST_TRACK_COUNT; i++) { - /* eMEDIATYPE_VIDEO, eMEDIATYPE_AUDIO, eMEDIATYPE_SUBTITLE, eMEDIATYPE_AUX_AUDIO */ + /* eMEDIATYPE_VIDEO, eMEDIATYPE_AUDIO, eMEDIATYPE_SUBTITLE */ if (source == privatePlayer->gstPrivateContext->stream[i].source) { return static_cast(i); @@ -1810,7 +1791,7 @@ void InterfacePlayerRDK::InitializeSourceForPlayer(void *PlayerInstance, void * g_object_set(source, "handle-segment-change", TRUE, NULL); } } - else if (eGST_MEDIATYPE_AUDIO == mediaType || eGST_MEDIATYPE_AUX_AUDIO == mediaType) + else if (eGST_MEDIATYPE_AUDIO == mediaType) { int MaxGstAudioBufBytes = m_gstConfigParam->audioBufBytes; @@ -1908,7 +1889,6 @@ static void GstPlayer_OnDemuxPadAddedCb(GstElement* demux, GstPad* newPad, void* } MW_LOG_TRACE("mask %u",mask); // We need to identify which stream the demux belongs to. - // We can't use a CAPS based check, for use-cases such as aux-audio GstElement *parent = GST_ELEMENT_PARENT(demux); bool found = false; while (parent) @@ -2007,11 +1987,6 @@ static void gst_found_source(GObject * object, GObject * orig, GParamSpec * pspe MW_LOG_MIL("Found source for audio"); mediaType = eGST_MEDIATYPE_AUDIO; } - else if (object == G_OBJECT(privatePlayer->gstPrivateContext->stream[eGST_MEDIATYPE_AUX_AUDIO].sinkbin)) - { - MW_LOG_MIL("Found source for auxiliary audio"); - mediaType = eGST_MEDIATYPE_AUX_AUDIO; - } else if(object == G_OBJECT(privatePlayer->gstPrivateContext->stream[eGST_MEDIATYPE_SUBTITLE].sinkbin)) { MW_LOG_MIL("Found source for subtitle"); @@ -2031,14 +2006,11 @@ static void gst_found_source(GObject * object, GObject * orig, GParamSpec * pspe } static void callback_element_added (GstElement * element, GstElement * source, gpointer data) { + // TODO: Check if this is needed InterfacePlayerRDK * pInterfacePlayerRDK = (InterfacePlayerRDK*)data; InterfacePlayerPriv* privatePlayer = pInterfacePlayerRDK->GetPrivatePlayer(); HANDLER_CONTROL_HELPER_CALLBACK_VOID(); MW_LOG_INFO("callback_element_added: %s",GST_ELEMENT_NAME(source)); - if (element == privatePlayer->gstPrivateContext->stream[eGST_MEDIATYPE_AUX_AUDIO].sinkbin) - { - privatePlayer->socInterface->SetAudioRoutingProperties(source); - } } /** * @brief callback when the source has been created @@ -2367,23 +2339,6 @@ int InterfacePlayerRDK::SetupStream(int streamId, void *playerInstance, std::st } } #endif - - if (eGST_MEDIATYPE_AUX_AUDIO == streamId) - { - // We need to route audio through audsrvsink - GstElement *audiosink = gst_element_factory_make("audsrvsink", NULL); /* Creates a new element of "audsrvsink" type and returns a new GstElement */ - g_object_set(audiosink, "session-type", 2, NULL); - g_object_set(audiosink, "session-name", "btSAP", NULL); - g_object_set(audiosink, "session-private", TRUE, NULL); - - g_object_set(stream->sinkbin, "audio-sink", audiosink, NULL); /* In the stream->sinkbin, set the audio-sink property to audiosink */ - if (privatePlayer->socInterface->RequiredElementSetup()) - { - privatePlayer->SignalConnect(stream->sinkbin, "element-setup", G_CALLBACK(callback_element_added), this); - } - - MW_LOG_MIL("using audsrvsink"); - } } gst_bin_add(GST_BIN(interfacePlayerPriv->gstPrivateContext->pipeline), stream->sinkbin); /* Add the stream sink to the pipeline */ @@ -2559,14 +2514,6 @@ gboolean InterfacePlayerPriv::SendQtDemuxOverrideEvent(int mediaType, GstClockTi return enableOverride; } -/** - * @brief Check if audio buffers to be forwarded or not - */ -bool InterfacePlayerRDK::ForwardAudioBuffersToAux() -{ - return (interfacePlayerPriv->gstPrivateContext->forwardAudioBuffers && interfacePlayerPriv->gstPrivateContext->stream[eGST_MEDIATYPE_AUX_AUDIO].format != GST_FORMAT_INVALID); -} - /** * @brief Get the video rectangle co-ordinates */ @@ -2951,42 +2898,6 @@ bool InterfacePlayerRDK::WaitForSourceSetup(int mediaType) return ret; } -/** - * @brief Forward buffer to aux pipeline - */ -void InterfacePlayerPriv::ForwardBuffersToAuxPipeline(GstBuffer *buffer, bool pauseInjector, void *user_data) -{ - gst_media_stream *stream = &gstPrivateContext->stream[eGST_MEDIATYPE_AUX_AUDIO]; - InterfacePlayerRDK *instance = static_cast(user_data); - if (!stream->sourceConfigured && stream->format != GST_FORMAT_INVALID) - { - bool status = instance->WaitForSourceSetup((int)eGST_MEDIATYPE_AUX_AUDIO); - if (pauseInjector && !status) - { - // Buffer is not owned by us, no need to free - return; - } - } - - GstBuffer *fwdBuffer = gst_buffer_new(); - if (fwdBuffer != NULL) - { - if (FALSE == gst_buffer_copy_into(fwdBuffer, buffer, GST_BUFFER_COPY_ALL, 0, -1)) - { - MW_LOG_ERR("Error while copying audio buffer to auxiliary buffer!!"); - gst_buffer_unref(fwdBuffer); - return; - } - //MW_LOG_TRACE("Forward audio buffer to auxiliary pipeline!!"); - GstFlowReturn ret = gst_app_src_push_buffer(GST_APP_SRC(stream->source), fwdBuffer); - if (ret != GST_FLOW_OK) - { - MW_LOG_ERR("gst_app_src_push_buffer error: %d[%s] mediaType %d", ret, gst_flow_get_name (ret), (int)eGST_MEDIATYPE_AUX_AUDIO); - assert(false); - } - } -} - bool InterfacePlayerRDK::HandleVideoBufferSent() { bool isFirstBuffer = (interfacePlayerPriv->gstPrivateContext->numberOfVideoBuffersSent == 0); @@ -3043,11 +2954,6 @@ bool InterfacePlayerRDK::SendHelper(int type, const void *ptr, size_t len, doubl int enableGstQuery = m_gstConfigParam->enableGstPosQuery; interfacePlayerPriv->SendGstEvents((int)mediaType, pts, enableGstQuery, m_gstConfigParam->enablePTSReStamp, m_gstConfigParam->vodTrickModeFPS); - if (mediaType == eGST_MEDIATYPE_AUDIO && ForwardAudioBuffersToAux()) - { - interfacePlayerPriv->SendGstEvents((int)eGST_MEDIATYPE_AUX_AUDIO, pts, enableGstQuery, m_gstConfigParam->enablePTSReStamp, m_gstConfigParam->vodTrickModeFPS); - } - // included to fix av sync / trickmode speed issues // Also add check for trick-play on 1st frame. if( interfacePlayerPriv->gstPrivateContext->video_sink && @@ -3126,10 +3032,6 @@ bool InterfacePlayerRDK::SendHelper(int type, const void *ptr, size_t len, doubl if (bPushBuffer) { - if (mediaType == eGST_MEDIATYPE_AUDIO && ForwardAudioBuffersToAux()) - { - interfacePlayerPriv->ForwardBuffersToAuxPipeline(buffer, mPauseInjector, this); - } if( mediaType<2 && m_gstConfigParam->useMp4Demux && !copy /* avoid using this path for hls/ts */ ) { diff --git a/middleware/InterfacePlayerRDK.h b/middleware/InterfacePlayerRDK.h index be891ac1d..b9cae61ea 100644 --- a/middleware/InterfacePlayerRDK.h +++ b/middleware/InterfacePlayerRDK.h @@ -330,10 +330,8 @@ class InterfacePlayerRDK * @brief Configures the GStreamer pipeline. * @param format Video format. * @param audioFormat Audio format. - * @param auxFormat Auxiliary format. * @param subFormat Whether subtitle format is enabled. * @param bESChangeStatus Whether ES change status is enabled. - * @param forwardAudioToAux Whether audio should be forwarded to the auxiliary output. * @param setReadyAfterPipelineCreation Whether to set the player as ready after pipeline creation. * @param isSubEnable Whether subtitles are enabled. * @param trackId Track ID. @@ -341,18 +339,12 @@ class InterfacePlayerRDK * @param pipelineName Pipeline name. * @param PipelinePriority Pipeline priority. */ - void ConfigurePipeline(int, int, int, int, bool, bool, bool, bool, int32_t, gint, const char *, int, bool, std::string url); + void ConfigurePipeline(int, int, int, bool, bool, bool, int32_t, gint, const char *, int, bool, std::string url); /** * @brief Enables or disables pausing on playback start. * @param enable True to enable pausing, false to disable. */ void SetPauseOnStartPlayback(bool enable); - /** - * @fn ForwardAudioBuffersToAux - * - * @return bool - true if audio to be forwarded - */ - bool ForwardAudioBuffersToAux(); /** * @brief Flush the track playbin * @param[in] pos - position to seek to after flush diff --git a/middleware/drm/HlsDrmBase.h b/middleware/drm/HlsDrmBase.h index 87158b875..5d0bf6795 100644 --- a/middleware/drm/HlsDrmBase.h +++ b/middleware/drm/HlsDrmBase.h @@ -40,7 +40,6 @@ typedef enum DRM_PROFILE_BUCKET_DECRYPT_VIDEO, /**< Video decryption bucket*/ DRM_PROFILE_BUCKET_DECRYPT_AUDIO, /**< Audio decryption bucket*/ DRM_PROFILE_BUCKET_DECRYPT_SUBTITLE, /**< Subtitle decryption bucket*/ - DRM_PROFILE_BUCKET_DECRYPT_AUXILIARY, /**< Auxiliary decryption bucket*/ DRM_PROFILE_BUCKET_LA_TOTAL, /**< License acquisition total bucket*/ DRM_PROFILE_BUCKET_LA_PREPROC, /**< License acquisition pre-processing bucket*/ diff --git a/middleware/drm/PlayerHlsDrmSessionInterfaceBase.h b/middleware/drm/PlayerHlsDrmSessionInterfaceBase.h index 24d7fe830..98cc652a7 100644 --- a/middleware/drm/PlayerHlsDrmSessionInterfaceBase.h +++ b/middleware/drm/PlayerHlsDrmSessionInterfaceBase.h @@ -36,7 +36,6 @@ enum DrmMediaType eDRM_MEDIATYPE_VIDEO, /**< Type video */ eDRM_MEDIATYPE_AUDIO, /**< Type audio */ eDRM_MEDIATYPE_SUBTITLE, /**< Type subtitle */ - eDRM_MEDIATYPE_AUX_AUDIO, /**< Type auxiliary audio */ eDRM_MEDIATYPE_DEFAULT /**< Type unknown */ }; diff --git a/middleware/test/utests/tests/GstPlayer/FunctionalTests.cpp b/middleware/test/utests/tests/GstPlayer/FunctionalTests.cpp index 90f653fa1..a5b400df5 100644 --- a/middleware/test/utests/tests/GstPlayer/FunctionalTests.cpp +++ b/middleware/test/utests/tests/GstPlayer/FunctionalTests.cpp @@ -81,9 +81,7 @@ class GstPlayerTests : public ::testing::Test /* Table with different parameter sets to be passed into mAAMPGstPlayer->Configure(...) */ typedef struct { - GstStreamOutputFormat auxFormat; bool bESChangeStatus; - bool forwardAudioToAux; bool setReadyAfterPipelineCreation; bool enableRectangleProperty; bool usingWesteros; @@ -218,11 +216,6 @@ class GstPlayerTests : public ::testing::Test } EXPECT_CALL(*g_mockGStreamer, gst_element_factory_make(_, NULL)) .WillRepeatedly(Return(&gst_element_bin)); - if (setup->forwardAudioToAux) - { - EXPECT_CALL(*g_mockGStreamer, gst_element_factory_make(StrEq("audsrvsink"), NULL)) - .WillOnce(Return(&gst_element_audsrvsink)); - } if (setup->usingRialto) { @@ -249,10 +242,8 @@ class GstPlayerTests : public ::testing::Test mInterfaceGstPlayer->ConfigurePipeline(GST_FORMAT_VIDEO_ES_H264, GST_FORMAT_AUDIO_ES_AAC, - setup->auxFormat, GST_FORMAT_SUBTITLE_WEBVTT, setup->bESChangeStatus, - setup->forwardAudioToAux, setup->setReadyAfterPipelineCreation, false, 0, GST_NORMAL_PLAY_RATE, "testPipeline", 0, false, "testManifest"); @@ -335,9 +326,7 @@ TEST_F(GstPlayerTests, Constructor) // typedef struct // { -// GstStreamOutputFormat auxFormat; // bool bESChangeStatus; -// bool forwardAudioToAux; // bool setReadyAfterPipelineCreation; // bool enableRectangleProperty; // bool usingWesteros; @@ -346,11 +335,12 @@ TEST_F(GstPlayerTests, Constructor) static GstPlayerTests::Config_Params tbl[] = { // focus on Rialto only - {GST_FORMAT_INVALID, false, false, false, false, false, true }, -// {GST_FORMAT_INVALID, false, false, false, false, true, false }, -// {GST_FORMAT_INVALID, false, false, false, false, true, true }, -// {GST_FORMAT_INVALID, false, false, false, true, true, false }, -// {GST_FORMAT_AUDIO_ES_AC3, true, true, true, false, true, false } + {false, false, false, false, true }, + // Need to revisit them when uncommenting the below tests +// {false, false, false, true, false }, +// {false, false, false, true, true }, +// {false, false, true, true, false }, +// {true, true, false, true, false } }; // Parameter test class, for running same tests with different settings @@ -386,7 +376,7 @@ TEST_P(GstPlayerTestsP, SetAudioVolume) // Code under test - // Muted, and volume not set (note this is not the case for non-rialto AMLOGIC builds) + // Muted, and volume not set (note this is not the case for non-rialto on specific SOC builds) int volume = 0; EXPECT_CALL(*g_mockGLib, g_object_set(NotNull(), StrEq("mute"), Matcher(true))).Times(1); EXPECT_CALL(*g_mockGLib, g_object_set(NotNull(), StrEq("volume"), Matcher(_))).Times(0); diff --git a/middleware/test/utests/tests/InterfacePlayerTests/InterfacePlayerFunctionTests.cpp b/middleware/test/utests/tests/InterfacePlayerTests/InterfacePlayerFunctionTests.cpp index cd34729ad..e55875c90 100644 --- a/middleware/test/utests/tests/InterfacePlayerTests/InterfacePlayerFunctionTests.cpp +++ b/middleware/test/utests/tests/InterfacePlayerTests/InterfacePlayerFunctionTests.cpp @@ -119,13 +119,6 @@ class InterfacePlayerTests : public ::testing::Test }; -TEST_F(InterfacePlayerTests, ConfigurePipeline_WithAudioForwardToAux) -{ - g_mockGStreamer = nullptr; - mInterfaceGstPlayer->ConfigurePipeline(GST_FORMAT_INVALID, GST_FORMAT_INVALID, GST_FORMAT_INVALID, GST_FORMAT_INVALID, false, true, false, false, 0, GST_NORMAL_PLAY_RATE, "testPipeline", 0, false, "testManifest"); - EXPECT_EQ(mPlayerContext->forwardAudioBuffers, true); -} - TEST_F(InterfacePlayerTests, ConfigurePipeline_WithWesterosAndRealtoSink) { g_mockGStreamer = nullptr; @@ -974,24 +967,6 @@ TEST_F(InterfacePlayerTests, SendQtDemuxOverrideEvent_EnablePTSReStampTrue) EXPECT_FALSE(result); } -TEST_F(InterfacePlayerTests, ForwardAudioBuffersToAux_True) -{ - mPlayerContext->forwardAudioBuffers = true; - mPlayerContext->stream[eGST_MEDIATYPE_AUX_AUDIO].format = GST_FORMAT_ISO_BMFF; - - EXPECT_TRUE(mInterfaceGstPlayer->ForwardAudioBuffersToAux()); - - mPlayerContext->forwardAudioBuffers = false; - mPlayerContext->stream[eGST_MEDIATYPE_AUX_AUDIO].format = GST_FORMAT_ISO_BMFF; - - EXPECT_FALSE(mInterfaceGstPlayer->ForwardAudioBuffersToAux()); - - mPlayerContext->forwardAudioBuffers = true; - mPlayerContext->stream[eGST_MEDIATYPE_AUX_AUDIO].format = GST_FORMAT_INVALID; - - EXPECT_FALSE(mInterfaceGstPlayer->ForwardAudioBuffersToAux()); -} - TEST_F(InterfacePlayerTests, GetVideoRectangle) { std::string expectedRectangle = "0,0,1920,1080"; @@ -1371,41 +1346,6 @@ TEST_F(InterfacePlayerTests, WaitForSourceSetup_PauseInjector) EXPECT_FALSE(stream->sourceConfigured); } -TEST_F(InterfacePlayerTests, ForwardBuffersToAuxPipeline_WaitForSourceSetupFailed) -{ - GstBuffer buffer = {}; - gst_media_stream* stream = &mPlayerContext->stream[eGST_MEDIATYPE_AUX_AUDIO]; - stream->format = GST_FORMAT_ISO_BMFF; - stream->sourceConfigured = false; - - EXPECT_CALL(*g_mockGStreamer, gst_buffer_copy_into(_, _, _, _, _)).Times(0); - EXPECT_CALL(*g_mockGStreamer, gst_app_src_push_buffer(_, _)).Times(0); - - // Run the method - mInterfacePrivatePlayer->ForwardBuffersToAuxPipeline(&buffer, true, mInterfaceGstPlayer); -} - -TEST_F(InterfacePlayerTests, ForwardBuffersToAuxPipeline_PushBufferFailed) -{ - GstBuffer buffer = {}; - gst_media_stream* stream = &mPlayerContext->stream[eGST_MEDIATYPE_AUX_AUDIO]; - stream->sourceConfigured = true; - stream->format = GST_FORMAT_ISO_BMFF; - stream->source = &gst_element_pipeline; - - GstBuffer fwdBuffer = {}; - //assert(false) in source code causes premature exit which causes expect_call to fail - ON_CALL(*g_mockGStreamer, gst_buffer_new()) - .WillByDefault(Return(&fwdBuffer)); - ON_CALL(*g_mockGStreamer, gst_buffer_copy_into(_,_,_,_,_)) - .WillByDefault(Return(TRUE)); - ON_CALL(*g_mockGStreamer, gst_app_src_push_buffer(_,_)) - .WillByDefault(Return(GST_FLOW_ERROR)); - - //catches the assert(false) in the function - EXPECT_DEATH(mInterfacePrivatePlayer->ForwardBuffersToAuxPipeline(&buffer,true,mInterfaceGstPlayer), "Assertion"); -} - TEST_F(InterfacePlayerTests, HandleVideoBufferSent_SubsequentBuffer) { mPlayerContext->numberOfVideoBuffersSent = 5; diff --git a/middleware/vendor/SocInterface.h b/middleware/vendor/SocInterface.h index cdf88edb0..4f83a3c4b 100644 --- a/middleware/vendor/SocInterface.h +++ b/middleware/vendor/SocInterface.h @@ -397,15 +397,6 @@ class SocInterface */ virtual bool RequiredElementSetup(){return false;} - /** - * @brief Set audio routing properties on source. - * - * Sets audio routing properties on the given source element. - * - * @param source The source element. - */ - virtual void SetAudioRoutingProperties(GstElement *source){} - /** * @brief Check if first audio frame callback is set. * diff --git a/middleware/vendor/realtek/RealtekSocInterface.cpp b/middleware/vendor/realtek/RealtekSocInterface.cpp index d4c0af757..decf5a4fd 100644 --- a/middleware/vendor/realtek/RealtekSocInterface.cpp +++ b/middleware/vendor/realtek/RealtekSocInterface.cpp @@ -280,29 +280,6 @@ void RealtekSocInterface::SetFreerunThreshold(GstObject* src) } } -/** - * @brief Set audio routing properties on source. - * - * Sets audio routing properties on the given source element. - * - * @param source The source element. - */ -void RealtekSocInterface::SetAudioRoutingProperties(GstElement *source) -{ - if ((strstr(GST_ELEMENT_NAME(source), "omxaacdec") != NULL) || - (strstr(GST_ELEMENT_NAME(source), "omxac3dec") != NULL) || - (strstr(GST_ELEMENT_NAME(source), "omxeac3dec") != NULL) || - (strstr(GST_ELEMENT_NAME(source), "omxmp3dec") != NULL) || - (strstr(GST_ELEMENT_NAME(source), "omxvorbisdec") != NULL) || - (strstr(GST_ELEMENT_NAME(source), "omxac4dec") != NULL)) - { - g_object_set(source, "audio-tunnel-mode", FALSE, NULL ); - MW_LOG_INFO("callback_element_added audio-tunnel-mode FALSE"); - g_object_set(source, "aux-audio", TRUE, NULL ); - MW_LOG_INFO("callback_element_added aux-audio TRUE"); - } -} - /** * @brief Set playback flags. * diff --git a/middleware/vendor/realtek/RealtekSocInterface.h b/middleware/vendor/realtek/RealtekSocInterface.h index 50f2a651c..b59481b6a 100644 --- a/middleware/vendor/realtek/RealtekSocInterface.h +++ b/middleware/vendor/realtek/RealtekSocInterface.h @@ -240,15 +240,6 @@ class RealtekSocInterface : public SocInterface */ bool RequiredElementSetup()override{return true;} - /** - * @brief Set audio routing properties on source. - * - * Sets audio routing properties on the given source element. - * - * @param source The source element. - */ - void SetAudioRoutingProperties(GstElement *source)override; - /** * @brief Check if first audio frame callback is set. * diff --git a/ota_shim.cpp b/ota_shim.cpp index 40b4acbfe..caae8b25d 100644 --- a/ota_shim.cpp +++ b/ota_shim.cpp @@ -757,11 +757,10 @@ void StreamAbstractionAAMP_OTA::EnableContentRestrictions() /** * @brief Get output format of stream. */ -void StreamAbstractionAAMP_OTA::GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &auxAudioOutputFormat, StreamOutputFormat &subtitleOutputFormat) +void StreamAbstractionAAMP_OTA::GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &subtitleOutputFormat) { primaryOutputFormat = FORMAT_INVALID; audioOutputFormat = FORMAT_INVALID; - auxAudioOutputFormat = FORMAT_INVALID; subtitleOutputFormat = FORMAT_INVALID; } diff --git a/ota_shim.h b/ota_shim.h index 56b1f5c48..f832cf592 100644 --- a/ota_shim.h +++ b/ota_shim.h @@ -92,10 +92,9 @@ class StreamAbstractionAAMP_OTA : public StreamAbstractionAAMP * @fn GetStreamFormat * @param[out] primaryOutputFormat - format of primary track * @param[out] audioOutputFormat - format of audio track - * @param[out] auxOutputFormat - format of aux audio track * @param[out] subtitleOutputFormat - format of subtitle track */ - void GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &auxOutputFormat, StreamOutputFormat &subtitleOutputFormat) override; + void GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &subtitleOutputFormat) override; /** * @fn GetFirstPTS diff --git a/priv_aamp.cpp b/priv_aamp.cpp index b427d8995..75ce8365e 100644 --- a/priv_aamp.cpp +++ b/priv_aamp.cpp @@ -418,7 +418,6 @@ static MediaTypeTelemetry aamp_GetMediaTypeForTelemetry(AampMediaType type) case eMEDIATYPE_VIDEO: case eMEDIATYPE_AUDIO: case eMEDIATYPE_SUBTITLE: - case eMEDIATYPE_AUX_AUDIO: case eMEDIATYPE_IFRAME: ret = eMEDIATYPE_TELEMETRY_AVS; break; @@ -426,14 +425,12 @@ static MediaTypeTelemetry aamp_GetMediaTypeForTelemetry(AampMediaType type) case eMEDIATYPE_PLAYLIST_VIDEO: case eMEDIATYPE_PLAYLIST_AUDIO: case eMEDIATYPE_PLAYLIST_SUBTITLE: - case eMEDIATYPE_PLAYLIST_AUX_AUDIO: case eMEDIATYPE_PLAYLIST_IFRAME: ret = eMEDIATYPE_TELEMETRY_MANIFEST; break; case eMEDIATYPE_INIT_VIDEO: case eMEDIATYPE_INIT_AUDIO: case eMEDIATYPE_INIT_SUBTITLE: - case eMEDIATYPE_INIT_AUX_AUDIO: case eMEDIATYPE_INIT_IFRAME: ret = eMEDIATYPE_TELEMETRY_INIT; break; @@ -457,7 +454,6 @@ double PrivateInstanceAAMP::RecalculatePTS(AampMediaType mediaType, const void * timeScale = GetVidTimeScale(); break; case eMEDIATYPE_AUDIO: - case eMEDIATYPE_AUX_AUDIO: timeScale = GetAudTimeScale(); break; case eMEDIATYPE_SUBTITLE: @@ -1200,7 +1196,6 @@ PrivateInstanceAAMP::PrivateInstanceAAMP(AampConfig *config) : mReportProgressPo , mHarvestCountLimit(0) , mHarvestConfig(0) , mIsWVKIDWorkaround(false) - , mAuxFormat(FORMAT_INVALID), mAuxAudioLanguage() , mAbsoluteEndPosition(0), mIsLiveStream(false) , mbUsingExternalPlayer (false) , mCCId(0) @@ -3079,7 +3074,7 @@ bool PrivateInstanceAAMP::ProcessPendingDiscontinuity() if (!(DiscontinuitySeenInAllTracks())) { - AAMPLOG_ERR("PrivateInstanceAAMP: Discontinuity status of video - (%d), audio - (%d) and aux - (%d)", mProcessingDiscontinuity[eMEDIATYPE_VIDEO], mProcessingDiscontinuity[eMEDIATYPE_AUDIO], mProcessingDiscontinuity[eMEDIATYPE_AUX_AUDIO]); + AAMPLOG_ERR("PrivateInstanceAAMP: Discontinuity status of video - (%d), audio - (%d)", mProcessingDiscontinuity[eMEDIATYPE_VIDEO], mProcessingDiscontinuity[eMEDIATYPE_AUDIO]); UnblockWaitForDiscontinuityProcessToComplete(); return ret; // true so that PrivateInstanceAAMP_ProcessDiscontinuity can cleanup properly } @@ -3098,7 +3093,6 @@ bool PrivateInstanceAAMP::ProcessPendingDiscontinuity() ResetTrackDiscontinuityIgnoredStatus(); lastUnderFlowTimeMs[eMEDIATYPE_VIDEO] = 0; lastUnderFlowTimeMs[eMEDIATYPE_AUDIO] = 0; - lastUnderFlowTimeMs[eMEDIATYPE_AUX_AUDIO] = 0; { double newPosition = GetPositionSeconds(); @@ -3153,7 +3147,7 @@ bool PrivateInstanceAAMP::ProcessPendingDiscontinuity() // The same thread will be executing operations involving TeardownStream. mpStreamAbstractionAAMP->StopInjection(); - GetStreamFormat(mVideoFormat, mAudioFormat, mAuxFormat, mSubtitleFormat); + GetStreamFormat(mVideoFormat, mAudioFormat, mSubtitleFormat); StreamSink *sink = AampStreamSinkManager::GetInstance().GetStreamSink(this); if (sink) @@ -3161,10 +3155,8 @@ bool PrivateInstanceAAMP::ProcessPendingDiscontinuity() sink->Configure( mVideoFormat, mAudioFormat, - mAuxFormat, mSubtitleFormat, mpStreamAbstractionAAMP->GetESChangeStatus(), - mpStreamAbstractionAAMP->GetAudioFwdToAuxStatus(), mIsTrackIdMismatch /*setReadyAfterPipelineCreation*/); /* @@ -3581,11 +3573,9 @@ void PrivateInstanceAAMP::ResetProfileCache(void) profiler.ProfileReset(PROFILE_BUCKET_INIT_VIDEO); profiler.ProfileReset(PROFILE_BUCKET_INIT_AUDIO); profiler.ProfileReset(PROFILE_BUCKET_INIT_SUBTITLE); - profiler.ProfileReset(PROFILE_BUCKET_INIT_AUXILIARY); profiler.ProfileReset(PROFILE_BUCKET_FRAGMENT_VIDEO); profiler.ProfileReset(PROFILE_BUCKET_FRAGMENT_AUDIO); profiler.ProfileReset(PROFILE_BUCKET_FRAGMENT_SUBTITLE); - profiler.ProfileReset(PROFILE_BUCKET_FRAGMENT_AUXILIARY); } void PrivateInstanceAAMP::ActivatePlayer(void) { @@ -3803,7 +3793,7 @@ void PrivateInstanceAAMP::CurlTerm(AampCurlInstance startIdx, unsigned int insta assert (instanceEnd <= eCURLINSTANCE_MAX); if (ISCONFIGSET_PRIV(eAAMPConfig_EnableCurlStore) && \ - ( startIdx == eCURLINSTANCE_VIDEO ) && (eCURLINSTANCE_AUX_AUDIO < instanceEnd) ) + ( startIdx == eCURLINSTANCE_VIDEO ) && (eCURLINSTANCE_SUBTITLE < instanceEnd) ) { for(int i=0; iSetAudioVolume(volume); if (mbPlayEnabled) { - sink->Configure(mVideoFormat, mAudioFormat, mAuxFormat, mSubtitleFormat, mpStreamAbstractionAAMP->GetESChangeStatus(), mpStreamAbstractionAAMP->GetAudioFwdToAuxStatus()); + sink->Configure(mVideoFormat, mAudioFormat, mSubtitleFormat, mpStreamAbstractionAAMP->GetESChangeStatus()); } } else @@ -8656,14 +8640,6 @@ void PrivateInstanceAAMP::UpdateVideoEndMetrics(AampMediaType mediaType, BitsPer } break; - case eMEDIATYPE_PLAYLIST_AUX_AUDIO: - { - dataType = VideoStatDataType::VE_DATA_MANIFEST; - trackType = VideoStatTrackType::STAT_AUDIO; - audioIndex += mCurrentLanguageIndex; - } - break; - case eMEDIATYPE_PLAYLIST_IFRAME: { dataType = VideoStatDataType::VE_DATA_MANIFEST; @@ -8702,13 +8678,6 @@ void PrivateInstanceAAMP::UpdateVideoEndMetrics(AampMediaType mediaType, BitsPer } break; case eMEDIATYPE_AUDIO: - { - dataType = VideoStatDataType::VE_DATA_FRAGMENT; - trackType = VideoStatTrackType::STAT_AUDIO; - audioIndex += mCurrentLanguageIndex; - } - break; - case eMEDIATYPE_AUX_AUDIO: { dataType = VideoStatDataType::VE_DATA_FRAGMENT; trackType = VideoStatTrackType::STAT_AUDIO; @@ -8744,14 +8713,6 @@ void PrivateInstanceAAMP::UpdateVideoEndMetrics(AampMediaType mediaType, BitsPer } break; - case eMEDIATYPE_INIT_AUX_AUDIO: - { - dataType = VideoStatDataType::VE_DATA_INIT_FRAGMENT; - trackType = VideoStatTrackType::STAT_AUDIO; - audioIndex += mCurrentLanguageIndex; - } - break; - case eMEDIATYPE_SUBTITLE: { dataType = VideoStatDataType::VE_DATA_FRAGMENT; @@ -9610,9 +9571,6 @@ ProfilerBucketType PrivateInstanceAAMP::mediaType2Bucket(AampMediaType mediaType case eMEDIATYPE_SUBTITLE: pbt = PROFILE_BUCKET_FRAGMENT_SUBTITLE; break; - case eMEDIATYPE_AUX_AUDIO: - pbt = PROFILE_BUCKET_FRAGMENT_AUXILIARY; - break; case eMEDIATYPE_MANIFEST: pbt = PROFILE_BUCKET_MANIFEST; break; @@ -9625,9 +9583,6 @@ ProfilerBucketType PrivateInstanceAAMP::mediaType2Bucket(AampMediaType mediaType case eMEDIATYPE_INIT_SUBTITLE: pbt = PROFILE_BUCKET_INIT_SUBTITLE; break; - case eMEDIATYPE_INIT_AUX_AUDIO: - pbt = PROFILE_BUCKET_INIT_AUXILIARY; - break; case eMEDIATYPE_PLAYLIST_VIDEO: pbt = PROFILE_BUCKET_PLAYLIST_VIDEO; break; @@ -9637,9 +9592,6 @@ ProfilerBucketType PrivateInstanceAAMP::mediaType2Bucket(AampMediaType mediaType case eMEDIATYPE_PLAYLIST_SUBTITLE: pbt = PROFILE_BUCKET_PLAYLIST_SUBTITLE; break; - case eMEDIATYPE_PLAYLIST_AUX_AUDIO: - pbt = PROFILE_BUCKET_PLAYLIST_AUXILIARY; - break; default: pbt = (ProfilerBucketType)mediaType; break; @@ -11269,7 +11221,6 @@ void PrivateInstanceAAMP::ResetTrackDiscontinuityIgnoredStatus(void) mIsDiscontinuityIgnored[eTRACK_VIDEO] = false; mIsDiscontinuityIgnored[eTRACK_AUDIO] = false; mIsDiscontinuityIgnored[eTRACK_SUBTITLE] = false; - mIsDiscontinuityIgnored[eTRACK_AUX_AUDIO] = false; } /** @@ -11297,7 +11248,7 @@ bool PrivateInstanceAAMP::PipelineValid(AampMediaType track) /** * @brief Set stream format for audio/video tracks */ -void PrivateInstanceAAMP::SetStreamFormat(StreamOutputFormat videoFormat, StreamOutputFormat audioFormat, StreamOutputFormat auxFormat) +void PrivateInstanceAAMP::SetStreamFormat(StreamOutputFormat videoFormat, StreamOutputFormat audioFormat) { bool reconfigure = false; //AAMPLOG_MIL("Got format - videoFormat %d and audioFormat %d", videoFormat, audioFormat); @@ -11329,15 +11280,10 @@ void PrivateInstanceAAMP::SetStreamFormat(StreamOutputFormat videoFormat, Stream reconfigure = true; mAudioFormat = audioFormat; } - if (auxFormat != mAuxFormat && (mAuxFormat == FORMAT_INVALID || (mAuxFormat != FORMAT_UNKNOWN && auxFormat != FORMAT_UNKNOWN)) && auxFormat != FORMAT_INVALID) - { - reconfigure = true; - mAuxFormat = auxFormat; - } if (IsMuxedStream() && (mVideoComponentCount == 0 || mAudioComponentCount == 0)) //Can be a Muxed stream/Demuxed with either of audio or video-only stream { AAMPLOG_INFO(" TS Processing Done. Number of Audio Components : %d and Video Components : %d",mAudioComponentCount,mVideoComponentCount); - if (IsAudioOrVideoOnly(videoFormat, audioFormat, auxFormat)) + if (IsAudioOrVideoOnly(videoFormat, audioFormat)) { bool newTune = IsNewTune(); lock.unlock(); @@ -11357,7 +11303,7 @@ void PrivateInstanceAAMP::SetStreamFormat(StreamOutputFormat videoFormat, Stream StreamSink *sink = AampStreamSinkManager::GetInstance().GetStreamSink(this); if (sink) { - sink->Configure(mVideoFormat, mAudioFormat, mAuxFormat, mSubtitleFormat, false, mpStreamAbstractionAAMP->GetAudioFwdToAuxStatus()); + sink->Configure(mVideoFormat, mAudioFormat, mSubtitleFormat, false); } } } @@ -11366,7 +11312,7 @@ void PrivateInstanceAAMP::SetStreamFormat(StreamOutputFormat videoFormat, Stream * @brief To check for audio/video only Playback */ -bool PrivateInstanceAAMP::IsAudioOrVideoOnly(StreamOutputFormat videoFormat, StreamOutputFormat audioFormat, StreamOutputFormat auxFormat) +bool PrivateInstanceAAMP::IsAudioOrVideoOnly(StreamOutputFormat videoFormat, StreamOutputFormat audioFormat) { AAMPLOG_WARN("Old Stream format - videoFormat %d and audioFormat %d",mVideoFormat,mAudioFormat); bool ret = false; @@ -11384,10 +11330,6 @@ bool PrivateInstanceAAMP::IsAudioOrVideoOnly(StreamOutputFormat videoFormat, Str { mAudioFormat = audioFormat; } - else if (mAuxFormat != auxFormat && auxFormat == FORMAT_INVALID) - { - mAuxFormat = auxFormat; - } mVideoOnlyPb = true; AAMPLOG_INFO("Video-Only PlayBack"); ret = true; @@ -11503,14 +11445,6 @@ void PrivateInstanceAAMP::ReleaseStreamLock() mStreamLock.unlock(); } -/** - * @brief To check if auxiliary audio is enabled - */ -bool PrivateInstanceAAMP::IsAuxiliaryAudioEnabled(void) -{ - return !mAuxAudioLanguage.empty(); -} - /** * @brief Check if discontinuity processed in all tracks * @@ -11521,9 +11455,8 @@ bool PrivateInstanceAAMP::DiscontinuitySeenInAllTracks() // Split off the logical expression for better clarity bool vidDiscontinuity = (mVideoFormat == FORMAT_INVALID || mProcessingDiscontinuity[eMEDIATYPE_VIDEO]); bool audDiscontinuity = (mAudioFormat == FORMAT_INVALID || mProcessingDiscontinuity[eMEDIATYPE_AUDIO]); - bool auxDiscontinuity = (mAuxFormat == FORMAT_INVALID || mProcessingDiscontinuity[eMEDIATYPE_AUX_AUDIO]); - return (vidDiscontinuity && audDiscontinuity && auxDiscontinuity); + return (vidDiscontinuity && audDiscontinuity); } /** @@ -11535,9 +11468,8 @@ bool PrivateInstanceAAMP::DiscontinuitySeenInAnyTracks() // Split off the logical expression for better clarity bool vidDiscontinuity = (mVideoFormat != FORMAT_INVALID && mProcessingDiscontinuity[eMEDIATYPE_VIDEO]); bool audDiscontinuity = (mAudioFormat != FORMAT_INVALID && mProcessingDiscontinuity[eMEDIATYPE_AUDIO]); - bool auxDiscontinuity = (mAuxFormat != FORMAT_INVALID && mProcessingDiscontinuity[eMEDIATYPE_AUX_AUDIO]); - return (vidDiscontinuity || audDiscontinuity || auxDiscontinuity); + return (vidDiscontinuity || audDiscontinuity); } /** @@ -11547,7 +11479,6 @@ void PrivateInstanceAAMP::ResetDiscontinuityInTracks() { mProcessingDiscontinuity[eMEDIATYPE_VIDEO] = false; mProcessingDiscontinuity[eMEDIATYPE_AUDIO] = false; - mProcessingDiscontinuity[eMEDIATYPE_AUX_AUDIO] = false; } /** @@ -13164,8 +13095,7 @@ MediaStreamContext* PrivateInstanceAAMP::GetMediaStreamContext(AampMediaType typ if(mpStreamAbstractionAAMP && (type == eMEDIATYPE_VIDEO || type == eMEDIATYPE_AUDIO || - type == eMEDIATYPE_SUBTITLE || - type == eMEDIATYPE_AUX_AUDIO)) + type == eMEDIATYPE_SUBTITLE)) { MediaStreamContext* context = (MediaStreamContext*)mpStreamAbstractionAAMP->GetMediaTrack((TrackType)type); return context; @@ -14095,13 +14025,12 @@ double PrivateInstanceAAMP::GetFormatPositionOffsetInMSecs() * * @param[out] primaryOutputFormat - format of primary track * @param[out] audioOutputFormat - format of audio track - * @param[out] auxAudioOutputFormat - format of aux audio track * @param[out] subtitleOutputFormat - format of subtitle track * @return void */ -void PrivateInstanceAAMP::GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &auxAudioOutputFormat, StreamOutputFormat &subtitleOutputFormat) +void PrivateInstanceAAMP::GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &subtitleOutputFormat) { - mpStreamAbstractionAAMP->GetStreamFormat(primaryOutputFormat, audioOutputFormat, auxAudioOutputFormat, subtitleOutputFormat); + mpStreamAbstractionAAMP->GetStreamFormat(primaryOutputFormat, audioOutputFormat, subtitleOutputFormat); // Limiting the change to just Rialto, until the change has been tested on non-Rialto if (ISCONFIGSET_PRIV(eAAMPConfig_useRialtoSink) && @@ -14109,8 +14038,7 @@ void PrivateInstanceAAMP::GetStreamFormat(StreamOutputFormat &primaryOutputForma (rate != AAMP_NORMAL_PLAY_RATE)) { audioOutputFormat = FORMAT_INVALID; - auxAudioOutputFormat = FORMAT_INVALID; subtitleOutputFormat = FORMAT_INVALID; - AAMPLOG_TRACE("aamp->rate %f videoFormat %d audioFormat %d auxFormat %d subFormat %d", rate, primaryOutputFormat, audioOutputFormat, auxAudioOutputFormat, subtitleOutputFormat); + AAMPLOG_TRACE("aamp->rate %f videoFormat %d audioFormat %d subFormat %d", rate, primaryOutputFormat, audioOutputFormat, subtitleOutputFormat); } } diff --git a/priv_aamp.h b/priv_aamp.h index 73984a824..000a1ebce 100644 --- a/priv_aamp.h +++ b/priv_aamp.h @@ -893,7 +893,6 @@ class PrivateInstanceAAMP : public DrmCallbacks, public std::enable_shared_from_ StreamOutputFormat mVideoFormat; StreamOutputFormat mAudioFormat; StreamOutputFormat mPreviousAudioType; /**< Used to maintain previous audio type of HLS playback */ - StreamOutputFormat mAuxFormat; StreamOutputFormat mSubtitleFormat{FORMAT_UNKNOWN}; std::condition_variable_any mDownloadsDisabled; bool mDownloadsEnabled; @@ -3349,20 +3348,18 @@ class PrivateInstanceAAMP : public DrmCallbacks, public std::enable_shared_from_ * * @param[in] videoFormat - video stream format * @param[in] audioFormat - audio stream format - * @param[in] auxFormat - aux stream format * @return void */ - void SetStreamFormat(StreamOutputFormat videoFormat, StreamOutputFormat audioFormat, StreamOutputFormat auxFormat); + void SetStreamFormat(StreamOutputFormat videoFormat, StreamOutputFormat audioFormat); /** * @fn IsAudioOrVideoOnly * * @param[in] videoFormat - video stream format * @param[in] audioFormat - audio stream format - * @param[in] auxFormat - aux stream format * @return bool */ - bool IsAudioOrVideoOnly(StreamOutputFormat videoFormat, StreamOutputFormat audioFormat, StreamOutputFormat auxFormat); + bool IsAudioOrVideoOnly(StreamOutputFormat videoFormat, StreamOutputFormat audioFormat); /** * @fn DisableContentRestrictions @@ -3450,28 +3447,6 @@ class PrivateInstanceAAMP : public DrmCallbacks, public std::enable_shared_from_ */ void UpdateLiveOffset(); - /** - * @fn IsAuxiliaryAudioEnabled - * - * @return bool - true if aux audio is enabled - */ - bool IsAuxiliaryAudioEnabled(void); - - /** - * @brief Set auxiliary language - * - * @param[in] language - auxiliary language - * @return void - */ - void SetAuxiliaryLanguage(const std::string &language) { mAuxAudioLanguage = language; } - - /** - * @brief Get auxiliary language - * - * @return std::string auxiliary audio language - */ - std::string GetAuxiliaryAudioLanguage() { return mAuxAudioLanguage; } - /** * @fn GetPauseOnFirstVideoFrameDisp * @return bool @@ -4139,12 +4114,10 @@ class PrivateInstanceAAMP : public DrmCallbacks, public std::enable_shared_from_ * * @param[out] primaryOutputFormat - format of primary track * @param[out] audioOutputFormat - format of audio track - * @param[out] auxAudioOutputFormat - format of aux audio track * @param[out] subtitleOutputFormat - format of subtitle track * @return void */ - void GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &auxAudioOutputFormat, StreamOutputFormat &subtitleOutputFormat); - + void GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &subtitleOutputFormat); std::mutex mPausePositionMonitorMutex; // Mutex lock for PausePosition condition variable std::condition_variable mPausePositionMonitorCV; // Condition Variable to signal to stop PausePosition monitoring std::thread mPausePositionMonitoringThreadID; // Thread Id of the PausePositionMonitoring thread @@ -4211,7 +4184,6 @@ class PrivateInstanceAAMP : public DrmCallbacks, public std::enable_shared_from_ std::recursive_mutex mStreamLock; /**< Mutex for accessing mpStreamAbstractionAAMP */ int mHarvestCountLimit; /**< Harvest count */ int mHarvestConfig; /**< Harvest config */ - std::string mAuxAudioLanguage; /**< auxiliary audio language */ int mCCId; AampLLDashServiceData mAampLLDashServiceData; /**< Low Latency Service Configuration Data */ bool bLowLatencyServiceConfigured; diff --git a/rmf_shim.cpp b/rmf_shim.cpp index d77e349f0..8db66807c 100644 --- a/rmf_shim.cpp +++ b/rmf_shim.cpp @@ -304,11 +304,10 @@ void StreamAbstractionAAMP_RMF::EnableContentRestrictions() /** * @brief Get output format of stream. */ -void StreamAbstractionAAMP_RMF::GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &auxAudioOutputFormat, StreamOutputFormat &subtitleOutputFormat) +void StreamAbstractionAAMP_RMF::GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &subtitleOutputFormat) { primaryOutputFormat = FORMAT_INVALID; audioOutputFormat = FORMAT_INVALID; - auxAudioOutputFormat = FORMAT_INVALID; subtitleOutputFormat = FORMAT_INVALID; } diff --git a/rmf_shim.h b/rmf_shim.h index d2c3b7ae0..ab46d2dbc 100644 --- a/rmf_shim.h +++ b/rmf_shim.h @@ -93,10 +93,9 @@ class StreamAbstractionAAMP_RMF : public StreamAbstractionAAMP * @fn GetStreamFormat * @param[out] primaryOutputFormat - format of primary track * @param[out] audioOutputFormat - format of audio track - * @param[out] auxOutputFormat - format of aux audio track * @param[out] subtitleOutputFormat - format of subtitle track */ - void GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &auxOutputFormat, StreamOutputFormat &subtitleOutputFormat) override; + void GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &subtitleOutputFormat) override; /** * @fn GetStreamPosition * diff --git a/streamabstraction.cpp b/streamabstraction.cpp index 906f440f1..8537ef137 100644 --- a/streamabstraction.cpp +++ b/streamabstraction.cpp @@ -59,8 +59,6 @@ AampMediaType TrackTypeToMediaType( TrackType trackType ) return eMEDIATYPE_PLAYLIST_AUDIO; case eTRACK_SUBTITLE: return eMEDIATYPE_PLAYLIST_SUBTITLE; - case eTRACK_AUX_AUDIO: - return eMEDIATYPE_PLAYLIST_AUX_AUDIO; //case eTRACK_IFRAME: // return eMEDIATYPE_PLAYLIST_IFRAME; default: @@ -1775,10 +1773,6 @@ void MediaTrack::RunInjectLoop() { pContext->WaitForAudioTrackCatchup(); } - else if (eTRACK_AUX_AUDIO == type) - { - pContext->WaitForVideoTrackCatchupForAux(); - } } else { @@ -2097,7 +2091,6 @@ void StreamAbstractionAAMP::ReassessAndResumeAudioTrack(bool abort) { MediaTrack *audio = GetMediaTrack(eTRACK_AUDIO); MediaTrack *video = GetMediaTrack(eTRACK_VIDEO); - MediaTrack *aux = GetMediaTrack(eTRACK_AUX_AUDIO); if( audio && video ) { std::lock_guard guard(mLock); @@ -2107,20 +2100,12 @@ void StreamAbstractionAAMP::ReassessAndResumeAudioTrack(bool abort) { mCond.notify_one(); } - if (aux && aux->enabled) - { - double auxDuration = aux->GetTotalInjectedDuration(); - if (auxDuration < (videoDuration + (2 * video->fragmentDurationSeconds)) || !aamp->DownloadsAreEnabled() || video->IsDiscontinuityProcessed() || abort || video->IsAtEndOfTrack()) - { - mAuxCond.notify_one(); - } - } } } /** - * @brief Blocks aux track injection until caught up with video track. + * @brief Blocks audio track injection until caught up with video track. * Used internally by injection logic */ void StreamAbstractionAAMP::WaitForVideoTrackCatchup() @@ -2168,7 +2153,6 @@ StreamAbstractionAAMP::StreamAbstractionAAMP(PrivateInstanceAAMP* aamp, id3_call mRampDownLimit(-1), mRampDownCount(0),mABRMaxBuffer(0), mABRCacheLength(0), mABRMinBuffer(0), mABRNwConsistency(0), mBitrateReason(eAAMP_BITRATE_CHANGE_BY_TUNE), mAudioTrackIndex(), mTextTrackIndex(), - mAuxCond(), mFwdAudioToAux(false), mAudioTracksAll(), mTextTracksAll(), mTsbMaxBitrateProfileIndex(-1),mUpdateReason(false), mPTSOffset(0.0), @@ -3506,11 +3490,6 @@ bool StreamAbstractionAAMP::ProcessDiscontinuity(TrackType type) { state = eDISCONTINUITY_IN_AUDIO; } - // bypass discontinuity check for auxiliary audio for now - else if (type == eTRACK_AUX_AUDIO) - { - aamp->Discontinuity(eMEDIATYPE_AUX_AUDIO, false); - } else if (type == eTRACK_SUBTITLE) { ret=true; @@ -3736,7 +3715,7 @@ bool StreamAbstractionAAMP::CheckForRampDownLimitReached() */ void StreamAbstractionAAMP::UnblockWaitForCachedFragmentChunk() { - for ( int type = eTRACK_VIDEO; type <= eTRACK_AUX_AUDIO; type++) + for ( int type = eTRACK_VIDEO; type <= eTRACK_SUBTITLE; type++) { MediaTrack *track = GetMediaTrack((TrackType)type); if(track) @@ -3896,35 +3875,6 @@ void StreamAbstractionAAMP::RefreshSubtitles() } } - -void StreamAbstractionAAMP::WaitForVideoTrackCatchupForAux() -{ - MediaTrack *aux = GetMediaTrack(eTRACK_AUX_AUDIO); - MediaTrack *video = GetMediaTrack(eTRACK_VIDEO); - if( aux && video ) - { - std::unique_lock lock(mLock); - double auxDuration = aux->GetTotalInjectedDuration(); - double videoDuration = video->GetTotalInjectedDuration(); - - while ((auxDuration > (videoDuration + video->fragmentDurationSeconds)) && aamp->DownloadsAreEnabled() && !aux->IsDiscontinuityProcessed() && !video->IsInjectionAborted() && !(video->IsAtEndOfTrack())) - { - if (mTrackState == eDISCONTINUITY_IN_VIDEO) - { - AAMPLOG_WARN("Skipping WaitForVideoTrackCatchupForAux as video is processing a discontinuity"); - break; - } - - if (std::cv_status::no_timeout == mAuxCond.wait_for(lock, std::chrono::milliseconds(100))) - { - break; - } - auxDuration = aux->GetTotalInjectedDuration(); - videoDuration = video->GetTotalInjectedDuration(); - } - } -} - /** * @fn GetPreferredLiveOffsetFromConfig * @brief check if current stream have 4K content @@ -4101,8 +4051,8 @@ void StreamAbstractionAAMP::InitializeMediaProcessor(bool passThroughMode) std::shared_ptr peerAudioProcessor = nullptr; std::shared_ptr peerSubtitleProcessor = nullptr; std::shared_ptr subtitleESProcessor = nullptr; - StreamOutputFormat videoFormat, audioFormat, auxAudioFormat, subtitleFormat; - GetStreamFormat(videoFormat, audioFormat, auxAudioFormat, subtitleFormat); + StreamOutputFormat videoFormat, audioFormat, subtitleFormat; + GetStreamFormat(videoFormat, audioFormat, subtitleFormat); for (int i = eMEDIATYPE_SUBTITLE; i >= eMEDIATYPE_VIDEO; i--) { MediaTrack *track = GetMediaTrack((TrackType) i); @@ -4173,10 +4123,6 @@ AampMediaType MediaTrack::GetPlaylistMediaTypeFromTrack(TrackType type, bool isI { playlistType = eMEDIATYPE_PLAYLIST_SUBTITLE; } - else if (type == eTRACK_AUX_AUDIO) - { - playlistType = eMEDIATYPE_PLAYLIST_AUX_AUDIO; - } else if (type == eTRACK_VIDEO) { playlistType = eMEDIATYPE_PLAYLIST_VIDEO; diff --git a/test/aampcli/AampcliSet.cpp b/test/aampcli/AampcliSet.cpp index fcaa041b4..ec2f5b05e 100644 --- a/test/aampcli/AampcliSet.cpp +++ b/test/aampcli/AampcliSet.cpp @@ -1206,22 +1206,6 @@ bool Set::execute( const char *cmd, PlayerInstanceAAMP *playerInstanceAamp) break; } - case 52: - { - char lang[12]; - AAMPCLI_PRINTF("[AAMPCLI] Matched Command AuxiliaryAudio - %s\n", cmd); - if (sscanf(cmd, "set %s %s", command, lang) == 2) - { - playerInstanceAamp->SetAuxiliaryLanguage(lang); - } - else - { - AAMPCLI_PRINTF("[AAMPCLI] ERROR: Mismatch in arguments\n"); - AAMPCLI_PRINTF("[AAMPCLI] Expected: set %s \n", command); - } - break; - } - case 55: { int timeout; @@ -1359,14 +1343,12 @@ void Set::registerSetCommands() addCommand(44,"ccStatus"," ","Set CC status (x = 0/1)"); addCommand(45,"ccStyle"," ","Set a predefined CC style commandion (x = 1/2/3)"); addCommand(46,"languageFormat"," ","Set Language Format (x = preferredFormat(0-3), y = useRole(0/1))"); - //addCommand("auxiliaryAudio"," ","Set auxiliary audio language (x = string lang)"); addCommand(47,"propagateUriParam"," ","Set propagate uri parameters: (int x = 0 to disable)"); //addCommand("rateOnTune"," ","Set Pre-tune rate (x= PreTuneRate)"); addCommand(48,"thumbnailTrack"," ","Set Thumbnail Track (int x = Thumbnail Index)"); addCommand(49,"sslVerifyPeer"," ","Set Ssl Verify Peer flag (x = 1 for enabling)"); addCommand(50,"downloadDelayOnFetch"," ","Set delay while downloading fragments (unsigned int x = download delay in ms)"); addCommand(51,"pausedBehavior"," ","Set Paused behavior (int x (0-3) options -\"autoplay defer\",\"autoplay immediate\",\"live defer\",\"live immediate\""); - addCommand(52,"auxiliaryAudio"," ","Set auxiliary audio language (x = string lang)"); addCommand(53,"registerForMediaMetadata"," ","Set Listen for AAMP_EVENT_MEDIA_METADATA events (x = 1 - add listener, x = 0 - remove)"); addCommand(54,"videoTrack"," ","Set Video tracks range (x = bitrate1, y = bitrate2, z = bitrate3) OR single bitrate provide same value for x, y,z "); addCommand(55,"dynamicDrm"," ","set Dynamic DRM config in Json format x=Timeout value for response message "); diff --git a/test/utests/drm/mocks/aampMocks.cpp b/test/utests/drm/mocks/aampMocks.cpp index 1ea8642a4..2be53b439 100644 --- a/test/utests/drm/mocks/aampMocks.cpp +++ b/test/utests/drm/mocks/aampMocks.cpp @@ -732,11 +732,6 @@ BitsPerSecond PrivateInstanceAAMP::GetMinimumBitrate() return 0; } -bool PrivateInstanceAAMP::IsAuxiliaryAudioEnabled(void) -{ - return true; -} - bool PrivateInstanceAAMP::IsPlayEnabled() { return true; diff --git a/test/utests/fakes/FakeAampGstPlayer.cpp b/test/utests/fakes/FakeAampGstPlayer.cpp index da785219b..dd532359e 100644 --- a/test/utests/fakes/FakeAampGstPlayer.cpp +++ b/test/utests/fakes/FakeAampGstPlayer.cpp @@ -34,11 +34,11 @@ AAMPGstPlayer::~AAMPGstPlayer() { } -void AAMPGstPlayer::Configure(StreamOutputFormat format, StreamOutputFormat audioFormat, StreamOutputFormat auxFormat, StreamOutputFormat subFormat, bool bESChangeStatus, bool forwardAudioToAux, bool setReadyAfterPipelineCreation) +void AAMPGstPlayer::Configure(StreamOutputFormat format, StreamOutputFormat audioFormat, StreamOutputFormat subFormat, bool bESChangeStatus, bool setReadyAfterPipelineCreation) { if (g_mockAampGstPlayer != nullptr) { - g_mockAampGstPlayer->Configure(format, audioFormat, auxFormat, subFormat, bESChangeStatus, forwardAudioToAux, setReadyAfterPipelineCreation); + g_mockAampGstPlayer->Configure(format, audioFormat, subFormat, bESChangeStatus, setReadyAfterPipelineCreation); } } diff --git a/test/utests/fakes/FakeAampUtils.cpp b/test/utests/fakes/FakeAampUtils.cpp index de04eac61..d6a0f58bf 100644 --- a/test/utests/fakes/FakeAampUtils.cpp +++ b/test/utests/fakes/FakeAampUtils.cpp @@ -32,18 +32,15 @@ enum HarvestConfigType eHARVEST_ENABLE_VIDEO = 0x00000001, /**< Enable Harvest Video fragments - set 1st bit*/ eHARVEST_ENABLE_AUDIO = 0x00000002, /**< Enable Harvest audio - set 2nd bit*/ eHARVEST_ENABLE_SUBTITLE = 0x00000004, /**< Enable Harvest subtitle - set 3rd bit */ - eHARVEST_ENABLE_AUX_AUDIO = 0x00000008, /**< Enable Harvest auxiliary audio - set 4th bit*/ eHARVEST_ENABLE_MANIFEST = 0x00000010, /**< Enable Harvest manifest - set 5th bit */ eHARVEST_ENABLE_LICENCE = 0x00000020, /**< Enable Harvest license - set 6th bit */ eHARVEST_ENABLE_IFRAME = 0x00000040, /**< Enable Harvest iframe - set 7th bit */ eHARVEST_ENABLE_INIT_VIDEO = 0x00000080, /**< Enable Harvest video init fragment - set 8th bit*/ eHARVEST_ENABLE_INIT_AUDIO = 0x00000100, /**< Enable Harvest audio init fragment - set 9th bit*/ eHARVEST_ENABLE_INIT_SUBTITLE = 0x00000200, /**< Enable Harvest subtitle init fragment - set 10th bit*/ - eHARVEST_ENABLE_INIT_AUX_AUDIO = 0x00000400, /**< Enable Harvest auxiliary audio init fragment - set 11th bit*/ eHARVEST_ENABLE_PLAYLIST_VIDEO = 0x00000800, /**< Enable Harvest video playlist - set 12th bit*/ eHARVEST_ENABLE_PLAYLIST_AUDIO = 0x00001000, /**< Enable Harvest audio playlist - set 13th bit*/ eHARVEST_ENABLE_PLAYLIST_SUBTITLE = 0x00002000, /**< Enable Harvest subtitle playlist - set 14th bit*/ - eHARVEST_ENABLE_PLAYLIST_AUX_AUDIO = 0x00004000, /**< Enable Harvest auxiliary audio playlist - set 15th bit*/ eHARVEST_ENABLE_PLAYLIST_IFRAME = 0x00008000, /**< Enable Harvest Iframe playlist - set 16th bit*/ eHARVEST_ENABLE_INIT_IFRAME = 0x00010000, /**< Enable Harvest IFRAME init fragment - set 17th bit*/ eHARVEST_ENABLE_DSM_CC = 0x00020000, /**< Enable Harvest digital storage media command and control (DSM-CC)- set 18th bit */ @@ -489,18 +486,15 @@ const char* GetMediaTypeName( AampMediaType mediaType ) "video",//eMEDIATYPE_VIDEO "audio",//eMEDIATYPE_AUDIO "text",//eMEDIATYPE_SUBTITLE - "aux_audio",//eMEDIATYPE_AUX_AUDIO "manifest",//eMEDIATYPE_MANIFEST "licence",//eMEDIATYPE_LICENCE "iframe",//eMEDIATYPE_IFRAME "init_video",//eMEDIATYPE_INIT_VIDEO "init_audio",//eMEDIATYPE_INIT_AUDIO "init_text",//eMEDIATYPE_INIT_SUBTITLE - "init_aux_audio",//eMEDIATYPE_INIT_AUX_AUDIO "playlist_video",//eMEDIATYPE_PLAYLIST_VIDEO "playlist_audio",//eMEDIATYPE_PLAYLIST_AUDIO "playlist_text",//eMEDIATYPE_PLAYLIST_SUBTITLE - "playlist_aux_audio",//eMEDIATYPE_PLAYLIST_AUX_AUDIO "playlist_iframe",//eMEDIATYPE_PLAYLIST_IFRAME "init_iframe",//eMEDIATYPE_INIT_IFRAME "dsm_cc",//eMEDIATYPE_DSM_CC diff --git a/test/utests/fakes/FakeFragmentCollector_HLS.cpp b/test/utests/fakes/FakeFragmentCollector_HLS.cpp index 5db62cc5f..6ee25b2e4 100644 --- a/test/utests/fakes/FakeFragmentCollector_HLS.cpp +++ b/test/utests/fakes/FakeFragmentCollector_HLS.cpp @@ -37,7 +37,7 @@ void StreamAbstractionAAMP_HLS::Start() { } void StreamAbstractionAAMP_HLS::Stop(bool clearChannelData) { } -void StreamAbstractionAAMP_HLS::GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &auxAudioOutputFormat, StreamOutputFormat &subtitleOutputFormat) { } +void StreamAbstractionAAMP_HLS::GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &subtitleOutputFormat) { } double StreamAbstractionAAMP_HLS::GetFirstPTS() { return 0; } diff --git a/test/utests/fakes/FakeFragmentCollector_MPD.cpp b/test/utests/fakes/FakeFragmentCollector_MPD.cpp index 880b15053..80f893e35 100644 --- a/test/utests/fakes/FakeFragmentCollector_MPD.cpp +++ b/test/utests/fakes/FakeFragmentCollector_MPD.cpp @@ -66,7 +66,7 @@ void StreamAbstractionAAMP_MPD::Start() { } void StreamAbstractionAAMP_MPD::Stop(bool clearChannelData) { } -void StreamAbstractionAAMP_MPD::GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &auxAudioOutputFormat, StreamOutputFormat &subtitleOutputFormat) { } +void StreamAbstractionAAMP_MPD::GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &subtitleOutputFormat) { } double StreamAbstractionAAMP_MPD::GetFirstPTS() { return 0; } diff --git a/test/utests/fakes/FakeFragmentCollector_Progressive.cpp b/test/utests/fakes/FakeFragmentCollector_Progressive.cpp index 0b74f9ce2..ffb888c4d 100644 --- a/test/utests/fakes/FakeFragmentCollector_Progressive.cpp +++ b/test/utests/fakes/FakeFragmentCollector_Progressive.cpp @@ -33,7 +33,7 @@ void StreamAbstractionAAMP_PROGRESSIVE::Start() { } void StreamAbstractionAAMP_PROGRESSIVE::Stop(bool clearChannelData) { } -void StreamAbstractionAAMP_PROGRESSIVE::GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &auxAudioOutputFormat, StreamOutputFormat &subtitleOutputFormat) { } +void StreamAbstractionAAMP_PROGRESSIVE::GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &subtitleOutputFormat) { } double StreamAbstractionAAMP_PROGRESSIVE::GetStreamPosition() { return 0; } diff --git a/test/utests/fakes/FakeHDMIIN.cpp b/test/utests/fakes/FakeHDMIIN.cpp index c2c7007be..b0920b264 100644 --- a/test/utests/fakes/FakeHDMIIN.cpp +++ b/test/utests/fakes/FakeHDMIIN.cpp @@ -36,7 +36,7 @@ void StreamAbstractionAAMP_VIDEOIN::Start() { } void StreamAbstractionAAMP_VIDEOIN::Stop(bool clearChannelData) { } -void StreamAbstractionAAMP_VIDEOIN::GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &auxAudioOutputFormat, StreamOutputFormat &subtitleOutputFormat) { } +void StreamAbstractionAAMP_VIDEOIN::GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &subtitleOutputFormat) { } double StreamAbstractionAAMP_VIDEOIN::GetFirstPTS() { return 0; } diff --git a/test/utests/fakes/FakeOTA.cpp b/test/utests/fakes/FakeOTA.cpp index 87b050d7d..4ca18b401 100644 --- a/test/utests/fakes/FakeOTA.cpp +++ b/test/utests/fakes/FakeOTA.cpp @@ -34,7 +34,7 @@ void StreamAbstractionAAMP_OTA::Start() { } void StreamAbstractionAAMP_OTA::Stop(bool clearChannelData) { } -void StreamAbstractionAAMP_OTA::GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &auxAudioOutputFormat, StreamOutputFormat &subtitleOutputFormat) { } +void StreamAbstractionAAMP_OTA::GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &subtitleOutputFormat) { } double StreamAbstractionAAMP_OTA::GetFirstPTS() { return 0; } diff --git a/test/utests/fakes/FakePlayerInstanceAamp.cpp b/test/utests/fakes/FakePlayerInstanceAamp.cpp index 5ab6852fd..4ae8883c8 100644 --- a/test/utests/fakes/FakePlayerInstanceAamp.cpp +++ b/test/utests/fakes/FakePlayerInstanceAamp.cpp @@ -164,7 +164,6 @@ const std::vector & PlayerInstanceAAMP::GetTimedMetadata( void ) void PlayerInstanceAAMP::SetUseAbsoluteTimeline(bool configState) { } void PlayerInstanceAAMP::EnableAsyncOperation() { } void PlayerInstanceAAMP::SetRepairIframes(bool configState) { } - void PlayerInstanceAAMP::SetAuxiliaryLanguage(const std::string &language) { } void PlayerInstanceAAMP::SetLicenseCustomData(const char *customData) { } void PlayerInstanceAAMP::SetContentProtectionDataUpdateTimeout(int timeout) { } void PlayerInstanceAAMP::ProcessContentProtectionDataConfig(const char *jsonbuffer) { } diff --git a/test/utests/fakes/FakePrivateInstanceAAMP.cpp b/test/utests/fakes/FakePrivateInstanceAAMP.cpp index ce290fdb3..e03b53daa 100644 --- a/test/utests/fakes/FakePrivateInstanceAAMP.cpp +++ b/test/utests/fakes/FakePrivateInstanceAAMP.cpp @@ -95,7 +95,6 @@ PrivateInstanceAAMP::PrivateInstanceAAMP(AampConfig *config) : mSubLanguage(), mPlayerId(PLAYERID_CNTR++), mIsWVKIDWorkaround(false), - mAuxAudioLanguage(), mAbsoluteEndPosition(0), mIsLive(false), mIsLiveStream(false), @@ -137,7 +136,6 @@ PrivateInstanceAAMP::PrivateInstanceAAMP(AampConfig *config) : mVideoFormat(), mAudioFormat(), mPreviousAudioType(), - mAuxFormat(), mCurlShared(), mIsChunkMode(false) { @@ -847,11 +845,6 @@ long long PrivateInstanceAAMP::GetPositionMs() return positionMs; } -bool PrivateInstanceAAMP::IsAuxiliaryAudioEnabled(void) -{ - return true; -} - bool PrivateInstanceAAMP::IsPlayEnabled() { return true; @@ -1308,11 +1301,11 @@ bool PrivateInstanceAAMP::PipelineValid(AampMediaType track) return true; } -void PrivateInstanceAAMP::SetStreamFormat(StreamOutputFormat videoFormat, StreamOutputFormat audioFormat, StreamOutputFormat auxFormat) +void PrivateInstanceAAMP::SetStreamFormat(StreamOutputFormat videoFormat, StreamOutputFormat audioFormat) { if (g_mockPrivateInstanceAAMP != nullptr) { - g_mockPrivateInstanceAAMP->SetStreamFormat(videoFormat, audioFormat, auxFormat); + g_mockPrivateInstanceAAMP->SetStreamFormat(videoFormat, audioFormat); } } diff --git a/test/utests/fakes/FakeRMF.cpp b/test/utests/fakes/FakeRMF.cpp index 91786e9df..5780abd28 100644 --- a/test/utests/fakes/FakeRMF.cpp +++ b/test/utests/fakes/FakeRMF.cpp @@ -175,7 +175,7 @@ void StreamAbstractionAAMP_RMF::EnableContentRestrictions() /** * @brief Get output format of stream. */ -void StreamAbstractionAAMP_RMF::GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &auxAudioOutputFormat, StreamOutputFormat &subtitleOutputFormat) +void StreamAbstractionAAMP_RMF::GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &subtitleOutputFormat) { } diff --git a/test/utests/fakes/FakeTsProcessor.cpp b/test/utests/fakes/FakeTsProcessor.cpp index ca7151b72..8d9253d2a 100644 --- a/test/utests/fakes/FakeTsProcessor.cpp +++ b/test/utests/fakes/FakeTsProcessor.cpp @@ -21,7 +21,7 @@ #include "tsprocessor.h" #include "ID3Metadata.hpp" -TSProcessor::TSProcessor(class PrivateInstanceAAMP *aamp,StreamOperation streamOperation, id3_callback_t id3_hdl, int track, TSProcessor* peerTSProcessor, TSProcessor* auxTSProcessor) +TSProcessor::TSProcessor(class PrivateInstanceAAMP *aamp,StreamOperation streamOperation, id3_callback_t id3_hdl, int track, TSProcessor* peerTSProcessor) { } diff --git a/test/utests/mocks/MockAampGstPlayer.h b/test/utests/mocks/MockAampGstPlayer.h index 24b3f1417..1c30900c4 100644 --- a/test/utests/mocks/MockAampGstPlayer.h +++ b/test/utests/mocks/MockAampGstPlayer.h @@ -53,7 +53,7 @@ class MockAAMPGstPlayer : public AAMPGstPlayer MOCK_METHOD(void, SeekStreamSink, (double , double ), (override)); - MOCK_METHOD(void, Configure, (StreamOutputFormat format, StreamOutputFormat audioFormat, StreamOutputFormat auxFormat, StreamOutputFormat subFormat, bool bESChangeStatus, bool forwardAudioToAux, bool setReadyAfterPipelineCreation), (override)); + MOCK_METHOD(void, Configure, (StreamOutputFormat format, StreamOutputFormat audioFormat, StreamOutputFormat subFormat, bool bESChangeStatus, bool setReadyAfterPipelineCreation), (override)); }; extern MockAAMPGstPlayer *g_mockAampGstPlayer; diff --git a/test/utests/mocks/MockPrivateInstanceAAMP.h b/test/utests/mocks/MockPrivateInstanceAAMP.h index a9c8572e3..fcf32879c 100644 --- a/test/utests/mocks/MockPrivateInstanceAAMP.h +++ b/test/utests/mocks/MockPrivateInstanceAAMP.h @@ -42,7 +42,7 @@ class MockPrivateInstanceAAMP int * http_error, double *downloadTime, const char *range, unsigned int curlInstance, bool resetBuffer, BitsPerSecond *bitrate, int * fogError, double fragmentDurationSeconds, ProfilerBucketType bucketType, int maxInitDownloadTimeMS)); - MOCK_METHOD(void, SetStreamFormat, (StreamOutputFormat videoFormat, StreamOutputFormat audioFormat, StreamOutputFormat auxFormat)); + MOCK_METHOD(void, SetStreamFormat, (StreamOutputFormat videoFormat, StreamOutputFormat audioFormat)); MOCK_METHOD(std::string, GetAvailableAudioTracks, (bool allTrack)); MOCK_METHOD(int,GetAudioTrack,()); diff --git a/test/utests/mocks/MockStreamAbstractionAAMP.h b/test/utests/mocks/MockStreamAbstractionAAMP.h index b75770ff8..0c8f79a22 100644 --- a/test/utests/mocks/MockStreamAbstractionAAMP.h +++ b/test/utests/mocks/MockStreamAbstractionAAMP.h @@ -37,7 +37,7 @@ class MockStreamAbstractionAAMP : public StreamAbstractionAAMP MOCK_METHOD(void, Stop, (bool clearChannelData), (override)); - MOCK_METHOD(void, GetStreamFormat, (StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &auxAudioOutputFormat, StreamOutputFormat &subtitleOutputFormat), (override)); + MOCK_METHOD(void, GetStreamFormat, (StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &subtitleOutputFormat), (override)); MOCK_METHOD(double, GetStreamPosition, (), (override)); diff --git a/test/utests/mocks/MockStreamAbstractionAAMP_MPD.h b/test/utests/mocks/MockStreamAbstractionAAMP_MPD.h index 128b7e38d..32259d2fb 100644 --- a/test/utests/mocks/MockStreamAbstractionAAMP_MPD.h +++ b/test/utests/mocks/MockStreamAbstractionAAMP_MPD.h @@ -36,7 +36,7 @@ class MockStreamAbstractionAAMP_MPD : public StreamAbstractionAAMP_MPD MOCK_METHOD(double, GetMidSeekPosOffset, (), (override)); MOCK_METHOD(IPeriod *, GetPeriod, ()); MOCK_METHOD(double, GetStreamPosition, (), (override)); - MOCK_METHOD(void, GetStreamFormat, (StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &auxAudioOutputFormat, StreamOutputFormat &subtitleOutputFormat), (override)); + MOCK_METHOD(void, GetStreamFormat, (StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &subtitleOutputFormat), (override)); MOCK_METHOD(bool, DoEarlyStreamSinkFlush, (bool newTune, float rate), (override)); MOCK_METHOD(Accessibility, getAccessibilityNode, (AampJsonObject &accessNode)); diff --git a/test/utests/tests/AampBufferControlTests/AampBufferControlTests.cpp b/test/utests/tests/AampBufferControlTests/AampBufferControlTests.cpp index bf32c608b..0660dcb2c 100644 --- a/test/utests/tests/AampBufferControlTests/AampBufferControlTests.cpp +++ b/test/utests/tests/AampBufferControlTests/AampBufferControlTests.cpp @@ -82,23 +82,20 @@ TEST_F(BufferControlExternalDataTest, mBufferControlactionDownloadsTest2) // Arrange: Creating the variables for passing to arguments AAMPGstPlayer* player = nullptr; bool downloadsEnabled = true; - AampMediaType mediaType[21] = { + AampMediaType mediaType[18] = { eMEDIATYPE_DEFAULT, eMEDIATYPE_VIDEO, eMEDIATYPE_AUDIO, eMEDIATYPE_SUBTITLE, - eMEDIATYPE_AUX_AUDIO, eMEDIATYPE_MANIFEST, eMEDIATYPE_LICENCE, eMEDIATYPE_IFRAME, eMEDIATYPE_INIT_VIDEO, eMEDIATYPE_INIT_AUDIO, eMEDIATYPE_INIT_SUBTITLE, - eMEDIATYPE_INIT_AUX_AUDIO, eMEDIATYPE_PLAYLIST_VIDEO, eMEDIATYPE_PLAYLIST_AUDIO, eMEDIATYPE_PLAYLIST_SUBTITLE, - eMEDIATYPE_PLAYLIST_AUX_AUDIO, eMEDIATYPE_PLAYLIST_IFRAME, eMEDIATYPE_INIT_IFRAME, eMEDIATYPE_DSM_CC, @@ -106,7 +103,7 @@ TEST_F(BufferControlExternalDataTest, mBufferControlactionDownloadsTest2) eMEDIATYPE_DEFAULT }; - for(int i=0; i<21; i++){ + for(int i=0; i<18; i++){ //Act: Call the function for test mBufferControl->actionDownloads(player,mediaType[i],downloadsEnabled); @@ -165,23 +162,20 @@ TEST_F(BufferControlExternalDataTest, BufferControlMasterneedDataTest2) { // Arrange: Creating the variables for passing to arguments AAMPGstPlayer* player = nullptr; - AampMediaType mediaType[21] = { + AampMediaType mediaType[18] = { eMEDIATYPE_DEFAULT, eMEDIATYPE_VIDEO, eMEDIATYPE_AUDIO, eMEDIATYPE_SUBTITLE, - eMEDIATYPE_AUX_AUDIO, eMEDIATYPE_MANIFEST, eMEDIATYPE_LICENCE, eMEDIATYPE_IFRAME, eMEDIATYPE_INIT_VIDEO, eMEDIATYPE_INIT_AUDIO, eMEDIATYPE_INIT_SUBTITLE, - eMEDIATYPE_INIT_AUX_AUDIO, eMEDIATYPE_PLAYLIST_VIDEO, eMEDIATYPE_PLAYLIST_AUDIO, eMEDIATYPE_PLAYLIST_SUBTITLE, - eMEDIATYPE_PLAYLIST_AUX_AUDIO, eMEDIATYPE_PLAYLIST_IFRAME, eMEDIATYPE_INIT_IFRAME, eMEDIATYPE_DSM_CC, @@ -189,7 +183,7 @@ TEST_F(BufferControlExternalDataTest, BufferControlMasterneedDataTest2) eMEDIATYPE_DEFAULT }; - for(int i=0; i<21; i++){ + for(int i=0; i<18; i++){ //Act: Call the function for test mBufferControlMaster->needData(player,mediaType[i]); @@ -285,23 +279,20 @@ TEST_F(BufferControlExternalDataTest, BufferControlMasternotifyFragmentInjectTes double fdts = 1.3; double duration = 1.4; bool firstBuffer = false; - AampMediaType mediaType[21] = { + AampMediaType mediaType[18] = { eMEDIATYPE_DEFAULT, eMEDIATYPE_VIDEO, eMEDIATYPE_AUDIO, eMEDIATYPE_SUBTITLE, - eMEDIATYPE_AUX_AUDIO, eMEDIATYPE_MANIFEST, eMEDIATYPE_LICENCE, eMEDIATYPE_IFRAME, eMEDIATYPE_INIT_VIDEO, eMEDIATYPE_INIT_AUDIO, eMEDIATYPE_INIT_SUBTITLE, - eMEDIATYPE_INIT_AUX_AUDIO, eMEDIATYPE_PLAYLIST_VIDEO, eMEDIATYPE_PLAYLIST_AUDIO, eMEDIATYPE_PLAYLIST_SUBTITLE, - eMEDIATYPE_PLAYLIST_AUX_AUDIO, eMEDIATYPE_PLAYLIST_IFRAME, eMEDIATYPE_INIT_IFRAME, eMEDIATYPE_DSM_CC, @@ -309,7 +300,7 @@ TEST_F(BufferControlExternalDataTest, BufferControlMasternotifyFragmentInjectTes eMEDIATYPE_DEFAULT }; - for(int i=0; i<21; i++){ + for(int i=0; i<18; i++){ //Act: Call the function for test mBufferControlMaster->notifyFragmentInject(player,mediaType[i],fpts,fdts,duration,firstBuffer); @@ -342,23 +333,20 @@ TEST_F(BufferControlExternalDataTest, BufferControlMasterenoughDataTest2) { // Arrange: Creating the variables for passing to arguments AAMPGstPlayer* player = nullptr; - AampMediaType mediaType[21] = { + AampMediaType mediaType[18] = { eMEDIATYPE_DEFAULT, eMEDIATYPE_VIDEO, eMEDIATYPE_AUDIO, eMEDIATYPE_SUBTITLE, - eMEDIATYPE_AUX_AUDIO, eMEDIATYPE_MANIFEST, eMEDIATYPE_LICENCE, eMEDIATYPE_IFRAME, eMEDIATYPE_INIT_VIDEO, eMEDIATYPE_INIT_AUDIO, eMEDIATYPE_INIT_SUBTITLE, - eMEDIATYPE_INIT_AUX_AUDIO, eMEDIATYPE_PLAYLIST_VIDEO, eMEDIATYPE_PLAYLIST_AUDIO, eMEDIATYPE_PLAYLIST_SUBTITLE, - eMEDIATYPE_PLAYLIST_AUX_AUDIO, eMEDIATYPE_PLAYLIST_IFRAME, eMEDIATYPE_INIT_IFRAME, eMEDIATYPE_DSM_CC, @@ -366,7 +354,7 @@ TEST_F(BufferControlExternalDataTest, BufferControlMasterenoughDataTest2) eMEDIATYPE_DEFAULT }; - for(int i=0; i<21; i++){ + for(int i=0; i<18; i++){ //Act: Call the function for test mBufferControlMaster->enoughData(player,mediaType[i]); @@ -390,23 +378,20 @@ TEST_F(BufferControlExternalDataTest, BufferControlMasterunderflowTest2) { // Arrange: Creating the variables for passing to arguments AAMPGstPlayer* player = nullptr; - AampMediaType mediaType[21] = { + AampMediaType mediaType[18] = { eMEDIATYPE_DEFAULT, eMEDIATYPE_VIDEO, eMEDIATYPE_AUDIO, eMEDIATYPE_SUBTITLE, - eMEDIATYPE_AUX_AUDIO, eMEDIATYPE_MANIFEST, eMEDIATYPE_LICENCE, eMEDIATYPE_IFRAME, eMEDIATYPE_INIT_VIDEO, eMEDIATYPE_INIT_AUDIO, eMEDIATYPE_INIT_SUBTITLE, - eMEDIATYPE_INIT_AUX_AUDIO, eMEDIATYPE_PLAYLIST_VIDEO, eMEDIATYPE_PLAYLIST_AUDIO, eMEDIATYPE_PLAYLIST_SUBTITLE, - eMEDIATYPE_PLAYLIST_AUX_AUDIO, eMEDIATYPE_PLAYLIST_IFRAME, eMEDIATYPE_INIT_IFRAME, eMEDIATYPE_DSM_CC, @@ -414,7 +399,7 @@ TEST_F(BufferControlExternalDataTest, BufferControlMasterunderflowTest2) eMEDIATYPE_DEFAULT }; - for(int i=0; i<21; i++){ + for(int i=0; i<18; i++){ //Act: Call the function for test mBufferControlMaster->underflow(player,mediaType[i]); @@ -440,23 +425,20 @@ TEST_F(BufferControlExternalDataTest, BufferControlMasterupdateTest2) { // Arrange: Creating the variables for passing to arguments AAMPGstPlayer* player = nullptr; - AampMediaType mediaType[21] = { + AampMediaType mediaType[18] = { eMEDIATYPE_DEFAULT, eMEDIATYPE_VIDEO, eMEDIATYPE_AUDIO, eMEDIATYPE_SUBTITLE, - eMEDIATYPE_AUX_AUDIO, eMEDIATYPE_MANIFEST, eMEDIATYPE_LICENCE, eMEDIATYPE_IFRAME, eMEDIATYPE_INIT_VIDEO, eMEDIATYPE_INIT_AUDIO, eMEDIATYPE_INIT_SUBTITLE, - eMEDIATYPE_INIT_AUX_AUDIO, eMEDIATYPE_PLAYLIST_VIDEO, eMEDIATYPE_PLAYLIST_AUDIO, eMEDIATYPE_PLAYLIST_SUBTITLE, - eMEDIATYPE_PLAYLIST_AUX_AUDIO, eMEDIATYPE_PLAYLIST_IFRAME, eMEDIATYPE_INIT_IFRAME, eMEDIATYPE_DSM_CC, @@ -464,7 +446,7 @@ TEST_F(BufferControlExternalDataTest, BufferControlMasterupdateTest2) eMEDIATYPE_DEFAULT }; - for(int i=0; i<21; i++){ + for(int i=0; i<18; i++){ //Act: Call the function for test mBufferControlMaster->update(player,mediaType[i]); diff --git a/test/utests/tests/AampGstPlayer/FunctionalTests.cpp b/test/utests/tests/AampGstPlayer/FunctionalTests.cpp index 3c1e47645..3b73c4ac3 100644 --- a/test/utests/tests/AampGstPlayer/FunctionalTests.cpp +++ b/test/utests/tests/AampGstPlayer/FunctionalTests.cpp @@ -102,9 +102,7 @@ class AAMPGstPlayerTests : public ::testing::Test /* Table with different parameter sets to be passed into mAAMPGstPlayer->Configure(...) */ typedef struct { - StreamOutputFormat auxFormat; - bool bESChangeStatus; - bool forwardAudioToAux; + bool bESChangeStatus;s bool setReadyAfterPipelineCreation; bool enableRectangleProperty; bool usingWesteros; @@ -232,11 +230,6 @@ class AAMPGstPlayerTests : public ::testing::Test } EXPECT_CALL(*g_mockGStreamer, gst_element_factory_make(_, NULL)) .WillRepeatedly(Return(&gst_element_bin)); - if (setup->forwardAudioToAux) - { - EXPECT_CALL(*g_mockGStreamer, gst_element_factory_make(StrEq("audsrvsink"), NULL)) - .WillOnce(Return(&gst_element_audsrvsink)); - } if (setup->usingRialto) { @@ -263,10 +256,8 @@ class AAMPGstPlayerTests : public ::testing::Test mAAMPGstPlayer->Configure(FORMAT_VIDEO_ES_H264, FORMAT_AUDIO_ES_AAC, - setup->auxFormat, FORMAT_SUBTITLE_WEBVTT, setup->bESChangeStatus, - setup->forwardAudioToAux, setup->setReadyAfterPipelineCreation); ASSERT_TRUE(bus_sync_func != nullptr); @@ -348,9 +339,7 @@ TEST_F(AAMPGstPlayerTests, Constructor) // typedef struct // { -// StreamOutputFormat auxFormat; // bool bESChangeStatus; -// bool forwardAudioToAux; // bool setReadyAfterPipelineCreation; // bool enableRectangleProperty; // bool usingWesteros; @@ -358,10 +347,10 @@ TEST_F(AAMPGstPlayerTests, Constructor) // } Config_Params; static AAMPGstPlayerTests::Config_Params tbl[] = { - {FORMAT_INVALID, false, false, false, false, true, false }, - {FORMAT_INVALID, false, false, false, false, true, true }, - {FORMAT_INVALID, false, false, false, true, true, false }, - {FORMAT_AUDIO_ES_AC3, true, true, true, false, true, false } }; + {false, false, false, true, false }, + {false, false, false, true, true }, + {false, false, true, true, false }, + {true, true, false, true, false } }; // Parameter test class, for running same tests with different settings diff --git a/test/utests/tests/AampLogManagerTests/AampLogManagerTests.cpp b/test/utests/tests/AampLogManagerTests/AampLogManagerTests.cpp index fa55e9386..8b426b05c 100644 --- a/test/utests/tests/AampLogManagerTests/AampLogManagerTests.cpp +++ b/test/utests/tests/AampLogManagerTests/AampLogManagerTests.cpp @@ -263,26 +263,23 @@ TEST_F(AampLogManagerTest, ParseContentUrl_Test2) const char* url = "//httsurl"; std::string location = "test2"; std::string symptom = "test3"; - AampMediaType type[15] = { + AampMediaType type[12] = { eMEDIATYPE_VIDEO, eMEDIATYPE_AUDIO, eMEDIATYPE_SUBTITLE, - eMEDIATYPE_AUX_AUDIO, eMEDIATYPE_MANIFEST, eMEDIATYPE_LICENCE, eMEDIATYPE_IFRAME, eMEDIATYPE_INIT_VIDEO, eMEDIATYPE_INIT_AUDIO, eMEDIATYPE_INIT_SUBTITLE, - eMEDIATYPE_INIT_AUX_AUDIO, eMEDIATYPE_PLAYLIST_VIDEO, eMEDIATYPE_PLAYLIST_AUDIO, - eMEDIATYPE_PLAYLIST_SUBTITLE, - eMEDIATYPE_PLAYLIST_AUX_AUDIO + eMEDIATYPE_PLAYLIST_SUBTITLE }; //Act: Calling the function for test - for(int i=0;i<15;i++) + for(int i=0;i<12;i++) { AampLogManager::ParseContentUrl(url,location,symptom,type[i]); } diff --git a/test/utests/tests/AampMPDUtils/FunctionalTests.cpp b/test/utests/tests/AampMPDUtils/FunctionalTests.cpp index 69fd7aada..6eefa2d31 100644 --- a/test/utests/tests/AampMPDUtils/FunctionalTests.cpp +++ b/test/utests/tests/AampMPDUtils/FunctionalTests.cpp @@ -48,23 +48,20 @@ class AampMPDUtils : public ::testing::Test TEST(AampMPDUtils, IsCompatibleMimeTypeTest1) { - AampMediaType mediaType[21] = { + AampMediaType mediaType[18] = { eMEDIATYPE_DEFAULT, eMEDIATYPE_VIDEO, eMEDIATYPE_AUDIO, eMEDIATYPE_SUBTITLE, - eMEDIATYPE_AUX_AUDIO, eMEDIATYPE_MANIFEST, eMEDIATYPE_LICENCE, eMEDIATYPE_IFRAME, eMEDIATYPE_INIT_VIDEO, eMEDIATYPE_INIT_AUDIO, eMEDIATYPE_INIT_SUBTITLE, - eMEDIATYPE_INIT_AUX_AUDIO, eMEDIATYPE_PLAYLIST_VIDEO, eMEDIATYPE_PLAYLIST_AUDIO, eMEDIATYPE_PLAYLIST_SUBTITLE, - eMEDIATYPE_PLAYLIST_AUX_AUDIO, eMEDIATYPE_PLAYLIST_IFRAME, eMEDIATYPE_INIT_IFRAME, eMEDIATYPE_DSM_CC, @@ -72,7 +69,7 @@ TEST(AampMPDUtils, IsCompatibleMimeTypeTest1) eMEDIATYPE_DEFAULT }; std::string mimeType = "test"; - for(int i=0; i<21; i++){ + for(int i=0; i<18; i++){ bool minetype = IsCompatibleMimeType(mimeType,mediaType[i]); EXPECT_FALSE(minetype); } @@ -80,7 +77,7 @@ TEST(AampMPDUtils, IsCompatibleMimeTypeTest1) TEST(AampMPDUtils, IsCompatibleMimeTypeTest2) { - AampMediaType mediaType = eMEDIATYPE_AUX_AUDIO; + AampMediaType mediaType = eMEDIATYPE_AUDIO; std::string mimeType = "audio/webm"; bool result = IsCompatibleMimeType(mimeType,mediaType); EXPECT_TRUE(result); diff --git a/test/utests/tests/AampProfilerTests/AampProfilerTests.cpp b/test/utests/tests/AampProfilerTests/AampProfilerTests.cpp index ee50f7dc4..46dd6d668 100644 --- a/test/utests/tests/AampProfilerTests/AampProfilerTests.cpp +++ b/test/utests/tests/AampProfilerTests/AampProfilerTests.cpp @@ -87,24 +87,20 @@ TEST_F(AampProfilertests, ProfileResetTest1) TEST_F(AampProfilertests, ProfileResetTest2) { ProfileEventAAMP profileEvent; - ProfilerBucketType profilesList[28] = { + ProfilerBucketType profilesList[24] = { PROFILE_BUCKET_MANIFEST, PROFILE_BUCKET_PLAYLIST_VIDEO, PROFILE_BUCKET_PLAYLIST_AUDIO, PROFILE_BUCKET_PLAYLIST_SUBTITLE, - PROFILE_BUCKET_PLAYLIST_AUXILIARY, PROFILE_BUCKET_INIT_VIDEO, PROFILE_BUCKET_INIT_AUDIO, PROFILE_BUCKET_INIT_SUBTITLE, - PROFILE_BUCKET_INIT_AUXILIARY, PROFILE_BUCKET_FRAGMENT_VIDEO, PROFILE_BUCKET_FRAGMENT_AUDIO, PROFILE_BUCKET_FRAGMENT_SUBTITLE, - PROFILE_BUCKET_FRAGMENT_AUXILIARY, PROFILE_BUCKET_DECRYPT_VIDEO, PROFILE_BUCKET_DECRYPT_AUDIO, PROFILE_BUCKET_DECRYPT_SUBTITLE, - PROFILE_BUCKET_DECRYPT_AUXILIARY, PROFILE_BUCKET_LA_TOTAL, PROFILE_BUCKET_LA_PREPROC, PROFILE_BUCKET_LA_NETWORK, @@ -117,7 +113,7 @@ TEST_F(AampProfilertests, ProfileResetTest2) PROFILE_BUCKET_DISCO_FIRST_FRAME, PROFILE_BUCKET_TYPE_COUNT, }; - for(int i=0;i<28;i++){ + for(int i=0;i<24;i++){ profileEvent.ProfileReset(profilesList[i]); EXPECT_EQ(profilesList[i],i); } @@ -127,29 +123,25 @@ TEST_F(AampProfilertests, ProfileEndTest1) profileEvent->ProfileReset(PROFILE_BUCKET_MANIFEST); profileEvent->ProfileBegin(PROFILE_BUCKET_MANIFEST); profileEvent->ProfileEnd(PROFILE_BUCKET_TYPE_COUNT); - EXPECT_EQ(PROFILE_BUCKET_TYPE_COUNT,27); + EXPECT_EQ(PROFILE_BUCKET_TYPE_COUNT,23); } TEST_F(AampProfilertests, ProfileEndTest2) { ProfileEventAAMP profileEvent; - ProfilerBucketType profilesList[28] = { + ProfilerBucketType profilesList[24] = { PROFILE_BUCKET_MANIFEST, PROFILE_BUCKET_PLAYLIST_VIDEO, PROFILE_BUCKET_PLAYLIST_AUDIO, PROFILE_BUCKET_PLAYLIST_SUBTITLE, - PROFILE_BUCKET_PLAYLIST_AUXILIARY, PROFILE_BUCKET_INIT_VIDEO, PROFILE_BUCKET_INIT_AUDIO, PROFILE_BUCKET_INIT_SUBTITLE, - PROFILE_BUCKET_INIT_AUXILIARY, PROFILE_BUCKET_FRAGMENT_VIDEO, PROFILE_BUCKET_FRAGMENT_AUDIO, PROFILE_BUCKET_FRAGMENT_SUBTITLE, - PROFILE_BUCKET_FRAGMENT_AUXILIARY, PROFILE_BUCKET_DECRYPT_VIDEO, PROFILE_BUCKET_DECRYPT_AUDIO, PROFILE_BUCKET_DECRYPT_SUBTITLE, - PROFILE_BUCKET_DECRYPT_AUXILIARY, PROFILE_BUCKET_LA_TOTAL, PROFILE_BUCKET_LA_PREPROC, PROFILE_BUCKET_LA_NETWORK, @@ -162,7 +154,7 @@ TEST_F(AampProfilertests, ProfileEndTest2) PROFILE_BUCKET_DISCO_FIRST_FRAME, PROFILE_BUCKET_TYPE_COUNT, }; - for(int i=0;i<28;i++){ + for(int i=0;i<24;i++){ profileEvent.ProfileEnd(profilesList[i]); EXPECT_EQ(profilesList[i],i); } @@ -188,32 +180,24 @@ TEST_F(AampProfilertests, ProfileErrorTest1) profileEvent.ProfileError(PROFILE_BUCKET_PLAYLIST_SUBTITLE, result); EXPECT_EQ(PROFILE_BUCKET_PLAYLIST_SUBTITLE,3); EXPECT_EQ(result,2147483647); - result = 0; - profileEvent.ProfileError(PROFILE_BUCKET_PLAYLIST_AUXILIARY, result); - EXPECT_EQ(PROFILE_BUCKET_PLAYLIST_AUXILIARY,4); - EXPECT_EQ(result,0); } TEST_F(AampProfilertests, ProfileErrorTest2) { ProfileEventAAMP profileEvent; - ProfilerBucketType profilesList[28] = { + ProfilerBucketType profilesList[24] = { PROFILE_BUCKET_MANIFEST, PROFILE_BUCKET_PLAYLIST_VIDEO, PROFILE_BUCKET_PLAYLIST_AUDIO, PROFILE_BUCKET_PLAYLIST_SUBTITLE, - PROFILE_BUCKET_PLAYLIST_AUXILIARY, PROFILE_BUCKET_INIT_VIDEO, PROFILE_BUCKET_INIT_AUDIO, PROFILE_BUCKET_INIT_SUBTITLE, - PROFILE_BUCKET_INIT_AUXILIARY, PROFILE_BUCKET_FRAGMENT_VIDEO, PROFILE_BUCKET_FRAGMENT_AUDIO, PROFILE_BUCKET_FRAGMENT_SUBTITLE, - PROFILE_BUCKET_FRAGMENT_AUXILIARY, PROFILE_BUCKET_DECRYPT_VIDEO, PROFILE_BUCKET_DECRYPT_AUDIO, PROFILE_BUCKET_DECRYPT_SUBTITLE, - PROFILE_BUCKET_DECRYPT_AUXILIARY, PROFILE_BUCKET_LA_TOTAL, PROFILE_BUCKET_LA_PREPROC, PROFILE_BUCKET_LA_NETWORK, @@ -226,7 +210,7 @@ TEST_F(AampProfilertests, ProfileErrorTest2) PROFILE_BUCKET_DISCO_FIRST_FRAME, PROFILE_BUCKET_TYPE_COUNT, }; - for(int i=0;i<28;i++){ + for(int i=0;i<24;i++){ profileEvent.ProfileError(profilesList[i],i); EXPECT_EQ(profilesList[i],i); } @@ -238,24 +222,20 @@ TEST_F(AampProfilertests, ProfileBeginTest) TEST_F(AampProfilertests, ProfileBeginTest2) { ProfileEventAAMP profileEvent; - ProfilerBucketType profilesList[28] = { + ProfilerBucketType profilesList[24] = { PROFILE_BUCKET_MANIFEST, PROFILE_BUCKET_PLAYLIST_VIDEO, PROFILE_BUCKET_PLAYLIST_AUDIO, PROFILE_BUCKET_PLAYLIST_SUBTITLE, - PROFILE_BUCKET_PLAYLIST_AUXILIARY, PROFILE_BUCKET_INIT_VIDEO, PROFILE_BUCKET_INIT_AUDIO, PROFILE_BUCKET_INIT_SUBTITLE, - PROFILE_BUCKET_INIT_AUXILIARY, PROFILE_BUCKET_FRAGMENT_VIDEO, PROFILE_BUCKET_FRAGMENT_AUDIO, PROFILE_BUCKET_FRAGMENT_SUBTITLE, - PROFILE_BUCKET_FRAGMENT_AUXILIARY, PROFILE_BUCKET_DECRYPT_VIDEO, PROFILE_BUCKET_DECRYPT_AUDIO, PROFILE_BUCKET_DECRYPT_SUBTITLE, - PROFILE_BUCKET_DECRYPT_AUXILIARY, PROFILE_BUCKET_LA_TOTAL, PROFILE_BUCKET_LA_PREPROC, PROFILE_BUCKET_LA_NETWORK, @@ -268,7 +248,7 @@ TEST_F(AampProfilertests, ProfileBeginTest2) PROFILE_BUCKET_DISCO_FIRST_FRAME, PROFILE_BUCKET_TYPE_COUNT, }; - for(int i=0;i<28;i++){ + for(int i=0;i<24;i++){ profileEvent.ProfileBegin(profilesList[i]); EXPECT_EQ(profilesList[i],i); } @@ -278,12 +258,8 @@ TEST_F(AampProfilertests, SetTuneFailCodeTest1) ProfileEventAAMP profileEvent; int tuneFailCode = 10; profileEvent.SetTuneFailCode(tuneFailCode,PROFILE_BUCKET_LA_PREPROC); - EXPECT_EQ(PROFILE_BUCKET_LA_PREPROC,18); + EXPECT_EQ(PROFILE_BUCKET_LA_PREPROC,14); EXPECT_EQ(tuneFailCode,10); - tuneFailCode = INT_MAX; - profileEvent.SetTuneFailCode(tuneFailCode,PROFILE_BUCKET_PLAYLIST_AUXILIARY); - EXPECT_EQ(PROFILE_BUCKET_PLAYLIST_AUXILIARY,4); - EXPECT_EQ(tuneFailCode,2147483647); tuneFailCode = INT_MIN; profileEvent.SetTuneFailCode(tuneFailCode,PROFILE_BUCKET_PLAYLIST_AUDIO); EXPECT_EQ(PROFILE_BUCKET_PLAYLIST_AUDIO,2); @@ -296,24 +272,20 @@ TEST_F(AampProfilertests, SetTuneFailCodeTest1) TEST_F(AampProfilertests, SetTuneFailCodeTest2) { ProfileEventAAMP profileEvent; - ProfilerBucketType profilesList[28] = { + ProfilerBucketType profilesList[24] = { PROFILE_BUCKET_MANIFEST, PROFILE_BUCKET_PLAYLIST_VIDEO, PROFILE_BUCKET_PLAYLIST_AUDIO, PROFILE_BUCKET_PLAYLIST_SUBTITLE, - PROFILE_BUCKET_PLAYLIST_AUXILIARY, PROFILE_BUCKET_INIT_VIDEO, PROFILE_BUCKET_INIT_AUDIO, PROFILE_BUCKET_INIT_SUBTITLE, - PROFILE_BUCKET_INIT_AUXILIARY, PROFILE_BUCKET_FRAGMENT_VIDEO, PROFILE_BUCKET_FRAGMENT_AUDIO, PROFILE_BUCKET_FRAGMENT_SUBTITLE, - PROFILE_BUCKET_FRAGMENT_AUXILIARY, PROFILE_BUCKET_DECRYPT_VIDEO, PROFILE_BUCKET_DECRYPT_AUDIO, PROFILE_BUCKET_DECRYPT_SUBTITLE, - PROFILE_BUCKET_DECRYPT_AUXILIARY, PROFILE_BUCKET_LA_TOTAL, PROFILE_BUCKET_LA_PREPROC, PROFILE_BUCKET_LA_NETWORK, @@ -326,7 +298,7 @@ TEST_F(AampProfilertests, SetTuneFailCodeTest2) PROFILE_BUCKET_DISCO_FIRST_FRAME, PROFILE_BUCKET_TYPE_COUNT, }; - for(int i=0;i<28;i++){ + for(int i=0;i<24;i++){ profileEvent.SetTuneFailCode(i,profilesList[i]); EXPECT_EQ(profilesList[i],i); } @@ -335,29 +307,25 @@ TEST_F(AampProfilertests, ProfilePerformedTest1) { ProfileEventAAMP profileEvent; profileEvent.ProfilePerformed(PROFILE_BUCKET_LA_NETWORK); - EXPECT_EQ(PROFILE_BUCKET_LA_NETWORK,19); + EXPECT_EQ(PROFILE_BUCKET_LA_NETWORK,15); } TEST_F(AampProfilertests, ProfilePerformedTest2) { ProfileEventAAMP profileEvent; - ProfilerBucketType ProfilePerformedList[28] = { + ProfilerBucketType ProfilePerformedList[24] = { PROFILE_BUCKET_MANIFEST, PROFILE_BUCKET_PLAYLIST_VIDEO, PROFILE_BUCKET_PLAYLIST_AUDIO, PROFILE_BUCKET_PLAYLIST_SUBTITLE, - PROFILE_BUCKET_PLAYLIST_AUXILIARY, PROFILE_BUCKET_INIT_VIDEO, PROFILE_BUCKET_INIT_AUDIO, PROFILE_BUCKET_INIT_SUBTITLE, - PROFILE_BUCKET_INIT_AUXILIARY, PROFILE_BUCKET_FRAGMENT_VIDEO, PROFILE_BUCKET_FRAGMENT_AUDIO, PROFILE_BUCKET_FRAGMENT_SUBTITLE, - PROFILE_BUCKET_FRAGMENT_AUXILIARY, PROFILE_BUCKET_DECRYPT_VIDEO, PROFILE_BUCKET_DECRYPT_AUDIO, PROFILE_BUCKET_DECRYPT_SUBTITLE, - PROFILE_BUCKET_DECRYPT_AUXILIARY, PROFILE_BUCKET_LA_TOTAL, PROFILE_BUCKET_LA_PREPROC, PROFILE_BUCKET_LA_NETWORK, @@ -370,7 +338,7 @@ TEST_F(AampProfilertests, ProfilePerformedTest2) PROFILE_BUCKET_DISCO_FIRST_FRAME, PROFILE_BUCKET_TYPE_COUNT, }; - for(int i=0;i<28;i++){ + for(int i=0;i<24;i++){ profileEvent.ProfilePerformed(ProfilePerformedList[i]); EXPECT_EQ(ProfilePerformedList[i],i); } diff --git a/test/utests/tests/AampTSBSessionManager/FunctionalTests.cpp b/test/utests/tests/AampTSBSessionManager/FunctionalTests.cpp index 0035ade31..54a39227c 100644 --- a/test/utests/tests/AampTSBSessionManager/FunctionalTests.cpp +++ b/test/utests/tests/AampTSBSessionManager/FunctionalTests.cpp @@ -157,9 +157,6 @@ TEST_F(FunctionalTests, ConvertMediaType) convertedType = mAampTSBSessionManager->ConvertMediaType(eMEDIATYPE_INIT_SUBTITLE); EXPECT_EQ(convertedType, eMEDIATYPE_SUBTITLE); - convertedType = mAampTSBSessionManager->ConvertMediaType(eMEDIATYPE_INIT_AUX_AUDIO); - EXPECT_EQ(convertedType, eMEDIATYPE_AUX_AUDIO); - convertedType = mAampTSBSessionManager->ConvertMediaType(eMEDIATYPE_INIT_IFRAME); EXPECT_EQ(convertedType, eMEDIATYPE_IFRAME); } diff --git a/test/utests/tests/AampTrackWorkerTests/AampTrackWorkerManagerTests.cpp b/test/utests/tests/AampTrackWorkerTests/AampTrackWorkerManagerTests.cpp index 3a8be1c8d..690b26be7 100644 --- a/test/utests/tests/AampTrackWorkerTests/AampTrackWorkerManagerTests.cpp +++ b/test/utests/tests/AampTrackWorkerTests/AampTrackWorkerManagerTests.cpp @@ -75,7 +75,7 @@ TEST_F(AampTrackWorkerManagerTest, CreateWorkerReturnsSameInstance) */ TEST_F(AampTrackWorkerManagerTest, GetWorkerReturnsNullIfNotExists) { - EXPECT_EQ(mTrackWorkerManager->GetWorker(AampMediaType::eMEDIATYPE_AUX_AUDIO), nullptr); + EXPECT_EQ(mTrackWorkerManager->GetWorker(AampMediaType::eMEDIATYPE_AUDIO), nullptr); } /** diff --git a/test/utests/tests/AampTrackWorkerTests/FunctionalTests.cpp b/test/utests/tests/AampTrackWorkerTests/FunctionalTests.cpp index 504f6d7e4..94bd6cb57 100644 --- a/test/utests/tests/AampTrackWorkerTests/FunctionalTests.cpp +++ b/test/utests/tests/AampTrackWorkerTests/FunctionalTests.cpp @@ -243,7 +243,6 @@ TEST_F(FunctionalTests, CreateMultipleWorkers) { PrivateInstanceAAMP mAAMP; aamp::AampTrackWorker audioWorker(&mAAMP, AampMediaType::eMEDIATYPE_AUDIO); - aamp::AampTrackWorker auxAudioWorker(&mAAMP, AampMediaType::eMEDIATYPE_AUX_AUDIO); aamp::AampTrackWorker subtitleWorker(&mAAMP, AampMediaType::eMEDIATYPE_SUBTITLE); SUCCEED(); } diff --git a/test/utests/tests/AampTsbSessionManagerTests_Mocked/FunctionalTests.cpp b/test/utests/tests/AampTsbSessionManagerTests_Mocked/FunctionalTests.cpp index f0b630b4b..2b1097ddd 100644 --- a/test/utests/tests/AampTsbSessionManagerTests_Mocked/FunctionalTests.cpp +++ b/test/utests/tests/AampTsbSessionManagerTests_Mocked/FunctionalTests.cpp @@ -371,7 +371,7 @@ TEST_F(AampTsbSessionManagerTests, TSBWriteTests_WrongMediaType) cachedFragment->duration = 0; cachedFragment->position = 0; cachedFragment->fragment.AppendBytes(TEST_DATA, strlen(TEST_DATA)); - // Valid media types are only VIDEO, AUDIO, SUBTITLE, AUX_AUDIO and INIT fragments + // Valid media types are only VIDEO, AUDIO, SUBTITLE and INIT fragments cachedFragment->type = eMEDIATYPE_DEFAULT; EXPECT_CALL(*g_mockPrivateInstanceAAMP, RecalculatePTS(_,_,_)).Times(0); diff --git a/test/utests/tests/AampUtilsTests/AampUtilsTests.cpp b/test/utests/tests/AampUtilsTests/AampUtilsTests.cpp index 752fff713..a6aaf2d61 100644 --- a/test/utests/tests/AampUtilsTests/AampUtilsTests.cpp +++ b/test/utests/tests/AampUtilsTests/AampUtilsTests.cpp @@ -660,23 +660,20 @@ TEST(_AampUtils, GetNetworkTimeTest2) } TEST(_AampUtils, GetMediaTypeNameTest) { - AampMediaType mediaType[21] = { + AampMediaType mediaType[18] = { eMEDIATYPE_DEFAULT, eMEDIATYPE_VIDEO, eMEDIATYPE_AUDIO, eMEDIATYPE_SUBTITLE, - eMEDIATYPE_AUX_AUDIO, eMEDIATYPE_MANIFEST, eMEDIATYPE_LICENCE, eMEDIATYPE_IFRAME, eMEDIATYPE_INIT_VIDEO, eMEDIATYPE_INIT_AUDIO, eMEDIATYPE_INIT_SUBTITLE, - eMEDIATYPE_INIT_AUX_AUDIO, eMEDIATYPE_PLAYLIST_VIDEO, eMEDIATYPE_PLAYLIST_AUDIO, eMEDIATYPE_PLAYLIST_SUBTITLE, - eMEDIATYPE_PLAYLIST_AUX_AUDIO, eMEDIATYPE_PLAYLIST_IFRAME, eMEDIATYPE_INIT_IFRAME, eMEDIATYPE_DSM_CC, diff --git a/test/utests/tests/CachedFragmentTests/CachedFragmentTestCases.cpp b/test/utests/tests/CachedFragmentTests/CachedFragmentTestCases.cpp index 55409dc55..d950cce20 100644 --- a/test/utests/tests/CachedFragmentTests/CachedFragmentTestCases.cpp +++ b/test/utests/tests/CachedFragmentTests/CachedFragmentTestCases.cpp @@ -394,7 +394,6 @@ TEST_F(CachedFragmentTest, AampMediaType_CommonEnumValues_SetAndRetrievedCorrect eMEDIATYPE_VIDEO, eMEDIATYPE_AUDIO, eMEDIATYPE_SUBTITLE, - eMEDIATYPE_AUX_AUDIO, eMEDIATYPE_MANIFEST, eMEDIATYPE_LICENCE, eMEDIATYPE_IFRAME diff --git a/test/utests/tests/PlayerInstanceAAMP/PlayerInstanceAAMPTestsMain.cpp b/test/utests/tests/PlayerInstanceAAMP/PlayerInstanceAAMPTestsMain.cpp index 29b4df902..27281ebab 100644 --- a/test/utests/tests/PlayerInstanceAAMP/PlayerInstanceAAMPTestsMain.cpp +++ b/test/utests/tests/PlayerInstanceAAMP/PlayerInstanceAAMPTestsMain.cpp @@ -2197,32 +2197,6 @@ TEST_F(PlayerInstanceAAMPTests,InitAAMPConfigTest) mPlayerInstance->InitAAMPConfig(jsonStr); } -TEST_F(PlayerInstanceAAMPTests,SetAuxiliaryLanguageTest1) -{ - //checking minimum string - std::string language = "a"; - EXPECT_CALL(*g_mockPrivateInstanceAAMP, GetState()).WillRepeatedly(Return(eSTATE_PLAYING)); - - EXPECT_CALL(*g_mockAampConfig, IsConfigSet(eAAMPConfig_AsyncTune)).WillRepeatedly(Return(true)); - mPlayerInstance->AsyncStartStop(); - - EXPECT_CALL(*g_mockAampScheduler, ScheduleTask(_)).WillOnce(Return(1)); - mPlayerInstance->SetAuxiliaryLanguage(language); -} -TEST_F(PlayerInstanceAAMPTests,SetAuxiliaryLanguageTest2) -{ - //checking maximum string - std::string language(1000000,'A'); - mPlayerInstance->SetAuxiliaryLanguage(language); -} - -TEST_F(PlayerInstanceAAMPTests,SetAuxiliaryLanguageTest3) -{ - //checking random string - std::string language = "English"; - mPlayerInstance->SetAuxiliaryLanguage(language); -} - TEST_F(PlayerInstanceAAMPTests,SetPlaybackSpeedTest1) { //checking null speed diff --git a/test/utests/tests/PrivAampTests/PrivAampTests.cpp b/test/utests/tests/PrivAampTests/PrivAampTests.cpp index 9a9fd4af3..d63617567 100644 --- a/test/utests/tests/PrivAampTests/PrivAampTests.cpp +++ b/test/utests/tests/PrivAampTests/PrivAampTests.cpp @@ -338,9 +338,9 @@ class PrivAampPrivTests : public ::testing::Test IsDiscontinuityProcessPending(); NotifyEOSReached(); } - void CallGetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &auxAudioOutputFormat, StreamOutputFormat &subtitleOutputFormat) + void CallGetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &subtitleOutputFormat) { - GetStreamFormat(primaryOutputFormat, audioOutputFormat, auxAudioOutputFormat, subtitleOutputFormat); + GetStreamFormat(primaryOutputFormat, audioOutputFormat, subtitleOutputFormat); } void GetAvailableTracks_obj() { @@ -1498,31 +1498,31 @@ TEST_F(PrivAampTests,IsDiscontinuityProcessPendingTest) TEST_F(PrivAampTests,IsDiscontinuityProcessPendingTest_1) { - p_aamp->SetStreamFormat(FORMAT_INVALID,FORMAT_INVALID,FORMAT_INVALID); + p_aamp->SetStreamFormat(FORMAT_INVALID,FORMAT_INVALID); EXPECT_FALSE(p_aamp->IsDiscontinuityProcessPending()); - p_aamp->SetStreamFormat(FORMAT_UNKNOWN,FORMAT_UNKNOWN,FORMAT_UNKNOWN); + p_aamp->SetStreamFormat(FORMAT_UNKNOWN,FORMAT_UNKNOWN); EXPECT_FALSE(p_aamp->IsDiscontinuityProcessPending()); - p_aamp->SetStreamFormat(FORMAT_UNKNOWN,FORMAT_INVALID,FORMAT_INVALID); + p_aamp->SetStreamFormat(FORMAT_UNKNOWN,FORMAT_INVALID); EXPECT_FALSE(p_aamp->IsDiscontinuityProcessPending()); - p_aamp->SetStreamFormat(FORMAT_INVALID,FORMAT_UNKNOWN,FORMAT_INVALID); + p_aamp->SetStreamFormat(FORMAT_INVALID,FORMAT_UNKNOWN); EXPECT_FALSE(p_aamp->IsDiscontinuityProcessPending()); - p_aamp->SetStreamFormat(FORMAT_INVALID,FORMAT_UNKNOWN,FORMAT_UNKNOWN); + p_aamp->SetStreamFormat(FORMAT_INVALID,FORMAT_UNKNOWN); EXPECT_FALSE(p_aamp->IsDiscontinuityProcessPending()); } TEST_F(PrivAampTests,IsDiscontinuityProcessPendingTest_2) { - p_aamp->SetStreamFormat(FORMAT_VIDEO_ES_H264,FORMAT_AUDIO_ES_AC3,FORMAT_UNKNOWN); + p_aamp->SetStreamFormat(FORMAT_VIDEO_ES_H264,FORMAT_AUDIO_ES_AC3); EXPECT_FALSE(p_aamp->IsDiscontinuityProcessPending()); - p_aamp->SetStreamFormat(FORMAT_VIDEO_ES_HEVC,FORMAT_AUDIO_ES_ATMOS,FORMAT_INVALID); + p_aamp->SetStreamFormat(FORMAT_VIDEO_ES_HEVC,FORMAT_AUDIO_ES_ATMOS); EXPECT_FALSE(p_aamp->IsDiscontinuityProcessPending()); - p_aamp->SetStreamFormat(FORMAT_VIDEO_ES_MPEG2,FORMAT_AUDIO_ES_AAC,FORMAT_INVALID); + p_aamp->SetStreamFormat(FORMAT_VIDEO_ES_MPEG2,FORMAT_AUDIO_ES_AAC); EXPECT_FALSE(p_aamp->IsDiscontinuityProcessPending()); } @@ -1620,7 +1620,6 @@ TEST_F(PrivAampTests,ResetProfileCacheTest) { ProfileEventAAMP profiler; profiler.ProfileReset(PROFILE_BUCKET_INIT_VIDEO); - profiler.ProfileReset(PROFILE_BUCKET_FRAGMENT_AUXILIARY); p_aamp->ResetProfileCache(); } @@ -1787,7 +1786,7 @@ TEST_F(PrivAampTests,SetCurlTimeoutTest_2) TEST_F(PrivAampTests,CurlTermTest) { - p_aamp->CurlTerm(eCURLINSTANCE_AUDIO,10); + p_aamp->CurlTerm(eCURLINSTANCE_AUDIO,9); } TEST_F(PrivAampTests,CurlTermTest_1) @@ -1800,28 +1799,25 @@ TEST_F(PrivAampTests,CurlTermTest_1) TEST_F(PrivAampTests,GetPlaylistCurlInstanceTest) { AampCurlInstance retVar = p_aamp->GetPlaylistCurlInstance(eMEDIATYPE_PLAYLIST_VIDEO,true); - EXPECT_EQ(4,retVar); + EXPECT_EQ(3,retVar); } TEST_F(PrivAampTests,GetPlaylistCurlInstanceTest_1) { AampCurlInstance retVar = p_aamp->GetPlaylistCurlInstance(eMEDIATYPE_PLAYLIST_VIDEO,false); - EXPECT_EQ(5,retVar); + EXPECT_EQ(4,retVar); retVar = p_aamp->GetPlaylistCurlInstance(eMEDIATYPE_PLAYLIST_IFRAME,false); - EXPECT_EQ(5,retVar); + EXPECT_EQ(4,retVar); } TEST_F(PrivAampTests,GetPlaylistCurlInstanceTest_2) { AampCurlInstance retVar = p_aamp->GetPlaylistCurlInstance(eMEDIATYPE_PLAYLIST_AUDIO,false); - EXPECT_EQ(6,retVar); + EXPECT_EQ(5,retVar); retVar = p_aamp->GetPlaylistCurlInstance(eMEDIATYPE_PLAYLIST_SUBTITLE,false); - EXPECT_EQ(7,retVar); - - retVar = p_aamp->GetPlaylistCurlInstance(eMEDIATYPE_PLAYLIST_AUX_AUDIO,false); - EXPECT_EQ(8,retVar); + EXPECT_EQ(6,retVar); } TEST_F(PrivAampTests,ResetCurrentlyAvailableBandwidthTest) @@ -1997,7 +1993,6 @@ INSTANTIATE_TEST_SUITE_P( ::testing::Values( eMEDIATYPE_INIT_VIDEO, eMEDIATYPE_INIT_AUDIO, - eMEDIATYPE_INIT_AUX_AUDIO, eMEDIATYPE_INIT_SUBTITLE, eMEDIATYPE_INIT_IFRAME ), @@ -2005,7 +2000,6 @@ INSTANTIATE_TEST_SUITE_P( switch (info.param) { case eMEDIATYPE_INIT_VIDEO: return "InitVideo"; case eMEDIATYPE_INIT_AUDIO: return "InitAudio"; - case eMEDIATYPE_INIT_AUX_AUDIO: return "InitAuxAudio"; case eMEDIATYPE_INIT_SUBTITLE: return "InitSubtitle"; default: return "Unknown"; } @@ -3222,15 +3216,15 @@ TEST_F(PrivAampTests,getStreamTypeStringTest) TEST_F(PrivAampTests,mediaType2BucketTest) { - EXPECT_EQ(9,p_aamp->mediaType2Bucket(eMEDIATYPE_VIDEO)); + EXPECT_EQ(7,p_aamp->mediaType2Bucket(eMEDIATYPE_VIDEO)); } TEST_F(PrivAampTests,mediaType2BucketTest_1) { - EXPECT_EQ(9,p_aamp->mediaType2Bucket(eMEDIATYPE_VIDEO)); - EXPECT_EQ(10,p_aamp->mediaType2Bucket(eMEDIATYPE_AUDIO)); - EXPECT_EQ(5,p_aamp->mediaType2Bucket(eMEDIATYPE_LICENCE)); - EXPECT_EQ(6,p_aamp->mediaType2Bucket(eMEDIATYPE_IFRAME)); + EXPECT_EQ(7,p_aamp->mediaType2Bucket(eMEDIATYPE_VIDEO)); + EXPECT_EQ(8,p_aamp->mediaType2Bucket(eMEDIATYPE_AUDIO)); + EXPECT_EQ(4,p_aamp->mediaType2Bucket(eMEDIATYPE_LICENCE)); + EXPECT_EQ(5,p_aamp->mediaType2Bucket(eMEDIATYPE_IFRAME)); EXPECT_EQ(20,p_aamp->mediaType2Bucket((AampMediaType)20)); } @@ -3402,10 +3396,8 @@ TEST_F(PrivAampTests,TrackDownloadsAreEnabledTest) { EXPECT_FALSE(p_aamp->TrackDownloadsAreEnabled(eMEDIATYPE_INIT_VIDEO)); EXPECT_FALSE(p_aamp->TrackDownloadsAreEnabled(eMEDIATYPE_LICENCE)); - EXPECT_FALSE(p_aamp->TrackDownloadsAreEnabled(eMEDIATYPE_PLAYLIST_AUX_AUDIO)); EXPECT_FALSE(p_aamp->TrackDownloadsAreEnabled(eMEDIATYPE_DEFAULT)); - EXPECT_TRUE(p_aamp->TrackDownloadsAreEnabled(eMEDIATYPE_AUX_AUDIO)); EXPECT_TRUE(p_aamp->TrackDownloadsAreEnabled(eMEDIATYPE_VIDEO)); } @@ -3662,8 +3654,8 @@ TEST_F(PrivAampTests,IsDiscontinuityIgnoredForCurrentTrackTest) TEST_F(PrivAampTests,IsAudioOrVideoOnlyTest) { - EXPECT_FALSE(p_aamp->IsAudioOrVideoOnly(FORMAT_INVALID,FORMAT_INVALID,FORMAT_INVALID)); - EXPECT_FALSE(p_aamp->IsAudioOrVideoOnly(FORMAT_VIDEO_ES_MPEG2,FORMAT_AUDIO_ES_AAC,FORMAT_MPEGTS)); + EXPECT_FALSE(p_aamp->IsAudioOrVideoOnly(FORMAT_INVALID,FORMAT_INVALID)); + EXPECT_FALSE(p_aamp->IsAudioOrVideoOnly(FORMAT_VIDEO_ES_MPEG2,FORMAT_AUDIO_ES_AAC)); } @@ -3719,11 +3711,6 @@ TEST_F(PrivAampTests,TryStreamLockTest) p_aamp->ReleaseStreamLock(); } -TEST_F(PrivAampTests,IsAuxiliaryAudioEnabledTest) -{ - EXPECT_FALSE(p_aamp->IsAuxiliaryAudioEnabled()); -} - TEST_F(PrivAampTests,ResetDiscontinuityInTracksTest) { p_aamp->ResetDiscontinuityInTracks(); @@ -3980,9 +3967,7 @@ TEST_F(PrivAampTests,IsAudioOrVideoOnlyTest1) StreamOutputFormat audioFormat_result= FORMAT_INVALID; - StreamOutputFormat auxFormat_result= FORMAT_INVALID; - - bool result = p_aamp->IsAudioOrVideoOnly(videoFormat_result,audioFormat_result,auxFormat_result); + bool result = p_aamp->IsAudioOrVideoOnly(videoFormat_result,audioFormat_result); EXPECT_TRUE(result); } @@ -3996,9 +3981,7 @@ TEST_F(PrivAampTests,IsAudioOrVideoOnlyTest2) StreamOutputFormat audioFormat_result= FORMAT_INVALID; - StreamOutputFormat auxFormat_result= FORMAT_INVALID; - - bool result = p_aamp->IsAudioOrVideoOnly(videoFormat_result,audioFormat_result,auxFormat_result); + bool result = p_aamp->IsAudioOrVideoOnly(videoFormat_result,audioFormat_result); EXPECT_TRUE(result); } @@ -4008,14 +3991,11 @@ TEST_F(PrivAampTests,IsAudioOrVideoOnlyTest3) StreamOutputFormat videoFormat_result = FORMAT_INVALID; - StreamOutputFormat mAudioFormat_result= p_aamp->mAuxFormat = FORMAT_UNKNOWN; + StreamOutputFormat mAudioFormat_result= FORMAT_UNKNOWN; StreamOutputFormat audioFormat_result= FORMAT_INVALID; - StreamOutputFormat auxFormat_result= FORMAT_INVALID; - - bool result = p_aamp->IsAudioOrVideoOnly(videoFormat_result,audioFormat_result,auxFormat_result); - + bool result = p_aamp->IsAudioOrVideoOnly(videoFormat_result,audioFormat_result); EXPECT_TRUE(result); } @@ -4037,17 +4017,14 @@ TEST_F(PrivAampTests,SendTuneMetricsEventTest) TEST_F(PrivAampTests,mediaType2BucketTest_122) { - EXPECT_EQ(11,p_aamp->mediaType2Bucket(eMEDIATYPE_SUBTITLE)); - EXPECT_EQ(12,p_aamp->mediaType2Bucket(eMEDIATYPE_AUX_AUDIO)); + EXPECT_EQ(9,p_aamp->mediaType2Bucket(eMEDIATYPE_SUBTITLE)); EXPECT_EQ(0,p_aamp->mediaType2Bucket(eMEDIATYPE_MANIFEST)); - EXPECT_EQ(5,p_aamp->mediaType2Bucket(eMEDIATYPE_INIT_VIDEO)); - EXPECT_EQ(6,p_aamp->mediaType2Bucket(eMEDIATYPE_INIT_AUDIO)); - EXPECT_EQ(7,p_aamp->mediaType2Bucket(eMEDIATYPE_INIT_SUBTITLE)); - EXPECT_EQ(8,p_aamp->mediaType2Bucket(eMEDIATYPE_INIT_AUX_AUDIO)); + EXPECT_EQ(4,p_aamp->mediaType2Bucket(eMEDIATYPE_INIT_VIDEO)); + EXPECT_EQ(5,p_aamp->mediaType2Bucket(eMEDIATYPE_INIT_AUDIO)); + EXPECT_EQ(6,p_aamp->mediaType2Bucket(eMEDIATYPE_INIT_SUBTITLE)); EXPECT_EQ(1,p_aamp->mediaType2Bucket(eMEDIATYPE_PLAYLIST_VIDEO)); EXPECT_EQ(2,p_aamp->mediaType2Bucket(eMEDIATYPE_PLAYLIST_AUDIO)); EXPECT_EQ(3,p_aamp->mediaType2Bucket(eMEDIATYPE_PLAYLIST_SUBTITLE)); - EXPECT_EQ(4,p_aamp->mediaType2Bucket(eMEDIATYPE_PLAYLIST_AUX_AUDIO)); EXPECT_EQ(20,p_aamp->mediaType2Bucket((AampMediaType)20)); } @@ -4165,21 +4142,7 @@ TEST_F(PrivAampTests,UpdateVideoEndMetricsTest3) p_aamp->UpdateVideoEndMetrics(mediaType, bitrate, curlOrHTTPCode, strUrl, duration, curlDownloadTime); } -TEST_F(PrivAampTests,UpdateVideoEndMetricsTest4) -{ - // covering eMEDIATYPE_PLAYLIST_AUX_AUDIO switch case - - AampMediaType mediaType = eMEDIATYPE_PLAYLIST_AUX_AUDIO; - BitsPerSecond bitrate = 500000; - int curlOrHTTPCode = CURLcode::CURLE_FUNCTION_NOT_FOUND; - std::string strUrl = "strUrl"; - double duration = 20.15; - double curlDownloadTime = 10.98; - bool keyChanged = false; - bool isEncrypted = true; - p_aamp->UpdateVideoEndMetrics(mediaType, bitrate, curlOrHTTPCode, strUrl, duration, curlDownloadTime); -} TEST_F(PrivAampTests,UpdateVideoEndMetricsTest5) { // covering eMEDIATYPE_PLAYLIST_IFRAME switch case @@ -4225,21 +4188,7 @@ TEST_F(PrivAampTests,UpdateVideoEndMetricsTest7) p_aamp->UpdateVideoEndMetrics(mediaType, bitrate, curlOrHTTPCode, strUrl, duration, curlDownloadTime); } -TEST_F(PrivAampTests,UpdateVideoEndMetricsTest8) -{ - // covering eMEDIATYPE_AUX_AUDIO switch case - - AampMediaType mediaType = eMEDIATYPE_AUX_AUDIO; - BitsPerSecond bitrate = 200000; - int curlOrHTTPCode = CURLcode::CURLE_FUNCTION_NOT_FOUND; - std::string strUrl = "strUrl"; - double duration = 20.15; - double curlDownloadTime = 10.98; - bool keyChanged = true; - bool isEncrypted = true; - p_aamp->UpdateVideoEndMetrics(mediaType, bitrate, curlOrHTTPCode, strUrl, duration, curlDownloadTime); -} TEST_F(PrivAampTests,UpdateVideoEndMetricsTest9) { // covering eMEDIATYPE_IFRAME switch case @@ -4301,20 +4250,7 @@ TEST_F(PrivAampTests,UpdateVideoEndMetricsTest12) p_aamp->UpdateVideoEndMetrics(mediaType, bitrate, curlOrHTTPCode, strUrl, duration, curlDownloadTime); } -TEST_F(PrivAampTests,UpdateVideoEndMetricsTest13) -{ - // covering eMEDIATYPE_INIT_AUX_AUDIO switch case - AampMediaType mediaType = eMEDIATYPE_INIT_AUX_AUDIO; - BitsPerSecond bitrate = 500000; - int curlOrHTTPCode = CURLcode::CURLE_FUNCTION_NOT_FOUND; - std::string strUrl = "strUrl"; - double duration = 20.15; - double curlDownloadTime = 11.8; - bool keyChanged = false; - bool isEncrypted = false; - p_aamp->UpdateVideoEndMetrics(mediaType, bitrate, curlOrHTTPCode, strUrl, duration, curlDownloadTime); -} TEST_F(PrivAampTests,UpdateVideoEndMetricsTest14) { // covering eMEDIATYPE_SUBTITLE switch case @@ -4853,20 +4789,20 @@ TEST_F(PrivAampPrivTests, TuneHelperWithAampTsbConfigureFlushSequence) //Verify the sequence for SeekToLive EXPECT_CALL(*g_mockAampStreamSinkManager, GetStreamSink(_)).WillRepeatedly(Return(g_mockAampGstPlayer)); EXPECT_CALL(*g_mockStreamAbstractionAAMP_MPD, DoEarlyStreamSinkFlush(false, AAMP_NORMAL_PLAY_RATE)).WillRepeatedly(Return(true)); - EXPECT_CALL(*g_mockAampGstPlayer, Configure(_,_,_,_,_,_,_)).InSequence(s); + EXPECT_CALL(*g_mockAampGstPlayer, Configure(_,_,_,_,_)).InSequence(s); EXPECT_CALL(*g_mockAampGstPlayer, Flush(_,_,_)).InSequence(s); testp_aamp->TuneHelper(eTUNETYPE_SEEKTOLIVE); //Verify the sequence for newTune EXPECT_CALL(*g_mockStreamAbstractionAAMP_MPD, DoEarlyStreamSinkFlush(true, AAMP_NORMAL_PLAY_RATE)).WillRepeatedly(Return(true)); - EXPECT_CALL(*g_mockAampGstPlayer, Configure(_,_,_,_,_,_,_)).InSequence(s); + EXPECT_CALL(*g_mockAampGstPlayer, Configure(_,_,_,_,_)).InSequence(s); EXPECT_CALL(*g_mockAampGstPlayer, Flush(_,_,_)).InSequence(s); testp_aamp->TuneHelper(eTUNETYPE_NEW_NORMAL); //Verify the sequence for eTUNETYPE_SEEK testp_aamp->SetLocalAAMPTsb(true); EXPECT_CALL(*g_mockAampGstPlayer, Flush(_,_,_)).InSequence(s); - EXPECT_CALL(*g_mockAampGstPlayer, Configure(_,_,_,_,_,_,_)).InSequence(s); + EXPECT_CALL(*g_mockAampGstPlayer, Configure(_,_,_,_,_)).InSequence(s); EXPECT_CALL(*g_mockAampGstPlayer, Flush(_,_,_)).InSequence(s); testp_aamp->TuneHelper(eTUNETYPE_SEEK); } @@ -5009,11 +4945,9 @@ struct GetStreamFormatTestParams { bool useRialtoSink; StreamOutputFormat mockPrimary; StreamOutputFormat mockAudio; - StreamOutputFormat mockAuxAudio; StreamOutputFormat mockSubtitle; StreamOutputFormat expectedPrimary; StreamOutputFormat expectedAudio; - StreamOutputFormat expectedAuxAudio; StreamOutputFormat expectedSubtitle; // For test name generation @@ -5041,28 +4975,26 @@ TEST_P(GetStreamFormatTests, GetStreamFormatParameterizedTest) { auto params = GetParam(); - StreamOutputFormat primaryOutputFormat, audioOutputFormat, auxAudioOutputFormat, subtitleOutputFormat; + StreamOutputFormat primaryOutputFormat, audioOutputFormat, subtitleOutputFormat; testp_aamp->mpStreamAbstractionAAMP = g_mockStreamAbstractionAAMP_MPD; testp_aamp->rate = params.rate; testp_aamp->SetLocalAAMPTsbInjection(params.hasTsbInjection); - EXPECT_CALL(*g_mockStreamAbstractionAAMP_MPD, GetStreamFormat(_,_,_,_)) + EXPECT_CALL(*g_mockStreamAbstractionAAMP_MPD, GetStreamFormat(_,_,_)) .Times(1) .WillOnce(DoAll( SetArgReferee<0>(params.mockPrimary), SetArgReferee<1>(params.mockAudio), - SetArgReferee<2>(params.mockAuxAudio), - SetArgReferee<3>(params.mockSubtitle) + SetArgReferee<2>(params.mockSubtitle) )); EXPECT_CALL(*g_mockAampConfig, IsConfigSet(eAAMPConfig_useRialtoSink)).WillOnce(Return(params.useRialtoSink)); - testp_aamp->CallGetStreamFormat(primaryOutputFormat, audioOutputFormat, auxAudioOutputFormat, subtitleOutputFormat); + testp_aamp->CallGetStreamFormat(primaryOutputFormat, audioOutputFormat, subtitleOutputFormat); EXPECT_EQ(primaryOutputFormat, params.expectedPrimary); EXPECT_EQ(audioOutputFormat, params.expectedAudio); - EXPECT_EQ(auxAudioOutputFormat, params.expectedAuxAudio); EXPECT_EQ(subtitleOutputFormat, params.expectedSubtitle); } @@ -5076,11 +5008,9 @@ INSTANTIATE_TEST_SUITE_P( false, // useRialtoSink FORMAT_VIDEO_ES_H264, // mockPrimary FORMAT_AUDIO_ES_AC3, // mockAudio - FORMAT_INVALID, // mockAuxAudio FORMAT_SUBTITLE_WEBVTT, // mockSubtitle FORMAT_VIDEO_ES_H264, // expectedPrimary FORMAT_AUDIO_ES_AC3, // expectedAudio - FORMAT_INVALID, // expectedAuxAudio FORMAT_SUBTITLE_WEBVTT // expectedSubtitle }, GetStreamFormatTestParams{ @@ -5089,11 +5019,9 @@ INSTANTIATE_TEST_SUITE_P( true, // useRialtoSink FORMAT_VIDEO_ES_H264, // mockPrimary FORMAT_AUDIO_ES_AC3, // mockAudio - FORMAT_INVALID, // mockAuxAudio FORMAT_SUBTITLE_WEBVTT, // mockSubtitle FORMAT_VIDEO_ES_H264, // expectedPrimary FORMAT_AUDIO_ES_AC3, // expectedAudio - FORMAT_INVALID, // expectedAuxAudio FORMAT_SUBTITLE_WEBVTT // expectedSubtitle }, GetStreamFormatTestParams{ @@ -5102,11 +5030,9 @@ INSTANTIATE_TEST_SUITE_P( true, // useRialtoSink FORMAT_VIDEO_ES_H264, // mockPrimary FORMAT_AUDIO_ES_AC3, // mockAudio - FORMAT_INVALID, // mockAuxAudio FORMAT_SUBTITLE_WEBVTT, // mockSubtitle FORMAT_VIDEO_ES_H264, // expectedPrimary FORMAT_AUDIO_ES_AC3, // expectedAudio - FORMAT_INVALID, // expectedAuxAudio FORMAT_SUBTITLE_WEBVTT // expectedSubtitle }, GetStreamFormatTestParams{ @@ -5115,11 +5041,9 @@ INSTANTIATE_TEST_SUITE_P( true, // useRialtoSink FORMAT_VIDEO_ES_H264, // mockPrimary FORMAT_AUDIO_ES_AC3, // mockAudio - FORMAT_INVALID, // mockAuxAudio FORMAT_SUBTITLE_WEBVTT, // mockSubtitle FORMAT_VIDEO_ES_H264, // expectedPrimary FORMAT_INVALID, // expectedAudio - FORMAT_INVALID, // expectedAuxAudio FORMAT_INVALID // expectedSubtitle } ) diff --git a/test/utests/tests/PrivAampTests/PrivAampTests_TsbInjection.cpp b/test/utests/tests/PrivAampTests/PrivAampTests_TsbInjection.cpp index e657d2689..ee1d2ed73 100644 --- a/test/utests/tests/PrivAampTests/PrivAampTests_TsbInjection.cpp +++ b/test/utests/tests/PrivAampTests/PrivAampTests_TsbInjection.cpp @@ -65,7 +65,6 @@ struct TrackInjectionParams bool videoInjection; bool audioInjection; bool subtitleInjection; - bool auxAudioInjection; bool videoTrackEnabled; // For test name generation @@ -75,7 +74,6 @@ struct TrackInjectionParams ss << "V" << videoInjection << "_A" << audioInjection << "_S" << subtitleInjection - << "_X" << auxAudioInjection << "_VE" << videoTrackEnabled; return ss.str(); } @@ -131,25 +129,22 @@ TEST_P(TestPrivateInstanceAAMPTracks, UpdateLocalAAMPTsbInjection) const bool hasActiveVideoInjection = params.videoInjection && params.videoTrackEnabled; const bool expectedInjection = hasActiveVideoInjection || params.audioInjection || - params.subtitleInjection || params.auxAudioInjection; + params.subtitleInjection; // Calculate expected call counts based on short-circuit evaluation const int expectVideoCheck = (hasActiveVideoInjection) ? 1 : 0; const int expectAudioCheck = (hasActiveVideoInjection) ? 0 : 1; const int expectSubtitleCheck = (hasActiveVideoInjection || params.audioInjection) ? 0 : 1; - const int expectAuxCheck = (hasActiveVideoInjection || params.audioInjection || params.subtitleInjection) ? 0 : 1; // Create tracks auto videoTrack = CreateMockTrack(eTRACK_VIDEO, "VIDEO"); auto audioTrack = CreateMockTrack(eTRACK_AUDIO, "AUDIO"); auto subtitleTrack = params.subtitleInjection ? CreateMockTrack(eTRACK_SUBTITLE, "SUBTITLE") : nullptr; - auto auxTrack = CreateMockTrack(eTRACK_AUX_AUDIO, "AUX_AUDIO"); // Setup expectations SetupTrackExpectations(eTRACK_VIDEO, videoTrack, params.videoInjection, params.videoTrackEnabled, 1, expectVideoCheck); SetupTrackExpectations(eTRACK_AUDIO, audioTrack, params.audioInjection, true, expectAudioCheck, expectAudioCheck); SetupTrackExpectations(eTRACK_SUBTITLE, subtitleTrack, params.subtitleInjection, true, expectSubtitleCheck, expectSubtitleCheck); - SetupTrackExpectations(eTRACK_AUX_AUDIO, auxTrack, params.auxAudioInjection, true, expectAuxCheck, expectAuxCheck); // Execute test p_aamp->UpdateLocalAAMPTsbInjection(); @@ -161,13 +156,12 @@ TEST_P(TestPrivateInstanceAAMPTracks, UpdateLocalAAMPTsbInjection) // Generate test cases for all track combinations std::vector GenerateTestCases() { std::vector cases; - for (int i = 0; i < 16; i++) { + for (int i = 0; i < 8; i++) { cases.push_back({ - static_cast(i & 0x8), static_cast(i & 0x4), static_cast(i & 0x2), static_cast(i & 0x1), - static_cast(i & 0x8) // Video track enabled if video injection is true + static_cast(i & 0x4) // Video track enabled if video injection is true }); } @@ -176,7 +170,6 @@ std::vector GenerateTestCases() { true, false, false, - false, false // Video track not enabled }); diff --git a/test/utests/tests/StreamAbstractionAAMP/FunctionalTests.cpp b/test/utests/tests/StreamAbstractionAAMP/FunctionalTests.cpp index 1ce086d2c..f3ff6d441 100644 --- a/test/utests/tests/StreamAbstractionAAMP/FunctionalTests.cpp +++ b/test/utests/tests/StreamAbstractionAAMP/FunctionalTests.cpp @@ -80,7 +80,7 @@ class StreamAbstractionAAMP_Test : public ::testing::Test virtual AAMPStatusType Init(TuneType tuneType) override {return eAAMPSTATUS_OK;} virtual void Start() override {} virtual void Stop(bool clearChannelData) override {} - virtual void GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &auxAudioOutputFormat, StreamOutputFormat &subtitleOutputFormat) override {} + virtual void GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &subtitleOutputFormat) override {} virtual MediaTrack* GetMediaTrack(TrackType type) override { diff --git a/test/utests/tests/StreamAbstractionAAMP_HLS/FunctionalTests.cpp b/test/utests/tests/StreamAbstractionAAMP_HLS/FunctionalTests.cpp index aa5696939..cfbefea77 100644 --- a/test/utests/tests/StreamAbstractionAAMP_HLS/FunctionalTests.cpp +++ b/test/utests/tests/StreamAbstractionAAMP_HLS/FunctionalTests.cpp @@ -867,15 +867,6 @@ TEST_F(StreamAbstractionAAMP_HLSTest, GetStreamOutputFormatForTrackAudio) EXPECT_EQ(outputFormat, expectedAudioOutputFormat); } -TEST_F(StreamAbstractionAAMP_HLSTest, GetStreamOutputFormatForTrackAuxAudio) -{ - - TrackType auxAudioTrackType = eTRACK_AUX_AUDIO; - StreamOutputFormat outputFormat = mStreamAbstractionAAMP_HLS->GetStreamOutputFormatForTrack(auxAudioTrackType); - StreamOutputFormat expectedAuxAudioOutputFormat = FORMAT_AUDIO_ES_AAC; // Example value, replace with your logic - EXPECT_EQ(outputFormat, expectedAuxAudioOutputFormat); -} - TEST_F(StreamAbstractionAAMP_HLSTest, GetMediaIndexForLanguage) { @@ -1181,13 +1172,6 @@ TEST_F(TrackStateTests, FetchPlaylistTest_eTRACK_SUBTITLE) TrackStateobj->FetchPlaylist(); } -TEST_F(TrackStateTests, FetchPlaylistTest_eTRACK_AUX_AUDIO) -{ - //To Cover MediaTrack::type as eTRACK_AUX_AUDIO - TrackStateobj->type = TrackType::eTRACK_AUX_AUDIO; - TrackStateobj->FetchPlaylist(); -} - TEST_F(TrackStateTests, GetPeriodStartPositionTest) { AampTime result{TrackStateobj->GetPeriodStartPosition(1000)}; @@ -2021,12 +2005,6 @@ TEST_F(StreamAbstractionAAMP_HLSTest, RefreshSubtitlestest) mStreamAbstractionAAMP_HLS->RefreshSubtitles(); } -TEST_F(StreamAbstractionAAMP_HLSTest, WaitForVideoTrackCatchupForAuxtest) -{ - // Set up necessary data and conditions for testing - mStreamAbstractionAAMP_HLS->WaitForVideoTrackCatchupForAux(); -} - TEST_F(StreamAbstractionAAMP_HLSTest, GetPreferredLiveOffsetFromConfigtest_1) { // Set up necessary data and conditions for testing @@ -2498,11 +2476,6 @@ TEST_F(TrackStateTests, GetPlaylistMediaTypeFromTrackTest_3) AampMediaType playlistMediaType = TrackStateobj->GetPlaylistMediaTypeFromTrack(eTRACK_SUBTITLE, false); } -TEST_F(TrackStateTests, GetPlaylistMediaTypeFromTrackTest_4) -{ - AampMediaType playlistMediaType = TrackStateobj->GetPlaylistMediaTypeFromTrack(eTRACK_AUX_AUDIO, false); -} - TEST_F(StreamAbstractionAAMP_HLSTest, IsStreamerAtLivePointtest_1) { double seekPosition = 470.0; @@ -2560,11 +2533,6 @@ TEST_F(StreamAbstractionAAMP_HLSTest, GetBufferedVideoDurationSectest_1) ASSERT_EQ(result, -1); } -TEST_F(StreamAbstractionAAMP_HLSTest, ProcessDiscontinuity) -{ - mStreamAbstractionAAMP_HLS->ProcessDiscontinuity(eTRACK_AUX_AUDIO); -} - TEST_F(StreamAbstractionAAMP_HLSTest, SetAudioTrackInfoFromMuxedStreamTest) { std::vector audioTrackInfoVector; diff --git a/test/utests/tests/StreamAbstractionAAMP_MPD/FunctionalTests.cpp b/test/utests/tests/StreamAbstractionAAMP_MPD/FunctionalTests.cpp index d3020d043..a40b388ad 100644 --- a/test/utests/tests/StreamAbstractionAAMP_MPD/FunctionalTests.cpp +++ b/test/utests/tests/StreamAbstractionAAMP_MPD/FunctionalTests.cpp @@ -1083,9 +1083,8 @@ R"( */ StreamOutputFormat primaryOutputFormat = FORMAT_ISO_BMFF; StreamOutputFormat audioOutputFormat = FORMAT_ISO_BMFF; - StreamOutputFormat auxAudioOutputFormat = FORMAT_ISO_BMFF; StreamOutputFormat subtitleOutputFormat = FORMAT_INVALID; - mStreamAbstractionAAMP_MPD->GetStreamFormat(primaryOutputFormat, audioOutputFormat, auxAudioOutputFormat, subtitleOutputFormat); + mStreamAbstractionAAMP_MPD->GetStreamFormat(primaryOutputFormat, audioOutputFormat, subtitleOutputFormat); EXPECT_CALL(*g_mockPrivateInstanceAAMP, DownloadsAreEnabled()).WillRepeatedly(Return(true)); mStreamAbstractionAAMP_MPD->ReassessAndResumeAudioTrack(true); mStreamAbstractionAAMP_MPD->AbortWaitForAudioTrackCatchup(false); @@ -1951,13 +1950,11 @@ TEST_F(FunctionalTests_1, GetStreamFormatTest) // Create variables to store the output formats StreamOutputFormat primaryFormat; StreamOutputFormat audioFormat; - StreamOutputFormat auxFormat; StreamOutputFormat subtitleFormat; // Call the GetStreamFormat function - _instanceStreamAbstractionAAMP_MPD->GetStreamFormat(primaryFormat, audioFormat, auxFormat, subtitleFormat); + _instanceStreamAbstractionAAMP_MPD->GetStreamFormat(primaryFormat, audioFormat, subtitleFormat); EXPECT_EQ(FORMAT_INVALID, primaryFormat); EXPECT_EQ(FORMAT_INVALID, audioFormat); - EXPECT_EQ(FORMAT_INVALID, auxFormat); EXPECT_EQ(FORMAT_INVALID, subtitleFormat); } diff --git a/test/utests/tests/fragmentcollector_progressiveTests/fragmentcollector_progressiveTests.cpp b/test/utests/tests/fragmentcollector_progressiveTests/fragmentcollector_progressiveTests.cpp index a8b7cb588..bba95c89a 100644 --- a/test/utests/tests/fragmentcollector_progressiveTests/fragmentcollector_progressiveTests.cpp +++ b/test/utests/tests/fragmentcollector_progressiveTests/fragmentcollector_progressiveTests.cpp @@ -128,17 +128,15 @@ TEST_F(fragmentcollector_progressiveTests,GetMaxBitrateTest){ } TEST_F(fragmentcollector_progressiveTests, GetStreamFormatTest) { // Create variables to hold the output format results - StreamOutputFormat primaryOutputFormat, audioOutputFormat, auxAudioOutputFormat, subtitleOutputFormat; + StreamOutputFormat primaryOutputFormat, audioOutputFormat, subtitleOutputFormat; // Call the GetStreamFormat method - profileEvent->GetStreamFormat(primaryOutputFormat, audioOutputFormat, auxAudioOutputFormat, subtitleOutputFormat); + profileEvent->GetStreamFormat(primaryOutputFormat, audioOutputFormat, subtitleOutputFormat); ASSERT_EQ(primaryOutputFormat, FORMAT_ISO_BMFF); ASSERT_EQ(audioOutputFormat, FORMAT_INVALID); - ASSERT_EQ(auxAudioOutputFormat, FORMAT_INVALID); - ASSERT_EQ(subtitleOutputFormat, FORMAT_INVALID); } diff --git a/test/utests/tests/ota_shimTests/ota_shimtest.cpp b/test/utests/tests/ota_shimTests/ota_shimtest.cpp index ab8da7cc8..5851beb79 100644 --- a/test/utests/tests/ota_shimTests/ota_shimtest.cpp +++ b/test/utests/tests/ota_shimTests/ota_shimtest.cpp @@ -120,16 +120,14 @@ TEST_F(StreamAbstractionAAMP_OTATest, GetStreamFormatTest) // Initialize output format variables with some non-default values StreamOutputFormat primaryFormat = FORMAT_UNKNOWN; StreamOutputFormat audioFormat = FORMAT_UNKNOWN; - StreamOutputFormat auxAudioFormat = FORMAT_UNKNOWN; StreamOutputFormat subtitleFormat = FORMAT_UNKNOWN; // Call the GetStreamFormat function - aamp_ota->GetStreamFormat(primaryFormat, audioFormat, auxAudioFormat, subtitleFormat); + aamp_ota->GetStreamFormat(primaryFormat, audioFormat, subtitleFormat); // Assert that the output formats are set to FORMAT_INVALID ASSERT_EQ(primaryFormat, FORMAT_INVALID); ASSERT_EQ(audioFormat, FORMAT_INVALID); - ASSERT_EQ(auxAudioFormat, FORMAT_INVALID); ASSERT_EQ(subtitleFormat, FORMAT_INVALID); } diff --git a/test/utests/tests/videoin_shimTests/videoin_shimtest.cpp b/test/utests/tests/videoin_shimTests/videoin_shimtest.cpp index a0e4cb2c0..fe4f6041c 100644 --- a/test/utests/tests/videoin_shimTests/videoin_shimtest.cpp +++ b/test/utests/tests/videoin_shimTests/videoin_shimtest.cpp @@ -118,11 +118,10 @@ TEST_F(StreamAbstractionAAMP_VIDEOINTest, GetStreamFormatTest){ // Initialize output format variables with some non-default values StreamOutputFormat primaryFormat = FORMAT_UNKNOWN; StreamOutputFormat audioFormat = FORMAT_UNKNOWN; - StreamOutputFormat auxAudioFormat = FORMAT_UNKNOWN; StreamOutputFormat subtitleFormat = FORMAT_UNKNOWN; // Call the GetStreamFormat function - videoinShim->GetStreamFormat(primaryFormat, audioFormat, auxAudioFormat, subtitleFormat); + videoinShim->GetStreamFormat(primaryFormat, audioFormat, subtitleFormat); // Assert that the output formats are set to FORMAT_INVALID ASSERT_EQ(primaryFormat, FORMAT_INVALID); diff --git a/tsprocessor.cpp b/tsprocessor.cpp index 2238c1c8e..de2978c60 100644 --- a/tsprocessor.cpp +++ b/tsprocessor.cpp @@ -162,7 +162,7 @@ static StreamOutputFormat getStreamFormatForCodecType(int streamType) /** * @brief TSProcessor Constructor */ -TSProcessor::TSProcessor(class PrivateInstanceAAMP *aamp,StreamOperation streamOperation, id3_callback_t id3_hdl, int track, TSProcessor* peerTSProcessor, TSProcessor* auxTSProcessor) +TSProcessor::TSProcessor(class PrivateInstanceAAMP *aamp,StreamOperation streamOperation, id3_callback_t id3_hdl, int track, TSProcessor* peerTSProcessor) : m_needDiscontinuity(true), m_PatPmtLen(0), m_PatPmt(0), m_PatPmtTrickLen(0), m_PatPmtTrick(0), m_PatPmtPcrLen(0), m_PatPmtPcr(0), m_nullPFrame(0), m_nullPFrameLength(0), m_nullPFrameNextCount(0), m_nullPFrameOffset(0), @@ -192,8 +192,6 @@ TSProcessor::TSProcessor(class PrivateInstanceAAMP *aamp,StreamOperation streamO m_queuedSegmentPos(0), m_queuedSegmentDuration(0), m_queuedSegmentLen(0), m_queuedSegmentDiscontinuous(false), m_startPosition(-1.0), m_track(track), m_last_frame_time(0), m_demuxInitialized(false), m_basePTSFromPeer(-1), m_dsmccComponentFound(false), m_dsmccComponent() , m_AudioTrackIndexToPlay(0) - , m_auxTSProcessor(auxTSProcessor) - , m_auxiliaryAudio(false) ,m_audioGroupId() ,m_applyOffset(true) ,m_SPS{} @@ -209,7 +207,7 @@ TSProcessor::TSProcessor(class PrivateInstanceAAMP *aamp,StreamOperation streamO m_versionPMT = 0; - if ((m_streamOperation == eStreamOp_DEMUX_ALL) || (m_streamOperation == eStreamOp_DEMUX_VIDEO) || (m_streamOperation == eStreamOp_DEMUX_VIDEO_AND_AUX)) + if ((m_streamOperation == eStreamOp_DEMUX_ALL) || (m_streamOperation == eStreamOp_DEMUX_VIDEO)) { m_vidDemuxer = new Demuxer(aamp, eMEDIATYPE_VIDEO, optimizeMuxed ); //demux DSM CC stream only together with video stream @@ -222,21 +220,6 @@ TSProcessor::TSProcessor(class PrivateInstanceAAMP *aamp,StreamOperation streamO m_audDemuxer = new Demuxer(aamp, eMEDIATYPE_AUDIO, optimizeMuxed); m_demux = true; } - else if ((m_streamOperation == eStreamOp_DEMUX_AUX) || m_streamOperation == eStreamOp_DEMUX_VIDEO_AND_AUX) - { - m_auxiliaryAudio = true; - m_audDemuxer = new Demuxer(aamp, eMEDIATYPE_AUX_AUDIO, optimizeMuxed); - // Map auxiliary specific streamOperation back to generic streamOperation used by TSProcessor - if (m_streamOperation == eStreamOp_DEMUX_AUX) - { - m_streamOperation = eStreamOp_DEMUX_AUDIO; // this is an audio only streamOperation - } - else - { - m_streamOperation = eStreamOp_DEMUX_ALL; // this is a muxed streamOperation - } - m_demux = true; - } } /** @@ -661,14 +644,7 @@ void TSProcessor::processPMTSection(unsigned char* section, int sectionLength) audioFormat = getStreamFormatForCodecType(audioComponents[0].elemStreamType); } // Notify the format to StreamSink - if (!m_auxiliaryAudio) - { - aamp->SetStreamFormat(videoFormat, audioFormat, FORMAT_INVALID); - } - else - { - aamp->SetStreamFormat(videoFormat, FORMAT_INVALID, audioFormat); - } + aamp->SetStreamFormat(videoFormat, audioFormat); if (m_dsmccComponentFound) { @@ -1637,10 +1613,6 @@ bool TSProcessor::demuxAndSend(const void *ptr, size_t len, double position, dou { m_peerTSProcessor->setBasePTS( position, demuxer->getBasePTS()); } - if(m_auxTSProcessor) - { - m_auxTSProcessor->setBasePTS(position, demuxer->getBasePTS()); - } notifyPeerBasePTS = false; } if (ptsError && !dsmccDemuxerUsed && !basePtsUpdatedFromCurrentSegment) diff --git a/tsprocessor.h b/tsprocessor.h index a6c70edec..77a39004d 100644 --- a/tsprocessor.h +++ b/tsprocessor.h @@ -72,9 +72,7 @@ typedef enum eStreamOp_NONE, /**< Normal operation when no demuxing is required*/ eStreamOp_DEMUX_AUDIO, /**< Demux and inject audio only*/ eStreamOp_DEMUX_VIDEO, /**< Demux and inject video only*/ - eStreamOp_DEMUX_ALL, /**< Demux and inject audio and video*/ - eStreamOp_DEMUX_AUX, /**< Demux and inject auxiliary audio only*/ - eStreamOp_DEMUX_VIDEO_AND_AUX /**< Demux and inject auxiliary audio and video*/ + eStreamOp_DEMUX_ALL /**< Demux and inject audio and video*/ } StreamOperation; @@ -103,7 +101,7 @@ class TSProcessor : public MediaProcessor * @param[in] track AampMediaType to be operated on. Not relavent for demux operation * @param[in] peerTSProcessor Peer TSProcessor used along with this in case of separate audio/video playlists */ - TSProcessor(class PrivateInstanceAAMP *aamp, StreamOperation streamOperation, id3_callback_t id3_hdl, int track = 0, TSProcessor* peerTSProcessor = NULL, TSProcessor* auxTSProcessor = NULL); + TSProcessor(class PrivateInstanceAAMP *aamp, StreamOperation streamOperation, id3_callback_t id3_hdl, int track = 0, TSProcessor* peerTSProcessor = NULL); /** * @brief Copy constructor disabled * @@ -599,8 +597,6 @@ class TSProcessor : public MediaProcessor bool m_demuxInitialized; long long m_basePTSFromPeer; unsigned char m_AudioTrackIndexToPlay; - TSProcessor* m_auxTSProcessor; - bool m_auxiliaryAudio; std::string m_audioGroupId; }; diff --git a/videoin_shim.cpp b/videoin_shim.cpp index eaaac2c05..ea84421f0 100644 --- a/videoin_shim.cpp +++ b/videoin_shim.cpp @@ -123,12 +123,11 @@ void StreamAbstractionAAMP_VIDEOIN::SetVideoRectangle(int x, int y, int w, int h * @brief Get output format of stream. * */ -void StreamAbstractionAAMP_VIDEOIN::GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &auxAudioOutputFormat, StreamOutputFormat &subtitleOutputFormat) +void StreamAbstractionAAMP_VIDEOIN::GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &subtitleOutputFormat) { // STUB AAMPLOG_WARN("%s ",mName.c_str()); primaryOutputFormat = FORMAT_INVALID; audioOutputFormat = FORMAT_INVALID; - //auxAudioOutputFormat = FORMAT_INVALID; } /** diff --git a/videoin_shim.h b/videoin_shim.h index ae60f7983..7bed5284e 100644 --- a/videoin_shim.h +++ b/videoin_shim.h @@ -85,10 +85,9 @@ class StreamAbstractionAAMP_VIDEOIN : public StreamAbstractionAAMP * @fn GetStreamFormat * @param[out] primaryOutputFormat - format of primary track * @param[out] audioOutputFormat - format of audio track - * @param[out] auxOutputFormat - format of aux audio track * @param[out] subtitleOutputFormat - format of subtitle track */ - void GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &auxOutputFormat, StreamOutputFormat &subtitleOutputFormat) override; + void GetStreamFormat(StreamOutputFormat &primaryOutputFormat, StreamOutputFormat &audioOutputFormat, StreamOutputFormat &subtitleOutputFormat) override; /** * @fn GetFirstPTS