Commit Graph

5 Commits

Author SHA1 Message Date
kingecg fd53f97770 feat: add Media Stream Reader high-level API
Add stream package providing StreamReader interface for reading media
streams from URLs (rtsp/http/https/ws) or io.Reader with optional
transcoding support.

- pkg/ffmpeg/stream/reader.go: Core StreamReader implementation
- pkg/ffmpeg/stream/options.go: TranscodeOptions configuration
- pkg/ffmpeg/stream/mediaInfo.go: MediaInfo and StreamInfo structs
- pkg/ffmpeg/stream/pipe.go: io.Reader to FFmpeg bridge
- pkg/ffmpeg/stream/errors.go: Error definitions
- pkg/ffmpeg/stream/helpers.go: Codec/format name converters
- pkg/ffmpeg/cgo.go: Add Duration/StartTime/BitRate/ChannelLayout methods
- examples/stream-reader/: Example demonstrating usage

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 07:48:45 +08:00
kingecg 03039dec91 Remove simple-transcode example binary 2026-03-20 21:49:56 +08:00
kingecg 387ecc992a Add .gitignore, enhance build script output, and implement codec context methods 2026-03-20 21:48:53 +08:00
kingecg 3fdc475316 添加构建脚本
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 21:12:45 +08:00
kingecg 8a258d8b60 Initial FFmpeg CGO bindings library structure
- Add CGO configuration with pkg-config for FFmpeg libraries
- Implement FormatContext for input/output operations
- Add Stream and CodecParameters wrappers
- Implement Codec/Context with encode/decode API
- Add Frame and Packet wrappers for media data
- Include error types and FFmpegError
- Add CLI tool and simple-transcode example

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 21:02:47 +08:00