[vlc-devel] [PATCH] decoder: prefix some internal functions with their calling thread
Steve Lhomme
robux4 at ycbcr.xyz
Fri Sep 6 11:08:02 CEST 2019
On 2019-09-05 16:02, Thomas Guillem wrote:
>
>
> On Wed, Sep 4, 2019, at 16:16, Steve Lhomme wrote:
>> @@ -1697,10 +1697,10 @@ static void *DecoderThread( void *p_data )
>> static const struct decoder_owner_callbacks dec_video_cbs =
>> {
>> .video = {
>> - .format_update = vout_update_format,
>> - .buffer_new = vout_new_buffer,
>> - .queue = DecoderQueueVideo,
>> - .queue_cc = DecoderQueueCc,
>> + .format_update = DecoderOutputThreads_UpdateVideoFormat,
>> + .buffer_new = DecoderOutputThreads_NewVideoBuffer,
>> + .queue = DecoderOutputThreads_QueueVideo,
>> + .queue_cc = DecoderOutputThreads_QueueCc,
>> .get_display_date = DecoderGetDisplayDate,
>> .get_display_rate = DecoderGetDisplayRate,
>
> Why not renaming these ones ?
Because the patch says "some" functions. I didn't go through all of them.
These in particular seem to be called from decoder_SynchroChoose().
Which is currently only called in the "DecoderOutputThread" of libmpeg2.
>> },
>> @@ -1718,16 +1718,16 @@ static const struct decoder_owner_callbacks
>> dec_thumbnailer_cbs =
>> static const struct decoder_owner_callbacks dec_audio_cbs =
>> {
>> .audio = {
>> - .format_update = aout_update_format,
>> - .queue = DecoderQueueAudio,
>> + .format_update = DecoderOutputThreads_UpdateAudioFormat,
>> + .queue = DecoderOutputThreads_QueueAudio,
>> },
>> .get_attachments = DecoderGetInputAttachments,
>
> And this one.
I did not check this one. It's called by decoder_GetInputAttachments()
which is called on decoder opening (input thread ?).
>
>> };
>> static const struct decoder_owner_callbacks dec_spu_cbs =
>> {
>> .spu = {
>> - .buffer_new = spu_new_buffer,
>> - .queue = DecoderQueueSpu,
>> + .buffer_new = DecoderOutputThreads_NewSpuBuffer,
>> + .queue = DecoderOutputThreads_QueueSpu,
>> },
>> .get_attachments = DecoderGetInputAttachments,
>> };
>> @@ -1836,15 +1836,15 @@ static struct decoder_owner * CreateDecoder(
>> vlc_object_t *p_parent,
>> p_dec->cbs = &dec_video_cbs;
>> else
>> p_dec->cbs = &dec_thumbnailer_cbs;
>> - p_owner->pf_update_stat = DecoderUpdateStatVideo;
>> + p_owner->pf_update_stat =
>> DecoderOutputThreads_UpdateStatVideo;
>> break;
>> case AUDIO_ES:
>> p_dec->cbs = &dec_audio_cbs;
>> - p_owner->pf_update_stat = DecoderUpdateStatAudio;
>> + p_owner->pf_update_stat =
>> DecoderOutputThreads_UpdateStatAudio;
>> break;
>> case SPU_ES:
>> p_dec->cbs = &dec_spu_cbs;
>> - p_owner->pf_update_stat = DecoderUpdateStatSpu;
>> + p_owner->pf_update_stat =
>> DecoderOutputThreads_UpdateStatSpu;
>
> What about PluginThread_ or ModuleThread_ ? All these functions come from the module and are not necassarily called from an output thread.
I like ModuleThread_
>
>> break;
>> default:
>> msg_Err( p_dec, "unknown ES format" );
>> --
>> 2.17.1
>>
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
>
More information about the vlc-devel
mailing list