Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
d1bd0868
Commit
d1bd0868
authored
Jul 21, 2002
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* mp4 : improve mp4a detection/handling.
parent
54c0e5d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
69 additions
and
49 deletions
+69
-49
plugins/mp4/mp4.c
plugins/mp4/mp4.c
+69
-49
No files found.
plugins/mp4/mp4.c
View file @
d1bd0868
...
...
@@ -2,7 +2,7 @@
* mp4.c : MP4 file input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: mp4.c,v 1.
3 2002/07/21 19:57:22
fenrir Exp $
* $Id: mp4.c,v 1.
4 2002/07/21 21:18:15
fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -406,11 +406,14 @@ static void MP4End( input_thread_t *p_input )
FREE
(
p_demux
->
track
[
i_track
].
chunk
[
i_chunk
].
p_sample_delta_dts
);
}
}
if
(
p_demux
->
track
->
p_data_init
)
#if 0
/* if( p_demux->track->p_data_init )
{
input_DeletePacket( p_input->p_method_data,
p_demux->track->p_data_init );
}
*/
#endif
if
(
!
p_demux
->
track
[
i_track
].
i_sample_size
)
{
FREE
(
p_demux
->
track
[
i_track
].
p_sample_size
);
...
...
@@ -819,48 +822,11 @@ static void MP4_StartDecoder( input_thread_t *p_input,
else
{
p_demux_track
->
p_es
->
i_type
=
i_codec
;
msg_Info
(
p_input
,
"%s supported"
,
psz_name
);
msg_Info
(
p_input
,
"%s supported
(or a subpart)
"
,
psz_name
);
}
switch
(
p_demux_track
->
i_cat
)
{
case
(
VIDEO_ES
):
p_demux_track
->
p_es
->
b_audio
=
0
;
/* now create a bitmapinfoheader_t for decoder */
p_bmih
=
malloc
(
40
);
memset
(
p_bmih
,
0
,
40
);
MP4_Set4BytesLE
(
p_bmih
,
40
);
if
(
p_sample
->
data
.
p_sample_mp4v
->
i_width
)
{
MP4_Set4BytesLE
(
p_bmih
+
4
,
p_sample
->
data
.
p_sample_mp4v
->
i_width
);
}
else
{
/* use display size */
MP4_Set4BytesLE
(
p_bmih
+
4
,
p_demux_track
->
i_width
);
}
if
(
p_sample
->
data
.
p_sample_mp4v
->
i_height
)
{
MP4_Set4BytesLE
(
p_bmih
+
8
,
p_sample
->
data
.
p_sample_mp4v
->
i_height
);
}
else
{
MP4_Set4BytesLE
(
p_bmih
+
8
,
p_demux_track
->
i_height
);
}
p_demux_track
->
p_es
->
p_demux_data
=
p_bmih
;
break
;
case
(
AUDIO_ES
):
p_demux_track
->
p_es
->
b_audio
=
1
;
break
;
default:
break
;
}
/* now see if esds is present and i so create a data packet
/* now see if esds is present and i
f
so create a data packet
with decoder_specific_info */
if
(
(
p_esds
=
MP4_FindBox
(
p_sample
,
FOURCC_esds
)
)
&&
(
p_esds
->
data
.
p_esds
->
es_descriptor
.
p_decConfigDescr
)
)
...
...
@@ -883,10 +849,14 @@ static void MP4_StartDecoder( input_thread_t *p_input,
case
(
0x65
):
p_demux_track
->
p_es
->
i_type
=
MPEG2_VIDEO_ES
;
break
;
case
(
0x66
):
case
(
0x67
):
case
(
0x68
):
case
(
0x69
):
/* Theses are MPEG2-AAC */
case
(
0x66
):
/* main profile */
case
(
0x67
):
/* Low complexity profile */
case
(
0x68
):
/* Scaleable Sampling rate profile */
p_demux_track
->
p_es
->
i_type
=
UNKNOWN_ES
;
break
;
/* true MPEG 2 audio */
case
(
0x69
):
p_demux_track
->
p_es
->
i_type
=
MPEG2_AUDIO_ES
;
break
;
case
(
0x6a
):
...
...
@@ -895,15 +865,19 @@ static void MP4_StartDecoder( input_thread_t *p_input,
case
(
0x6b
):
p_demux_track
->
p_es
->
i_type
=
MPEG1_AUDIO_ES
;
break
;
case
(
0x6c
):
p_demux_track
->
p_es
->
i_type
=
UNKNOWN_ES
;
/* in fact jpeg */
break
;
default:
/* Unknown entry, don't touch i_type */
msg_Warn
(
p_input
,
"objectTypeIndication(0x%x) unknow"
,
es_descriptor
.
p_decConfigDescr
->
i_objectTypeIndication
);
break
;
}
/* Create a packet to init the decoder, send with the first frame */
if
(
es_descriptor
.
p_decConfigDescr
->
i_decoder_specific_info_len
)
if
(
(
es_descriptor
.
p_decConfigDescr
->
i_decoder_specific_info_len
)
&&
(
p_demux_track
->
p_es
->
i_type
!=
UNKNOWN_ES
)
)
{
data_packet_t
*
p_data
;
int
i_size
=
...
...
@@ -926,12 +900,58 @@ static void MP4_StartDecoder( input_thread_t *p_input,
#undef es_descriptor
}
if
(
p_demux_track
->
p_es
->
i_type
==
UNKNOWN_ES
)
{
msg_Warn
(
p_input
,
"SampleEntry in fact not supported"
);
p_demux_track
->
b_ok
=
0
;
return
;
}
/* some last initialisation */
switch
(
p_demux_track
->
i_cat
)
{
case
(
VIDEO_ES
):
p_demux_track
->
p_es
->
b_audio
=
0
;
/* now create a bitmapinfoheader_t for decoder */
p_bmih
=
malloc
(
40
);
memset
(
p_bmih
,
0
,
40
);
MP4_Set4BytesLE
(
p_bmih
,
40
);
if
(
p_sample
->
data
.
p_sample_mp4v
->
i_width
)
{
MP4_Set4BytesLE
(
p_bmih
+
4
,
p_sample
->
data
.
p_sample_mp4v
->
i_width
);
}
else
{
/* use display size */
MP4_Set4BytesLE
(
p_bmih
+
4
,
p_demux_track
->
i_width
);
}
if
(
p_sample
->
data
.
p_sample_mp4v
->
i_height
)
{
MP4_Set4BytesLE
(
p_bmih
+
8
,
p_sample
->
data
.
p_sample_mp4v
->
i_height
);
}
else
{
MP4_Set4BytesLE
(
p_bmih
+
8
,
p_demux_track
->
i_height
);
}
p_demux_track
->
p_es
->
p_demux_data
=
p_bmih
;
break
;
case
(
AUDIO_ES
):
p_demux_track
->
p_es
->
b_audio
=
1
;
break
;
default:
break
;
}
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
input_SelectES
(
p_input
,
p_demux_track
->
p_es
);
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
p_demux_track
->
b_ok
=
1
;
return
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment