Comments (4)
Something like this is what you want for calling out and getting the cutpoints, though it probably needs splitting up a bit, as we would need the addMessageListener just once, but the ability to fetch the cutpoints multiple times:
HtspMessage message = new HtspMessage();
message.put("method", "getDvrCutpoints");
message.put("id", Integer.parseInt(recordingUri.getPath().substring(1)));
try {
mConnection.addMessageListener(new HtspMessage.Listener() {
@Override
public Handler getHandler() {
return null;
}
@Override
public void onMessage(@NonNull HtspMessage message) {
HtspMessage[] cutpoints = message.getHtspMessageArray("cutpoints", null);
// TODO: Null check...
for (HtspMessage cutpoint : cutpoints) {
Log.d(TAG,"Cutpoint: Type=" + message.getInteger("type"));
}
}
});
mConnection.sendMessage(message);
} catch (HtspNotConnectedException e) {
e.printStackTrace();
}
As for where it belongs, humm. I suspect TvheadendPlayer
is currently the right place for the parsed data to end up - it's the player, and it should be responsible for monitoring the current presentation timestamp, and triggering the seek where necessary. The code above can be called from TvheadendPlayer.buildHtspRecordingMediaSource
or maybe TvheadendPlayer.onLoadingChanged
.
Looking at the hacky fast forward / rewind code I pushed a few minutes, as well as things like the radio info screens, I'd like to at some point refactor those behavious out of the main player class - but - thats future plans ;)
from android-tvheadend.
If you're still stuck, post the code to a PR and I'll see if I can spot anything on Tuesday (holidays until then!)
from android-tvheadend.
Awesome, thanks for that. I'll implement EDL support tonight.
from android-tvheadend.
I've come across bit of a stumbling block - the Target in #createMessage doesn't seem to get called for me. I suspect this is due to the same issue that means the current time is stuck on 0:00 (the duration seems to be fine). I don't know enough about ExoPlayer to try fixing this though.
from android-tvheadend.
Related Issues (20)
- Channel not starting - hangs on loader
- Possible to implement a Plex Live TV plugin
- Update ExoPlayer to 2.7.x HOT 2
- TVHeadend Settings Menu
- The Dev Jenkins needs a bit of attention!
- Channels not loading after a a few hours HOT 3
- Whats the trick for rewind timeshift? HOT 8
- Support server without authentication HOT 1
- Feature Request - Logos on client setup HOT 1
- Audio/Video sync issues HOT 3
- Channel information pop-up window stays and doesn't vanish.
- Feature request- Add launcher Channel support for Oreo. HOT 3
- Playback broken with Shield Experience 7.0 HOT 5
- technicolor skipper - TVheadend doesn't start
- No video output on SD channels. HD channels work fine HOT 5
- Constantly dropping frames on WiFi HOT 2
- ExoPlayerImplInternal: Internal runtime error HOT 2
- Black Screen HOT 1
- Is the project dead?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-tvheadend.