Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
3439df81
Commit
3439df81
authored
Nov 24, 2003
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* all: removed decoder_fifo_t.
parent
057d2ab9
Changes
33
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
314 additions
and
795 deletions
+314
-795
Makefile.am
Makefile.am
+1
-2
include/input_ext-dec.h
include/input_ext-dec.h
+1
-447
include/input_ext-intf.h
include/input_ext-intf.h
+3
-2
include/input_ext-plugins.h
include/input_ext-plugins.h
+6
-3
include/vlc_codec.h
include/vlc_codec.h
+1
-7
include/vlc_common.h
include/vlc_common.h
+1
-3
include/vlc_es.h
include/vlc_es.h
+6
-1
include/vlc_objects.h
include/vlc_objects.h
+1
-3
modules/access/cdda.c
modules/access/cdda.c
+3
-3
modules/access/cddax.c
modules/access/cddax.c
+3
-3
modules/access/dshow/dshow.cpp
modules/access/dshow/dshow.cpp
+3
-3
modules/access/dvb/access.c
modules/access/dvb/access.c
+2
-2
modules/access/satellite/access.c
modules/access/satellite/access.c
+2
-2
modules/access/v4l/v4l.c
modules/access/v4l/v4l.c
+5
-12
modules/codec/dvbsub.c
modules/codec/dvbsub.c
+84
-66
modules/codec/ffmpeg/audio.c
modules/codec/ffmpeg/audio.c
+9
-5
modules/codec/ffmpeg/video.c
modules/codec/ffmpeg/video.c
+9
-5
modules/codec/spudec/parse.c
modules/codec/spudec/parse.c
+3
-6
modules/demux/flac.c
modules/demux/flac.c
+1
-3
modules/demux/mp4/mp4.c
modules/demux/mp4/mp4.c
+9
-9
modules/demux/mpeg/m4v.c
modules/demux/mpeg/m4v.c
+3
-3
modules/demux/mpeg/mpgv.c
modules/demux/mpeg/mpgv.c
+1
-3
modules/demux/mpeg/system.c
modules/demux/mpeg/system.c
+9
-9
modules/demux/rawdv.c
modules/demux/rawdv.c
+10
-10
modules/gui/beos/VlcWrapper.cpp
modules/gui/beos/VlcWrapper.cpp
+2
-2
modules/gui/gtk/menu.c
modules/gui/gtk/menu.c
+2
-2
modules/stream_out/display.c
modules/stream_out/display.c
+3
-3
src/input/input.c
src/input/input.c
+13
-34
src/input/input_dec.c
src/input/input_dec.c
+101
-121
src/input/input_ext-intf.c
src/input/input_ext-intf.c
+2
-2
src/input/input_programs.c
src/input/input_programs.c
+11
-11
src/misc/objects.c
src/misc/objects.c
+1
-5
src/video_output/video_output.c
src/video_output/video_output.c
+3
-3
No files found.
Makefile.am
View file @
3439df81
...
...
@@ -321,8 +321,7 @@ SOURCES_libvlc_common = \
src/input/stream.c
\
src/input/demux.c
\
src/input/subtitles.c
\
src/input/input_ext-plugins.c
\
src/input/input_ext-dec.c
\
src/input/input_ext-plugins.c
\
src/input/input_ext-intf.c
\
src/input/input_dec.c
\
src/input/input_programs.c
\
...
...
include/input_ext-dec.h
View file @
3439df81
This diff is collapsed.
Click to expand it.
include/input_ext-intf.h
View file @
3439df81
...
...
@@ -4,7 +4,7 @@
* control the pace of reading.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: input_ext-intf.h,v 1.
99 2003/11/22 18:04:10 gbazin
Exp $
* $Id: input_ext-intf.h,v 1.
100 2003/11/24 00:39:00 fenrir
Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -68,10 +68,11 @@ struct es_descriptor_t
/* Decoder information */
es_format_t
fmt
;
decoder_fifo_t
*
p_decoder_fifo
;
void
*
p_waveformatex
;
void
*
p_bitmapinfoheader
;
void
*
p_spuinfo
;
/* Decoder */
decoder_t
*
p_dec
;
count_t
c_packets
;
/* total packets read */
count_t
c_invalid_packets
;
/* invalid packets read */
...
...
include/input_ext-plugins.h
View file @
3439df81
...
...
@@ -3,7 +3,7 @@
* but exported to plug-ins
*****************************************************************************
* Copyright (C) 1999-2002 VideoLAN
* $Id: input_ext-plugins.h,v 1.4
2 2003/05/05 22:23:31 gbazin
Exp $
* $Id: input_ext-plugins.h,v 1.4
3 2003/11/24 00:39:00 fenrir
Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -55,9 +55,12 @@ VLC_EXPORT( int, input_UnselectES,( input_thread_t *, es_descriptor_t * ) );
/*****************************************************************************
* Prototypes from input_dec.c
*****************************************************************************/
decoder_
fifo_
t
*
input_RunDecoder
(
input_thread_t
*
,
es_descriptor_t
*
);
decoder_t
*
input_RunDecoder
(
input_thread_t
*
,
es_descriptor_t
*
);
void
input_EndDecoder
(
input_thread_t
*
,
es_descriptor_t
*
);
VLC_EXPORT
(
void
,
input_DecodePES
,
(
decoder_fifo_t
*
,
pes_packet_t
*
)
);
VLC_EXPORT
(
void
,
input_DecodePES
,
(
decoder_t
*
,
pes_packet_t
*
)
);
void
input_DecodeBlock
(
decoder_t
*
,
block_t
*
);
void
input_EscapeDiscontinuity
(
input_thread_t
*
);
void
input_EscapeAudioDiscontinuity
(
input_thread_t
*
);
VLC_EXPORT
(
void
,
input_NullPacket
,
(
input_thread_t
*
,
es_descriptor_t
*
)
);
...
...
include/vlc_codec.h
View file @
3439df81
...
...
@@ -2,7 +2,7 @@
* vlc_codec.h: codec related structures
*****************************************************************************
* Copyright (C) 1999-2003 VideoLAN
* $Id: vlc_codec.h,v 1.
4 2003/11/16 21:07:30 gbazin
Exp $
* $Id: vlc_codec.h,v 1.
5 2003/11/24 00:39:00 fenrir
Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
...
...
@@ -48,12 +48,6 @@ struct decoder_t
module_t
*
p_module
;
decoder_sys_t
*
p_sys
;
/* Deprecated */
int
(
*
pf_decode
)(
decoder_t
*
,
block_t
*
);
decoder_fifo_t
*
p_fifo
;
int
(
*
pf_run
)
(
decoder_fifo_t
*
);
/* End deprecated */
picture_t
*
(
*
pf_decode_video
)(
decoder_t
*
,
block_t
**
);
aout_buffer_t
*
(
*
pf_decode_audio
)(
decoder_t
*
,
block_t
**
);
void
(
*
pf_decode_sub
)
(
decoder_t
*
,
block_t
**
);
...
...
include/vlc_common.h
View file @
3439df81
...
...
@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vlc_common.h,v 1.
89 2003/11/22 13:56:21 ipkiss
Exp $
* $Id: vlc_common.h,v 1.
90 2003/11/24 00:39:00 fenrir
Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
...
...
@@ -270,7 +270,6 @@ typedef struct sout_cfg_t sout_cfg_t;
typedef struct slp_session_t slp_session_t;*/
/* Decoders */
typedef
struct
decoder_fifo_t
decoder_fifo_t
;
typedef
struct
decoder_t
decoder_t
;
typedef
struct
decoder_sys_t
decoder_sys_t
;
...
...
@@ -284,7 +283,6 @@ typedef struct data_buffer_t data_buffer_t;
typedef
struct
stream_position_t
stream_position_t
;
typedef
struct
stream_ctrl_t
stream_ctrl_t
;
typedef
struct
pes_packet_t
pes_packet_t
;
typedef
struct
bit_stream_t
bit_stream_t
;
typedef
struct
network_socket_t
network_socket_t
;
typedef
struct
iso639_lang_t
iso639_lang_t
;
...
...
include/vlc_es.h
View file @
3439df81
...
...
@@ -2,7 +2,7 @@
* vlc_es.h
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: vlc_es.h,v 1.
3 2003/11/22 18:04:10 gbazin
Exp $
* $Id: vlc_es.h,v 1.
4 2003/11/24 00:39:00 fenrir
Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -87,6 +87,11 @@ struct subs_format_t
{
char
*
psz_encoding
;
struct
{
/* FIXME */
uint32_t
palette
[
16
+
1
];
}
spu
;
};
/**
...
...
include/vlc_objects.h
View file @
3439df81
...
...
@@ -2,7 +2,7 @@
* vlc_objects.h: vlc_object_t definition.
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: vlc_objects.h,v 1.2
0 2003/10/14 22:41:41 gbazin
Exp $
* $Id: vlc_objects.h,v 1.2
1 2003/11/24 00:39:00 fenrir
Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
...
...
@@ -40,8 +40,6 @@
#define VLC_OBJECT_ITEM (-6)
#define VLC_OBJECT_INPUT (-7)
#define VLC_OBJECT_DECODER (-8)
/* tmp for backward compat */
#define VLC_OBJECT_DECODER_FIFO (-999)
#define VLC_OBJECT_VOUT (-9)
#define VLC_OBJECT_AOUT (-10)
#define VLC_OBJECT_SOUT (-11)
...
...
modules/access/cdda.c
View file @
3439df81
...
...
@@ -2,7 +2,7 @@
* cdda.c : CD digital audio input module for vlc
*****************************************************************************
* Copyright (C) 2000 VideoLAN
* $Id: cdda.c,v 1.
6 2003/09/07 22:49:05
fenrir Exp $
* $Id: cdda.c,v 1.
7 2003/11/24 00:39:01
fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com>
...
...
@@ -492,9 +492,9 @@ static int CDDADemux( input_thread_t * p_input )
p_input
->
stream
.
p_selected_program
,
p_demux
->
i_pts
);
if
(
p_demux
->
p_es
->
p_dec
oder_fifo
)
if
(
p_demux
->
p_es
->
p_dec
)
{
input_DecodePES
(
p_demux
->
p_es
->
p_dec
oder_fifo
,
p_pes
);
input_DecodePES
(
p_demux
->
p_es
->
p_dec
,
p_pes
);
}
else
{
...
...
modules/access/cddax.c
View file @
3439df81
...
...
@@ -2,7 +2,7 @@
* cddax.c : CD digital audio input module for vlc using libcdio
*****************************************************************************
* Copyright (C) 2000 VideoLAN
* $Id: cddax.c,v 1.
4 2003/11/23 14:34:19 rocky
Exp $
* $Id: cddax.c,v 1.
5 2003/11/24 00:39:01 fenrir
Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com>
...
...
@@ -629,9 +629,9 @@ static int CDDADemux( input_thread_t * p_input )
p_input
->
stream
.
p_selected_program
,
p_demux
->
i_pts
);
if
(
p_demux
->
p_es
->
p_dec
oder_fifo
)
if
(
p_demux
->
p_es
->
p_dec
)
{
input_DecodePES
(
p_demux
->
p_es
->
p_dec
oder_fifo
,
p_pes
);
input_DecodePES
(
p_demux
->
p_es
->
p_dec
,
p_pes
);
}
else
{
...
...
modules/access/dshow/dshow.cpp
View file @
3439df81
...
...
@@ -2,7 +2,7 @@
* dshow.cpp : DirectShow access module for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: dshow.cpp,v 1.1
3 2003/11/05 02:43:55 gbazin
Exp $
* $Id: dshow.cpp,v 1.1
4 2003/11/24 00:39:01 fenrir
Exp $
*
* Author: Gildas Bazin <gbazin@netcourrier.com>
*
...
...
@@ -1331,7 +1331,7 @@ static int Demux( input_thread_t *p_input )
p_pes
->
p_first
->
p_payload_start
+=
16
;
p_pes
->
i_pes_size
-=
16
;
if
(
p_es
&&
p_es
->
p_dec
oder_fifo
)
if
(
p_es
&&
p_es
->
p_dec
)
{
/* Call the pace control. */
input_ClockManageRef
(
p_input
,
p_input
->
stream
.
p_selected_program
,
...
...
@@ -1341,7 +1341,7 @@ static int Demux( input_thread_t *p_input )
input_ClockGetTS
(
p_input
,
p_input
->
stream
.
p_selected_program
,
i_pcr
);
input_DecodePES
(
p_es
->
p_dec
oder_fifo
,
p_pes
);
input_DecodePES
(
p_es
->
p_dec
,
p_pes
);
}
else
{
...
...
modules/access/dvb/access.c
View file @
3439df81
...
...
@@ -554,7 +554,7 @@ void E_(Close) ( vlc_object_t *p_this )
i_es_index
++
)
{
#define p_es p_input->stream.p_selected_program->pp_es[i_es_index]
if
(
p_es
->
p_dec
oder_fifo
)
if
(
p_es
->
p_dec
)
{
ioctl_UnsetDMXFilter
(
p_input
,
p_es
->
i_demux_fd
);
}
...
...
@@ -641,7 +641,7 @@ int SatelliteSetProgram( input_thread_t * p_input,
i_es_index
++
)
{
#define p_es p_input->stream.p_selected_program->pp_es[i_es_index]
if
(
p_es
->
p_dec
oder_fifo
)
if
(
p_es
->
p_dec
)
{
input_UnselectES
(
p_input
,
p_es
);
}
...
...
modules/access/satellite/access.c
View file @
3439df81
...
...
@@ -331,7 +331,7 @@ void E_(Close) ( vlc_object_t *p_this )
i_es_index
++
)
{
#define p_es p_input->stream.p_selected_program->pp_es[i_es_index]
if
(
p_es
->
p_dec
oder_fifo
)
if
(
p_es
->
p_dec
)
{
ioctl_UnsetDMXFilter
(
p_es
->
i_demux_fd
);
}
...
...
@@ -420,7 +420,7 @@ int SatelliteSetProgram( input_thread_t * p_input,
i_es_index
++
)
{
#define p_es p_input->stream.p_selected_program->pp_es[i_es_index]
if
(
p_es
->
p_dec
oder_fifo
)
if
(
p_es
->
p_dec
)
{
input_UnselectES
(
p_input
,
p_es
);
}
...
...
modules/access/v4l/v4l.c
View file @
3439df81
...
...
@@ -2,7 +2,7 @@
* v4l.c : Video4Linux input module for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: v4l.c,v 1.3
1 2003/11/23 18:31:54 alexis
Exp $
* $Id: v4l.c,v 1.3
2 2003/11/24 00:39:01 fenrir
Exp $
*
* Author: Laurent Aimar <fenrir@via.ecp.fr>
* Paul Forgey <paulf at aphrodite dot com>
...
...
@@ -1657,19 +1657,12 @@ static int Demux( input_thread_t *p_input )
p_pes
->
p_first
->
p_payload_start
+=
16
;
p_pes
->
i_pes_size
-=
16
;
if
(
p_es
&&
p_es
->
p_dec
oder_fifo
)
if
(
p_es
&&
p_es
->
p_dec
)
{
vlc_mutex_lock
(
&
p_es
->
p_decoder_fifo
->
data_lock
);
if
(
p_es
->
p_decoder_fifo
->
i_depth
>=
MAX_PACKETS_IN_FIFO
)
{
/* Wait for the decoder. */
vlc_cond_wait
(
&
p_es
->
p_decoder_fifo
->
data_wait
,
&
p_es
->
p_decoder_fifo
->
data_lock
);
}
vlc_mutex_unlock
(
&
p_es
->
p_decoder_fifo
->
data_lock
);
p_pes
->
i_pts
=
p_pes
->
i_dts
=
i_pts
+
p_input
->
i_pts_delay
;
p_pes
->
i_pts
=
p_pes
->
i_dts
=
i_pts
+
p_input
->
i_pts_delay
;
input_DecodePES
(
p_es
->
p_dec
oder_fifo
,
p_pes
);
input_DecodePES
(
p_es
->
p_dec
,
p_pes
);
}
else
{
...
...
modules/codec/dvbsub.c
View file @
3439df81
...
...
@@ -2,7 +2,8 @@
* dvbsub.c : DVB subtitles decoder thread
*****************************************************************************
* Copyright (C) 2003 ANEVIA
* $Id: dvbsub.c,v 1.4 2003/11/22 23:39:14 fenrir Exp $
* Copyright (C) 2003 VideoLAN
* $Id: dvbsub.c,v 1.5 2003/11/24 00:39:01 fenrir Exp $
*
* Authors: Damien LUCAS <damien.lucas@anevia.com>
*
...
...
@@ -27,7 +28,21 @@
#include <vlc/vout.h>
#include <vlc/decoder.h>
#include "codecs.h"
#include "vlc_bits.h"
/*****************************************************************************
* Module descriptor.
*****************************************************************************/
static
int
Open
(
vlc_object_t
*
p_this
);
static
void
Close
(
vlc_object_t
*
p_this
);
vlc_module_begin
();
add_category_hint
(
N_
(
"subtitles"
),
NULL
,
VLC_TRUE
);
set_description
(
_
(
"subtitles decoder"
)
);
set_capability
(
"decoder"
,
50
);
set_callbacks
(
Open
,
Close
);
vlc_module_end
();
// Wow, that's ugly but very usefull for a memory leak track
// so I just keep it
...
...
@@ -175,16 +190,7 @@ typedef struct
dvbsub_object_t
*
p_objects
;
subpicture_t
*
p_spu
[
16
];
}
dvbsub_all_t
;
typedef
struct
{
/* Thread properties and locks */
vlc_thread_t
thread_id
;
/* Id for thread functions */
/* Input properties */
decoder_fifo_t
*
p_fifo
;
/* Stores the PES stream data */
bit_stream_t
bit_stream
;
/* PES data at the bit level */
/* Output properties */
vout_thread_t
*
p_vout
;
/* Needed to create the subpictures */
}
dvbsub_thread_t
;
struct
subpicture_sys_t
{
mtime_t
i_pts
;
...
...
@@ -192,6 +198,16 @@ struct subpicture_sys_t
vlc_object_t
*
p_input
;
/* Link to the input */
vlc_bool_t
b_obsolete
;
};
struct
decoder_sys_t
{
vout_thread_t
*
p_vout
;
mtime_t
i_pts
;
bs_t
bs
;
};
// List of different SEGMENT TYPES
// According to EN 300-743, table 2
#define DVBSUB_ST_PAGE_COMPOSITION 0x10
...
...
@@ -218,11 +234,10 @@ struct subpicture_sys_t
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static
int
OpenDecoder
(
vlc_object_t
*
);
static
int
RunDecoder
(
decoder_fifo_t
*
);
static
int
InitThread
(
dvbsub_thread_t
*
);
static
void
EndThread
(
dvbsub_thread_t
*
i
,
dvbsub_all_t
*
);
static
vout_thread_t
*
FindVout
(
dvbsub_thread_t
*
);
static
void
Decode
(
decoder_t
*
,
block_t
**
);
static
vout_thread_t
*
FindVout
(
decoder_t
*
);
static
void
RenderI42x
(
vout_thread_t
*
,
picture_t
*
,
const
subpicture_t
*
,
vlc_bool_t
);
static
void
RenderYUY2
(
vout_thread_t
*
,
picture_t
*
,
const
subpicture_t
*
,
...
...
@@ -256,30 +271,59 @@ static void free_all ( dvbsub_all_t* p_a );
/*****************************************************************************
* Module descriptor.
*****************************************************************************/
vlc_module_begin
();
add_category_hint
(
N_
(
"subtitles"
),
NULL
,
VLC_TRUE
);
set_description
(
_
(
"subtitles decoder"
)
);
set_capability
(
"decoder"
,
50
);
set_callbacks
(
OpenDecoder
,
NULL
);
vlc_module_end
();
/*****************************************************************************
* OpenDecoder: probe the decoder and return score
* Open: probe the decoder and return score
*****************************************************************************
* Tries to launch a decoder and return score so that the interface is able
* to chose.
*****************************************************************************/
static
int
Open
Decoder
(
vlc_object_t
*
p_this
)
static
int
Open
(
vlc_object_t
*
p_this
)
{
decoder_t
*
p_dec
=
(
decoder_t
*
)
p_this
;
decoder_t
*
p_dec
=
(
decoder_t
*
)
p_this
;
decoder_sys_t
*
p_sys
;
if
(
p_dec
->
fmt_in
.
i_codec
!=
VLC_FOURCC
(
'd'
,
'v'
,
'b'
,
's'
)
)
{
return
VLC_EGENERIC
;
}
p_dec
->
pf_run
=
RunDecoder
;
p_dec
->
pf_decode_subs
=
Decode
;
p_sys
=
p_dec
->
p_sys
=
malloc
(
sizeof
(
decoder_sys_t
)
);
p_sys
->
p_vout
=
NULL
;
p_sys
->
i_pts
=
0
;
es_format_Init
(
&
p_dec
->
fmt_out
,
SPU_ES
,
VLC_FOURCC
(
'd'
,
'v'
,
'b'
,
's'
)
);
return
VLC_SUCCESS
;
}
/*****************************************************************************
* Close:
*****************************************************************************/
static
void
Close
(
vlc_object_t
*
p_this
)
{
decoder_t
*
p_dec
=
(
decoder_t
*
)
p_this
;
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
if
(
p_sys
->
p_vout
&&
p_sys
->
p_vout
->
p_subpicture
!=
NULL
)
{
subpicture_t
*
p_subpic
;
int
i_subpic
;
for
(
i_subpic
=
0
;
i_subpic
<
VOUT_MAX_SUBPICTURES
;
i_subpic
++
)
{
p_subpic
=
&
p_sys
->
p_vout
->
p_subpicture
[
i_subpic
];
if
(
p_subpic
!=
NULL
&&
(
(
p_subpic
->
i_status
==
RESERVED_SUBPICTURE
)
||
(
p_subpic
->
i_status
==
READY_SUBPICTURE
)
)
)
{
vout_DestroySubPicture
(
p_sys
->
p_vout
,
p_subpic
);
}
}
}
trox_call
();
}
/*****************************************************************************
* RunDecoder: this function is called just after the thread is created
*****************************************************************************/
...
...
@@ -350,56 +394,30 @@ static int RunDecoder( decoder_fifo_t * p_fifo )
free_all
(
&
dvbsub
);
return
0
;
}
/* following functions are local */
/*****************************************************************************
* InitThread: initialize dvbsub decoder thread
*****************************************************************************
* This function is called from RunThread and performs the second step of the
* initialization. It returns 0 on success. Note that the thread's flag are not
* modified inside this function.
*****************************************************************************/
static
int
InitThread
(
dvbsub_thread_t
*
p_dvbsubdec
)
{
int
i_ret
;
/* Call InitBitstream anyway so p_spudec->bit_stream is in a known
* state before calling CloseBitstream */
i_ret
=
InitBitstream
(
&
p_dvbsubdec
->
bit_stream
,
p_dvbsubdec
->
p_fifo
,
NULL
,
NULL
);
/* Check for a video output */
p_dvbsubdec
->
p_vout
=
FindVout
(
p_dvbsubdec
);
if
(
!
p_dvbsubdec
->
p_vout
)
{
return
-
1
;
}
/* It was just a check */
vlc_object_release
(
p_dvbsubdec
->
p_vout
);
p_dvbsubdec
->
p_vout
=
NULL
;
return
i_ret
;
}
/*****************************************************************************
* FindVout: Find a vout or wait for one to be created.
*****************************************************************************/
static
vout_thread_t
*
FindVout
(
d
vbsub_thread_t
*
p_spu
dec
)
static
vout_thread_t
*
FindVout
(
d
ecoder_t
*
p_
dec
)
{
vout_thread_t
*
p_vout
=
NULL
;
/* Find an available video output */
do
for
(
;;
)
{
if
(
p_spudec
->
p_fifo
->
b_die
||
p_spudec
->
p_fifo
->
b_error
)
vout_thread_t
*
p_vout
;
if
(
p_dec
->
b_die
||
p_dec
->
b_error
)
{
break
;
return
NULL
;
}
p_vout
=
vlc_object_find
(
p_spudec
->
p_fifo
,
VLC_OBJECT_VOUT
,
FIND_ANYWHERE
);
p_vout
=
vlc_object_find
(
p_dec
,
VLC_OBJECT_VOUT
,
FIND_ANYWHERE
);
if
(
p_vout
)
{
break
;
return
p_vout
;
}
msleep
(
VOUT_OUTMEM_SLEEP
);
}
while
(
1
);
return
p_vout
;
}
/*****************************************************************************
* EndThread: thread destruction
*****************************************************************************
...
...
modules/codec/ffmpeg/audio.c
View file @
3439df81
...
...
@@ -2,7 +2,7 @@
* audio.c: audio decoder using ffmpeg library
*****************************************************************************
* Copyright (C) 1999-2003 VideoLAN
* $Id: audio.c,v 1.2
5 2003/11/22 23:39:14
fenrir Exp $
* $Id: audio.c,v 1.2
6 2003/11/24 00:39:01
fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com>
...
...
@@ -79,6 +79,9 @@ int E_(InitAudioDec)( decoder_t *p_dec, AVCodecContext *p_context,
AVCodec
*
p_codec
,
int
i_codec_id
,
char
*
psz_namecodec
)
{
decoder_sys_t
*
p_sys
;
vlc_value_t
lockval
;
var_Get
(
p_dec
->
p_libvlc
,
"avcodec"
,
&
lockval
);
/* Allocate the memory needed to store the decoder's structure */
if
(
(
p_dec
->
p_sys
=
p_sys
=
...
...
@@ -110,15 +113,16 @@ int E_(InitAudioDec)( decoder_t *p_dec, AVCodecContext *p_context,
}
/* ***** Open the codec ***** */
vlc_mutex_lock
(
lockval
.
p_address
);
if
(
avcodec_open
(
p_sys
->
p_context
,
p_sys
->
p_codec
)
<
0
)
{
vlc_mutex_unlock
(
lockval
.
p_address
);
msg_Err
(
p_dec
,
"cannot open codec (%s)"
,
p_sys
->
psz_namecodec
);
return
VLC_EGENERIC
;
}
else
{
msg_Dbg
(
p_dec
,
"ffmpeg codec (%s) started"
,
p_sys
->
psz_namecodec
);
}
vlc_mutex_unlock
(
lockval
.
p_address
);
msg_Dbg
(
p_dec
,
"ffmpeg codec (%s) started"
,
p_sys
->
psz_namecodec
);
p_sys
->
p_output
=
malloc
(
3
*
AVCODEC_MAX_AUDIO_FRAME_SIZE
);
...
...
modules/codec/ffmpeg/video.c
View file @
3439df81
...
...
@@ -2,7 +2,7 @@
* video.c: video decoder using the ffmpeg library
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: video.c,v 1.5
1 2003/11/23 20:37:04 gbazin
Exp $
* $Id: video.c,v 1.5
2 2003/11/24 00:39:01 fenrir
Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com>
...
...
@@ -184,9 +184,13 @@ int E_(InitVideoDec)( decoder_t *p_dec, AVCodecContext *p_context,
AVCodec
*
p_codec
,
int
i_codec_id
,
char
*
psz_namecodec
)
{
decoder_sys_t
*
p_sys
;
vlc_value_t
lockval
;
vlc_value_t
val
;
int
i_tmp
;
var_Get
(
p_dec
->
p_libvlc
,
"avcodec"
,
&
lockval
);
/* Allocate the memory needed to store the decoder's structure */
if
(
(
p_dec
->
p_sys
=
p_sys
=
(
decoder_sys_t
*
)
malloc
(
sizeof
(
decoder_sys_t
))
)
==
NULL
)
...
...
@@ -224,15 +228,15 @@ int E_(InitVideoDec)( decoder_t *p_dec, AVCodecContext *p_context,
#endif
/* ***** Open the codec ***** */
vlc_mutex_lock
(
lockval
.
p_address
);
if
(
avcodec_open
(
p_sys
->
p_context
,
p_sys
->
p_codec
)
<
0
)
{
vlc_mutex_unlock
(
lockval
.
p_address
);
msg_Err
(
p_dec
,
"cannot open codec (%s)"
,
p_sys
->
psz_namecodec
);
return
VLC_EGENERIC
;
}
else
{
msg_Dbg
(
p_dec
,
"ffmpeg codec (%s) started"
,
p_sys
->
psz_namecodec
);
}
vlc_mutex_unlock
(
lockval
.
p_address
);
msg_Dbg
(
p_dec
,
"ffmpeg codec (%s) started"
,
p_sys
->
psz_namecodec
);
/* ***** ffmpeg frame skipping ***** */
var_Create
(
p_dec
,
"ffmpeg-hurry-up"
,
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
...
...
modules/codec/spudec/parse.c
View file @
3439df81
...
...
@@ -2,7 +2,7 @@
* parse.c: SPU parser
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: parse.c,v 1.1
5 2003/11/22 23:39:14
fenrir Exp $
* $Id: parse.c,v 1.1
6 2003/11/24 00:39:01
fenrir Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Laurent Aimar <fenrir@via.ecp.fr>
...
...
@@ -225,8 +225,7 @@ static int ParseControlSeq( decoder_t *p_dec, subpicture_t * p_spu )
case
SPU_CMD_SET_PALETTE
:
/* 03xxxx (palette) */
if
(
p_dec
->
p_fifo
->
p_demux_data
&&
*
(
int
*
)
p_dec
->
p_fifo
->
p_demux_data
==
0xBeeF
)
if
(
p_dec
->
fmt_in
.
subs
.
spu
.
palette
[
0
]
==
0xBeeF
)
{
unsigned
int
idx
[
4
];
...
...
@@ -239,9 +238,7 @@ static int ParseControlSeq( decoder_t *p_dec, subpicture_t * p_spu )
for
(
i
=
0
;
i
<
4
;
i
++
)
{
uint32_t
i_color
;
i_color
=
((
uint32_t
*
)((
char
*
)
p_dec
->
p_fifo
->
p_demux_data
+
sizeof
(
int
)))[
idx
[
i
]];
uint32_t
i_color
=
p_dec
->
fmt_in
.
subs
.
spu
.
palette
[
1
+
idx
[
i
]];
/* FIXME: this job should be done sooner */
p_spu
->
p_sys
->
pi_yuv
[
3
-
i
][
0
]
=
(
i_color
>>
16
)
&
0xff
;
...
...
modules/demux/flac.c
View file @
3439df81
...
...
@@ -2,7 +2,7 @@
* flac.c : FLAC demux module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: flac.c,v 1.
8 2003/11/21 20:49:13 gbazin
Exp $
* $Id: flac.c,v 1.
9 2003/11/24 00:39:01 fenrir
Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
...
...
@@ -117,12 +117,10 @@ static int Open( vlc_object_t * p_this )
* Load the FLAC packetizer
*/
p_sys
->
p_packetizer
=
vlc_object_create
(
p_input
,
VLC_OBJECT_DECODER
);
p_sys
->
p_packetizer
->
pf_decode
=
0
;
p_sys
->
p_packetizer
->
pf_decode_audio
=
0
;
p_sys
->
p_packetizer
->
pf_decode_video
=
0
;
p_sys
->
p_packetizer
->
pf_decode_sub
=
0
;
p_sys
->
p_packetizer
->
pf_packetize
=
0
;
p_sys
->
p_packetizer
->
pf_run
=
0
;
/* Initialization of decoder structure */
es_format_Init
(
&
p_sys
->
p_packetizer
->
fmt_in
,
AUDIO_ES
,
...
...
modules/demux/mp4/mp4.c
View file @
3439df81
...
...
@@ -2,7 +2,7 @@
* mp4.c : MP4 file input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: mp4.c,v 1.4
1 2003/11/23 13:15:27 gbazin
Exp $
* $Id: mp4.c,v 1.4
2 2003/11/24 00:39:01 fenrir
Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -425,11 +425,11 @@ static int Demux( input_thread_t *p_input )
}
else
if
(
track
.
b_ok
)
{
if
(
track
.
b_selected
&&
track
.
p_es
->
p_dec
oder_fifo
==
NULL
)
if
(
track
.
b_selected
&&
track
.
p_es
->
p_dec
==
NULL
)
{
MP4_TrackUnselect
(
p_input
,
&
track
);
}
else
if
(
!
track
.
b_selected
&&
track
.
p_es
->
p_dec
oder_fifo
!=
NULL
)
else
if
(
!
track
.
b_selected
&&
track
.
p_es
->
p_dec
!=
NULL
)
{
MP4_TrackSelect
(
p_input
,
&
track
,
MP4_GetMoviePTS
(
p_demux
)
);
}
...
...
@@ -532,11 +532,11 @@ static int Demux( input_thread_t *p_input )
p_pes
->
i_pts
=
0
;
}
if
(
track
.
p_es
->
p_dec
oder_fifo
)
if
(
track
.
p_es
->
p_dec
)
{
p_pes
->
i_rate
=
p_input
->
stream
.
control
.
i_rate
;
input_DecodePES
(
track
.
p_es
->
p_dec
oder_fifo
,
p_pes
);
input_DecodePES
(
track
.
p_es
->
p_dec
,
p_pes
);
}
else
{
...
...
@@ -1372,19 +1372,19 @@ static int TrackGotoChunkSample( input_thread_t *p_input,
}
/* select again the new decoder */
if
(
p_track
->
b_selected
&&
p_track
->
p_es
&&
p_track
->
p_es
->
p_dec
oder_fifo
==
NULL
)
if
(
p_track
->
b_selected
&&
p_track
->
p_es
&&
p_track
->
p_es
->
p_dec
==
NULL
)
{
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
input_SelectES
(
p_input
,
p_track
->
p_es
);
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
if
(
p_track
->
p_es
->
p_dec
oder_fifo
)
if
(
p_track
->
p_es
->
p_dec
)
{
if
(
p_track
->
p_pes_init
!=
NULL
)
{
p_track
->
p_pes_init
->
i_rate
=
p_input
->
stream
.
control
.
i_rate
;
input_DecodePES
(
p_track
->
p_es
->
p_dec
oder_fifo
,
input_DecodePES
(
p_track
->
p_es
->
p_dec
,
p_track
->
p_pes_init
);
p_track
->
p_pes_init
=
NULL
;
}
...
...
@@ -1663,7 +1663,7 @@ static void MP4_TrackUnselect(input_thread_t *p_input,
return
;
}
if
(
p_track
->
p_es
->
p_dec
oder_fifo
)
if
(
p_track
->
p_es
->
p_dec
)
{
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
input_UnselectES
(
p_input
,
p_track
->
p_es
);
...
...
modules/demux/mpeg/m4v.c
View file @
3439df81
...
...
@@ -2,7 +2,7 @@
* m4v.c : MPEG-4 video Stream input module for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: m4v.c,v 1.
8 2003/09/10 11:51:00
fenrir Exp $
* $Id: m4v.c,v 1.
9 2003/11/24 00:39:01
fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -275,7 +275,7 @@ static int Demux( input_thread_t * p_input )
p_input
->
stream
.
p_selected_program
,
p_demux
->
i_dts
);
if
(
!
p_demux
->
p_es
->
p_dec
oder_fifo
)
if
(
!
p_demux
->
p_es
->
p_dec
)
{
msg_Err
(
p_input
,
"no video decoder"
);
input_DeletePES
(
p_input
->
p_method_data
,
p_pes
);
...
...
@@ -283,7 +283,7 @@ static int Demux( input_thread_t * p_input )
}
else
{
input_DecodePES
(
p_demux
->
p_es
->
p_dec
oder_fifo
,
p_pes
);
input_DecodePES
(
p_demux
->
p_es
->
p_dec
,
p_pes
);
}
/* FIXME FIXME FIXME FIXME */
p_demux
->
i_dts
+=
(
mtime_t
)
90000
/
25
;
...
...
modules/demux/mpeg/mpgv.c
View file @
3439df81
...
...
@@ -2,7 +2,7 @@
* mpgv.c : MPEG-I/II Video demuxer
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: mpgv.c,v 1.
1 2003/11/22 17:03:57
fenrir Exp $
* $Id: mpgv.c,v 1.
2 2003/11/24 00:39:01
fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -130,12 +130,10 @@ static int Open( vlc_object_t * p_this )
* Load the mpegvideo packetizer
*/
p_sys
->
p_packetizer
=
vlc_object_create
(
p_input
,
VLC_OBJECT_PACKETIZER
);
p_sys
->
p_packetizer
->
pf_decode
=
NULL
;
p_sys
->
p_packetizer
->
pf_decode_audio
=
NULL
;
p_sys
->
p_packetizer
->
pf_decode_video
=
NULL
;
p_sys
->
p_packetizer
->
pf_decode_sub
=
NULL
;
p_sys
->
p_packetizer
->
pf_packetize
=
NULL
;
p_sys
->
p_packetizer
->
pf_run
=
NULL
;
es_format_Init
(
&
p_sys
->
p_packetizer
->
fmt_in
,
VIDEO_ES
,
VLC_FOURCC
(
'm'
,
'p'
,
'g'
,
'v'
)
);
es_format_Init
(
&
p_sys
->
p_packetizer
->
fmt_out
,
UNKNOWN_ES
,
0
);
p_sys
->
p_packetizer
->
p_module
=
...
...
modules/demux/mpeg/system.c
View file @
3439df81
...
...
@@ -2,7 +2,7 @@
* system.c: helper module for TS, PS and PES management
*****************************************************************************
* Copyright (C) 1998-2002 VideoLAN
* $Id: system.c,v 1.
19 2003/11/06 16:36:41 nitrox
Exp $
* $Id: system.c,v 1.
20 2003/11/24 00:39:01 fenrir
Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
...
...
@@ -414,11 +414,11 @@ static void ParsePES( input_thread_t * p_input, es_descriptor_t * p_es )
/* Now we can eventually put the PES packet in the decoder's
* PES fifo */
if
(
p_es
->
p_dec
oder_fifo
!=
NULL
)
if
(
p_es
->
p_dec
!=
NULL
)
{
input_DecodePES
(
p_es
->
p_dec
oder_fifo
,
p_pes
);
input_DecodePES
(
p_es
->
p_dec
,
p_pes
);
}
else
if
(
p_es
->
p_dec
oder_fifo
==
NULL
&&
else
if
(
p_es
->
p_dec
==
NULL
&&
((
es_ts_data_t
*
)
p_es
->
p_demux_data
)
->
b_dvbsub
)
{
es_descriptor_t
*
p_dvbsub
;
...
...
@@ -430,9 +430,9 @@ static void ParsePES( input_thread_t * p_input, es_descriptor_t * p_es )
for
(
i
=
0
;
i
<
i_count
;
i
++
)
{
p_dvbsub
=
((
es_ts_data_t
*
)
p_es
->
p_demux_data
)
->
p_dvbsub_es
[
i
];
if
(
p_dvbsub
->
p_dec
oder_fifo
!=
NULL
)
if
(
p_dvbsub
->
p_dec
!=
NULL
)
{
input_DecodePES
(
p_dvbsub
->
p_dec
oder_fifo
,
p_pes
);
input_DecodePES
(
p_dvbsub
->
p_dec
,
p_pes
);
break
;
}
}
...
...
@@ -1112,7 +1112,7 @@ static void DemuxPS( input_thread_t * p_input, data_packet_t * p_data )
p_es
=
ParsePS
(
p_input
,
p_data
);
vlc_mutex_lock
(
&
p_input
->
stream
.
control
.
control_lock
);
if
(
p_es
!=
NULL
&&
p_es
->
p_dec
oder_fifo
!=
NULL
if
(
p_es
!=
NULL
&&
p_es
->
p_dec
!=
NULL
&&
(
p_es
->
i_cat
!=
AUDIO_ES
||
!
p_input
->
stream
.
control
.
b_mute
)
)
{
vlc_mutex_unlock
(
&
p_input
->
stream
.
control
.
control_lock
);
...
...
@@ -1271,7 +1271,7 @@ static void DemuxTS( input_thread_t * p_input, data_packet_t * p_data,
/* Not selected. Just read the adaptation field for a PCR. */
b_trash
=
1
;
}
else
if
(
p_es
->
p_dec
oder_fifo
==
NULL
&&
!
b_psi
&&
!
b_dvbsub
)
else
if
(
p_es
->
p_dec
==
NULL
&&
!
b_psi
&&
!
b_dvbsub
)
{
b_trash
=
1
;
}
...
...
@@ -1284,7 +1284,7 @@ static void DemuxTS( input_thread_t * p_input, data_packet_t * p_data,
* may still be null. Who said it was ugly ?
* I have written worse. --Meuuh */
if
(
(
p_es
)
&&
((
p_es
->
p_dec
oder_fifo
!=
NULL
)
||
b_psi
||
b_pcr
||
b_dvbsub
)
)
((
p_es
->
p_dec
!=
NULL
)
||
b_psi
||
b_pcr
||
b_dvbsub
)
)
{
p_es
->
c_packets
++
;
...
...
modules/demux/rawdv.c
View file @
3439df81
...
...
@@ -2,7 +2,7 @@
* rawdv.c : raw dv input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: rawdv.c,v 1.1
0 2003/09/07 22:48:29
fenrir Exp $
* $Id: rawdv.c,v 1.1
1 2003/11/24 00:39:01
fenrir Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
...
...
@@ -374,7 +374,7 @@ static int Demux( input_thread_t * p_input )
}
/* Build video PES packet */
if
(
p_rawdv
->
p_video_es
->
p_dec
oder_fifo
)
if
(
p_rawdv
->
p_video_es
->
p_dec
)
{
p_pes
=
input_NewPES
(
p_input
->
p_method_data
);
if
(
p_pes
==
NULL
)
...
...
@@ -394,7 +394,7 @@ static int Demux( input_thread_t * p_input )
}
/* Do the same for audio */
if
(
p_rawdv
->
p_audio_es
->
p_dec
oder_fifo
)
if
(
p_rawdv
->
p_audio_es
->
p_dec
)
{
p_audio_pes
=
input_NewPES
(
p_input
->
p_method_data
);
if
(
p_audio_pes
==
NULL
)
...
...
@@ -405,7 +405,7 @@ static int Demux( input_thread_t * p_input )
}
p_audio_pes
->
i_rate
=
p_input
->
stream
.
control
.
i_rate
;
if
(
p_rawdv
->
p_video_es
->
p_dec
oder_fifo
)
if
(
p_rawdv
->
p_video_es
->
p_dec
)
p_audio_pes
->
p_first
=
p_audio_pes
->
p_last
=
input_ShareBuffer
(
p_input
->
p_method_data
,
p_data
->
p_buffer
);
else
...
...
@@ -422,15 +422,15 @@ static int Demux( input_thread_t * p_input )
}
/* Decode PES packets if stream is selected */
if
(
p_rawdv
->
p_video_es
->
p_dec
oder_fifo
)
input_DecodePES
(
p_rawdv
->
p_video_es
->
p_dec
oder_fifo
,
p_pes
);
if
(
p_rawdv
->
p_audio_es
->
p_dec
oder_fifo
)
input_DecodePES
(
p_rawdv
->
p_audio_es
->
p_dec
oder_fifo
,
p_audio_pes
);
if
(
p_rawdv
->
p_video_es
->
p_dec
)
input_DecodePES
(
p_rawdv
->
p_video_es
->
p_dec
,
p_pes
);
if
(
p_rawdv
->
p_audio_es
->
p_dec
)
input_DecodePES
(
p_rawdv
->
p_audio_es
->
p_dec
,
p_audio_pes
);
p_rawdv
->
i_pcr
+=
(
90000
/
p_rawdv
->
f_rate
);
if
(
!
p_rawdv
->
p_video_es
->
p_dec
oder_fifo
&&
!
p_rawdv
->
p_audio_es
->
p_dec
oder_fifo
)
if
(
!
p_rawdv
->
p_video_es
->
p_dec
&&
!
p_rawdv
->
p_audio_es
->
p_dec
)
input_DeletePacket
(
p_input
->
p_method_data
,
p_data
);
return
1
;
...
...
modules/gui/beos/VlcWrapper.cpp
View file @
3439df81
...
...
@@ -2,7 +2,7 @@
* VlcWrapper.cpp: BeOS plugin for vlc (derived from MacOS X port)
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: VlcWrapper.cpp,v 1.3
8 2003/10/21 01:48:02 tite
r Exp $
* $Id: VlcWrapper.cpp,v 1.3
9 2003/11/24 00:39:01 fenri
r Exp $
*
* Authors: Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
...
...
@@ -1005,7 +1005,7 @@ void VlcWrapper::FilterChange()
for
(
unsigned
int
i
=
0
;
i
<
p_input
->
stream
.
i_es_number
;
i
++
)
{
if
(
(
p_input
->
stream
.
pp_es
[
i
]
->
i_cat
==
VIDEO_ES
)
&&
(
p_input
->
stream
.
pp_es
[
i
]
->
p_dec
oder_fifo
!=
NULL
)
)
(
p_input
->
stream
.
pp_es
[
i
]
->
p_dec
!=
NULL
)
)
{
input_UnselectES
(
p_input
,
p_input
->
stream
.
pp_es
[
i
]
);
input_SelectES
(
p_input
,
p_input
->
stream
.
pp_es
[
i
]
);
...
...
modules/gui/gtk/menu.c
View file @
3439df81
...
...
@@ -2,7 +2,7 @@
* menu.c : functions to handle menu items.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: menu.c,v 1.1
1 2003/08/04 12:34:20 jpsaman
Exp $
* $Id: menu.c,v 1.1
2 2003/11/24 00:39:01 fenrir
Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
...
...
@@ -398,7 +398,7 @@ static void GtkDeinterlaceUpdate( intf_thread_t *p_intf, char *psz_mode )
for
(
i
=
0
;
i
<
p_intf
->
p_sys
->
p_input
->
stream
.
i_es_number
;
i
++
)
{
if
(
(
ES
->
i_cat
==
VIDEO_ES
)
&&
ES
->
p_dec
oder_fifo
!=
NULL
)
ES
->
p_dec
!=
NULL
)
{
input_UnselectES
(
p_intf
->
p_sys
->
p_input
,
ES
);
input_SelectES
(
p_intf
->
p_sys
->
p_input
,
ES
);
...
...
modules/stream_out/display.c
View file @
3439df81
...
...
@@ -2,7 +2,7 @@
* display.c
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: display.c,v 1.
7 2003/11/21 15:32:08
fenrir Exp $
* $Id: display.c,v 1.
8 2003/11/24 00:39:01
fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -271,9 +271,9 @@ static int Send( sout_stream_t *p_stream, sout_stream_id_t *id,
p_buffer
->
p_buffer
,
p_buffer
->
i_size
);
if
(
id
->
p_es
->
p_dec
oder_fifo
)
if
(
id
->
p_es
->
p_dec
)
{
input_DecodePES
(
id
->
p_es
->
p_dec
oder_fifo
,
p_pes
);
input_DecodePES
(
id
->
p_es
->
p_dec
,
p_pes
);
}
else
{
...
...
src/input/input.c
View file @
3439df81
...
...
@@ -4,7 +4,7 @@
* decoders.
*****************************************************************************
* Copyright (C) 1998-2002 VideoLAN
* $Id: input.c,v 1.26
0 2003/11/22 13:19:30 gbazin
Exp $
* $Id: input.c,v 1.26
1 2003/11/24 00:39:01 fenrir
Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -30,6 +30,7 @@
#include <vlc/vlc.h>
#include <vlc/input.h>
#include <vlc/decoder.h>
#include <vlc/vout.h>
#ifdef HAVE_SYS_TIMES_H
...
...
@@ -1134,7 +1135,7 @@ static es_out_id_t *EsOutAdd( es_out_t *out, es_format_t *fmt )
msg_Err
(
p_input
,
"FIXME unselect es in es_out_Add"
);
}
input_SelectES
(
p_input
,
id
->
p_es
);
if
(
id
->
p_es
->
p_dec
oder_fifo
)
if
(
id
->
p_es
->
p_dec
)
{
out
->
p_sys
->
i_audio
=
fmt
->
i_priority
;
}
...
...
@@ -1146,7 +1147,7 @@ static es_out_id_t *EsOutAdd( es_out_t *out, es_format_t *fmt )
msg_Err
(
p_input
,
"FIXME unselect es in es_out_Add"
);
}
input_SelectES
(
p_input
,
id
->
p_es
);
if
(
id
->
p_es
->
p_dec
oder_fifo
)
if
(
id
->
p_es
->
p_dec
)
{
out
->
p_sys
->
i_video
=
fmt
->
i_priority
;
}
...
...
@@ -1220,31 +1221,9 @@ static es_out_id_t *EsOutAdd( es_out_t *out, es_format_t *fmt )
static
int
EsOutSend
(
es_out_t
*
out
,
es_out_id_t
*
id
,
block_t
*
p_block
)
{
if
(
id
->
p_es
->
p_dec
oder_fifo
)
if
(
id
->
p_es
->
p_dec
)
{
pes_packet_t
*
p_pes
;
if
(
!
(
p_pes
=
input_NewPES
(
out
->
p_sys
->
p_input
->
p_method_data
)
)
)
{
return
VLC_SUCCESS
;
}
p_pes
->
p_first
=
p_pes
->
p_last
=
input_NewPacket
(
out
->
p_sys
->
p_input
->
p_method_data
,
p_block
->
i_buffer
);
p_pes
->
i_nb_data
=
1
;
p_pes
->
i_pts
=
p_block
->
i_pts
;
p_pes
->
i_dts
=
p_block
->
i_dts
;
p_pes
->
p_first
->
p_payload_end
=
p_pes
->
p_first
->
p_payload_start
+
p_block
->
i_buffer
;
memcpy
(
p_pes
->
p_first
->
p_payload_start
,
p_block
->
p_buffer
,
p_block
->
i_buffer
);
block_Release
(
p_block
);
input_DecodePES
(
id
->
p_es
->
p_decoder_fifo
,
p_pes
);
input_DecodeBlock
(
id
->
p_es
->
p_dec
,
p_block
);
}
else
{
...
...
@@ -1255,9 +1234,9 @@ static int EsOutSend( es_out_t *out, es_out_id_t *id, block_t *p_block )
static
int
EsOutSendPES
(
es_out_t
*
out
,
es_out_id_t
*
id
,
pes_packet_t
*
p_pes
)
{
if
(
id
->
p_es
->
p_dec
oder_fifo
)
if
(
id
->
p_es
->
p_dec
)
{
input_DecodePES
(
id
->
p_es
->
p_dec
oder_fifo
,
p_pes
);
input_DecodePES
(
id
->
p_es
->
p_dec
,
p_pes
);
}
else
{
...
...
@@ -1273,7 +1252,7 @@ static void EsOutDel( es_out_t *out, es_out_id_t *id )
TAB_REMOVE
(
p_sys
->
i_id
,
p_sys
->
id
,
id
);
vlc_mutex_lock
(
&
p_sys
->
p_input
->
stream
.
stream_lock
);
if
(
id
->
p_es
->
p_dec
oder_fifo
)
if
(
id
->
p_es
->
p_dec
)
{
input_UnselectES
(
p_sys
->
p_input
,
id
->
p_es
);
}
...
...
@@ -1304,13 +1283,13 @@ static int EsOutControl( es_out_t *out, int i_query, va_list args )
vlc_mutex_lock
(
&
p_sys
->
p_input
->
stream
.
stream_lock
);
id
=
(
es_out_id_t
*
)
va_arg
(
args
,
es_out_id_t
*
);
b
=
(
vlc_bool_t
)
va_arg
(
args
,
vlc_bool_t
);
if
(
b
&&
id
->
p_es
->
p_dec
oder_fifo
==
NULL
)
if
(
b
&&
id
->
p_es
->
p_dec
==
NULL
)
{
input_SelectES
(
p_sys
->
p_input
,
id
->
p_es
);
vlc_mutex_unlock
(
&
p_sys
->
p_input
->
stream
.
stream_lock
);
return
id
->
p_es
->
p_dec
oder_fifo
?
VLC_SUCCESS
:
VLC_EGENERIC
;
return
id
->
p_es
->
p_dec
?
VLC_SUCCESS
:
VLC_EGENERIC
;
}
else
if
(
!
b
&&
id
->
p_es
->
p_dec
oder_fifo
)
else
if
(
!
b
&&
id
->
p_es
->
p_dec
)
{
input_UnselectES
(
p_sys
->
p_input
,
id
->
p_es
);
vlc_mutex_unlock
(
&
p_sys
->
p_input
->
stream
.
stream_lock
);
...
...
@@ -1320,7 +1299,7 @@ static int EsOutControl( es_out_t *out, int i_query, va_list args )
id
=
(
es_out_id_t
*
)
va_arg
(
args
,
es_out_id_t
*
);
pb
=
(
vlc_bool_t
*
)
va_arg
(
args
,
vlc_bool_t
*
);
*
pb
=
id
->
p_es
->
p_dec
oder_fifo
?
VLC_TRUE
:
VLC_FALSE
;
*
pb
=
id
->
p_es
->
p_dec
?
VLC_TRUE
:
VLC_FALSE
;
return
VLC_SUCCESS
;
default:
...
...
src/input/input_dec.c
View file @
3439df81
This diff is collapsed.
Click to expand it.
src/input/input_ext-intf.c
View file @
3439df81
...
...
@@ -2,7 +2,7 @@
* input_ext-intf.c: services to the interface
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: input_ext-intf.c,v 1.5
1 2003/07/13 19:58:41 massiot
Exp $
* $Id: input_ext-intf.c,v 1.5
2 2003/11/24 00:39:02 fenrir
Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -360,7 +360,7 @@ void input_DumpStream( input_thread_t * p_input )
msg_Dbg
(
p_input
,
"ES 0x%x, "
"stream 0x%x, fourcc `%4.4s', %s [OK:%ld/ERR:%ld]"
,
ES
->
i_id
,
ES
->
i_stream_id
,
(
char
*
)
&
ES
->
i_fourcc
,
ES
->
p_dec
oder_fifo
!=
NULL
?
"selected"
:
"not selected"
,
ES
->
p_dec
!=
NULL
?
"selected"
:
"not selected"
,
ES
->
c_packets
,
ES
->
c_invalid_packets
);
#undef ES
}
...
...
src/input/input_programs.c
View file @
3439df81
...
...
@@ -2,7 +2,7 @@
* input_programs.c: es_descriptor_t, pgrm_descriptor_t management
*****************************************************************************
* Copyright (C) 1999-2002 VideoLAN
* $Id: input_programs.c,v 1.12
1 2003/11/16 21:07:31 gbazin
Exp $
* $Id: input_programs.c,v 1.12
2 2003/11/24 00:39:02 fenrir
Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -425,7 +425,7 @@ int input_SetProgram( input_thread_t * p_input, pgrm_descriptor_t * p_new_prg )
i_es_index
++
)
{
#define p_es p_input->stream.p_selected_program->pp_es[i_es_index]
if
(
p_es
->
p_dec
oder_fifo
)
/* if the ES was selected */
if
(
p_es
->
p_dec
)
/* if the ES was selected */
{
input_UnselectES
(
p_input
,
p_es
);
}
...
...
@@ -614,7 +614,7 @@ es_descriptor_t * input_AddES( input_thread_t * p_input,
/* Init its values */
p_es
->
i_id
=
i_es_id
;
p_es
->
p_pes
=
NULL
;
p_es
->
p_dec
oder_fifo
=
NULL
;
p_es
->
p_dec
=
NULL
;
p_es
->
i_cat
=
i_category
;
p_es
->
i_demux_fd
=
0
;
p_es
->
c_packets
=
0
;
...
...
@@ -756,7 +756,7 @@ void input_DelES( input_thread_t * p_input, es_descriptor_t * p_es )
}
/* Kill associated decoder, if any. */
if
(
p_es
->
p_dec
oder_fifo
!=
NULL
)
if
(
p_es
->
p_dec
!=
NULL
)
{
input_UnselectES
(
p_input
,
p_es
);
}
...
...
@@ -860,7 +860,7 @@ int input_SelectES( input_thread_t * p_input, es_descriptor_t * p_es )
msg_Dbg
(
p_input
,
"selecting ES 0x%x"
,
p_es
->
i_id
);
if
(
p_es
->
p_dec
oder_fifo
!=
NULL
)
if
(
p_es
->
p_dec
!=
NULL
)
{
msg_Err
(
p_input
,
"ES 0x%x is already selected"
,
p_es
->
i_id
);
return
-
1
;
...
...
@@ -869,10 +869,10 @@ int input_SelectES( input_thread_t * p_input, es_descriptor_t * p_es )
/* Release the lock, not to block the input thread during
* the creation of the thread. */
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
p_es
->
p_dec
oder_fifo
=
input_RunDecoder
(
p_input
,
p_es
);
p_es
->
p_dec
=
input_RunDecoder
(
p_input
,
p_es
);
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
if
(
p_es
->
p_dec
oder_fifo
==
NULL
)
if
(
p_es
->
p_dec
==
NULL
)
{
return
-
1
;
}
...
...
@@ -917,7 +917,7 @@ int input_UnselectES( input_thread_t * p_input, es_descriptor_t * p_es )
msg_Dbg
(
p_input
,
"unselecting ES 0x%x"
,
p_es
->
i_id
);
if
(
p_es
->
p_dec
oder_fifo
==
NULL
)
if
(
p_es
->
p_dec
==
NULL
)
{
msg_Err
(
p_input
,
"ES 0x%x is not selected"
,
p_es
->
i_id
);
return
(
-
1
);
...
...
@@ -947,7 +947,7 @@ int input_UnselectES( input_thread_t * p_input, es_descriptor_t * p_es )
input_EndDecoder
(
p_input
,
p_es
);
p_es
->
p_pes
=
NULL
;
if
(
(
p_es
->
p_dec
oder_fifo
==
NULL
)
&&
if
(
(
p_es
->
p_dec
==
NULL
)
&&
(
p_input
->
stream
.
i_selected_es_number
>
0
)
)
{
while
(
(
i_index
<
p_input
->
stream
.
i_selected_es_number
-
1
)
&&
...
...
@@ -1140,7 +1140,7 @@ static int ESCallback( vlc_object_t *p_this, char const *psz_cmd,
for
(
i
=
0
;
i
<
p_input
->
stream
.
i_es_number
;
i
++
)
{
if
(
p_input
->
stream
.
pp_es
[
i
]
->
i_id
==
oldval
.
i_int
&&
p_input
->
stream
.
pp_es
[
i
]
->
p_dec
oder_fifo
!=
NULL
)
p_input
->
stream
.
pp_es
[
i
]
->
p_dec
!=
NULL
)
{
input_UnselectES
(
p_input
,
p_input
->
stream
.
pp_es
[
i
]
);
}
...
...
@@ -1150,7 +1150,7 @@ static int ESCallback( vlc_object_t *p_this, char const *psz_cmd,
for
(
i
=
0
;
i
<
p_input
->
stream
.
i_es_number
;
i
++
)
{
if
(
p_input
->
stream
.
pp_es
[
i
]
->
i_id
==
newval
.
i_int
&&
p_input
->
stream
.
pp_es
[
i
]
->
p_dec
oder_fifo
==
NULL
)
p_input
->
stream
.
pp_es
[
i
]
->
p_dec
==
NULL
)
{
input_SelectES
(
p_input
,
p_input
->
stream
.
pp_es
[
i
]
);
}
...
...
src/misc/objects.c
View file @
3439df81
...
...
@@ -2,7 +2,7 @@
* objects.c: vlc_object_t handling
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: objects.c,v 1.4
2 2003/10/14 22:41:41 gbazin
Exp $
* $Id: objects.c,v 1.4
3 2003/11/24 00:39:02 fenrir
Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
...
...
@@ -131,10 +131,6 @@ void * __vlc_object_create( vlc_object_t *p_this, int i_type )
i_size
=
sizeof
(
decoder_t
);
psz_type
=
"decoder"
;
break
;
case
VLC_OBJECT_DECODER_FIFO
:
/* tmp for backward compat */
i_size
=
sizeof
(
decoder_fifo_t
);
psz_type
=
"decoder"
;
break
;
case
VLC_OBJECT_PACKETIZER
:
i_size
=
sizeof
(
decoder_t
);
psz_type
=
"packetizer"
;
...
...
src/video_output/video_output.c
View file @
3439df81
...
...
@@ -5,7 +5,7 @@
* thread, and destroy a previously oppened video output thread.
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: video_output.c,v 1.2
39 2003/10/26 13:10:05 sigmunau
Exp $
* $Id: video_output.c,v 1.2
40 2003/11/24 00:39:02 fenrir
Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
...
...
@@ -1360,7 +1360,7 @@ static int DeinterlaceCallback( vlc_object_t *p_this, char const *psz_cmd,
for
(
i
=
0
;
i
<
p_input
->
stream
.
i_es_number
;
i
++
)
{
if
(
(
ES
->
i_cat
==
VIDEO_ES
)
&&
ES
->
p_dec
oder_fifo
!=
NULL
)
if
(
(
ES
->
i_cat
==
VIDEO_ES
)
&&
ES
->
p_dec
!=
NULL
)
{
input_UnselectES
(
p_input
,
ES
);
input_SelectES
(
p_input
,
ES
);
...
...
@@ -1401,7 +1401,7 @@ static int FilterCallback( vlc_object_t *p_this, char const *psz_cmd,
for
(
i
=
0
;
i
<
p_input
->
stream
.
i_es_number
;
i
++
)
{
if
(
(
ES
->
i_cat
==
VIDEO_ES
)
&&
ES
->
p_dec
oder_fifo
!=
NULL
)
if
(
(
ES
->
i_cat
==
VIDEO_ES
)
&&
ES
->
p_dec
!=
NULL
)
{
input_UnselectES
(
p_input
,
ES
);
input_SelectES
(
p_input
,
ES
);
...
...
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