[mythtv] FFmpeg plans

Brian J. Murrell brian at interlinx.bc.ca
Mon Apr 30 15:52:37 UTC 2018


On Mon, 2018-04-30 at 11:05 -0400, Peter Bennett wrote:
> Thank you Brian Murrell for the helpful information.

NP.

> 1. submodule would incorporate a reference to the FFmpeg repository
> in 
> MythTV.

Correct.

> This would not work because we have many customizations of 
> FFmpeg.

Correct.

> It could work if we created first our own FFmpeg repository.

Right.  Which is just taking the same approach as sub{tree|repo} but
doing the work tracking yourself manually.

> I 
> do not like that idea.

Indeed.  There is nothing about it to like.  :-)

> 2. subtree includes a copy of FFmpeg's repo in our repo.

Correct.  Although I don't think it's the whole "repo", where a repo is
every object ever created in a project and so includes all branches,
tags, etc.  Rather I think git subtree (and subrepo) are just taking
the content of a single branch and copying it to your subdir.

> We can 
> customize the code as we need.

Correct.

> We can also pull newer versions from 
> FFmpeg and it will merge in the changes.

Correct.

> Sometimes you may need to 
> resolve conflicts if they have changed code that we have customized.

Correct.

> 3. subrepo is a third party tool 
> (https://github.com/ingydotnet/git-subrepo) that seems to be almost
> the 
> same as subtree.

Correct.

> One difference is that if you make a subsequent commit 
> that includes changes to MythTV as well as to FFmpeg, subrepo
> separates 
> them into two commits.

TBH, I'm not entirely sure about that.  I generally use subrepo in the
submodule sense, where I never commit changes to the subrepo'd dir in a
consuming project but instead commit them upstream and then pull them
back down to the consumers.

For my use-case, in fact, I would actually be using submodule except
that that requires users of my module to know there is a submodule and
do the git submodule init/blah-blah and I don't want my users to know
they have to that and for CI systems to know they have to do it.

> My feeling about subrepo is that I would
> rather 
> stick with built-in features of git (subtree) than rely on a third
> party 
> addon that may not be supported in future.

That's fair enough.  But given that both are just keeping a copy of the
external module in a subdir locally in your module, I don't think there
is anything stopping you from switching at some point in the future. 
You might just have to do a bit of gluing of one method's metadata to
the other.  Or even simpler, you just make a patch of your changes vs.
upstream, blow the subdir away and then use a different method (i.e.
converting from subrepo to subtree) to recreate the subdir and then
apply your patch and you are switched.

> I believe that using subtree or subrepo requires that we use the
> master 
> branch of FFmpeg.

I'm not convinced of that.  At least with subrepo, you can choose which
branch you clone and track into the subdir.  If/when you want to change
the upstream tracking branch, worst case scenario (assuming the tool
doesn't have a way to change) is you do as above.  Create your patch
vs. upstream, blow the subdir away, recreate the subdir using
{subtree|submodule} and then apply your patch, fixing any conflicts,
etc.

Cheers
b.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mythtv.org/pipermail/mythtv-dev/attachments/20180430/4e15a525/attachment.sig>


More information about the mythtv-dev mailing list