[vlc-commits] packetizer: hxxx: add raw SEI parser
Francois Cartegnie
git at videolan.org
Fri Oct 7 16:33:29 CEST 2016
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Oct 5 19:43:43 2016 +0200| [99c89d03428b724b84ec26b92cf08ab6124dc6e9] | committer: Francois Cartegnie
packetizer: hxxx: add raw SEI parser
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=99c89d03428b724b84ec26b92cf08ab6124dc6e9
---
modules/packetizer/hxxx_sei.c | 16 ++++++++++------
modules/packetizer/hxxx_sei.h | 1 +
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/modules/packetizer/hxxx_sei.c b/modules/packetizer/hxxx_sei.c
index 10b4d58..8161448 100644
--- a/modules/packetizer/hxxx_sei.c
+++ b/modules/packetizer/hxxx_sei.c
@@ -28,19 +28,23 @@
#include "hxxx_sei.h"
#include "hxxx_nal.h"
-void HxxxParseSEI(decoder_t *p_dec, const uint8_t *p_buffer, size_t i_buffer,
+void HxxxParse_AnnexB_SEI(decoder_t *p_dec, const uint8_t *p_buf, size_t i_buf,
+ uint8_t i_header, pf_hxxx_sei_callback cb)
+{
+ if( hxxx_strip_AnnexB_startcode( &p_buf, &i_buf ) )
+ HxxxParseSEI(p_dec, p_buf, i_buf, i_header, cb);
+}
+
+void HxxxParseSEI(decoder_t *p_dec, const uint8_t *p_buf, size_t i_buf,
uint8_t i_header, pf_hxxx_sei_callback pf_callback)
{
bs_t s;
unsigned i_bitflow = 0;
- const uint8_t *p_stripped = p_buffer;
- size_t i_stripped = i_buffer;
-
- if( !hxxx_strip_AnnexB_startcode( &p_stripped, &i_stripped ) || i_stripped < 2 )
+ if( i_buf < 2 )
return;
- bs_init( &s, p_stripped, i_stripped );
+ bs_init( &s, p_buf, i_buf );
s.p_fwpriv = &i_bitflow;
s.pf_forward = hxxx_bsfw_ep3b_to_rbsp; /* Does the emulated 3bytes conversion to rbsp */
diff --git a/modules/packetizer/hxxx_sei.h b/modules/packetizer/hxxx_sei.h
index 3495a69..b0bf2bb 100644
--- a/modules/packetizer/hxxx_sei.h
+++ b/modules/packetizer/hxxx_sei.h
@@ -48,5 +48,6 @@ typedef struct
typedef void (*pf_hxxx_sei_callback)(decoder_t *, const hxxx_sei_data_t *);
void HxxxParseSEI(decoder_t *, const uint8_t *, size_t, uint8_t, pf_hxxx_sei_callback);
+void HxxxParse_AnnexB_SEI(decoder_t *, const uint8_t *, size_t, uint8_t, pf_hxxx_sei_callback);
#endif
More information about the vlc-commits
mailing list