Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better debug #293

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

joaoantoniocardoso
Copy link
Collaborator

No description provided.

Comment on lines 63 to +80
sink_id: uuid::Uuid,
#[derivative(Debug = "ignore")]
pipeline: gst::Pipeline,
#[derivative(Debug = "ignore")]
queue: gst::Element,
#[derivative(Debug = "ignore")]
proxysink: gst::Element,
#[derivative(Debug = "ignore")]
_proxysrc: gst::Element,
#[derivative(Debug = "ignore")]
_transcoding_elements: Vec<gst::Element>,
#[derivative(Debug = "ignore")]
appsink: gst_app::AppSink,
#[derivative(Debug = "ignore")]
tee_src_pad: Option<gst::Pad>,
#[derivative(Debug = "ignore")]
flat_samples_sender: tokio::sync::broadcast::Sender<ClonableResult<FlatSamples<Vec<u8>>>>,
#[derivative(Debug = "ignore")]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is ugly, maybe we could change it to an internal struct, like:

struct Inner {
    pipeline: gst::Pipeline,
    queue: gst::Element,
    proxysink: gst::Element,
    _proxysrc: gst::Element,
    _transcoding_elements: Vec<gst::Element>,
    appsink: gst_app::AppSink,
    tee_src_pad: Option<gst::Pad>,
}

#[derive(derivative::Derivative)]
#[derivative(Debug)]
pub struct ImageSink {
    sink_id: uuid::Uuid,
    #[derivative(Debug = "ignore")]
    inner: Inner,
    flat_samples_sender: tokio::sync::broadcast::Sender<ClonableResult<FlatSamples<Vec<u8>>>>,
    pad_blocker: Arc<Mutex<Option<gst::PadProbeId>>>,
    pipeline_runner: PipelineRunner,
    thumbnails: Arc<Mutex<CachedThumbnails>>,
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the consequences of such approach ? If there are none, we could just change the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants