mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-22 00:17:32 +09:00
Implement keyframe and framesize VPXDecoder helpers
Encapsulate code from WebMDemuxer to query keyframe and frame resolution inside VPXDecoder, so we have a clean wrapper for all the libvpx functions we use.
This commit is contained in:
parent
85ee1da71a
commit
3b0820badb
2 changed files with 46 additions and 10 deletions
|
|
@ -7,6 +7,7 @@
|
|||
#define VPXDecoder_h_
|
||||
|
||||
#include "PlatformDecoderModule.h"
|
||||
#include "mozilla/Span.h"
|
||||
|
||||
#include <stdint.h>
|
||||
#define VPX_DONT_DEFINE_STDINT_TYPES
|
||||
|
|
@ -47,6 +48,12 @@ public:
|
|||
static bool IsVP8(const nsACString& aMimeType);
|
||||
static bool IsVP9(const nsACString& aMimeType);
|
||||
|
||||
// Return true if a sample is a keyframe for the specified codec.
|
||||
static bool IsKeyframe(Span<const uint8_t> aBuffer, Codec aCodec);
|
||||
|
||||
// Return the frame dimensions for a sample for the specified codec.
|
||||
static nsIntSize GetFrameSize(Span<const uint8_t> aBuffer, Codec aCodec);
|
||||
|
||||
private:
|
||||
void ProcessDecode(MediaRawData* aSample);
|
||||
MediaResult DoDecode(MediaRawData* aSample);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue