forked from aws/aws-sdk-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This release adds support for selecting the Program Date Time (PDT) C…
…lock source algorithm for HLS outputs.
- Loading branch information
aws-sdk-cpp-automation
committed
Jan 7, 2022
1 parent
a2512bd
commit fb8cbeb
Showing
6 changed files
with
234 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
aws-cpp-sdk-medialive/include/aws/medialive/model/HlsProgramDateTimeClock.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/** | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* SPDX-License-Identifier: Apache-2.0. | ||
*/ | ||
|
||
#pragma once | ||
#include <aws/medialive/MediaLive_EXPORTS.h> | ||
#include <aws/core/utils/memory/stl/AWSString.h> | ||
|
||
namespace Aws | ||
{ | ||
namespace MediaLive | ||
{ | ||
namespace Model | ||
{ | ||
enum class HlsProgramDateTimeClock | ||
{ | ||
NOT_SET, | ||
INITIALIZE_FROM_OUTPUT_TIMECODE, | ||
SYSTEM_CLOCK | ||
}; | ||
|
||
namespace HlsProgramDateTimeClockMapper | ||
{ | ||
AWS_MEDIALIVE_API HlsProgramDateTimeClock GetHlsProgramDateTimeClockForName(const Aws::String& name); | ||
|
||
AWS_MEDIALIVE_API Aws::String GetNameForHlsProgramDateTimeClock(HlsProgramDateTimeClock value); | ||
} // namespace HlsProgramDateTimeClockMapper | ||
} // namespace Model | ||
} // namespace MediaLive | ||
} // namespace Aws |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 70 additions & 0 deletions
70
aws-cpp-sdk-medialive/source/model/HlsProgramDateTimeClock.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/** | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* SPDX-License-Identifier: Apache-2.0. | ||
*/ | ||
|
||
#include <aws/medialive/model/HlsProgramDateTimeClock.h> | ||
#include <aws/core/utils/HashingUtils.h> | ||
#include <aws/core/Globals.h> | ||
#include <aws/core/utils/EnumParseOverflowContainer.h> | ||
|
||
using namespace Aws::Utils; | ||
|
||
|
||
namespace Aws | ||
{ | ||
namespace MediaLive | ||
{ | ||
namespace Model | ||
{ | ||
namespace HlsProgramDateTimeClockMapper | ||
{ | ||
|
||
static const int INITIALIZE_FROM_OUTPUT_TIMECODE_HASH = HashingUtils::HashString("INITIALIZE_FROM_OUTPUT_TIMECODE"); | ||
static const int SYSTEM_CLOCK_HASH = HashingUtils::HashString("SYSTEM_CLOCK"); | ||
|
||
|
||
HlsProgramDateTimeClock GetHlsProgramDateTimeClockForName(const Aws::String& name) | ||
{ | ||
int hashCode = HashingUtils::HashString(name.c_str()); | ||
if (hashCode == INITIALIZE_FROM_OUTPUT_TIMECODE_HASH) | ||
{ | ||
return HlsProgramDateTimeClock::INITIALIZE_FROM_OUTPUT_TIMECODE; | ||
} | ||
else if (hashCode == SYSTEM_CLOCK_HASH) | ||
{ | ||
return HlsProgramDateTimeClock::SYSTEM_CLOCK; | ||
} | ||
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); | ||
if(overflowContainer) | ||
{ | ||
overflowContainer->StoreOverflow(hashCode, name); | ||
return static_cast<HlsProgramDateTimeClock>(hashCode); | ||
} | ||
|
||
return HlsProgramDateTimeClock::NOT_SET; | ||
} | ||
|
||
Aws::String GetNameForHlsProgramDateTimeClock(HlsProgramDateTimeClock enumValue) | ||
{ | ||
switch(enumValue) | ||
{ | ||
case HlsProgramDateTimeClock::INITIALIZE_FROM_OUTPUT_TIMECODE: | ||
return "INITIALIZE_FROM_OUTPUT_TIMECODE"; | ||
case HlsProgramDateTimeClock::SYSTEM_CLOCK: | ||
return "SYSTEM_CLOCK"; | ||
default: | ||
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); | ||
if(overflowContainer) | ||
{ | ||
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue)); | ||
} | ||
|
||
return {}; | ||
} | ||
} | ||
|
||
} // namespace HlsProgramDateTimeClockMapper | ||
} // namespace Model | ||
} // namespace MediaLive | ||
} // namespace Aws |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters