Skip to content

Commit

Permalink
add h265 file for test
Browse files Browse the repository at this point in the history
  • Loading branch information
mpromonet committed Jan 18, 2025
1 parent b634616 commit 0c5f098
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/webrtc-streamer",
"args": ["-C", "config.json", "-a"],
"args": ["-C", "config.json", "-o"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
Expand Down
3 changes: 2 additions & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"Vaison-La-Romaine": {"video":"rtsp://176.139.87.16/axis-media/media.amp", "position":"44.238960,5.074610" },

"BigSky": {"video":"rtsp://76.75.8.120/axis-media/media.amp", "position":"45.284650,-111.368290"},
"Orlando": {"video":"rtsp://97.68.104.34/axis-media/media.amp", "position":"28.538340,-81.379240"}
"Orlando": {"video":"rtsp://97.68.104.34/axis-media/media.amp", "position":"28.538340,-81.379240"},
"H265": {"video":"file://h265.mkv"}

}
}
Binary file added h265.mkv
Binary file not shown.
4 changes: 3 additions & 1 deletion inc/NullDecoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@
#pragma once

class NullDecoder : public webrtc::VideoDecoder {
public:
public:
NullDecoder(const webrtc::SdpVideoFormat& format) : m_format(format) {}
virtual ~NullDecoder() override {}

bool Configure(const webrtc::VideoDecoder::Settings& settings) override {
RTC_LOG(LS_ERROR) << "Configure format:" << m_format.name;
m_settings = settings;
return true;
}
Expand Down Expand Up @@ -56,6 +57,7 @@ class NullDecoder : public webrtc::VideoDecoder {

const char* ImplementationName() const override { return "NullDecoder"; }

private:
webrtc::DecodedImageCallback* m_decoded_image_callback;
webrtc::VideoDecoder::Settings m_settings;
webrtc::SdpVideoFormat m_format;
Expand Down
2 changes: 1 addition & 1 deletion inc/NullEncoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class NullEncoder : public webrtc::VideoEncoder {
virtual ~NullEncoder() override {}

int32_t InitEncode(const webrtc::VideoCodec* codec_settings, const webrtc::VideoEncoder::Settings& settings) override {
RTC_LOG(LS_WARNING) << "InitEncode";
RTC_LOG(LS_ERROR) << "InitEncode format:" << m_format.name;
return WEBRTC_VIDEO_CODEC_OK;
}
int32_t Release() override {
Expand Down

0 comments on commit 0c5f098

Please sign in to comment.