MP4_READBOX_EXIT( 1 );
}
+static int MP4_ReadBox_fiel( stream_t *p_stream, MP4_Box_t *p_box )
+{
+ MP4_Box_data_fiel_t *p_fiel;
+ MP4_READBOX_ENTER( MP4_Box_data_fiel_t );
+ p_fiel = p_box->data.p_fiel;
+ if(i_read < 2)
+ MP4_READBOX_EXIT( 0 );
+ if(p_peek[0] == 2) /* Interlaced */
+ {
+ /*
+ * 0 – There is only one field.
+ * 1 – T is displayed earliest, T is stored first in the file.
+ * 6 – B is displayed earliest, B is stored first in the file.
+ * 9 – B is displayed earliest, T is stored first in the file.
+ * 14 – T is displayed earliest, B is stored first in the file.
+ */
+ if(p_peek[1] == 1 || p_peek[1] == 9)
+ p_fiel->i_flags = BLOCK_FLAG_TOP_FIELD_FIRST;
+ else if(p_peek[1] == 6 || p_peek[1] == 14)
+ p_fiel->i_flags = BLOCK_FLAG_BOTTOM_FIELD_FIRST;
+ }
+ MP4_READBOX_EXIT( 1 );
+}
+
static int MP4_ReadBox_enda( stream_t *p_stream, MP4_Box_t *p_box )
{
MP4_Box_data_enda_t *p_enda;
{ ATOM_dac3, MP4_ReadBox_dac3, MP4_FreeBox_Common, 0 },
{ ATOM_dec3, MP4_ReadBox_dec3, MP4_FreeBox_Common, 0 },
{ ATOM_dvc1, MP4_ReadBox_dvc1, MP4_FreeBox_Common, 0 },
+ { ATOM_fiel, MP4_ReadBox_fiel, MP4_FreeBox_Common, 0 },
{ ATOM_glbl, MP4_ReadBox_Binary, MP4_FreeBox_Binary, ATOM_FFV1 },
{ ATOM_enda, MP4_ReadBox_enda, MP4_FreeBox_Common, 0 },
{ ATOM_iods, MP4_ReadBox_iods, MP4_FreeBox_Common, 0 },
#define ATOM_avcC VLC_FOURCC( 'a', 'v', 'c', 'C' )
#define ATOM_m4ds VLC_FOURCC( 'm', '4', 'd', 's' )
+#define ATOM_fiel VLC_FOURCC( 'f', 'i', 'e', 'l' )
#define ATOM_glbl VLC_FOURCC( 'g', 'l', 'b', 'l' )
#define ATOM_hvcC VLC_FOURCC( 'h', 'v', 'c', 'C' )
} MP4_Box_data_dvc1_t;
+typedef struct
+{
+ uint32_t i_flags;
+} MP4_Box_data_fiel_t;
+
typedef struct
{
uint16_t i_little_endian;
MP4_Box_data_dac3_t *p_dac3;
MP4_Box_data_dec3_t *p_dec3;
MP4_Box_data_dvc1_t *p_dvc1;
+ MP4_Box_data_fiel_t *p_fiel;
MP4_Box_data_chan_t *p_chan;
MP4_Box_data_enda_t *p_enda;
MP4_Box_data_keys_t *p_keys;