Skip to content

Commit 2b099d0

Browse files
committed
MultiStreamingDecoder: add mimeDetector()
1 parent e09fe9e commit 2b099d0

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

src/AudioTools/AudioCodecs/StreamingDecoder.h

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,8 +514,26 @@ class MultiStreamingDecoder : public StreamingDecoder {
514514
return empty;
515515
}
516516

517-
// Uncomment to provide access to the mime detector
518-
// MimeDetector &mimeDetector() { return mime_detector;}
517+
/**
518+
* @brief Provides access to the internal MIME detector
519+
*
520+
* Returns a reference to the MimeDetector instance used for automatic
521+
* format detection. This allows access to advanced features such as:
522+
* - Adding custom MIME type detection logic
523+
* - Setting custom detection callbacks
524+
* - Configuring default MIME types
525+
* - Accessing detection statistics
526+
*
527+
* @note This method should typically only be used for advanced configuration
528+
* before calling begin(). Modifying the detector after format detection
529+
* has occurred may lead to unexpected behavior.
530+
*
531+
* @return Reference to the internal MimeDetector instance
532+
*
533+
* @see MimeDetector::setCheck() for adding custom detection logic
534+
* @see MimeDetector::setMimeCallback() for detection notifications
535+
*/
536+
MimeDetector &mimeDetector() { return mime_detector;}
519537

520538
protected:
521539
/**

0 commit comments

Comments
 (0)