Add sceAvPlayerGetStreamInfo prototype and related struct/enum.
@@ -32,6 +32,12 @@ typedef enum SceAvPlayerTrickSpeeds {
SCE_AVPLAYER_TRICK_SPEED_FAST_FORWARD_32X = 3200 //!< Fast Forward 32x
} SceAvPlayerTrickSpeeds;
+typedef enum SceAvPlayerStreamType {
+ SCE_AVPLAYER_VIDEO, //!< Video stream type
+ SCE_AVPLAYER_AUDIO, //!< Audio stream type
+ SCE_AVPLAYER_TIMEDTEXT //!< Timed text (subtitles) stream type
+} SceAvPlayerStreamType;
+
typedef void* (*SceAvPlayerAlloc)(void *arg, uint32_t alignment, uint32_t size);
typedef void (*SceAvPlayerFree)(void *arg, void *ptr);
typedef void* (*SceAvPlayerAllocFrame)(void *arg, uint32_t alignment, uint32_t size);
@@ -120,6 +126,14 @@ typedef struct SceAvPlayerFrameInfo {
SceAvPlayerStreamDetails details; //!< The frame details.
} SceAvPlayerFrameInfo;
+typedef struct SceAvPlayerStreamInfo {
+ uint32_t type; //!< Type of the stream (One of ::SceAvPlayerStreamType)
+ uint32_t reserved; //!< Reserved data
+ SceAvPlayerStreamDetails details; //!< The stream details.
+ uint64_t duration; //!< Total duration of the stream in milliseconds.
+ uint64_t startTime; //!< Starting time of the stream in milliseconds.
+} SceAvPlayerStreamInfo;
+
/**
* @param[in] data - Init data for the video player
*
@@ -224,6 +238,15 @@ int sceAvPlayerJumpToTime(SceAvPlayerHandle handle, uint64_t offset);
*/
int sceAvPlayerSetTrickSpeed(SceAvPlayerHandle handle, int speed);
+/**
+ * @param[in] handle - A player handle created with ::sceAvPlayerInit
+ * @param[in] id - Stream ID to get info for.
+ * @param[out] info - Info retrieved for the requested stream.
+ *
+ * @return 0 on success, < 0 on error.
+ */
+int sceAvPlayerGetStreamInfo(SceAvPlayerHandle handle, uint32_t id, SceAvPlayerStreamInfo *info);
+
#ifdef __cplusplus
}
#endif
