fftools/ffmpeg_dec: move decoding to a separate thread
This is only a preparatory step to a fully threaded architecture and does not yet make decoding truly parallel - the main thread will currently submit a packet and wait until it has been fully processed by the decoding thread before moving on. Decoder behavior as observed by the rest of the program should remain unchanged. That will change in future commits after encoders and filters are moved to threads and a thread-aware scheduler is added.
This commit is contained in:
@@ -730,6 +730,7 @@ int init_simple_filtergraph(InputStream *ist, OutputStream *ost,
|
||||
int init_complex_filtergraph(FilterGraph *fg);
|
||||
|
||||
int copy_av_subtitle(AVSubtitle *dst, const AVSubtitle *src);
|
||||
int subtitle_wrap_frame(AVFrame *frame, AVSubtitle *subtitle, int copy);
|
||||
|
||||
/**
|
||||
* Get our axiliary frame data attached to the frame, allocating it
|
||||
@@ -941,4 +942,14 @@ extern const char * const opt_name_codec_tags[];
|
||||
extern const char * const opt_name_frame_rates[];
|
||||
extern const char * const opt_name_top_field_first[];
|
||||
|
||||
static inline void pkt_move(void *dst, void *src)
|
||||
{
|
||||
av_packet_move_ref(dst, src);
|
||||
}
|
||||
|
||||
static inline void frame_move(void *dst, void *src)
|
||||
{
|
||||
av_frame_move_ref(dst, src);
|
||||
}
|
||||
|
||||
#endif /* FFTOOLS_FFMPEG_H */
|
||||
|
||||
Reference in New Issue
Block a user