qt: playlist: use item title if available
[vlc.git] / modules / demux / adaptive / plumbing / FakeESOutID.hpp
blob27283e56041b9436e6c21440522a45e0454738d7
1 /*
2 * FakeESOutID.hpp
3 *****************************************************************************
4 * Copyright © 2015 VideoLAN and VLC Authors
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU Lesser General Public License as published
8 * by the Free Software Foundation; either version 2.1 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
19 *****************************************************************************/
20 #ifndef FAKEESOUTID_HPP
21 #define FAKEESOUTID_HPP
23 #include <vlc_common.h>
24 #include <vlc_es.h>
26 namespace adaptive
28 class FakeESOut;
30 class AbstractFakeESOutID
32 public:
33 virtual ~AbstractFakeESOutID() = default;
34 virtual es_out_id_t * realESID() = 0;
35 virtual void create() = 0;
36 virtual void release() = 0;
37 virtual void sendData(block_t *) = 0;
40 class FakeESOutID : public AbstractFakeESOutID
42 public:
43 FakeESOutID( FakeESOut *, const es_format_t * );
44 virtual ~FakeESOutID();
45 void setRealESID( es_out_id_t * );
46 virtual es_out_id_t * realESID() override;
47 const es_format_t *getFmt() const;
48 virtual void create() override;
49 virtual void release() override;
50 virtual void sendData(block_t *) override;
51 bool isCompatible( const FakeESOutID * ) const;
52 /* Ensure we won't issue delete command twice */
53 void setScheduledForDeletion();
54 bool scheduledForDeletion() const;
56 private:
57 FakeESOut *fakeesout;
58 es_out_id_t *p_real_es_id;
59 es_format_t fmt;
60 bool pending_delete;
64 #endif // FAKEESOUTID_HPP