Skip to content

Commit

Permalink
test: Add additional tests to ffprobe (#341)
Browse files Browse the repository at this point in the history
  • Loading branch information
Euklios authored Aug 9, 2024
1 parent 221637f commit 4518bfc
Show file tree
Hide file tree
Showing 7 changed files with 469 additions and 41 deletions.
68 changes: 68 additions & 0 deletions src/main/java/net/bramp/ffmpeg/probe/FFmpegFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,72 @@ public class FFmpegFrame implements FFmpegFrameOrPacket {
public int nb_samples;
public int channels;
public String channel_layout;

public CodecType getMediaType() {
return media_type;
}

public int getStreamIndex() {
return stream_index;
}

public int getKeyFrame() {
return key_frame;
}

public long getPktPts() {
return pkt_pts;
}

public double getPktPtsTime() {
return pkt_pts_time;
}

public long getPktDts() {
return pkt_dts;
}

public double getPktDtsTime() {
return pkt_dts_time;
}

public long getBestEffortTimestamp() {
return best_effort_timestamp;
}

public float getBestEffortTimestampTime() {
return best_effort_timestamp_time;
}

public long getPktDuration() {
return pkt_duration;
}

public float getPktDurationTime() {
return pkt_duration_time;
}

public long getPktPos() {
return pkt_pos;
}

public long getPktSize() {
return pkt_size;
}

public String getSampleFmt() {
return sample_fmt;
}

public int getNbSamples() {
return nb_samples;
}

public int getChannels() {
return channels;
}

public String getChannelLayout() {
return channel_layout;
}
}
44 changes: 44 additions & 0 deletions src/main/java/net/bramp/ffmpeg/probe/FFmpegPacket.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,48 @@ public class FFmpegPacket implements FFmpegFrameOrPacket {
public String size;
public String pos;
public String flags;

public CodecType getCodecType() {
return codec_type;
}

public int getStreamIndex() {
return stream_index;
}

public long getPts() {
return pts;
}

public double getPtsTime() {
return pts_time;
}

public long getDts() {
return dts;
}

public double getDtsTime() {
return dts_time;
}

public long getDuration() {
return duration;
}

public float getDurationTime() {
return duration_time;
}

public String getSize() {
return size;
}

public String getPos() {
return pos;
}

public String getFlags() {
return flags;
}
}
5 changes: 5 additions & 0 deletions src/main/java/net/bramp/ffmpeg/probe/FFmpegStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.google.common.collect.ImmutableMap;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

import java.util.Collections;
import java.util.List;
import java.util.Map;

Expand Down Expand Up @@ -217,6 +218,10 @@ public Map<String, String> getTags() {
}

public List<SideData> getSideDataList() {
if (side_data_list == null) {
return Collections.emptyList();
}

return ImmutableList.copyOf(side_data_list);
}

Expand Down
Loading

0 comments on commit 4518bfc

Please sign in to comment.