Skip to content

Commit 53209e2

Browse files
committed
Revert "Merge pull request #58 from michael-dm/feature/decoder-threading"
This reverts commit 286d4de, reversing changes made to 7b1fc08.
1 parent 286d4de commit 53209e2

File tree

3 files changed

+0
-58
lines changed

3 files changed

+0
-58
lines changed

src/decode.rs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ use crate::location::Location;
1919
use crate::options::Options;
2020
use crate::packet::Packet;
2121
use crate::resize::Resize;
22-
use crate::threading::ThreadingConfig;
2322
use crate::time::Time;
2423

2524
type Result<T> = std::result::Result<T, Error>;
@@ -33,7 +32,6 @@ pub struct DecoderBuilder<'a> {
3332
options: Option<&'a Options>,
3433
resize: Option<Resize>,
3534
hardware_acceleration_device_type: Option<HardwareAccelerationDeviceType>,
36-
threading_config: Option<ThreadingConfig>
3735
}
3836

3937
impl<'a> DecoderBuilder<'a> {
@@ -46,7 +44,6 @@ impl<'a> DecoderBuilder<'a> {
4644
options: None,
4745
resize: None,
4846
hardware_acceleration_device_type: None,
49-
threading_config: None,
5047
}
5148
}
5249

@@ -77,14 +74,6 @@ impl<'a> DecoderBuilder<'a> {
7774
self
7875
}
7976

80-
/// Set threading configuration.
81-
///
82-
/// * `threading_config` - Threading configuration.
83-
pub fn with_threading_config(mut self, threading_config: ThreadingConfig) -> Self {
84-
self.threading_config = Some(threading_config);
85-
self
86-
}
87-
8877
/// Build [`Decoder`].
8978
pub fn build(self) -> Result<Decoder> {
9079
let mut reader_builder = ReaderBuilder::new(self.source);
@@ -99,7 +88,6 @@ impl<'a> DecoderBuilder<'a> {
9988
reader_stream_index,
10089
self.resize,
10190
self.hardware_acceleration_device_type,
102-
self.threading_config,
10391
)?,
10492
reader,
10593
reader_stream_index,
@@ -371,7 +359,6 @@ impl DecoderSplit {
371359
reader_stream_index: usize,
372360
resize: Option<Resize>,
373361
hwaccel_device_type: Option<HardwareAccelerationDeviceType>,
374-
threading_config: Option<ThreadingConfig>,
375362
) -> Result<Self> {
376363
let reader_stream = reader
377364
.input
@@ -381,10 +368,6 @@ impl DecoderSplit {
381368
let mut decoder = AvContext::new();
382369
ffi::set_decoder_context_time_base(&mut decoder, reader_stream.time_base());
383370
decoder.set_parameters(reader_stream.parameters())?;
384-
385-
if let Some(config) = threading_config {
386-
decoder.set_threading(config.into());
387-
}
388371

389372
let hwaccel_context = match hwaccel_device_type {
390373
Some(device_type) => Some(HardwareAccelerationContext::new(&mut decoder, device_type)?),

src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ pub mod packet;
1313
pub mod resize;
1414
pub mod rtp;
1515
pub mod stream;
16-
pub mod threading;
1716
pub mod time;
1817

1918
mod ffi;
@@ -31,7 +30,6 @@ pub use mux::{Muxer, MuxerBuilder};
3130
pub use options::Options;
3231
pub use packet::Packet;
3332
pub use resize::Resize;
34-
pub use threading::{ThreadingConfig, ThreadingKind};
3533
pub use time::Time;
3634

3735
/// Re-export backend `ffmpeg` library.

src/threading.rs

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)