AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Classes | Public Types | Public Member Functions | List of all members
alexaClientSDK::playlistParser::Id3TagsRemover Class Reference

#include <Id3TagsRemover.h>

Inheritance diagram for alexaClientSDK::playlistParser::Id3TagsRemover:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::playlistParser::Id3TagsRemover:
Collaboration graph
[legend]

Public Types

using ByteVector = std::vector< unsigned char >
 Alias for bytes. More...
 

Public Member Functions

 Id3TagsRemover ()
 
bool removeTagsAndWrite (const std::shared_ptr< avsCommon::avs::attachment::InProcessAttachment > &attachment, const std::shared_ptr< avsCommon::avs::attachment::AttachmentWriter > &streamWriter)
 
void stripID3Tags (ByteVector &buffer)
 
RequiresShutdown methods.
void doShutdown () override
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::utils::RequiresShutdown
 RequiresShutdown (const std::string &name)
 
virtual ~RequiresShutdown ()
 Destructor. More...
 
const std::string & name () const
 
void shutdown ()
 
bool isShutdown () const
 

Additional Inherited Members

Detailed Description

Helper class to remove ID3v2 tags in media content.

Member Typedef Documentation

◆ ByteVector

Alias for bytes.

Constructor & Destructor Documentation

◆ Id3TagsRemover()

alexaClientSDK::playlistParser::Id3TagsRemover::Id3TagsRemover ( )

Constructor

Member Function Documentation

◆ doShutdown()

void alexaClientSDK::playlistParser::Id3TagsRemover::doShutdown ( )
overridevirtual

Prepares/enables this object to be deleted. This should be the last function called on this object prior to deleting (or resetting) its shared_ptr.

Warning
  • Attempting to call functions on this object after calling shutdown() can result in undefined behavior.
  • Neglecting to call shutdown() on this object can result in resource leaks or other undefined behavior.

Implements alexaClientSDK::avsCommon::utils::RequiresShutdown.

◆ removeTagsAndWrite()

bool alexaClientSDK::playlistParser::Id3TagsRemover::removeTagsAndWrite ( const std::shared_ptr< avsCommon::avs::attachment::InProcessAttachment > &  attachment,
const std::shared_ptr< avsCommon::avs::attachment::AttachmentWriter > &  streamWriter 
)

A function that read from an attachment and remove ID3 tags from the stream and write the stream back to the streamWriter.

Parameters
attachmentThe attachment that contains the stream content.
streamWriterThe writer to write to the attachment after ID3 tags are removed.
Returns
true if succeeds and false otherwise.

◆ stripID3Tags()

void alexaClientSDK::playlistParser::Id3TagsRemover::stripID3Tags ( ByteVector buffer)

A function that removes any ID3 tags from the buffer. After the call of this function, all ID3 tags in buffer is removed. If there is no ID3 tag found, then the content in the buffer remains the same.

Parameters
[in,out]bufferThe buffer in which the ID3 tags will be removed.

The documentation for this class was generated from the following file:

AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0