Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass Http Headers in setDataSource ijkMediaPlayer #71

Closed
MehdiFal opened this issue Sep 7, 2014 · 1 comment
Closed

Pass Http Headers in setDataSource ijkMediaPlayer #71

MehdiFal opened this issue Sep 7, 2014 · 1 comment

Comments

@MehdiFal
Copy link

MehdiFal commented Sep 7, 2014

Hello,

I would like to add some http headers (to sign the requests to the server), I noticed that in the IjkMediaPlayer class there is the setDataSource method :

@OverRide
public void setDataSource(String path) throws IOException, IllegalArgumentException, SecurityException, IllegalStateException {
mDataSource = path;
_setDataSource (path, null, null);
}

private native void _setDataSource(String path, String[] keys, String[] values) throws IOException, IllegalArgumentException, SecurityException, IllegalStateException;

I can see that the first "setDataSource" method calls the native one with null / null for keys / values.

What are these 2 args ? are they useful to add some http headers to the setDataSource ?

if no, how can I do that ?

Thank you.

@bbcallen
Copy link
Contributor

These 2 args have no use for now.

You can do that with setAvFormatOption()
Supported http options could be found at libavformat/http.c

http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavformat/http.c;h=018d25c9d73f4338bf4bc1d99a4de7a6fea29913;hb=HEAD

Remember to check whether the options are too new. ijkplayer is based on ffmpeg 2.2 for this moment.

jss-tg pushed a commit to TranscodeGroup/ijkplayer that referenced this issue Feb 25, 2022
* build: upload aar artifact to github action

* fix: upgrade ffmpeg tag, fix mov seek crash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants